Questions about relays

Hi all, I just had a couple of questions about relays that work off the arduino. I plan on purchasing an 8 channel relay board to control different outlets. The amp draw per outlet is only at the most 2 amps. Do I need to protect the relays? These are 5 volt coil side voltage. I read somewhere that a resistors were needed but can't find it again. Any input would greatly be appreciated, Jim

The amp draw per outlet is only at the most 2 amps. Do I need to protect the relays?

In general no. Relays are fairly rugged. Just make sure the relays can handle the current/voltage. And, it doesn't hurt to use an over-rated relay.

If you are running AC power, a short circuit might burn-out the relay contacts. If you are worried about that, you can use a fuse.

These are 5 volt coil side voltage. I read somewhere that a resistors were needed but can't find it again.

Maybe a *trans*istor. The Arduino output pins are rated for 40mA, and most (but not all) relay coils require more than 40mA. If you need more current (or voltage) to drive the relay, you can use a transistor or MOSFET to boost the output.

The relays won't need much protection but the Arduino may, depending on how much current the relays need. You have that spec? If it's more than 20mA, I'd use a transistor to drive the relays. In either case, there should be a snubber diode across the relay coil to suppress back-EMF.

40mA per pin is the absolute maximum rating, the datasheet says

Stresses beyond those listed under “Absolute
Maximum Ratings” may cause permanent damage
to the device. This is a stress rating only and
functional operation of the device at these or
other conditions beyond those indicated in the
operational sections of this specification is not
implied. Exposure to absolute maximum rating
conditions for extended periods may affect
device reliability.

I/O pins are not guaranteed to source or sink over 20mA (for Vcc=5v) or 10mA (for Vcc=3V). In addition, there are aggregate maximum currents that should not be exceeded at the port level, and the absolute maximum current into the device overall is 200mA, so you’ll almost certainly need transistors to drive the relays.

I’d go with something like this:

relay.png

Looking at that diagram, I would need a separate supply voltage for it? If so what would you suggest? I would need 1 per relay then? I would be using only 5 of these relays at any given time. Only getting and 8 relay board for expand ability.

rjhudak1: Looking at that diagram, I would need a separate supply voltage for it? If so what would you suggest? I would need 1 per relay then? I would be using only 5 of these relays at any given time. Only getting and 8 relay board for expand ability.

If you use relays with 5 volt dc coils you can power them via the arduino +5v pin. The 500ma USB current limit or on-board regulator 600-700ma current limit should be able to handle 5-8 40ma relays coils with little problem, as long as you are not also powering other current demanding external components also.

Lefty

rjhudak1:
Looking at that diagram, I would need a separate supply voltage for it? If so what would you suggest?
I would need 1 per relay then? I would be using only 5 of these relays at any given time. Only getting and 8 relay board for expand ability.

Since the relays are 5V, a single supply can drive them and the Arduino, as long as it can deliver the total amount of current needed. I have some small 5V relays that will switch 120V @ 10A and they require 70mA to drive the coils. So do the maths and use an adequate power supply which has enough current capacity to run the relays, the microcontroller and whatever else may be part of the circuit. I’d also allow a fair amount of headroom. If I had eight of these relays that each need 70mA and just an Arduino in addition, I’d probably make sure the supply could provide at least 1A. If the supply is marginal, switching the relays can cause transients or sags that may affect the microcontroller. Even with a robust supply, proper circuit layout and liberal use of bypass and filter capacitors is recommended.