Hello, I want to make a latch that has 1 input and 2 outputs.
The working of this latch must be like:
1 - When the input is high output will be 10
2 - The input will be zero for some time
3 - When the input is high again output will be 01
4 - The input will be zero for some time
and it continues like this, it is like a single button that can do "on" and "off" both.
The switching frequency will be at most 120 Hz. But there will be instances where the off time is just 1 microsecond.
The latch will have a 5V input and 5V output
How can I implement this? It is for an Arduino and it will drive two MOSFET drivers.
1) What happens to the output values, eg. 01 an 10 ? What form do they take, a byte value
or a flag or.....?
2) off time 1 usec, is that for deadtime between the two MOSFETs to keep them both off ?
3) The off time comes from where ? Its a value or variable or hardware or....?
4) "for some time", what is the range of time ? From what to what ?
5) Accuracy of timing needed ?
Something like this -
mBlock takes user block configurations and generates Arduino code.
1 uS off time may be issue however with this approach. However
one can use MOSFET drivers that have internal deadtime control.
Regards, Dana.
--- Updated ---
Primarily a HW approach, single chip, many resources left for other stuff, see resources below.
ISR loads off time into PWM when input toggles.
Off time will come from an Arduino
It is like, the duty cycle of the PWMs will vary and the dead time caused by them is usually enough but when the duty cycle is 1 then there will be no delay between turn on and off of MOSFET couples. To avoid the danger I will purposefully add a microsecond delay form the code.
0.5 seconds to 1/120 seconds but also sometimes 1 microseconds. Basically depends on frequency and duty cycle. The minimum frequency is 1 Hz and 2 PWM signals occur at each period so the input=0 state wont be longer than 0.5 seconds. There will be no output when input=0 btw. It just has to remember the previous output configuration and do the opposite when the new input comes.
It will determine the average voltage for an AC motor, It doesn't need to be too accurate.
I just wanted a basic circuit with gate elements (NOR,AND....) that will allow me to create 2 PWM signal from a single Arduino pin. The two PWM signals will be delayed and inverted version of each other. My plan is to invert every other PWM signal with circuit components. That's why I wanted a 10 and 01 configuration.
The simulation stuff you sent me are too complex, I am sorry, may I have a circuit diagram please. I saw few that are not exactly what I wanted for example D latch or Push on off latching circuit.
Requires push button and duty cycle would cause problems:
the circuit in the video has a lot of issues:
* no power supply capacitors
* never leave (unused) inputs floating!
* CD4013 is mature
* bjt connected as emitter follower loses a lot of drive voltage
* CD4013 output current is rather limited (just 0.5mA for V_OH = 4.6V)
* the circuit violates CD4013 clock rise/fall time specification
Aah I wasn't going to use the BJTs, I was going to directly connect the Q and Qnot to IR2110. I guess you mean the base current will be affected by the emitter resistance. Yeah good point.
This concerned me. In the datasheet:
Soo, I think clock rise and fall time is close to zero as the clock signals come from a PWM signal generated by Arduino. What is wrong with the time can you explain?
capacitors:
No. It makes no differnce what supply you use.
Good practice is to use a capacitor at each supply pin of each IC.
So many of PCBs (professional industry devices) have more than 100 of these capacitors.
output current:
You are right about static current. But at every edge you need to charge/discharge (stray) capacitors. So with just 0.5mA your edges may go slow. It depends a lot on your ciruit and the PCB layout.
He calculates the current limiting resistor for the LED as if there was 5.0V at the output. But even with just 1.5mA the output voltage may drom from ideal 5V down to 2.5V. But a standard LED is made for 15...20mA.
rise/fall times:
Again: I referred to the circuit in the video. The falling clk edge is in the region of 100us. So it is too slow, intermediate oscillation may occur and the ouput stat may cange to a random state after releasing the pushbutton.
Just the fact that this does not happen in the video is no guarantee that it will not happen when you rebuild his circuit.
I just want to say: This video is not the best choice to learn from.