Maker Pro
Maker Pro

need a little flip-flop help!

rebeltaz

Nov 22, 2012
33
Joined
Nov 22, 2012
Messages
33
Admittedly, flip-flops are not my thing, but from what I read in the datasheet, I don't understand why this isn't working. I am building a sensor that will turn a hall light on when I go in one of two doors and back off when I exit one of two doors. A IR LED shines in an IR photodiode, which triggers a 555 in monostable mode for an on-period of 2.5 seconds. Here is where things go awry. The output of the 555 SHOULD toggle the flip-flop thereby turning a relay on or off (via an NPN transistor) on each pulse.

The problem is that both Q and Q (I can't do a line on top so...) are staying positive regardless of the clock pulse from the 555. That is keeping both the transistor and the relay turned on.

Can someone please tell me what I am doing wrong with this flip-flop? I have attached the schematic I am using. I could design this using an MSP430, but that is just overkill in my mind, and I really don't like doing things with processors that SHOULD work fine with discrete components.

Thanks!
 

Attachments

  • schematic.png
    schematic.png
    181.4 KB · Views: 114

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,747
Joined
Nov 17, 2011
Messages
13,747
You have PRE and CLR both connected to GND. Since these inputs are low-active, you're holding both outputs High (see datasheet, page 2). Connect PRE and CLR to Vcc instead.
 

rebeltaz

Nov 22, 2012
33
Joined
Nov 22, 2012
Messages
33
You have PRE and CLR both connected to GND. Since these inputs are low-active, you're holding both outputs High (see datasheet, page 2). Connect PRE and CLR to Vcc instead.

D'oh! I'm not sure what I was looking at. Now when I go back and look at the datasheet, I see that. No... I take that back... I was originally designing this around a CD4027 flip-flop and the Set-Reset lines of that were tied to ground - or at least that's the way it looks to me. When I changed to the 109, I forgot to swap the Set-Reset lines. I will try that tomorrow.

Thank you so much for your reply!
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
I could design this using an MSP430, but that is just overkill in my mind, and I really don't like doing things with processors that SHOULD work fine with discrete components.

I hope that Harald's suggestion fixes your problem but as an aside note there's nothing "discrete" about a 555 or the 74LS109. ;)

Chris
 

rebeltaz

Nov 22, 2012
33
Joined
Nov 22, 2012
Messages
33
I hope that Harald's suggestion fixes your problem but as an aside note there's nothing "discrete" about a 555 or the 74LS109. ;)

Chris

lol.. yeah, I know. I only meant discrete in relation to a microprocessor and code. Harald did help indeed. In addition to tying PRE and CLR high, I also had to tie K low instead of high. But he did point out that I neglected to check the datasheet when I swapped chips! Simple things... but sometimes a second pair of eyes helps. Now we're flipping and flopping like pros! :D
 
Top