Shop OBEX P1 Docs P2 Docs Learn Events
Problem with activating relay — Parallax Forums

Problem with activating relay

KudonymKudonym Posts: 5
edited 2014-05-07 12:49 in BASIC Stamp
Hi, got some good advice previously so I wanted to see if I could get help on another problem. I'm trying to wire up a relay to turn a solenoid on and off. I tried with 3 different kind of relays, two 12V and one 5V and I'm just not getting any response. All the relays I have available have five pins, two for coil, three for connection with a "normally closed" and "normally open" pin.

When I hook the solenoid and its 12v power source to the "normally closed" loop, it receives power, and does not receive power when hooked to the other pin.

I've read a couple different driving techniques, particularly with the schematic on this thread: http://forums.parallax.com/showthread.php/143792-Using-BASIC-stamp-with-electric-solenoid-valve-need-help

Yet I've had no luck. Tried different assigning it to different pins but still get no response from the relay.

Here's some pictures of my part and what I tried to set it up like.
photo 1.JPG
photo 2.JPG
photo 3.JPG
photo 4.JPG
640 x 480 - 121K
640 x 480 - 110K
640 x 480 - 125K
640 x 480 - 159K

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-05-04 15:42
    Did you use the schematic from post #3 in the thread you linked to? If so where's the transistor and other components? Which transistor are you using?
  • Mike GreenMike Green Posts: 23,101
    edited 2014-05-04 15:51
    Why do you want the relay? Do you want to turn the solenoid on and off using a microcontroller ... maybe a Stamp? Nuts and Volts Column #6 shows how. It's the same diagram shown in the thread you mentioned. You connect the solenoid and its 12V power supply in series with the "normally open" contact and the common contact so, when the relay closes, it switches on the solenoid. The coil gets connected with the diode and transistor and resistor as show in the Nuts and Volts article along with the 5V supply for the Stamp.
  • KudonymKudonym Posts: 5
    edited 2014-05-05 04:57
    Yeah, forgot to mention I am yusing the parallax BOE. I had hooked a wire from the pin to a resistor, the resistor to the middle of a 2N2222 transistor, one end of that transistor to ground, the other to the coil of the relay, a diode connecting the coils of the relay and the other coil to ground. Tried it also connecting straight to the relay but nothing works
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-05-05 05:17
    Try disconnecting everything from the relay except the ground connection to one of the coil pins. Now connect the other coil pin to 5V. Do you hear the relay click?

    If so try it again with the diode. If it still clicks with 5V to the coil pin, try it with the transistor (wired appropriately) except don't use the Stamp to trigger to the center pin, use a direct connection to 5V (through appropriate resistor) to the center pin.

    Once your satisfied the circuit works without the BS2, add the BS2 to the mix. If it doesn't work with the BS2, try a different I/O pin. If it still doesn't work Take a picture of your setup and post the picture and the code you're using.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2014-05-06 14:11
    A common mistake with TO-92 transistors such as the 2N2222, 2N3904, etc is that the datasheets often show the pin connections from the bottom. Since most people think from a top-down perspective they often get the Emitter and Collector backward. When looking at the transistor with the flat face toward you and the leads facing down the pins should be from left to right, Emitter, Base, Collector.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2014-05-07 10:17
    Did you try turning it off and on again?

    That is not a logical troubleshooting method given the information presented.
  • LA6WNALA6WNA Posts: 138
    edited 2014-05-07 12:49
    one end of that transistor to ground, the other to the coil of the relay, a diode connecting the coils of the relay and the other coil to ground. Tried it also connecting straight to the relay but nothing works
    Hi there. Seems like you have the ground potentiale at the both sides of your relay coil... The other end of the coil have to be connected to 12v (if relay coil is 12v). Also ground at the BOE has to be connected to ground (minus) at your 12v battery.
Sign In or Register to comment.