Relays and Amperage

Hi Everyone,

I'm trying to setup my Arduino Uno to control 4 relays (5v coils) but I'm not sure if I can energize the coils on the Arduino's 5v circuit. I would only be using 3 relays at a time but it it takes about 62 mA to energize each coil (So 186 mA when all 3 are on). I'm also using a 2x16 LCD and powering the board off a 12v power supply.

My concern is if I can pull this much. From my understanding the VCC and GND pins will start to become damaged at 200 mA. Do I need to use an external power source as in the attached picture? AND if so can I tie the GPIO pin going to the transistor to the ground on the external power supply?

Thanks in advance for any help

arduino-control-relay-schematic-550x391.png

Each Arduino pin has an absolute limit of 40mA, so you need to use a transistor or MOSFET to boost
the current anyway, so the ATmega chip won't be involved in the current at all. You can use the
5V rail, so long as each relay coil has a fast free-wheel diode across it and there is good decoupling
right next to transistor and relay.

A separate supply means less chance of interference when the relay coil switches and less load
on the on-board regulator (if powered from Vin or barrel jack).

You never tie a GPIO pin to ground if its an output.

You lost a relay somewhere, you start off describe 4 relays, then there are only 3...

Perhaps describe/draw your relay driving circuit in more detail?

Thanks for the reply.

I do understand I'm going to need to use a transistor. I meant to say can I wire the emitter to the GND on the external power supply? Each GPIO pin would be tied to a base on a transistor but there would be no other connection back to the Arduino. If I used the ground on the Arduino, wouldn't I be defeating the purpose of the eternal power supply?

Sorry, I shouldn't even have mentioned the 4th relay. I say 3 because only 3 of the 4 relays will be energized at any given time.

Common the grounds, for an NPN transistor:

emitter to ground
collector to load
base via a resistor to the GPIO pin (a resistor is essential, use 220 ohms if not sure)

other side of load to +ve supply, here the relay supply

For an inductive load such as relay coil you +must+ protect against
inductive kickback - usually with a free-wheel diode across the coil.

Thank you.

I guess I should also point out that if you look at the diagram attached in the original post... I am kind of confused because it looks like its tied to the ground on the Arduino. Isn't that a problem? Other than that I trying to build the same circuit

Hi,

What is your 12V supply?

Tom... :slight_smile:

I'm using a 12V 10 amp brick to power the arduino, a pump and two solenoids .

I guess that brings me to another question. Which is... Will I have any trouble when the pump or solenoids kick on if they share the same ground with the arduino

You'll be fine as long as you connect all the grounds at the power supply.
Post your schematic, lets see if it needs other adjustments.

Sorry for the delay. I can't draw schematics to save my life so I just edited the original. Is there any issue with the attached circuit? If not I can just replicate this 3 more times.

arduino-relay.png