Using a 9v relay with Basic Stamp
Buddie
Posts: 29
Hello,
I am building a project and I need to use my BS2px to control 9 and 12 volt relays. To hook them up, is it okay to use just a transitor with the base connected to the stamp through a 10k resitor, the collector connected through the relay to 12v and the emitter connected to ground? I also have a diode across the relay for protection. The stamp is powered through a 5v regulator, and the 12v comes from the unregulated supply. Is this setup okay, or do I need something more complicated, like an emitter-follower? Any help is greatly appreciated!
Thanks.
I am building a project and I need to use my BS2px to control 9 and 12 volt relays. To hook them up, is it okay to use just a transitor with the base connected to the stamp through a 10k resitor, the collector connected through the relay to 12v and the emitter connected to ground? I also have a diode across the relay for protection. The stamp is powered through a 5v regulator, and the 12v comes from the unregulated supply. Is this setup okay, or do I need something more complicated, like an emitter-follower? Any help is greatly appreciated!
Thanks.
Comments
Have a look at Nuts and Volts Column #6. Go to the main Parallax webpage and click on the Resources tab and you'll see a link to the Nuts and Volts Columns index.
Thanks
Mike
' {$STAMP BS2}
' {$PBASIC 2.5}
DO
HIGH 1
PAUSE 2000
LOW 1
PAUSE 2000
loop
I have also·attached is a schematic.
I hope that i will not have to redo my Project due to something overlooked/unexperieanced. I hope this will help. if you have and other ? let me know. i have used both npn and pnp s for the transister and have tried a fresh battery.
thanx again
mike
1) The resistors are too large. Transistors are current amplifiers and very little current flows through 50K with 5V applied to it (about 100uA).
2) You have to have a common ground with the Stamp power supply or the voltage on P1 has no meaning to the transistor and motor.
3) The motor should be in the collector lead, not the emitter. Look up the difference between a common collector amplifier and a common emitter amplifier.
Again thanx i will check it out.
thanx mike
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen