Arduino Forum

Using Arduino => Motors, Mechanics, and Power => Topic started by: WilliamMartin on Mar 29, 2019, 04:21 pm

Title: I want to control some 12 v Relays with the UNO.
Post by: WilliamMartin on Mar 29, 2019, 04:21 pm
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
Title: Re: I want to control some 12 v Relays with the UNO.
Post by: neiklot on Mar 29, 2019, 04:55 pm
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.

(https://i.stack.imgur.com/dijkJ.jpg)

Title: Re: I want to control some 12 v Relays with the UNO.
Post by: larryd on Mar 29, 2019, 05:06 pm
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 (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]

Title: Re: I want to control some 12 v Relays with the UNO.
Post by: neiklot on Mar 29, 2019, 06:05 pm
This pic from the electronicsclub is better; shows the diode:

(https://electronicsclub.info/images/diopro.gif)