D flip-flop output set high at power-up

Thread Starter

ebjowei

Joined Jan 28, 2018
4
Hi,
I have created a circuit that:
-Debounces 5 momentary push buttons.
-Inverts the active low signals from debouncer.
-Triggers a D flip-flop to toggle its outputs.

It works fine with one exception: when applying the Vcc at start-up the outputs (Q) of the D flip-flop are set high (and stay high). As I understand the initial value should be low. Seems that there is some transient issue when voltage is applied. If I increase the voltage very slowly the problem does not occur. "Slowly" in this case means 0->5V in ~10 seconds. I connected Clear and Set to Vcc according to datasheet.

Does anyone have any idea how to avoid this problem? Please see attached picture.

//Björn
 

Attachments

ericgibbs

Joined Jan 29, 2010
18,869
hi eb,
A simple way is to use a resistor and capacitor in series between the supply voltage and 0V, take off a Reset pulse from the junction and connect to Clr or Set of the F/F.
E

EDIT:
This is the R/C method, note the delayed rise time of the Rst pulse.
 

Attachments

Last edited:

Thread Starter

ebjowei

Joined Jan 28, 2018
4
Thanks for both answers! So, the idea is to reset the flip/flop after a few milliseconds determined by the RC filter, right? So even if the output is set very early after power-on (as in my problem description) it will be reset soon after that? I guess that could work, will definitely try it :).

The reverse diode, would that be to short-circuit negative voltages over R1 when switching on power?

//Björn
 

ericgibbs

Joined Jan 29, 2010
18,869
The reverse diode will help discharge the Cap, when the power is removed, also improves the recovery time of the R/C reset.
EDIT:
What I mean by the recovery time is, if the 5v power supply momentarily failed and was restored, the Cap could still be sufficiently charged and so would not provide a Reset pulse.
 

Thread Starter

ebjowei

Joined Jan 28, 2018
4
Ok, when supply voltage is low (momentarily or not) the cap will be discharged through the diode in a very short time instead of through R1 in a longer time. And this will make sure the cap voltage is always 0 and ready to create a new reset pulse when supply voltage comes back. Something like that? The diode could be more or less any standard one I assume.

//B
 

MrChips

Joined Oct 2, 2009
30,823
All flip-flops will power up in an unpredictable state. If you wish flip-flops to power up in a given state, you need a POR (power on reset) circuit.
There are dedicated chips designed to do this. A simple RC circuit on the reset pin of the flip-flop as already suggested will do the trick.

Having a reverse diode has advantages and disadvantages as already stated. Try it both ways and see which you prefer.
 
Top