Pages: [1]   Go Down
Author Topic: Transistor/Relay switch assistance  (Read 1468 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Good evening,

I know there have been a few threads on this board in regards to using a relay but I've been scratching my head and trying to get this circuit working for a while and I've given up....

What I'm working with:
- Arduino
- 12v1A pump
- 12v1A  SPDT relay (side 1 has the image of the coil on the diagram)
Here's an image:
- A NPN switching transistor

It's very simple, turning digital pin 2 on will turn the pump on.  

So I need help making sure my connections are right and I don't fry my board...

I'll do my best to express how I think the circuit should be, any corrections would be appreciated!

Arduino Pin 2 --> 1k resistor --> transistor base
Arduino ground --> transistor emitter
Transistor collector --> relay (side 1)
Arduino ground --> relay (side 1)

12v DC power supply + --> relay (side 2)
Pump power + --> relay (side 2)

12v DC power supply ground --> Pump ground


I guess I'm not sure where to connect the "common" 5th pin on the relay.

Obviously it's incorrect and I don't think I'm understanding the relay correctly.  I understand a small current across the coils will close the connection on the other side to create a separate circuit for the 12V DC power supply going to the pump but it's just not working out as planned.

Is it possible to trigger the relay directly from the Arduino without the transistor?

Thanks for any replies!  It's very much appreciated.  This is for an Arduino demo I'm doing next week so I'm hoping to have this circuit figured out by the weekend and running....
« Last Edit: October 06, 2008, 09:11:00 pm by mdweezer » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

After getting a better understanding of relays after much Googling I have connected the relay in such a way so the "normally closed" works, I can create a circuit with the 12V DC power supply and the pump and it works.  So I re-created the circuit using "normally open"  (I now know how the common pin works).

However, I still can't get the transistor switch to send off enough juice to cause the relay to activate and closing the circuit so the pump gets turned on.

Could it be the resistor I'm using?

Twice while testing the circuit with the transistor (I didn't have a resistor in place) the USB port on my Mac shut itself off because it was drawing too much power.

Any thoughts?

I've been looking at it too long tonight so I'll continue tomorrow with the transistor problem and see what I end up with...

Would still appreciate any thoughts if anything can see where I'm going wrong here...

Thanks!
Logged

London
Offline Offline
Tesla Member
***
Karma: 10
Posts: 6250
Have fun!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There is a wiring diagram for your relay here: http://catalog.tycoelectronics.com/catalog/common/images/PartImages/1v99011b.jpg


The coil are the two pins on the bottom left of that diagram. One pin (doesn't matter which) goes to the transistor collector. The other pin connects to +12V.

Connect Arduino Pin 2 --> 1k resistor --> transistor base
connect Arduino ground --> transistor emitter

Treat the other relay pins as a switch and connect the pump through the common and normally or closed contacts as required.

If you have connected it up as above and it doesn't work, try it with another transistor, you may have damages the one you have connecting it without a series resistor.  

good luck!
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 603
Posts: 33390
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Also put a diode across the coil to catch the back EMF generated when you turn the coil off. This could be upsetting your system. Place the anode to the positive side of the coil and the cathode to the earth (or ground) side of the coil.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Problem solved.

It turned out that the relay needed more power to trigger than the Arduino could provide...  Also, my transistor needed to be adjusted for more power (I had some on hand).

So I replaced the load on the relay with a 9V battery and swapper out the transistor and it's working like a charm.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 111
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Am I being silly?  I'm doing some relays on an automotive project (a DIY immobilizer) and chose to drive some 5v PC-board relays via generic 2N4401's; those relays switch the unregulated 12V which is then sent into the guts of the engine compartment to throw beefy automotive relays.

I think the next version, I'll just wire up a UN2803 Darlington Array and send that to the engine compartment -- I think the coils on those auto relays are under 400 ma.
Logged

Pages: [1]   Go Up
Jump to: