Basic Stamp pins always high?
Macadaciouse
Posts: 16
Hi all,
I'm trying to control a motor via relays. I'm using tip120 transistors to run 2 12v relays. When I connect vss to 12v+/the collector, the relays click. Connected to 12v-/emitter, nothing. I checked voltage on the pins and all are reading about 2v regardless of input. Did I fry something? The board comes on and responds normally otherwise. I have a fair amount riding on this relatively simple effect, I just don't know enough to troubleshoot.
Thanks for any advice,
Mac
I'm trying to control a motor via relays. I'm using tip120 transistors to run 2 12v relays. When I connect vss to 12v+/the collector, the relays click. Connected to 12v-/emitter, nothing. I checked voltage on the pins and all are reading about 2v regardless of input. Did I fry something? The board comes on and responds normally otherwise. I have a fair amount riding on this relatively simple effect, I just don't know enough to troubleshoot.
Thanks for any advice,
Mac
Comments
By default, the Stamp I/O pins are in input mode where they float in a high impedance state. You use LOW and HIGH statements to change them to specific output states (Vss or Vdd respectively).
You will need a resistor between the I/O pin and the transistor's base. See Nuts and Volts Column #6 for a discussion of this.
http://www.kronosrobotics.com/Anotes/Relays.pdf
Info also applies to Stamps.
The circuit was taken from here:
http://www.arduino.cc/playground/uploads/Learning/relays.pdf
but doubled up, so one relay controls power on/off through the other relay.
What happens if a resistor is not used between the stamp and the transistor? Could I have damaged anything that way?
Thanks for the links, I'm going through them now. It's all just a bit overwhelming, such a glut of information. Thanks for your help,
Mac
Your circuit diagram looks fine, should work OK if it's hooked up properly.
You've been so helpful, I hope you don't mind giving your opinion on another question; I'm using the parallax pir motion sensor and the output never seems to shift from high. I tried covering it to isolate it from movement and nothing happened, still high. Could I have inadvertently damaged it, or is this related to the jumper settings?
EDIT: The relays are driving a 3hp motor which is on circuit with another animatronic figure, my computer and who knows what else. Could the whole circuit, or at least that one extension cord, be overloaded?