Connect with us

need a little flip-flop help!

Discussion in 'General Electronics Discussion' started by rebeltaz, Jan 30, 2015.

Scroll to continue with content
  1. rebeltaz

    rebeltaz

    33
    0
    Nov 22, 2012
    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!
     

    Attached Files:

  2. Harald Kapp

    Harald Kapp Moderator Moderator

    10,220
    2,201
    Nov 17, 2011
    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.
     
  3. rebeltaz

    rebeltaz

    33
    0
    Nov 22, 2012
    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!
     
  4. CDRIVE

    CDRIVE Hauling 10' pipe on a Trek Shift3

    4,960
    648
    May 8, 2012
    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
     
  5. rebeltaz

    rebeltaz

    33
    0
    Nov 22, 2012
    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
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-