Shop OBEX P1 Docs P2 Docs Learn Events
Relay circuit causing feedback and stamp reset — Parallax Forums

Relay circuit causing feedback and stamp reset

dhenshawdhenshaw Posts: 7
edited 2007-01-01 01:39 in BASIC Stamp
I'm working on a mechanical clock project which, among other things, rings a standard household bell chime at the top of every hour (up to 12 times in sequence, with a gap of a few seconds between each chime). The problem is that after 5-7 chimes, I'm getting the dreaded feedback through the circuit which then hangs the Stamp. My circuit looks fine (it's identical to the "reference" circuit posted on this forum) - do you know where I might be going wrong?

Here are the specifics...
  • The resistor between the Stamp Pin and the transistor is a 10k, 1/4 watt (have also tried a lower 330 ohm)
  • The NPN transistor is a standard "pn2222" from Jameco
  • I use a 1N4001 diode as shown in the schematic
  • The relay is an Omron G5LE from Jameco. It's rated at supporting a load of·10amp @ 250vAC
  • The power for the chime is a standard household bell transformer: 16V AC @ 10VA (note: AC, not DC)
  • The relay effectively completes the circuit between the transformer and the door bell. The code keeps the relay on for about 1/4 of a second before releasing it, then waits 3 seconds before it chimes again.



Again, I know the circuit works... it's just that after around 5 to 7 chimes the stamp freezes.

Thanks for any advice!

Comments

  • stamptrolstamptrol Posts: 1,731
    edited 2006-12-31 19:20
    Circuit looks fine, except you don't say where the +ve is developed. Is it completely separate from the bell circuitry? Hopefully, the stamp's Vdd pin is not feeding the relay coil circuit. The relay draws a reasonable shot of current ( 79mA at 5v, for example) each time it operates, so the stamp power supply must be able to supply the current without letting the voltage drop. The transistor base resistor has to let enough current through to make sure the transistor fully turns on. About 1K is a safe bet.

    Also, is the diode OK? You might also benefit from a 0.1 uF cap between +5 and Vss very close to the stamp.

    If the RESET connection on the stamp were physically close to the relay or the chime, you could possibly have enough pickup to reset the stamp. I think you can pull-up the reset line with a 15K resistor to make it a bit more robust, if this turns out to be the problem.

    Tell us more about the relay/stamp DC power.

    Cheers

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
  • dhenshawdhenshaw Posts: 7
    edited 2006-12-31 21:01
    Ah, something you said got me thinking...
    stamptrol said...

    Hopefully, the stamp's Vdd pin is not feeding the relay coil circuit. The relay draws a reasonable shot of current ( 79mA at 5v, for example) each time it operates, so the stamp power supply must be able to supply the current without letting the voltage drop
    The Stamp's Vdd pin was indeed feeding the relay. I had never thought to seperate the relay power from the Stamp Board's power supply. I just spent a few minutes modifying the relay to get its power from the 5v power source (that also feeds the Stamp), and for now at least it will happily chime along for as many chimes as it wants. So although I'm still using the same 5v power supply, not using the Vdd pin in the relay circuit·seems to avoid any EMF or voltage drops.

    So, I think, problem solved. Thank you.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-01-01 01:39
    Are you sure it’s not a code issue? ·How can you be sure the Stamp Module is locking up? ·Are you able to DEBUG values and verify if the program is restarting or still running the loop? ·Before deciding it wasn’t the code I would recommend putting a DEBUG statement in the routine that displays a message each time the routine attempts to activate the relay. ·Also put another at the beginning that prints, “Program Started” or something similar. ·This will help narrow things down.· Take care.


    EDIT: Saw your reply...So you may have it solved, but good future debugging advice.· =)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
Sign In or Register to comment.