Go Down

Topic: I want to control some 12 v Relays with the UNO. (Read 90 times) previous topic - next topic

WilliamMartin

Hi,

I want to control a few 12v relays with my UNO and they aren't switching.

so i have a 12v power supply with the (+) connected to one side of the relay coil. The (-) is connected to the GND of the arduino.

On a breadboard, i have a 2n2222A transistor with the collector connected to the GND, emitter to the other side of the relay coil, and the base to pin 13 on the UNO (5.1k resistor was used on base).

i also have a diode between the 2 leads of the coil.

I am just using the 'blink' example for testing.


Can anybody help me?? >:(

Thanks

neiklot

Your (npn) transistor's connected back to front I think; picture would be better than words though.

It should look like this, emitter to ground and load above the collector.




larryd

Always supply us with:

Show us a good schematic & image of your circuit wiring. 
Posting images:
http://forum.arduino.cc/index.php?topic=519037.0

Use CTRL T to format your complete code.
Attach your sketch between code tags
[code]Paste your sketch here[/code]

No technical PMs.
The last thing you did is where you should start looking.

neiklot

This pic from the electronicsclub is better; shows the diode:






Go Up