Hardware based Clapper relay issue...

Discussion in 'The Projects Forum' started by kozzney, Jun 8, 2012.

  1. kozzney

    Thread Starter New Member

    Jun 8, 2012
    7
    0
    Hi, I'm making a clapper (you know, clap on lights clap off lights) from this guy's schematics:

    http://www.instructables.com/id/How-to-make-a-CLAP-ON-CLAP-OFF-circuit-from-scra/

    But I have a problem. If I don't connect my 5V relay to the circuit (just have a LED showing me the output of the J-K flip flop), everything works as I think it should.

    However, when I connect the relay to the circuit, when I clap to turn everything off, the lights flash off and then come immediately back on.

    I've got the diode across the coil of the relay, but I have no clue why this is happening, anyone got any ideas?

    Thanks.
     
  2. Brownout

    Well-Known Member

    Jan 10, 2012
    2,375
    998
    The link doesn't show a schemetic. Make sure you have clean and bypassed power to the circuit. Make sure the wires to the light route away from the rest of the circuit.
     
  3. wayneh

    Expert

    Sep 9, 2010
    12,127
    3,049
    You'll get better responses if you post the schematic. Few here want to watch a grainy video to get a glimpse of a hand-drawn sketch. Just too much effort. ;)
     
  4. kozzney

    Thread Starter New Member

    Jun 8, 2012
    7
    0
    I'll work on a schematic right now.

    What do you mean by clean and bypassed power? Right now, I took an old cell phone wall charger, cut the USB end off, and am using that to power my 5V circuit. The cell phone charger takes 120VAC and outputs 5VDC at 550mA
     
  5. Brownout

    Well-Known Member

    Jan 10, 2012
    2,375
    998
    Try a different power supply. Wall chargers don't produce the cleanest power. By clean, I mean a steady and noise-free DC voltage. Also, try baypass capacitors placed near the power pins of any IC being used. Typical values for byapss caps are .0uf-1uf.
     
  6. kozzney

    Thread Starter New Member

    Jun 8, 2012
    7
    0
    Ok here is my schematic of the circuit I'm building. They are both the same, one is white background, one is black. The relay is hooked up to a 120VAC lamp, drawing 26W.

    Thanks for the help so far, this is my first attempt at building a circuit outside of the 1 electrical class mechanical engineers are required to take... (which I took ~4 years ago...)
     
  7. Brownout

    Well-Known Member

    Jan 10, 2012
    2,375
    998
    If you get good, clean power, another possibility is the monostable times out early. Carefully check all the associated components, especially the 100K resistor and 10U capacitor. Pay particular attention to the capacitor polarization.
     
  8. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,392
    1,605
    A 5V relay can draw a surprising amount of current. Add a BIG cap, 100uf, 470uF or so on your 5V line. See if that helps.

    Also, how LOUD is the relay when it clicks in? Could that noise be coupling right into the mic and acting as another clap (off)? Can you just lightly tab the circut with a pencil and get it to hear that?
     
  9. kozzney

    Thread Starter New Member

    Jun 8, 2012
    7
    0
    I had actually thought about this earlier, and ensured that wasn't the case by isolating the microphone (taking it off the board and pointed away from the relay) and there's no way it could have heard the relay.

    But you are right, the relay is pretty loud when it switches. I think it may be a back EMF issue? Which I don't understand, I've got a 1N4004 diode across the relay coil to prevent that (and yes it is in the right direction)
     
  10. kozzney

    Thread Starter New Member

    Jun 8, 2012
    7
    0
    Yea the power looks good to me on my multimeter. The voltage is very steady at 4.96VDC, no jumping around or anything. I've checked all the connections; one difference I do have between my circuit and the plan I was following is in the J-K flip flop.

    My J-K flip flop, 74LS73, doesn't have a "set" input, whereas the J-K flip flop used in the video does (that one is a 74LS109). Is this really a critical input to have?

    Also, the output from my J-K flip flop into the transistor is only at 2VDC. Shouldn't it be 5VDC, like the input? Or is there a voltage drop somewhere inside of a J-K flip flop?
     
  11. Brownout

    Well-Known Member

    Jan 10, 2012
    2,375
    998
    You won't be able to see anything with a mulitmeter. It isn't fast enough to see trasients.

    No, not critical.

    I think it should be 5VDC. That sounds suspect. Try disconnecting the F/F from the transistor and see.
     
    kozzney likes this.
  12. absf

    Senior Member

    Dec 29, 2010
    1,493
    372
    I have redrawn the schematic with proteus and hope it would be clearer in a glance....:)
     
    kozzney likes this.
  13. kozzney

    Thread Starter New Member

    Jun 8, 2012
    7
    0
    Thanks, yea, AutoCAD isn't the best for drawing circuits I guess lol...

    But in other news, I've got the circuit working! I went and found a 74LS109 flip flop and replaced the 74LS73 with that, and now it's magically working. The only difference between the two (that I can discern) is that the 109 has a "set" input. Also, the K input is inverted, but that shouldn't matter, I had the K input on the 73 set to opposite what it should have been.

    Anyways, thanks everyone for your help! I'm working on soldering it all together now, we'll see how that goes...
     
  14. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,392
    1,605
    If you put it in backwards it keeps the relay from turning on.

    If you leaver it out or have a bad connection the relay will turn on, at least once, but soon the thing driving it (such as a transistor) will fail.

    "Back EMF" just means the relay coil looks like an inductor, so when you abruptly turn it off a big voltage spike can happen. The diode is there so the current has an alternate path to go to bleed off the energy stored in the inductance. (huh?)
     
  15. kozzney

    Thread Starter New Member

    Jun 8, 2012
    7
    0
    Ok, so I swear the circuit was working perfectly on my proto board. Now I transferred everything over and soldered it onto a printed circuit board... and guess what it's not working again.

    The relay turns on and off seemingly randomly with random claps. Even saturating the mic by blowing into it doesn't reliably turn the relay on and off. I've gone through and checked all the connections like 3 times, and nothing looks like it's shorted anywhere on the soldered side.

    I have 3 strategically placed LEDs; I can see the output of the 2nd op-amp looks ok, as well as the output of the multivibrator. But, like I said, the output of the J-K flip flop does not reliably toggle. It literally takes like 15-20 claps sometimes to get it to toggle, sometimes more, sometimes less.

    Am I missing something maybe with soldering? I've never soldered a circuit like this before, anything important that I should have known beforehand? Or maybe I'm missing something stupid, maybe I should just stop and come back to this project in a couple days
     
Loading...