texts: Why is this VHDL pseudo random number generator not working as expected?

texts:
I'll start off by saying I have about 2 days experience in VHDL so there's a strong chance my code is horrible. I would appreciate any tips on better VHDL practice. I am busy trying to simulate a Tausworthe pseudo random number generator as shown below. I've coded it in python so that I have some binary numbers for the first few iterations to compare my VHDL simulation with.

In VHDL I have the following.

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.NUMERIC_STD.ALL;

entity Tausworthe is
Port(
    clock : in STD_LOGIC;
    reset : in STD_LOGIC;
    data:   out STD_LOGIC_VECTOR (31 downto 0)
);

end Tausworthe;

architecture Behavioural of Tausworthe is

    signal s0,s1: std_logic_vector(31 downto 0) := x"00002710"; -- stages
    signal output: std_logic_vector(31 downto 0) := x"00000000";
    signal s0int1,s0int11,s0int12,s0int21,s0int22,s0int23: std_logic_vector(31 downto 0) := x"00000000"; -- intermediate signals for s0
    signal b0,b1: std_logic_vector(31 downto 0) := x"00000000"; -- Intermediate b signals for each branch
    signal snext0,snext1,snext2,snext3: std_logic_vector(31 downto 0) := x"00000000";
    signal s1int1,s1int11,s1int12,s1int21,s1int22,s1int23: std_logic_vector(31 downto 0) := x"00000000"; -- intermediate signals for s1

begin
    PROCESS(clock)
    BEGIN
      IF (rising_edge(clock) AND (reset='1')) THEN

        s0 <= x"00002710";
        s1 <= x"00002710";

      ELSIF (rising_edge(clock)) THEN

        -- Here I'm coding the logic for the generator which includes the
        -- Shifts, XORs and ANDs. Intermediate signals are named according to branch
        -- s0,s1 then int (for intermediate) and 11,12,13,14 etc

        -- For first branch

        s0int1 <= (s0(25 downto 0) & "000000"); -- Shift left by 6
        s0int12<= (s0int1 XOR s0);
        b0 <= ("0000000000000" & s0int12(31 downto 13)); --Shift right by 13
        s0int21 <= (s0 AND x"FFFFFFFE");
        s0int22 <= (s0int21(13 downto 0) & "000000000000000000"); --shift left by 18
        snext0 <= (s0int22 XOR b0);

        -- For second branch

        s1int1 <= (s1(29 downto 0) & "00"); -- Shift left by 2
        s1int12<= (s1int1 XOR s1);
        b1 <= ("000000000000000000000000000" & s1int12(31 downto 27)); --Shift right by 27
        s1int21 <= (s1 AND x"FFFFFFF8");
        s1int22 <= (s1int21(29 downto 0) & "00"); --shift left by 2
        snext1 <= (s1int22 XOR b1);

        output <= (snext0 XOR snext1);

      END IF;

      data <= output;

    END PROCESS;

end Behavioural;

When simulating in Modelsim I get the following. After the initial zeros the 32 bit value immediately after matches the binary of the first value I expect from my python simulation. However after this the binary doesn't match any of my values and the output doesn't seem to update. What I'm expecting is that the binary value will update after some regular amount of clock cycles. Could anyone point me in the right direction as to why this is not the case and does not happen? Perhaps my use of the process is incorrect.


texts: Power supply charging backup power - current flow via mosfet

texts:
I have following diagram on falstad

Top +5V is main PSU (12V 10A). Bottom +5V is battery (12V 2.3Ah). I have load about 2-3A so I dont think diode is good solution. Well I am trying to achieve following: While PSU is plugged then run circuit from PSU and charge battery. When it comes to power outage I would like to run circuit from battery.

What is not working? I dont know if its falstad issue or not but while PSU is active there is no current flowing to battery via resistor. Also I forgot to mention if there is power outage on PSU I definitely not want to charge PSU from battery (thats why there is mosfet) because behind mosfet will be 2 resistors to measure voltage by IC to notify user there is power outage.


texts: Voltage through resistor connected to tesla coil

texts:
I have been reading up about tesla coils and wondered what happens in a tesla coil circuit.

If I have a tesla coil producing around 40KV in close proximity (around 10mm spark gap) to a metal pin that is connected to a 1 ohm resistor and then ground, what value would I expect to see if I measured across (assuming that there was an arc between the tesla coil and metal pin):

The spark gap
The resistor

Would the total voltage that I measured be equal to the 40KV from the tesla coil, and would the voltage across the resistor be equal to or a lot less than the 40KV of the tesla coil?

Thanks


texts: Power dissipation of TLC6C5712-Q1 LED Driver IC

texts:
I am using this TI LED Driver IC to drive 9 LEDs

I want to calculate the Power Dissipation of the Resistor (20k 1% 0402) which I have connected to the IREF pin.

To calculate the power dissipation of that resistor, I am using ((V^2)/R) formula, where I am taking V in the range given in that datasheet as (1.204V to 1.254V) - Referring 6.5 section, page 5. Am I correct? And is the current through the 20k resistor sourced from the Vcc supply or from where?

Also I am trying to calculate the overall power dissipation and the Junction temperature of the IC.

Since TLC6C5712-Q1 does not have internal MOSFETs, how to calculate the power dissipation of the IC.

Can someone help me how this LED Driver IC internal architecture is different from LED Driver IC which has internal MOSFETs.


texts:
I was wondering why using different AC frequency makes some devises not working.

I found that I do not need to adjust frequency for using electric heat or electromagnetic wave such as
・rice cooker
・toaster
・stove
・light bulb
・TV
・radio

And for these appliance, I do not need to change the frequency but it will behave differently under different frequency. They are using motor.
・vacuum cleaner
・food processor
・fan
・fridge

For these appliance, I need to convert frequency.
・washing machine
・clothes dryer
・video tape recorder
・fluorescent light
・clock
・microwave oven

The thing I felt strange is that washing machine and clothes dryer also uses motor. Although, they cannot be used in wrong frequency. In electronic devises, why frequency matters? Is it related to clock frequency? And why there is a motor device that can be and can't be used in different frequency?


texts: 220 volt ac to 12 v dc converter without voltage regulator

texts: I want to design Additional RC Filter. My input is 220V AC and I want to observe 12 V DC output. I am designing 100 Hz with a full-wave bridge rectifier. My question how can I find the output of rectifier's Vdc and Vrms values?


texts:
Lets put it simply:

The aim is to rectify the high frequency/high voltage (i.e. 200 kHz, 100 kV) output to 12-24-48 V DC.

or

Modulate (possible amplitude modulation?) the HF/HV output with 50 Hz.

and compare which one of these two methods is more efficient at the output.
The question is how to rectify the HV/HF Tesla secondary(L2) output. What are (if there are any) the appropriate diode rectifiers that are capable of handling HF and HV outputs?


texts: Why do the 12 V and 5 V rails of a PSU briefly drop when the only 12 V load is removed?

texts:
I am using a 24 PIN 875W PSU (Dell H875EF-00) for some experiments. PINs are like here (Version 2.0):

I am using the +12V1 DC from PIN 10 and some COM ground (I dont remember which ground is used for the halogen light and which one is used for the Arduino after cutting and resoldering them). +5VSB is connecto to VIN of an Arduino, another COM is GND for Arduino and PS_ON is shorted to a GND of the Arduino.
I am using the +12V1 DC on a Philips H7 halogen light that is 12V 55W. According to the PSU label the 12V connectors can handle up to 18A, so no issues there. I have fixed the +12V to the halogen light. When I make contact with one of the COMs it lights up neatly and all the other components attached to the PSU work as desired. When I remove the jumper cable that connects the COM to the ground of the halogen light the PSU resets (clicking noise of the relais). Standby power still works (nothing happens to the arduino) but for example the R-PI connected to the 5V active supply also resets.
Am I supposed to "switch" the "live" wire for the halogen light? I was under the impression that for DC that does not matter. It is not over current as the light shines until I disconnect the ground from it, even for several seconds. To reiterate: The PSU resets when 12V load/ground is disconnected
Does anyone know why this happens?
Connections:

Switch connected --> Light on
Switch disconnected (after connected) --> Light off, but PSU resets


texts: How do remaining two phases act as return path in three phase system

texts:
Since they are out of phase one against the other then there is a potential difference between them and the one that is on the higher potential is enclosed in the lower one.

This is my assumption, so I'm wondering if it is true and if it is not how the rest of the phases at a certain point become current return path.


texts: Why electric company sell the electricity according to real power?

texts:
Electric company in some countries apply financial penalty for electricity consumers which have power factor lower than 0.9
If electric companies charged customers for apparent power, people would be encouraged to buy electric devices with better power factor because they will pay for Volt X Amp. Also, the company wouldn't need need to check the power factor of the consumer every day.

I think this could be more economic for the electric company.

So I'm wondering why the electric company doesn't sell the electricity according to Apparent power, so people are responsible for power factor correction, not the company.


texts: Beginner question, but I am confused on how to tell between analog and digital and applying it to everyday life. For example, what would school grades be, or a photo from kodak film? I know analog is supposed to be continuous but how do I apply it to these scenarios?


texts: Series internal resistance of Power Supply

texts:
I have this power supply - GPC-3030D

There are 3 independent channels. 2x (30V/3A) and 1x (5V/3A)

To find the internal resistance of the voltage source channels, its just 30V/3A = 10Ohms and 5V/3A = 1.66Ohms.

Is it correct?


texts: ICD3 + PIC + MPLAB: Target Device ID 0x0 does not match expected Device ID

texts:
We designed a board with a Microchip PIC24HJ256GP610A on it. We've successfully used an ICD3 to program and debug the PIC on the Explorer 16 development board. We think we've followed the design guidelines found in Debugger's User's Guide:

Edit:
We use a 4.6k pullup resistor between MCLR and VDD.

Our PCEG/PGED interface are pins 26/27 on the PIC. These lines are exclusively connected to the chip and not used for anything else.

We power our board externally and the PIC is connected to this power supply circuit (3.3 Volts, enough power from this source).

Edit:
We use some decoupling capacitors on our supply rails (C2, C8, C9 and C16, C18):

However, when we try to connect and upload our program to the PIC, we get the following message in MPLAB X's output window:

Target detected
Target Device ID (0x0) does not match expected Device ID (0x77b0000).

This is an excerpt from our board's layout:

Can someone see the error or explain what could go wrong?


texts: Designing system for multiple SPI and I2C slaves

texts:
I'm designing a system that has 2 SPI slaves and 3 I2C slaves. The master for all of the communication is STM32F429, which has 6 SPI and 3 I2C peripherals. I think I have two options: 1) use a different peripheral for each slave device (5 peripherals in total), we'll call this SEPARATE or 2) use one SPI for both SPI slaves and one I2C for all 3 I2C slaves (2 peripherals in total), we'll call this COMBINED.

My question is:

What are the pros/cons of using SEPARATE vs COMBINED?

Pro COMBINED: Routing for COMBINED is simpler because shared lines
don't have to all go all the way back to the micro.
Pro COMBINED: Extra pull-up resistors will be required for SEPARATE for each I2C bus.
Pro SEPARATE: If I use the DMA, I can initiate every transfer simultaneously without taking up cpu time, and perform cpu operations
once all the data arrives (is this true?)
Pro SEPARATE: Any I2C devices that are slower won't hold up the other I2C slaves since they're on separate buses.
What other pros/cons are there?


texts:
I have a toy that works with 3 AA Batteries in series. I switched to NiMH batteries but my voltage is less now.
Do you think that the middle Battery in the series can be swapped to a 14500 Li-ion?
That way it runs in between 2 NiMH batteries and the total voltage would be 5.1 in a perfect world, with more mAh.
What would happen? The toy is a GPi Case running a Raspberry Pi Zero, or upgraded to a CM3 module if I wanted.


texts: Is there a Cortex-M3 with external voltage regulators?

texts: Does anyone know of an ARM Cortex-M3 microcontroller with both the 3.3V peripheral and 1.8V core voltages supplied by external sources?  Everything I have found so far has an internal regulator for the 1.8V CPU core.  My problem is that I'm working in a high temperature environment and the internal regulators all have a thermal shutdown circuit to protect the chip which shuts the 1.8V off at 125C.  I would like to supply the 1.8V with my own extended thermal protection that will run up to 200C but have not been able to find a microcontroller that will accept one.


texts:
Ok so in the last couple of days I did a lot of research to get everything to work. What I want to do is make a dB sensor with the Arduino. I made the following circuit:

To make the supply voltage for the op-amp U1 I have used the following as power supply:

I have set the values of the first circuit to the following:

R1=2200 ohm (this matches with the internal resistance of the mic)
C1=100nF
R2=38100 (To match the Fcut of 50 Hz)
R6=100k ohm
R7= 1k ohm
R3=r4=1kohm
D1,C3,R5 are currently left out ,because there are some problems earlier on
R3=R4=1kohm , therefore there will be added a offset of 2.5 volts
The op-amp is a lm741
Mic datasheet: http://www.farnell.com/datasheets/1660938.pdf

I have made the amplification of the op-amp 100, because of I wanted the max. value of 2.5 volts to be around that decibel level. The maximum that will be measured is 2.5 volts. The sensitivity of the mic is -41 dB by 94 decibel and that (thanks to andy aka) will/should become 2.5 volts (peak voltage) when measuring.

The big problem is that I only get 200 mV at max (I tested with 90dB-100dB). What could be the problem? Any error in the schematic, please tell me I am really learning a lot right now over this topic!


texts: Device only reading a voltage on tester when touched.

texts:
I have a client that has a pair of class 2 sewing machines that have a metal plate which keeps giving them a small shock.

Having tested them both they are showing 0v when the machin is on. At least this is the case until the same metal component is touched at which point both machines read around 30v.

Any idea on the cause?


texts: Low voltage cutoff circuit with PV panel

texts:
I'm trying to build a simple reliable low voltage cutoff circuit and sufficient voltage turn on circuit for a PV panel powered circuit. The idea was to supply power from PV panel to a working circuit when sufficient Power is available else cut it off from the panel.
I tried to build a simple circuit to achieve this but It's quite not working reliably. I was trying to trigger a sugar cube relay (12v) when sufficient voltage is available at the panel. Please take a look at the following circuit.

simulate this circuit – Schematic created using CircuitLab

The problem I'm facing is Its collector to emitter voltage is not dropping to its near saturated value even if the base is supplied with the current and relay does not turn on.

Thank you community for lots of help in the past.

Edit :

Driving a thyristor  using BJT.

simulate this circuit


texts: Why do I get the wrong answer when determining the charge in a capacitor using definition of voltage?

texts:
I want to determine the charge in a capacitor. I didn't remember the formula for it, \$Q = C \cdot V\$, so I tried to derive it. This is how I went forwards. I've made the assumption that the capacitor has no initial charge.
\$v = \frac{dw}{dq} \Leftrightarrow dw = v \space dq \Rightarrow \int dw = \int v \space dq \Rightarrow w = v \space q\$.

Since the energy stored in a capacitor is \$w = \frac{1}{2} C v_c^2\$, I tried to plug this in which results in the equation for charge: \$q = \frac{1}{2} C v_c\$.

This is half of the expected value, so where it the faulty logic here?

If I start by using the definition of current, I get the correct equation:

\$i = \frac{dq}{dt} \Leftrightarrow dq = i \space dt \$

\$i_c = C \frac{dv_c}{dt} \Leftrightarrow i_c \space dt = C \space dv_c\$

\$dq = C \space dv_c \Rightarrow q = C \space v_c\$


texts: I want to design buck converter for 385VDC to 48VDC for that I  calculated the values of component and simulated it with proteus but I am not getting the desired output. What is wrong? PWM has a 20v amplitude as given in IRF740 data sheet. And 20kHz   frequency and 12% duty cycle.


texts: Signal path / configuration help for a PLL for AWG

texts:
In our system signal path, there is a clock signal being sent from the FPGA noted as SCLK. This goes to each component not including the MCU.
The  way I understand this is that the PLL receives the SCLK signal and the output signal from the DAC
Top Level

COMPin is mapped as SCLK and DACOut is the DAC output signal we're trying to lock with the SCLK.
Do we have this misconfigured? I keep going in circles while reading the datasheet and realize I don't understand the function of the PLL. Any recommendations or guidance would be greatly appreciated. I can include more context if needed but for this stage in the process we're just outputting our signal from the DAC to the PLL and finally to the filter.
PLL Schematic

PLL Part
https://www.ti.com/lit/ds/symlink/cd74hc7046a.pdf?HQS=dis-dk-null-digikeymode-dsf-pf-null-wwe&ts=1616775891129


texts:
I am looking for an SPO2 sensor where I can mount on the wrist.

but most data sheets do not specify whether sensors can be used in wrist-mounted devices.

they mention fitness or just wearables, I tested max30102 and max30100, work only for finger no other skins,

max86150 also mentions ECG and spo2 ppg workable, but not mention whether spo2 can be measured from the wrist.

found that green led for wrist due to low blood flow compared to fingers

also for spo2 red led or IR is must

how to find out before purchasing whether the sensor works for the wrist?


texts: Looking at the schematics of the STM32F4-Discovery board page 28, whose screenshot is attached below.. there is a Zero Ohms resistor 'R25' which is shown in the circuit with the Crystal. And there is an actual physical 0R resistor on the PCB board at this place. I wonder what is the purpose of a zero ohms resistor with Crystal?


texts: Coil in magnetic field. Voltage step response

texts:
Say we have a coil in magnetic field as shown below (two empty squares are magnet poles). Now imagine we give some voltage pulse across the terminals.

I wonder how would current (its magnitude and rise/fall times) depend on angle between magnetic induction B and coil axis. What processes are involved? How is it possible to sense coil orientation using it? I also would like to see the equations.


texts: VHDL Value of integer signal increase twice instead of once

texts:
I just created this project to get a clearer understanding of why the values of check1 and check2 to increase once we enter the state assigned but for some reason, it increases again the moment we go to the next state. Am I making any mistakes?

The Code

LIBRARY IEEE;
USE IEEE.std_logic_1164.ALL;
USE IEEE.std_logic_unsigned.ALL;
USE IEEE.numeric_std.ALL;
USE IEEE.math_real.all;

ENTITY Test IS

GENERIC(
    -- Define Generics
     N :natural := 10 -- Length of Codeword Bits
);

PORT(
    -- Clock and Reset
    clk : IN std_logic;
    rstb : IN std_logic;

    -- Input Interface I/O
    isop : IN std_logic

);

END Test;

ARCHITECTURE behav OF Test IS

-- Define State of the State Machine
TYPE state_type IS (ONRESET, IDLE, ONE, TWO, DONE);

-- Define States
SIGNAL current_state, next_state : state_type;

-- Define Signals
SIGNAL check1 : integer;
SIGNAL check2 : integer;

BEGIN

    clock_state_machine:
    PROCESS(clk,rstb)
    BEGIN
    IF (rstb /= '1') THEN
    current_state <= ONRESET;
    ELSIF (clk'EVENT and clk = '1') THEN
    current_state <= next_state;
    END IF;
    END PROCESS clock_state_machine;

    sequential:
    PROCESS(clk,rstb)
    BEGIN

    CASE current_state IS

    WHEN ONRESET =>
    next_state <= IDLE;

    WHEN IDLE =>
    IF( isop = '1') THEN
    next_state <= ONE;
    ELSE
    next_state <= IDLE;
    END IF;

    WHEN ONE =>
    next_state <= TWO;

    WHEN TWO =>
    next_state <= DONE;

    WHEN DONE =>
    next_state <= ONRESET;

    WHEN OTHERS =>
    next_state <= ONRESET;

    END CASE;
    END PROCESS sequential;

    combinational:
    PROCESS(clk,rstb)
    BEGIN

    IF (current_state = IDLE ) THEN
        check1 <= 0;
        check2 <= 0;
    END IF;

    IF (current_state = ONE  ) THEN
        check1 <= check1 + 1;
    END IF;

    IF (current_state = TWO ) THEN
        check2 <= check2 + 2;
    END IF;

    END PROCESS combinational;

END behav;

The testbench

LIBRARY IEEE;
USE IEEE.std_logic_1164.ALL;
USE IEEE.std_logic_arith.ALL;
USE IEEE.std_logic_unsigned.ALL;
USE IEEE.numeric_std.ALL;
USE IEEE.math_real.all;

ENTITY test_Test IS
GENERIC(
    -- Define Generics
     N :natural := 10 -- Length of Codeword Bits
);

END test_Test;

ARCHITECTURE behav OF test_Test IS

COMPONENT Test IS

PORT(
    -- Clock and Reset
    clk         : IN std_logic;
    rstb        : IN std_logic;

    -- Input Interface I/O
    isop        : IN std_logic
);

END COMPONENT;

-- Define Signals

    signal CycleNumber : integer;

    signal clk_i        : std_logic;
    signal rstb_i       : std_logic;
    signal isop_i       :  std_logic;

BEGIN

    -- Generate Clock
    GenerateCLK:
    PROCESS
    VARIABLE TimeHigh : time := 5 ns;
    VARIABLE TimeLow : time := 5 ns;
    VARIABLE CycleCount: integer := 0;

    BEGIN
    clk_i <= '1';
    WAIT FOR TimeHigh;
    clk_i <= '0';
    WAIT FOR TimeLow;

    --Handle Reset
    CycleCount := CycleCount + 1;
    CycleNumber <= CycleCount AFTER 1 ns;

    END PROCESS GenerateCLK;

    -- Generate Global Reset
    GenerateRSTB:
    PROCESS(CycleNumber)
    VARIABLE ResetTime : INTEGER := 2000;

    BEGIN
    IF (CycleNumber <= ResetTime) THEN
        rstb_i <= '1' AFTER 1 ns;
    ELSE
        rstb_i <= '0' AFTER 1 ns;
    END IF;
    END PROCESS GenerateRSTB;

    -- Port Map Declaration
    myTest: Test    PORT MAP(   clk => clk_i,
                            rstb => rstb_i,
                        isop => isop_i
                        );
    -- Perform Test
    Do_Test:
    PROCESS
    BEGIN

    WAIT FOR 20 ns;

    isop_i  <= '1';
        WAIT FOR 15 ns;
    isop_i  <= '0';

    WAIT FOR 100 ns;

    END PROCESS Do_Test;

END behav;

This is picture of the simulation results


texts:
The Input connector on Agilent/Keysight 4339B is atypical.

A "normal" or most common triax has two or three lugs, on the outer rim of the male, and the female has corresponding nothces to fit and to lock onto with a twist movement (same way as BNC does). This type has screws on both male and female.

The 4339B was manufactured in the 80's (I think, and in Japan I think) for high resistance measurements so the 3rd guard was for eliminating leakage current through the cable insulation. The info is not included in the user, maintenance, or accessories manuals of the instrument. The manufacturer company has merged and people who made this are not accessible anymore.

Does anyone know what the Input connector make and model these are (both male and female)?

Male

Both

Female side view

Female


texts: Why is a binary system used instead of decimal system when interpreting voltages?

texts:
In physical computing, binary is used to perform calculations.  Typically, 1 corresponds to high voltage (3V-5V), and 0 corresponds to low voltage (0V-2V).
Perhaps it is not feasible due to the amount of precision involved, but why is it that people do not use a higher base system such as decimal or hexadecimal when interpreting voltages?
The thought behind this is that if a computational system divides a range of voltages into 10 discrete sub-ranges, then couldn't computational speed be increased?
Instead of using 0V-2V and 3V-5V, perhaps something like the following could be used:

I realize that the voltage ranges cannot be be too high; so, if the voltage range of  0V-5V was split up into 10 intervals instead, would there be any issues?


texts: Can I use ATtiny SPI and still be able to do in-system programming?

texts: I'm building a cost sensitive device that requires SPI and a single analogue comparator. Looking at the spec, ATtiny20 or ATtiny48 would fit the bill. The requirement is to be able to program it in circuit, however if I understand correctly, AVR Dragon programmer is also using SPI. Is it possible to use SPI for my requirements and program MCU at the same time?


texts: Two 240-12 V wall warts in parallel through LM2596 buck regulator to increase available current

texts:
I have two wall wart 240 - 12 V power supplies rated at 1.3 amps and 1.2 amps. My project uses a couple of solenoid valves, relays, a 12 V pump and some fans. All these will bring peak consumption to around 1.5 amps (and the pump may pull this a little higher if working hard).

My plan was to take these two power supplies and hook them up to an LM2596 buck regulator circuit in order to increase the available current. I say LM2596 because it's the only regulator IC I have at the moment, and it seems they can be run at 'unity' 12-12 V according to the datasheet here. Considering my circuit will be well within the total final current output, are there pitfalls to this approach? I actually will have some buck/boost regulator ICs soon, so would this be preferable?
Thanks!


texts: How to gauge safety of cheap Lipo batteries?

texts:
I see a ton of cheap 12V lipo batteries for sale on Ebay, but other than the mAh rating, I can't find any info or datasheets on how to safely operate them. I'm looking for a good battery to power a couple of small gear motors, so I'd like to know the maximum safe continuous discharge rate. I've emailed several of these retailers, which all seem to be based in China, and everyone one of them has basically said, "sorry, we don't know". These batteries are interesting in that they include a compact built-in charging circuit, and I'm no where near confident enough to design my own. However, the lack of documentation makes me nervous.

Are these cheap Chinese batteries junk, or can they be used safely? Is there somewhere that provides a basic datasheet for them?

A lot of guides I've read on how to safely use lipo batteries read like you're handling a bomb that might explode at any moment. e.g. "never leave unattended" and "always store in a fireproof container". Are these concerns still justified? A lot of cellphones and laptops include these batteries and don't come with similar warnings. I just don't want to plug in one of these Chinese batteries to charge overnight and wake-up to a house fire.


texts: NPN transistor to drive a relay and IRF520 by ESP32 digital pin (3.3v)

texts:
I'm working on an automatic grow system that use sensors and actuators to keep cultivation in its optimal state, managing growth parameters dynamically.

My first prototype was made with ESP8266 (nodemcu 0.9) but 3.3v of digital pins are too low to switch well relays and MOSFET in saturation and i needed more pins for all components.

After i decided to use a strange Mega2560 + esp8266 pre-soldered (All in one) but it seems to me a unreliable solution also if 5v make relays and MOS works well. (https://win.adrirobot.it/wemos_mega/wemos_mega.htm).

i thinks ESP32 DEV KIT can works well in this configuration (it has several analog and digial gpio) but it remains the problem about 3.3v of GPIO.

Here is the list of actuators that I would like to drive by digital pins of an esp32:

PC fan ---> MOSFET IRF520 (on a board) to use PWM
water pump -----> mosfet board as switch (relay make noise)
LED lamp ------> 5v relay on board (with led and some resistors)

my best solution was use a NPN transistor (np2222a) connected to 5v between ESP32 and relay and all works well.
Also MOSFET seems to open well but i think it isn't in saturation.

I'm here to ask someone more expert for advice and maybe suggestions

Moreover, anyone can help me to understand the value of resistors that i have to put in this circuit??
Now I have put "common" values looking on the internet but I have not understood if they are correct.
I don't know also if the circuit i'have made is right.
The photos are limited to a demo of actuators diving circuito.

p.s. sorry for my english ;)

Emiliano


texts: Ideal diode - PNP emitter-base breakdown voltage question (PMOSFET)

texts:
I'm hoping to create this ideal diode. With 12V.

However, I feel like this would require the two PNP transistors to have an emitter-base breakdown voltage of 12V or more. Is this correct? (Such PNP transistors do not seem to exist.)

This page seems to strongly suggest that this can be used with 12V.

https://birds-are-nice.me/ipfs/QmSYsdRafbq19UzocGmWnkt9Gn3CuZga2TXvDKXFGQtJvw/

Does this circuit require emitter-base breakdown voltage of 12V or more? If not why not? And if so, what alternative can I use for a 12V ideal diode?

I was also thinking of using 4.7K for both R2 and R3. Is there a reason that they are different values in the diagram?


texts: How can I make LTSpice calculate the transient response starting from a time different than t=zero?

texts:
I'm creating a schematic and I'm trying to simulate it using LTSpice.
However, my RC time constant is quite large, and I'd like Spice to simulate only from around 10ms onward. I know that if i set .trans to 10ms, it will simulate from then on as well, but it will still calculate everything for the values before, and my computer can't handle that - Spice has already crashed on me a couple of times today.
Can anyone please help?


texts:
I have a power supply that has only screw terminals for its AC mains input.  Currently I'm using a power cord from a computer that I cut the female end off of and attached fork terminals to (live, neutral, and ground).  It works fine but now I'd like to add a rocker-type switch to the cord so I don't have to unplug it whenever I turn it off.

Is it better to use a DPST-type switch to simultaneously connect/disconnect the live and neutral wires or is a SPST-type switch fine?  If an SPST is ok, does convention and/or code prefer attaching it to the live or neutral wire?


texts:
I have an LM7332 that is creating a gate voltage to drive a MOSFET. The circuit failed in the field and I'm trying to debug. One thing I've noticed is that the supply voltage to the MOSFET was sometimes low, which meant that the LM7332 had been outputting a voltage right at its V+.
Does this do any harm to the OpAmp? A simulation showed that I(V+) was 1.2mA, I(Vout) 0.8mA and I(V-) 0.4mA so all seems kind of benign as per the spec sheets. Except VOut=V+ ... Could this have been the cause of the LM7332 to die?
Thanks, T.


texts: RC bandpass filter using two port network parameters?

texts: So my assignment is about exploring two port networks and the use of the 4 parameters, now one of the tasks is to design a bandpass filter with cascaded high pass and low pass filters, now I am really struggling to do this with the use of two port network parameters, anything I have tried ended with really nasty looking expressions. Is it even a good idea to use two port network parameters for such circuit ? which one of the parameter would I possibly have an easier time trying ? Only given values are the cut off frequencies.


texts:
I'm a software developer looking to prototype an application that requires input from a 3-axis accelerometer, ideally via Bluetooth LE.  Current specs on the accelerometer are +/-50G sensing range with +/-5% precision and at least 1kHz sample rate, ideally with peak sampling.

My primary question is whether I can do this with off-the-shelf hardware and APIs?  If so what are good sources and standards, especially if I want to mass-produce the hardware?

E.g., can I pay up for an integrated prototype device that meets those specs and comes with an API that encapsulates the Bluetooth, self-test, and other hardware interaction, so I can just get to work on the software problem?

Or is this still a "hard"/custom electronics problem?  If so is the Bluetooth requirement itself tricky, meaning I should start with a wired connection to the accelerometer and deal with Bluetooth integration later?


texts: PH 4502 electrical interference EMI when in aquarium

texts:
I'm trying to get a regular ph reading in an aquarium.
The sensor works well when the probe is in a small quantity of water(i.e. a glass) but has large variations in larger water quantities (i.e. aquarium).
The circuit uses an ads1115 and a node mcu.
I'm looking for suggestions on what i can do to reduce the interference. Here's what i've tried:

adding capacitors between gnd and vcc on the probe controller board.
different usb cables / power sources
unplugging all other electrical devices in the vecinity.
moving the cables around as to not intersect any power cables.
adding ferrite corea to both ends of the ph probe.
adding ground connection to the bnc connector.

Here's what it looks like and what values i get. The part where it stabilized is when i moved the probe to a glass of water in the same location.


texts:
In my schematic, I have 4 SPI devices to hook together. I am going to operate the SPI up to 8MHz. Should I be concerned with installing damping resistors? source termination resistors? Should I route them in a star formation, or in a serial fashion? Does adding lots of vias hurt the signal integrity?

I also have to add that these devices are quite close together, within 25mm of each other.


texts:
I have a lithium ion battery which operates between 40 and 58V along its discharge. I need a 5V bus to power a MCU and some sensors as well as a 12V one for lights, a horn, etc. Is there a better way to do this between stepping both of them down with different switching voltage regulators straight from the battery or stepping down to 12V and from this stepping down again to 5V?
Thank you for your help!


texts:
I am designing an inductor for high current where i need Air gap of 6mm in order to avoid saturation.. But the thing is I am not able to find the air the ferrite material which has airgap of 6mm(one side).. So I thought of keeping a plastic of 2mm on both the legs which also make 2mm gap on the center...which makes effective air gap of 6mm (That's what i believe).
The AL value for individual gaps are given in the datasheet but that value is for middle gapped...
My concern is if i keep gap on both the legs like i mentioned, do i get the AL value mentioned in the datasheet for the airgap?
How does it make a difference by adding gap on legs?


texts: Purpose of a spiral/wound copper wire in a DC motor?

texts:
I have recently torn down the air blower of a car (for cleaning).

I was wondering what is the name (and purpose) of the parts shown on the picture :

It looks like a copper wire wrapped around a (magnetic?) cylinder.
Is it a solenoid? I don't think it's brushes (which are above head of first arrow). This is not specific to my car, I have googled for other car blower pictures and this seems to be common.

Also (another question) is there a reason for most car manufacturers to use brushed motors instead of brushless ones for air blowers? It create tons of black dust (as shown on the picture) and they wear pretty quickly.


texts: Active Integrator Parallel Capacitor in Feedback

texts:
I am designing an integrator circuit, looking to perform in the range of 10-10kHz - and I had a thought and I cant find any information online about it.

For low frequencies of 10Hz, the reactance of the 0.01uF capacitor on its own is in the 10's of Megaohms such at low frequencies the capacitor struggles to integrate and causes an undesired phase shift. My thinking is by adding a larger capacitor in parallel, with lower impedance at low frequency, it will help the low end integration. Is my thinking correct, and what are the implications of doing this, if any?

simulate this circuit – Schematic created using CircuitLab


texts: How will output Vo vary with Vi in this opamp configuration?

texts:
\$Vi\$ can take two values either logic 0 or logic 1. How will output \$Vo\$ vary with \$Vi\$ in this opamp configuration?

simulate this circuit – Schematic created using CircuitLab

It is is an inverting amplifier so output will be \$Vo=-\dfrac{R1}{R2}Vi\$ for large voltage gain.

But \$R2=0\$. So \$Vo\$ is tending to infinity.

So for logic 1, the output is -15V as that is the maximum supply voltage supplied to the opamp.

Similarly for logic 0, the output should be -15V only.

But when I simulated the circuit I got output 0 for logic 0. I don't know why.


texts: (Frequnecy of) Bias tees and looking for online retails

texts:
Currently, I'm looking for some bias tees to add some DC bias to RF signals (whose carrier frequency is not determined yet, but definitely lower than 30 MHz and amplitdue does not exceed +/- 3 V.)
Since I'm not familiar with electrical engineering, I've referred some articles and papers and found bias tees from Aeroflex/Inmet.
In the page, I'm curious that what does frequency column stand for. Is it cutoff frequency of bias tees? And can I use those bias tees for my application?

And for the price around $ 420, it is a bit expensive than I expected (Detail price will be different after quote.)
Therefore, I'd like to look up other bias tees on some online retails and could you recommend some retails? I already know one, element14.


texts: Is there an industrial standard switching sequence for trapezoidal BLDC motor controller?

texts:
Currently I am working on a BLDC controller for 2kW hub BLDC motor of chinese origin. It does have 63 stator slots and 56 poles. I tried almost all standard BLDC switching sequences and some other sequences made by my own intuition. Finally I could run it in forward direction with the following algorithm. There are no missing steps in the rotation.
Hc Hb Ha                                  --Ha : hall sensor for A phase
----------
0  0   1  : AC                            --AC => +ve on phase A and -ve on phase B
0  1   0  : BA
0  1   1  : BC
1  0   0  : CB
1  0   1  : AB
1  1   0  : CA

I couldn't find an algorithm to run it in the reverse direction. I tried reversing the above sequence. It didn't reverse the direction of rotation, rather the motor rotated in forward direction with missing pulses (I could hear a noise when there is one or more pulses are missing). What should be the right algorithm to turn the motor in opposite directtion?


texts:
I'am wondering if it is possible to use an cheap doppler radar module from ebay (like HB100) to detect a bullet and calculate the entry hole on the target.
We are shooting with 4,5mm (.177) match diabolo pellets which have a velocity of ~170m/s.
The idea is to build a cheap device to detect your shooting results in combination with an Arduino. There are commercial solutions available but they are very expensive and other techniques involving infrared or microphones seems be fragile and complicated to implement.
While I'am experienced in programming I have no idea about electronics.
Is it possible to implement something like this with these cheap modules?


texts: Given five 10-Ohm resistors, design a network with an equivalent resistance of 10-Ohm

texts:
Trying to help a friend with their circuits homework, but it's been a good 6 years since I took this stuff at Uni.

The problem is: given five 10-Ohm resistors, design a network with an equivalent resistance of 10-Ohm. You are not allowed to short any of the resistors (wouldn't that make life easy!) and both ends of every resistors must be connected to at least one other resistor.

I've come up with over 20 different configurations (including deltas, and figuring the equivalency with delta-Y conversion formulas), but none of them are equivalent to 10-Ohm. Clearly it's the one I haven't thought of ;)

I feel like I must not be approaching this in the correct manner (drawing out random unique configurations as I think of them and figuring the equivalent resistance). Any ideas?

Edit: left out a piece of the problem >_<


texts: How to estimate the transfer function given only Bode plot data points?

texts:
I'm trying to obtain transfer function given Bode plot data points.
As an example I used the following RC filter and made AC sweep as follows:

I set the type of sweep to decade and for each decade the number of points as 100 points.

Then I exported the sweep to a txt file in Cartesian format as shown below:

Below is the first rows of Bode plot data saved to the text file from LTspice(first column is frequency the second column is the complex number):

1.00000000000000e-001   9.99999996052158e-001,-6.28318528237456e-005
1.02329299228075e-001   9.99999995866102e-001,-6.42953946745921e-005
1.04712854805090e-001   9.99999995671278e-001,-6.57930267936173e-005
1.07151930523761e-001   9.99999995467271e-001,-6.73255432451136e-005
1.09647819614319e-001   9.99999995253650e-001,-6.88937565895025e-005
1.12201845430196e-001   9.99999995029962e-001,-7.04984983141642e-005
1.14815362149688e-001   9.99999994795731e-001,-7.21406192743033e-005
1.17489755493953e-001   9.99999994550462e-001,-7.38209901440824e-005
1.20226443461741e-001   9.99999994293633e-001,-7.55405018782651e-005

Here is the Python code which reads and plots the exported LTspice Bode data.

import numpy as np
import matplotlib.pyplot as plt
import pandas as pd

dataset=pd.read_csv("Draft224.txt",delimiter=r'[\t,]', header=None, engine='python')

f = dataset[0]
re = dataset[1]
ima = dataset[2]

mag = np.sqrt(np.power(re,2)+np.power(ima,2))

plt.subplot(2, 1, 1)
plt.semilogx(f,20*np.log10(mag),'.r')
plt.semilogx(f,20*np.log10(mag),'-b')
plt.xlabel('Frequency [Hz]')
plt.ylabel('Magnitude [dB]')
plt.show()
plt.grid()

plt.subplot(2, 1, 2)
deg = np.rad2deg(np.arctan2(ima,re))
plt.semilogx(f,deg,'-g')
plt.xlabel('Frequency [Hz]')
plt.ylabel('Angle [°]')
plt.show()
plt.grid()

So this is the data plotted on Python which is the same shown in LTspice plot:

My question is:

Above I used LTspice as an example to create such data points. But such Bode plot data could be from a network analyzer or a data-acquisition system.

Having only the Bode plot data points of a system/circuit but not the circuit diagram, how can we obtain the transfer function?


texts: Beginner: Difference between safety resistor between pin and switch, or switch and ground

texts:
I'm making a little test board with a switch that intend to plug into a popular southern European microcontroller system. Obviously, it's intended to plug into a pin which is configured for input, but I want to protect against the case that I accidentally connect it to an output pin and set it HIGH. What's the difference between the two schematics below?

simulate this circuit – Schematic created using CircuitLab

The left hand version seems more common on Google, but is there a rationale behind this? Is it because closing SW1 will bring the input voltage to zero whereas closing SW2 will bring it to 0.5V (approx). For a digital input, would this effectively matter?


texts: using sine or square wave to obtain conductivity of solution?

texts: I see for designing a conductivity meter, Some Designer use square waves, as excitation to obtain conductivity and some others use sine waves for this work in their design, which wave do this job better for me?


texts:
Writing a USB driver for the "Blue Pill" - sub $2 board from China.

The STM32F103 has a USM packet memory of 512 bytes.  The USB sees this memory as 256 words.  The Application has to access this memory on 32bit boundaries so I us DW access.

As a test - a wrote a data pattern into the array then read it out to verify its contents.  I found many single bit failures.

Has anyone experienced this?

I'm wondering if China may be using ST parts that did not past all of ST's MFG testing and the one I got had issues with this memory array.

Any comments?  My recourse right now is to scrap the board.

Thanks


texts: Advice wind direction sensor with I²C interface

texts:
I need a wind direction sensor (not anemometer, which is a wind speed sensor) with a high resolution and I²C interface.

The only direction sensor I could find were magnetic compasses, that had a very low resolution (16 directions).

I'd like to stick to the I²C bus, since all my other sensors use that and it's quite easy to use.

It shouldn't be insanely expensive, as well...


texts:
I am referring a solid state relay circuit from here. The circuit given is below
Well I'm new to this, so dam confused with voltage rating of resistance and capacitance of snubber circuit. what would be the voltage ratting of components when connecting this at 220 ac volt.
Please help,how can I decide this.
Thanks in advance.


texts: Solving a parallel RC circuit without knowing the capacitor resistance

texts:
I Have the following circuit scheme (I have to find the U):
$$R_1=10, R_2=20 (\Omega); A_1->i=0.6,  A_2->i=0.8(A)$$

I have a problem with calculating the impedance Z since I need it to calculate he U, but I don't know how to calculate it since Xc (capacitor resistance)**** is not given.

What I've done so far:
$$i_1=i_2+i_3=1.4 A;\quad U_{r1}=i_1*R_1=14V;\quad U_{r2}=i_1*R_2=12V; $$
and after that I get stuck because I haven't got the Xl (inductor resistance) to solve for Ur3? How should I proceed?

I hope this question is appropriate for this community (my first question).

EDIT:
Results that are given:


texts: I am using an IR sensor (vishay tsop32 series) but I want to ensure that it only sender directly ahead so I made blinders out of pla and covered them in aluminium foil. However it seems that despite this the IR signal is able to be detected through the foil. Even when I surround the sensor with aluminium foil it is sensing an IR signal. The aluminium foil has decreased the sensing distance but not as much as is necessary. I'm wondering why this is not working as well as expected and what materials might work better as blinders for the sensor.


texts: eeprom data corruption during power failure

texts: I recently found a problem with eeprom of a PIC16F877A which is used to control the speed of a dc motor. The drive is supposed to work on the last set speed even if the power fails. But the problem is sometimes (not always) after the power failure the set speed (which is read from eeprom) is not same as the last set speed. Usually whenever this problem happens the value is changed to default eeprom value 255 ,( but not always, some random values also). what might be the possible causes?.


texts: Altium moving components breaks connections

texts:
I am new to Altium Designer.

I am trying to create a schematic. I have connected multiple components. Now, every time I move things a bit around on the sheet, all wired become disconnected and I have to manually reconnect them again.

Is there a way to make the connections persistent ?

Many Thanks !
Somniator


texts: How to find a faulty bulb in a Christmas lights string

texts:
I have a LED Christmas lights string, which consists of two circuits of LEDs connected serially. It is working directly on 110V AC. Most LED sockets have 2 wires connected to them, some have three. There is a 110V socket on the other end of the string, so these can be chained together.

One half of the string went dark, so I suppose one of the LEDs on that circuit is bad, or its connection is faulty.

LEDs are non-removable (molded plastic socket with lens), and I hope I can trace the string somehow and find where the fault is. Obviously cutting insulation in 50 places in order to test each LED separately is not an option...

If there any sane way to find the fault, either by buying some equipment or building DIY one, or do I need to just replace 100 LEDs string because one went bad?


texts: MPU-6050 doubt in playgroud code Arduino.cc

texts:
I am studying the MPU-6050 and saw this article. I'm wondering in two lines of code.

http://playground.arduino.cc/Main/MPU-6050

This line from what I understand the shield guard reading the last value in this register and the source code is asking these values. That's right?

Wire.requestFrom(MPU,14,true);

This code I understood that he reads the values, but because moving bits to the left?

AcX=Wire.read()<<8|Wire.read();  // 0x3B (ACCEL_XOUT_H) & 0x3C (ACCEL_XOUT_L)


texts: I am stuck at this step C(AB+A'B')(simplify using boolean laws)

texts: I cant figure out is AB+A'B' =1 or another answer


texts:
How can I implement the comparator of two 2-bit numbers using decoders DEC 2/4 and required logic gates? That comparator will be used to compare two 4-bit numbers. The comparator only has one output to show if the first number is bigger than the second. I created the truth table for the comparator:

A1 - higher positioned bit of the first number
A0 - lower positioned bit of the first number (mistake in the table)
B1 - higher positioned bit of the second number
B0 - lower positioned bit of the second number
X - is 1 if A>B  <=> (A1>B1) + (A1=B1)(A0>B0)

And here's my solution using decoders 2/4 and required logic gates:

Even though I did the task, I'm not completely sure if it's correct.
What I don't understand is: How do these decoders function? It's like X will always be 1 if the conditions are made, the output of the comparator will never be 0. Please correct me if I'm mistaken or correct the solution.

Edit, new solution using the true logic of decoders (not demultiplexers), please check if it is good:


texts: Do multimedia speaker systems run on AC power rather than DC?

texts:
I am talking about the typical multimedia speakers that are generally connected to the computer’s audio line-out point.

For example, my power adapter for Altec Lansing multimedia speakers says Input 230 V AC Output 9 V AC.

So 9V AC is fed into the device. What happens thereafter is a black box for me.
If I correctly remember during college studies I had seen audio amplifier circuits for which power input was DC. Even I had assembled one audio amplifier using some Philips TDA chip using a ready to solder hobby kit that would take DC input to power it. I would give the stereo output of my Walkman to it and it would drive the speakers with amplified output.

Is it that the 9V AC is then internally converted to 9V DC using bridge rectifier which is inside the speaker cabinet or does the entire amplifier circuit operates on 9V AC?


texts:
(Modified repost from stackoverflow since it might be more suited to this site)

I wanted to try building an arcade stick starting as simple as possible(ICs and basic electronic components as opposed to using an arduino board and the like) and use it on my computer, mostly just for the sake of building it.

The problem is that I know programming and basic circuitry, but I have no idea how both are connected. I already have a few scrapped male USB connectors and I have the circuit design pretty much done, the circuit would use a clock to generate a wave (something like pot 1, pot 2, button 1, button 2, repeat), but I'm not sure if the driver would be able to use that input in anyway.

So, how exactly would one go about getting a circuit to output information that a driver would be able to read?
Does it read it in a binary high low way or does it read something like the amperage, allowing me to, for example, link a pot to a computer and read the input?


texts: Fast opto-isolation with open collector output without VCC

texts:
I have a two wire communication channel, with a data line and a ground line, with the data line being pulled high via a resistor on the receiving end. I am supposed to send information on this line by connecting the data line to the ground. There are also other devices on the bus which may be transmitting at other times, so the data line is not always high. The data line normally has 5V, but I don't have a separate VCC output line.

I am allowed to leak 30 µA to the ground when I'm not sending and I need to sink atleast 15 mA to the ground when I am sending. Communicating on the line should be done by some isolated circuit.

A simple phototransistor output opto-coupler fits the bill perfectly. One combined with a suitably selected base resistor will reach 1-2 µS switching times.

However, there are a few things I do not like in this solution:

If I need to sink 15 mA and still stay fast, I need to use a lot of current to achieve that: opto couplers with a high CTR tend to be slower and requiring a high CTR is problematic if one wants to have equipment that will still work in 10 years without problems.
All the parts need to be selected just right to meet the specifications. If an input or output voltage is suddenly different (because a manufacturer does not adhere to specifications), it is likely that some resistor is too large or too small. It is hard to get wide enough margins for everything to deal with such events.
The switching time is adequate, but I'd love to get a solution that would be really fast. Getting under 1 µs would be great, 100 ns would be splendid!

So, I am wondering if there is some combination of simple components that would allow me to achieve faster, lower supply current and a more robust solution.

All the faster opto isolators tend to require the VCC input or simply do not work with open collector outputs. There are some with fast switching times and supply power requirements in the µA range, so I have been toying with the idea of just pulling VCC from the data line and keeping a capacitor to tide over the times some other device is pulling the line low. This would be kind of like 1-wire bus. However, such couplers would need to be coupled with a transistor or FET to achieve the needed sink current and I am guessing that might negate all my speed advantage and make the design difficult.

I also toyed with the idea of using ADuM5201, which provides isolated power as well as a high speed data link. That combined with a suitable FET might do the trick. However, such chips are somewhat complex beasts, requiring bypass capacitors, extended pads as heat sinks, large supply current at start up, and EM emission considerations.

So, I am wondering if anyone has a cool solution, maybe something with modern components as I believe most of the advanced opto coupler stuff was done when many things were a bit more primitive.

Thank you in advance.


texts: How do I open a rectangular hole on a metal case?

texts:
I'm working on a case design. There is rectangular switch. I am trying to open a rectangular hole on the metallic case to fix it in there. I'm not doing a good job, if it goes on like this it looks like I'm going to ruin the case at all.

How do I open this hole?

Picture #1

Picture #2

Dimensions of the rectangle is 20.0mm x 25.4mm.


texts: 1-10Hz frequency count translated to PWM for stepper motor RPM

texts:
I would like to control the speed of a stepper motor based on an input signal that consists of short 12V pulses at a varying frequency of 1-10Hz. I know this is an easy task with a microcontroller but I'm new to circuit design and I'm curious if there is an elegant way to do this in a more analog way without code.
The circuit is enabled by the first 12V pulse and then starts counting elapsed time before the second pulse, when the second pulse is received the stepper is run at a certain corresponding number of steps per second then repeats, third pulse is received, motor speed is adjusted to the new target and then waits for a fourth pulse, repeat, repeat, repeat until a pulse is no longer present after say a 1-2 second timeout the motor stops and the circuit is deactivated.
The frequency at which these 12V pulses are received varies constantly between 1-10Hz and I would like the motor's RPM to track the pulse frequency. Ideally this relationship would be adjustable to initially calibrate the accuracy within a small window with a pot.
Rather than design a circuit for me I'm just hoping to get a little creative direction to focus my research efforts, again I know this could easily be done with a couple lines of code and a micro but if I can do this with like a simple counter IC and a 555 to drive the stepper I'd really like to explore that.
Is a micro necessary for what I want to do? I guess I'm essentially multiplying a PWM signal by many factors.


texts:
I am trying to make a charging circuit to charge 2 NiMH batteries via trickle charging with 0.015A (15mA)

I have used a current regulator and basically J1 is connected to the source of 24V DC and J2 are the 2x9V NiMH batteries in series that are going to be charged.

I'm unsure where to connect the '2' from the J2 as previously I just connected to ground. Is ground just the same thing as the negative terminal on a battery?

As previously it looked like this before I got confused.

But the '1' from J1 has to connect somewhere right?


texts: STM32F0x1 run SYSCLK at 1MHz with 8 MHz external crystal

texts: I am using hardware with an 8 MHz external crystal and would like to reduce the SYSCLK frequency to 1MHz. I haven't been able to do this yet. Is it possible to achieve this with certain PLL and DIV settings?


texts: Can you filter out power supply noise by using a capacitor with a resonant frequency that matches the noise frequency?

texts:
From my limited understanding, the self-resonant frequency of a capacitor is also where typically impedance is at its minimum, and where Z = ESR.

I have a power rail that has some ringing at around 61MHz.  What would happen if I place a 10nF capacitor that has a self-resonant frequency of 61MHz, such as the one below, between the rail and ground?

Is it bad to attempt to try to use a capacitor at its self-resonant frequency?

Why don't people just select filtering capacitors based on the least ESR/Z at the frequency of concern (sometimes that means selecting capacitor and value that has a self-resonant frequency at the frequency of concern).  What am I missing here?


texts: Connecting pins of Raspberry Pi GPIO in series in order to turn up the voltage

texts:
It's unorthodox and probably not recommended by anyone but, for my project of driving a relay only with scrap parts and on the cheap, I managed to get a 12v relay, but, the GPIO ports on the RPi only output 3.3V (and the power supply pins are not switchable, meaning I cannot use them in order to control the relay).

I managed to drive the relay to the on position this way:

The 9V battery alone isn't enough to switch the relay's position so, assuming the 3.3V GPIO pin is pin number X, and I turn on the output and write a logical 1 to pin X, that's enough voltage to turn on the relay. But, the problem with this circuit is evident when we try to turn back off the relay, we write a logical 0 to pin X, but the 9V from the battery are still being supplied and the relay won't change state again until it reaches approx. 2V.

Thus, I want to remove the battery middleman and instead of connecting the battery in series with the pins, I want to connect some of these pins in series in order to add each pin's voltage:

1 Pin on: 3.3V
2 Pins on: 6.6V
3 Pins on: 9.9V etc.

How can I achieve this? (N.B: current is unimportant here, it merely needs 30mA and that's easy to supply, so, voltage is my problem)

N.B #2: Here's the pinout of the GPIO pins of the RPi, for reference (remember that there's no way to control the power pins):


texts: Which type of fuse should I use with a coil heater?

texts: Fast blow or time delay (anti surge) type?  I have read motors require anti surge fuses to permit higher than rated current for short periods during start up.


texts: Requirement to display 3 mm LED by 220 V AC supply

texts: I want to power a single 3 mm LED by a 220V AC source. For this I think I need one LED, one resistor and one capacitor. I don't know the needed resistor value and circuit diagram. The circuit also should tolerate changing voltages.


texts:
Given the following constraints:

~20% accuracy or better
Vcc=5V
Input is the falling edge of a TTL signal
Output can be TTL or the input to a Schmitt trigger
Time between 1-60min adjustable via pot or similar

I'm considering my options for a very simple timer. RC in this case is not very practical due to the components needed - for my first iteration, where a 2200uF cap needed to discharge to 1V, the resistance required was 1MΩ. 1M is too uncomfortably close to the input impedance of the next stage (5M), so I have leakage concerns with that low current; and caps in that range start to get expensive.

My preference is simplicity and low cost, so if I can pull this off without the use of an MCU or RTC that's what I'd prefer; but they're not out of the question.


texts: How does current divide in parallel inductors?

texts:
How does current divide over parallel inductors?
Take a setup like this, how would I solve for i1, i2 in terms of i?

simulate this circuit – Schematic created using CircuitLab


texts: How to design a PCB to connect the GSM modem with 50Ohm track impedance?

texts:
In the system integration manual of the Leon G100 GSM modem (http://www.u-blox.com/images/downloads/Product_Docs/LEON-G1-G2_SystemIntegrationManual_(UBX-13002023).pdf) it’s written to carefully design the 50 Ohm micro strip or stripline on the pcb (“The transmission line up to antenna connector or pad may be a micro strip or a stripline. In any case must be designed to achieve 50 Ω characteristic impedance”).
I design a 2-layer pcb and before I got to chapter 2.2.1.1 of the mentioned document I carelessly attached the ANT with the signal pin of the SMA.

I cannot use the stripline as it’s a 2-layer PCB, instead I used a coplanar waveguide with ground. Using a KiCad Pcb Calculator I ended up with the following conclusions: to have 50 Ohm at FR4 PCB of 1.5mm thickness and freq of 900MHz it has to be a 1.25mm wide path separated from the gnd paths by 0.25mm. The Electrical length 22 degrees.

And here I have some questions:
- for which frequency, 900 or 1800MHz shall I calculate the parameters?
- what is the 22 degrees electrical length about?. This value increases proportionally with frequency and at 1800MHz I get 44 degrees
- how shall I design the vias for the gnd and sma signal pin? As far as I know the SMA connector is “through pcb” not SMD.


texts: How does a high pass filter and a low pass filter work for an amp?

texts:
I'm researching how to incorporate treble and bass into an amp.

X1 is for bass, X2 is for treble and X3 is for volume.

Intuitively, for me, if a high pass filter only allows frequency above a certain threshold and the opposite for low pass filter, I can't see how these two could be added into the same circuit. The low frequency cannot pass through the high frequency threshold and vice versa.

I then fail to understand how they can then combine, i.e the frequency output of each resistor. Is this just superposition?

After playing around with values, the volume part of this circuit (X3) is also a mystery to me. If there is no resistance in X3, shouldn't this mean that the volume is max and therefore some voltage level above 0, but for this circuit it is 0.

Which raises another question, should volume be before the treble and bass settings or after?

This is a very simple circuit as far as I'm aware for treble and bass settings. I've seen many other claiming to be "simple",
https://www.eleccircuit.com/active-tone-controls-by-transistor/

But these are far beyond me.

If anyone could direct me to better circuits which doesn't have such a high difficulty rating I would appreciate that.


texts:
As my commercially purchased, 12V 4s3p LiFePO4 battery pack approaches full charge (3.65V per cell, 14.6V for the pack), the internal BMS disconnects the battery at a charge rate of 0.02C.  What advantage does this offer as opposed to allowing a charger to transition to CV charging at, for example, 14.2V?

(I previously posted this related thread, which I think is too broad in scope.)


texts:
I have a 3-phase motor. I want to find out the frequency of the motor so that I can supply the required PWM frequency for the motor.

My motor specification:

360 Watts (36v and 10A) rated max
30 poles
750rpm
line-to-line resistance = 0.7ohm, line-to-neutral resistance = 0.35ohm

PWM Frequency = 1/2*pi*t where t = L/R

Is the above formula right for frequency calculation?


texts: 12A current from 24V power source, are there resistors which can handle the wattage?

texts:
I'm planning on using a 500 W DC motor powered by 2 x 12 V batteries in series. But I want to reduce the power even more by adding 2 Ohm resistance so the power will be 288 W instead.

However, adding a small 2 Ohm resistor will ignite it instantaneously and burn down my house in the process (Thanks to Murphy).

So I was wondering:

Is there a resistor which can handle those 288 W?
Is there a potentiometer which can aswell?
If no, what would be the right way to go about this? Buy a ~300 W motor instead?

Background

The motor will power a bicycle and I'm having troubles finding a suitable DC motor for this purpose. The only one I found was this 500 W DC scooter motor.


texts: Are pointers treated differently in AVR compared to say x86?

texts:
Microcontroller: ATtiny13

IDE: Atmel Studio

I'm trying to write a Hello World application by writing high to port PB4.

This works fine:

int main(void)
{
    DDRB = 0x10;
    PORTB = 0x10;

    while(1)
    {
    }
}

Looking at the definition of DDRB and PORTB, they point to 0x17 and 0x18, as expected.

This, however, doesn't work:

int main(void)
{
    char *dir = (void *)0x17;
    char *port = (void *)0x18;

    *dir = (unsigned int)0x10;
    *port = (unsigned int)0x10;

    while(1)
    {
    }
}

Is my code wrong, or do I need to do something else to use pointers?


texts: What are the units of the output of an ADC?

texts:
How would you write or label the output of an analog-to-digital-conversion?  I don't seem to have a good grasp for the english when I try to write this out.

counts?
arbitrary units?

For example, if I want to write this out as algebra or label in a chart:

raw signal [au]: 200


texts:
I've ran into a slight confusion.

The equation for resistance in a parallel circuit should work for any number of resistors, I assumed.
So when I'd have 2 resistors in parallel, total Rt would be:
Rt = 1/G
and
G=1/Ra + 1/Rb

Now my book says, for 2 resistors in parallel, you may use this formula too:
Rt = (Ra * Rb) / (Ra + Rb)

When I fill in 100 Ohms for Ra, and 220 Ohms for Rb, the two equations produce different results. (68.75 for the first, and 66.67 for the second).
Now, I have tried it with several sets of values, but I couldn't reproduce this difference with those.

What is happening!? I'm lost!

Edit: Yeah, I've been miscalculating indeed. How embarrassing to find out this way. Thanks for all your answers :)


texts: Will using AND gate with clock signal cause timing issues?

texts:
I am creating a homebrew CPU with 74 series TTL chips.

I have a clock signal that goes to multiple registers. I have a particular register that I only want to update when the opcode is a particular value. So the solution seems to be an AND gate between the clock signal and the output of the logic used to decide if the register should update. This seems the only viable solution as the TTL chip does not have a separate enable line for controlling if the clock is used or not.

My concern is timing. Will the extra AND gate delay cause problems because it delays the clock signal to this register compared to other registers? Or should I place a double NOT gate on the clock line that is not going to the AND gate so both paths have the same timing?


texts:
This question has arisen due to the below issue, where a analog design board was scrapped due to too much noise from switching regulators.

eliminating-those-unwanted-op-amptia-outputs

The design which caused issue is as below:

My complete power budget is like below:
- Input : 12V
- Ouput
   Rail       Load(mA)
      5          1040
     -5          544
     2.5         800
    -2.5         800
     3.3         16

This kind of power supply distribution and design can be done with a bunch of switching regulators, but my question is how to completely eliminate the switching noise of DC-DC switching regulators.

In my previous design, I tried using output filter caps of 0.1F, 0.01uF, 47uF, 4.7uF as suggested, but it did not help me to the extent needed.

I am thinking of putting an linear regulator at the output of DCDC to reduce the noise. Is that proper solution, or should I use a pi filte? But they can create EMI issues to me (really not an expert in EMI avoidance. My senior suggested me to go for an inductor less module which helps in avoiding EMI issues.)

As my application is an electro-optic one, which involves analog opamps, I tried to have an output ripple voltage not more than few mV, so that it will not be difficult for me pick signals of low amplitudes around 30mV.

I agree to moderators suggesting to take care in PCB design, but primarily I want to take care schematic wise as much as possible and then want to take care in PCB design.

Please suggest techniques/tutorial to tackle noise in very low noise floor analog circuits, stressing noise filters to be adopted at output of DC-DC converters, or should I have to scrap the idea of using a DC-DC itself and go for using linear regulators.

EDIT 1 : Addition of a CLC filter at DC-DC output:

Eith some suggestions of pi filters, I have tried to create a CLC filter using components at my desk.

L = 10uH and C being 4.7uF, 47uF, 0.1uF and 0.01uF(all 0603 SMD.)

I did not get a 1nF but I was able to see noise suppressed to an extent, this set up is bare soldered and checked whether filter output is proper or not, I did not solder this on actual board, instead I took +/-5V from board and checked the filter output.

Please find the images below

Without CLC filter:

With filter:

Please help me in reducing it much further. Will a common mode choke or adding a 1nF can help me more?

Will an output LDO reduce it much further?


texts: Why Opamp UA741 CN (from ST) is saturating at 0.60V, when vcc=12V,-vcc=0?

texts:
simulate this circuit – Schematic created using CircuitLab

my circuit is shown below.It is saturating at 0.6V,but I am expecting 11V.
What is the reason for it?


texts: How to calculate cut-off frequency for T section high pass filter?

texts:
This is a high pass T filter:

According to me, if input voltage is \$V_{\text{in}}\$, then voltage across the inductor \$L\$ should be $$V_x=\frac{j\omega L}{j\omega L + \frac{1}{2j\omega C}}V_{\text{in}}$$

Now, I think \$V_{\text{out}} = V_x\$ since we can only measure the EMF across the output terminals unless there's some load resistance places across those two output terminals.

In that case if we want the cut-off frequency, we'll need to set \$|V_{\text{out}}/V_{\text{in}}|=\frac{1}{\sqrt{2}}\$. I get \$\omega_{\text{cut-off}} = \sqrt{\frac{1}{2(\sqrt{2}+1)LC}}\$ from here. However, the actual cut-off (angular) frequency \$\omega_{\text{cut-off}}\$ (according to what we were told in class) should have been \$\frac{1}{2\sqrt{LC}}\$. I'm not sure why I'm not getting the same result.

Also, another question is: What is the use of the right hand side \$2C\$ capacitor of the T-section filter in determining the cut-off frequency? As long as no load is there, we should solely consider the voltage across the inductor \$L\$ to be the output voltage, isn't it? Or no?


texts: Definition of XOR, and how to remember its expansion in disjunctive normal form for N variables

texts:
So the following boolean expression:

a'b'c + a'bc' + ab'c' + abc

Can be simplified to:

a XOR b XOR c

By the definition of XOR: XOR = 1 iff an odd number of ones from each term.

What I wonder is:

Have I understood the definition of XOR correctly?
How come that is the definition? Intuitive proof?

My intuition tells me XOR should only be true if and only if there is a single term with the value 1. i.e. A XOR B XOR C iff A'B'C+A'BC'+AB'C'.

More importantly, can the original expression be simplified in a step-by-step manner?

Personally, I feel like I would easily forget that the term abc is included in XOR for 3 variables. I'm not having trouble spotting XOR in 2 variables, and I haven't really worked with more than 3.


texts: How does writing to output pins on PORTB affect RBIF interrupt on PIC16F877

texts:
I have a PIC16f877 with PORTB configured as follows:

RB0 Output
RB1 Output
RB2 Output
RB3 Output
RB4 Input
RB5 Input
RB6 Output
RB7 Output

RB4..5 are used for detecting 2 simple push button switches, and I want to make used of the RBIF interrupt flag to handle the event of a button press, rather than polling.

Looking at the datasheet on page 31, is says this:

The user, in the Interrupt Service Routine, can clear the interrupt in the following manner:

a) Any read or write of PORTB. This will end the mismatch condition.

b) Clear flag bit RBIF.

A mismatch condition will continue to set flag bit RBIF. Reading PORTB will end the mismatch condition and allow flag bit RBIF to be cleared.

My concern is that it specifically says "Any WRITE of portb". The other pins on PORTB that are set to output are used for PWM dimmed LEDs, and therefore written to very frequently. I don't want an input change on RB4 or RB5 occurring a few cycles before a PORTB write to clear a mismatch condition and not fire the interrupt.

However, the datasheet contradicts itself in the previous paragraph:

Only pins configured as inputs can cause this interrupt to occur (i.e., any RB7:RB4 pin configured as an output is excluded from the interrupt on-change comparison).

Which would mean I'm gonna be ok and not have to worry about writes to PORTB affecting the interrupt.

Is this something I need to worry about? I can't move the outputs to another port as I don't have enough spare pins on the chip.


texts:
I'm currently try to use the MS5611 (sitting on a CJMCU-117) over I²C with libopencm3 on a STM32F103C8.
When I do a read, the slave sends an additional byte (0xFF) after the master has send a NACK. This happens for the PROM readout (2 bytes) as well as for the ADC readout (3 bytes).
The following Code results in the following waveform, the datasheet [1] shows on page 13 how it should look like.
// Send
i2c_transfer7(I2C2, 0x77,
    commandPtr, 1,
    nullptr, 0);

// Read
i2c_transfer7(I2C2, 0x77,
    nullptr, 0,
    bufferPtr, 3);

Can anybody help me how to solve this?
[1] https://www.te.com/commerce/DocumentDelivery/DDEController?Action=showdoc&DocId=Data+Sheet%7FMS5611-01BA03%7FB3%7Fpdf%7FEnglish%7FENG_DS_MS5611-01BA03_B3.pdf


texts: switching 11 250mA shape memory valves from arduino

texts:
I am trying to switch 11 shape memory valves (SMV), which are effectively valves that open by heating a (shape memory) wire by passing a current through it. The SMV require 250mA, and have a resistance of 3.2Ohms when hot(open) and 4.2Ohms when cold (closed). I'd like to switch these with an Arduino. I can use a MOSFET or PNP transistor to allow the arduino DIO to switch them, but this would require placing a high power resistor in series for each valve that, on a 5V power supply,  will waste 2.3W (x11 valves...). I'd like to avoid this but I am not sure how to go about this. I played around a bit with a PNP resistor in LTspice and circuitlab which resulted in the below circuit. it reliable shows 250mA to the SMV if the arduino 5v out is modelled as a battery supply, but I suspect I am making some mistake here, also because the calculated current for the smv is different in LTspice from Circuitlab. Anyone have any ideas how to sort this out? Would a PWM output from arduino be a solution?

Thanks!

simulate this circuit – Schematic created using CircuitLab


texts: Comparator logic control from a potentiometer

texts:
I'm trying to think of a solution to a problem.
I plan to use a 10k linear fader to control a voltage controlled amplifier (THAT 2180), however I would like to be able to control a logic high and low signal when the fader is moved from the bottom (infinity.)
The fader has 0V at the bottom and +5V at the top. I would like the fader to act like a switch as soon as the fader is moved.
I'm thinking a comparator that takes a sample from the fader output would do the job. The aim would be to have a 0 or 1 logic signal at the comparator output, high or low, it doesn't matter.
Any ideas would be greatly appreciated.
Would it be possible to use either a TL071/72 or NE5532, because I've got a load of these. The power supply is - + 15V.
Hope that's enough info, and no, this isn't my homework.


texts: Driving an RL circuit with an audio power amplifier

texts:
I'm using a Cerwin-Vega CV-2800 audio amplifier to drive the RL circuit depicted in the diagram below:

simulate this circuit – Schematic created using CircuitLab

The amplifier is rated for 1400 W at 2 ohms, 900 W at 4 ohms, and 600 W at 8 ohms. I have two resistors with value 1 ohm and 68 ohms, both rated at 100 W. R1 takes on one of these values. The resistance of the inductor is 40 ohms, and its reactance at 50 Hz is \$2\pi(50)(0.2) =\$ 62 ohms. When R1 is 68 ohms, I see a 3.25 V drop across the resistor; however, when R1 is 1 ohm, I see only a 0.04 V drop.

Questions:

Is this change in voltage because the series circuit divides the voltage across the resistor and the inductor, and the inductor has a much higher impedance than the resistor and therefore drops most of the voltage supplied by the audio amplifier?
Why does the power rating of the amplifier go down as the impedance of the load goes up?
If I wanted to generate a current between 7-10 A amplitude through the RL circuit, is this something my amplifier is capable of? If not, how much power would I need, and is there even such an amplifier out there?


texts: Calculating the resistor needed to replace batteries with another power supply

texts:
The project I'm working on is going to use a LiPo Battery to run a Raspberry Pi, Arduino, and some LED's. I currently have all of that working. One final thing I want to do is have a "Speaker" plugged into the Raspberry Pi. I went to the local electronics store and got a little battery operated speaker thingy that has a 3.5mm audio jack. The speaker runs off of two AAA batteries. I would like to wire it up so that the speaker runs off of the lipo battery instead of AAA. That way when I connect/disconnect the battery the whole system turns on and off as one.

My question is what resistor would I need to appropriately power the device? Two AAA batteries only put out 3v but my power source is 5v. I don't really know how much current the device needs though so I don't know how to calculate a resistor.

EDIT:
Did a little search on the internet and found a link to the product description: http://www.radioshack.com.eg/en/auvio-universal-speaker-for-media-players-40-036 That is the item I have. Due to complexity, budget, and size constraints I am unwilling to add another voltage regulator to the system. The battery I have is a 7.4v LiPo battery running through a BEC that is set to the default (5.1v). If I can use the power source directly great. If not then I'll have to just omit the sound feature of the project which will make it significantly simpler because the only reason for the Raspberry Pi is to provide sound.

EDIT 2: This is my BEC: http://www.quadrocopter.com/Battery-Eliminator-Circuit-BEC_p_625.html


texts:
Suppose you design ideal matching networks on the input and output of your transistor so ALL we're concerned with is the transistor and the packaging.

What semiconductor physics or parasitics or whatever sets the MAG figure in the datasheet?

I tried doing a few back of the envelope calculations: one by looking at the y parameters of the hybrid-pi model and looking at the unilateral gain.

This showed a dependence on the early voltage and beta (specifically, I get \$\ \frac{\beta V_a}{4 V_t}\$ ), but this figure was way too high (40 dB).

I also tried calculating the maximum stable gain given the parasitic base-emitter capacitance and the Barkhausen criteria (resulted in something looking like \$ G = (C_{be} Z_0 \omega)^{-2} \$), plugging in some sensible values gave a gain of somewhere between 20-30 dB, which seems better, but from what I understand, you can just add an inductor to resonate with this capacitance to stabilize the transistor and this is no longer a limit.

When MAG is measured, is this considered?
For whatever limits this MAG, could you point me to a reference where
this is modeled somewhat concretely?

I realize this might just be one
   of those things that just is really hard to model, but I really feel
   the need to have some back of the envelope calculation to ballpark
   this with some numbers.

I'm not particularly interested in answers
   that phrase this entirely in terms of the device's S-parameters at a
   certain frequency, unless you can explain why the gain is limited by
   this or that parameter, and then why that parameter is hard to make
   larger or smaller due to such-and-such reason.


texts: What are the parameters of a MP3 stream?

texts:
I'm not sure this is the right place to ask this but I'll give it a try:
I'm trying to build a WiFi Radio using my ESP8266, and currently it doesn't sound too good. I'm  using the code from here, which as far as I understand download a stream from a web server and playing it.
Currenty it doesn't sound too good so I'm trying to figure out how MP3 works.
I can see in this site that has radio streams, that each station has some parameters, like: MP3, 128, 44, S.
I understand that MP3 in the encoding, 128 I assume this is the bitrate, but what are the 44 and S stands for?


texts: Can a non-modulated / continuous carrier be heard in Superheterodyne receiver? Why do we need BFO?

texts:
I think a continuous carrier be able to heard in a super-heterodyne  receiver, since it has it's own oscillator.

Why do we need BFO then?
What's the difference between the two?
So, morse codes would be heard just on super-het receiver?


texts: Qi Charger broken magnetic backing plate

texts:
My Qi charger module arrived with a broken backplate. It appears to be some sort of magnet.

What is the exact purpose of this backplate? Is it meant to amplify the signals or only have them go one way?
Will the module work just as well with this broken plate or will it perform worse (longer charge times, more precise placement needed)?


texts: Can smartphones power a MCU circuit through an NFC tag?

texts:
NFC tags are passive devices and get their power from the NFC reader/writer. For my question, I'm specifically asking for recent smartphones as NFC readers/writers.
Does the phone transmit enough power to the NFC tag for driving a small microcontroller (say the Attiny 13A which draws around 0.19mA in active mode) and some peripheral devices?
Regardless of the answer, how much power could you usually expect to be transmitted when the phone and the tag have a maximum distance of 2cm?

Example Case: A passive info display. As soon as you touch the tag with your phone, the MCU is being powered and booted while the phone reads location information from the tag (i.e. New York City). The phone than makes a web request to get NYC's current air pollution level from a public API. This data is finally being written to the tag (without overwriting the location) and the MCU draws the data onto an E-Ink display (let's assume the drawing process takes 15mA). Finally, the phone can be removed and the power is lost - whereas the data stays visible, thanks to the E-Ink technology.


texts:
I want to buy an SMD IC.
More specifically, this one:
https://www.ti.com/product/SN74CBT3251#order-quality
I looked at the page and it offers:

SSOP (DB)
SSOP (DBQ)
TSSOP (PW)

I have this IC and i have it soldered on a SSOP16 breakout board.
Here is a picture of it.

I don't know which package to choose to buy.
I read the datasheets of the specific packages and they all appear to be the same.


texts: stm32 which timer and DMA channel should I use?

texts:
I am trying to control two lines of digital LEDs (WS2812b) with my STM32F103 using Timers with DMA and PWM. LED strips data lines are connected to PB5 and PB6 of the MC. I used STM32CumeMX to create the inital code for my project.

I click channel 1 and set it to "PWM Generation CH1". PB6 tuns green and
in DMA settings it says TIM4_CH1 and DMA1 Channel1. Looks OK, and it works.

But when I try to configure PB5 weird stuff happens:
I select TIM3 and Channel2. PA7 turns green(!?). I click PB5 and select TIM3_CH2 manually. The black pin appears next to it. In DMA settings it says TIM3_CH4/UP(!??) and DMA1 channel 3(!???). What is the logic here? What does /UP even mean? Where are all possible combinations of Timer/DMA channel are listed?

As the result PB5 does not work.

Also I noticed that CubeMX produces this:

/* Several peripheral DMA handle pointers point to the same DMA handle.
     Be aware that there is only one channel to perform all the requested DMAs. */
    __HAL_LINKDMA(tim_baseHandle, hdma[TIM_DMA_ID_CC4], hdma_tim3_ch4_up);
    __HAL_LINKDMA(tim_baseHandle, hdma[TIM_DMA_ID_UPDATE], hdma_tim3_ch4_up);

I deleted the last line, but it didn't help. I just want to configure PB5  similarly to PB6. What am I missing here?

Is it possible to use DMA on PB5 at all?


texts: I am wondering if anyone still has the EAGLE installation file for version 5. For my purposes, version 5 works better than version 6 and I have deleted the old file.


texts:
I have a broken headphone audio jack from an electronic keyboard. With the jack broken, the speaker audio no longer functions. The manufacture no longer supplies the part as it has been discontinued and they claim they manufacture all of their own parts. They have advised Googling the part number and looking on eBay, I have done so without luck.
The audio jack functions that when the headphone plug is inserted, the audio to the speakers is shut off. I have the schematic of the jack from the service manual.

I have 2 challenges:

Find an audio jack that has the same arrangement with 9 terminals
If the above exists, the jack to have the same pin-out and spacing to fit into the PCB

I am unsure of the claim that the manufacture indeed make all of their parts rather than source parts from third parties that have already been designed and built, especially for parts of this type. Thus I am assuming that the original manufacture may still produce it.
What seems to make this part unusual is the additional of an extra switch. From reading of the circuit diagram, 2 of the switches disconnect the left and right speaker and allow the routing of the audio to the headphones. The third switch from my understanding is used as a signal to the piano's microcontroller to detect the insertion of plug into the jack for the purposes of a headphone test function.
I am however slightly confused with the schematic. Normally when I see headphone jack schematics the switches have an arrow head that is in contact with the pole or has a small gap, thus distinguishing between normally close or normally open, respectively. This symbol is void of those and I am assuming this a normally closed switch. The other symbols for jack plug within the service manual, do indeed show arrow of the type I am used to seeing, this is the only one void of these.
So my question here is whether others agree with my assumption? It is consistent with the symptoms of no audio through the speakers.
My further questions relate to my challenges, and whether anyone knows of a headphone jack with the same arrangement, and a sign-post to such a part?
I appreciate that my second challenge is somewhat more difficult, however if I can find a solder tab version, this will be most suitable as a few flying leads will be absolutely fine.
I have a pic of the discontinued part obtained from a search using the manufacture part number. This isn't available from the picture source.


texts: Can I use DC20V/6.75A instead DC20V/6.5A Power Adapter for my VisionTek VT4000 - Dual Display 4K USB 3.0 & C Docking Station?


texts:
I want to buy a DC-DC converter which can convert 1.5-12V (input) to 0.5kV to 2kV (output). I searched the internet for such a converter but couldn't find one. I think such a converter exists as they are used in camera flash diffusers to convert 1.5V from the battery to 1kV in order to power the xenon flash tube.
If you want to know why I need such a converter- I'm interested in building a parallel plate electrostatic generator that requires input voltages of thousands of Volts. So I want to convert 5 or 12V from a battery to 1.5kV with the help of the converter and supply the 1.5kV to the parallel plates.
Now my question is do such converters exist? If yes do they have a specific name?
I don't want the converter to be too big I.e. its all three dimensions should be less than 150mm.


texts: Issue with Arduino TX/RX when using different power sources

texts:
I have had this issue multiple times and I really want to know what is going on. So I have a bench power supply, and I was powering my ESP8266 off of the bench supply. I then wanted to send it some AT commands, so I set up the Software Serial on the arduino and hooked everything up. All i got on the serial was complete garbage. I decide to disconnect the ESP8266 from the bench supply, and use the 3.3 output of the Arduino. I reset everything, and BOOM, serial monitor is working perfectly and I am no longer getting garbage from the ESP.

This has happened with multiple modules and I am at a total loss. Why would everything work fine when the module is running off of the 3.3v output of the arduino, and NOT when powered from 3.3v off of the bench power supply? Thank you for any clarification!


texts:
I would like to make a rlocus plot with Octave. The problem is that the poles and zeros in the plot appear very small and rather hard to see by the naked eye. Is there a way to make these more visible? Specifying the size of Markers doesn't help. My MWE code is:

pkg load control
num=[0 0 0 1 3];
den=[1 5 20 16 0];
sys=tf(num,den)
pole(sys)'

rlocus(sys);

v=[-6 6 -6 6]; axis(v);axis('square');grid on;

The poles are at these locations:

-2.00000 - 3.46410i
-2.00000 + 3.46410i
-1.00000 - 0.00000i
 0.00000 - 0.00000i

And there is a zero at -3.0000. The plot from Octave is:

Octave adds a legend and shows a red dot for poles and a blue dot for zeros. These markers are so tiny that I have to zoom in at several magnitudes in order to see them. In the figure attached one will not be able to see these small markers at all.


texts: Device including RTC EEPROM and battery?

texts:
I am currently designing an electronic board and i got a question:

Do you know if there is any device in which are integrated an RTC, an EEPROM and a battery? I heard about this type of device (i think it is called Time keeper) but I can't find any.

Thank you


texts: VGA video filter and frequency requiered for this filter

texts:
I'm designing a VGA generator and I have found nice and cheap video filter (ADA4430-1) that goes after DAC.

Its datasheet says that it has cutoff frequency around 10MHz. And that it is specially designed as video filter.
I want 640x480, 60Hz, so my pixel clock (frequency at which pixels are changing) is 25MHz.

So now my question: If my pixels changes with 25MHz and filter is for 10MHz, so how and why this filter calls itself suitable for video?

I'm a little confused - what should be the frequency cutoff of such filter to operate with this 640x480 VGA (25MHz)?


texts: Is it appropriate to use a 300V RMS CAT I rated oscilloscope to measure 230V RMS of a power inverter?

texts:
Yesterday I decided to look at the waveform of my portable power inverter. The inverter specs are the following:

Input: 12 V DC
Output: 230 V RMS
Rated power: 300 W

I powered my inverter from a bench power supply at 12 V (powered from a mains power outlet) and set the current limiter to 2 A. The inverter was then loaded with a series of 2 resistors of 1 Mega ohm each (rated at 1.5 W).

At first, I measured the output voltage by connecting the probe of the oscilloscope to the second resistor (therefore measuring half of the inverter output). Then I connected the probe in parallel to the series of resistors.

My oscilloscope is a Rigol DS1054Z. From the datasheet, I read

  Maximum Input Voltage (1 MΩ) for analog channel: CAT I 300 Vrms, CAT II 100 Vrms.

According to my understanding of CAT ratings, the system I was probing should be CAT I so the measurement setup is appropriate. Is my reasoning correct? Furthermore, I'd like to understand if I may have damaged the oscilloscope somehow, maybe because of startup/poweroff transients from the inverter.

The probes I used were those shipped with the oscilloscope. I think I was using the x10.

EDIT:
I added the waveform of one of the measurements I did


texts: USB power delivery and data transfer using type c

texts: I have recently been designing a soldering station that uses Weller active tips and have become interested in using USB power delivery to power the station I have found the STUSB4500 which looks relatively easy to use and has 3 power profiles. I was wondering whether using this ic I would still be able to plug the port into my pc to program the on board stm32 if I added a 5v profile and when plugged into a wall port I could negotiate for 12v for day to day operation? Thanks.


texts: Relation between spectral leakage and the frequency of harmonics of a signal

texts:
I'm currently studying "Data Acquisition".

I read that when we have frequency/spectral resolution equal to a natural number, there will be no spectral leakage, for none of the harmonics.

However the text I read makes a parenthesis about a situation where the harmonics frequency is greater than half the sampling frequency but it doesn't explain on detail what happens. I was wondering if someone could give me some explanation please.

I'm also testing this phenomena on lab.

On one experiment I'm sampling a triangular signal with frequency 600 Hz and sampling frequency 24000 with 5600 samples. I'm studying the first 11 harmonics. In this case 11*600= 6600<12000 so I assume no spectral leakage.

On the other hand I have a square wave with frequency 500 Hz and sampling frequency 9500 with 1710 samples. I'm studying again the first 11 harmonics and then again theoretically we would have no spectral leakage. However in this case the 10th and 11th harmonic will have a frequency greater than fs/2 so spectral leakage?

But now that I think about it, while I was writing this. Isn't f>fs/2 a condition for aliasing? So I'm getting aliasing instead of spectral leakage. I'm confused.

If someone who understands about this could explain me I would thank you very much!


texts: What do the settings on a multimeter mean?

texts: I wanted to measure the resistance in ohms of an apple, so I plugged my digital multimeter into either end of the apple and adjusted the settings up to 200k and it gave me a reading of about 68. Because the meter was set to 200k does that mean I have to do 68 x 200000 to get the number of ohms for the apple or something else? Sorry, I'm new to all this.


texts: What is the circuit for the PMOS driver found in synchronous buck regulator ICs?

texts:
Some synchronous buck regulator ICs sport a NMOS lowside switch and a PMOS high side switch.  I understand why these use a PMOS/NMOS pair instead of a NMOS/NMOS pair, but I can't seem to make sense of how one would drive the PMOS at 1MHz without significantly impacting the ICs quiescent current.

Asked differently, what is the circuit for the component show below (taken from the SC192 IC, which switches at 750kHz and has a quiescent current of 50uA).

Update:

I recently found this schematic (from the IR2302 600V NMOS Driver) which shed some interesting light on the matter (annotations assume we are driving a 500V load with a 15V VCC).

To level shift from VCC levels to high voltage levels (say, 500V), they use NMOS pull-downs with resistive pull-ups.  This presumably works because the following stage (labeled Pulse-Filter in the diagram below) has very small input capacitance (in the order of a few pF) and so can be switched at high frequency (the part is spec-ed to switch at 1MHz).

When the HV-Level Shifters NMOS are not enabled, the Pulse-Filter only sees +15V on its inputs, which is fine.  However, when those NMOS are enabled, the Pulse-Filter sees -500V on its inputs.  Presumably, these get clamped, but clamping 500V is no small feat.

The catch with this IC is that it's used to drive N-Channel MOSFETs.  For P-Channel MOSFETs, is it as simple as taking the ~Q output of the SR latch on the schematic above (i.e. inverting the output logic)?


texts: Connecting to an IR sensor to a microcontroller module without soldering pins

texts:
I'm trying to connect an IR sensor to an Adafruit Feather Huzzah microcontroller module without soldering the pins on. The sensor has a power supply of 5V which I have connected to the USB pin of the microcontroller as shown below. I don't have access yet to a breadboard but I want to try and get some data as soon as I can.

My first question is whether the electrical connections will work without soldering?

Secondly, am I using suitable cables for the connection to the sensor since although it goes all the way in, it is quite easy to pull out. This may be a problem since they may come out during application.

And finally, while writing this question, I found that the USB gets regulated down to 3.3 V so I need to use a power supply at 5 V. Is there a quick fix for this or will I have to just have to wait until the breadboard arrives and then connect it to a battery?

Also, what are these cables called?


texts: How can I tell (easily) if my power supply is regulated/switched or unregulated/nonregulated?

texts: I found this great blog post about unregulated vs. regulated and switched power supplies. I've got a specialized need for a Regulated 12v power supply and a handful of wall-warts and bricks laying around that I would like to re-use if possible. I have a volt-meter and a handful of basic electronic bits and wires. But I haven't found anything that would help me identify the type of power supply.