Arduino - multiple relays voltage drop

Hi,
I have connected multiple sensors and relays to my Mega2560, but they don't work always as it should. They are all powered from the 5v pin a grounded to same ground pin. Most of time, the voltage I measure on relays is not 5v, but something aroud 2v, which is not enough to power the relay. When I turn on the output pin, it also outputs the same voltage. Please help...

You should probably give them their own 5V power, and use the Arduino to switch that with a transistor.

http://www.ecs.umass.edu/ece/m5/tutorials/relay_tutorial.html

edit.... having said that I'm curious as to how you currently have them hooked up. If you have one side to 5V and the other to ground, how are you switching them?- do you have transistors?

JimboZA:
You should probably give them their own 5V power, and use the Arduino to switch that with a transistor.

http://www.ecs.umass.edu/ece/m5/tutorials/relay_tutorial.html

So it's not a good idea to power relays directly from Arduino? I have these > http://www.ebay.com/itm/Fashion-5V-1-Channel-Isolated-Relay-Module-Coupling-For-Arduino-PIC-AVR-DSP-ARM-/400484435431?hash=item5d3ebb85e7 and also one relay board with 8 relays on it.

If by power you mean the power on the coil, no I don't think that's a good idea in principal, but of course it depends what current is consumed.

Switching's a different thing of course, and that module says it's isolated and that's probably a 4N25 or similar there which will isolate the Arduino's i/o via light so there's no problem with the back emf induced by the coil.

JimboZA:
If by power you mean the power on the coil, no I don't think that's a good idea in principal, but of course it depends what current is consumed.

Switching's a different thing of course, and that module says it's isolated and that's probably a 4N25 or similar there which will isolate the Arduino's i/o via light so there's no problem with the back emf induced by the coil.

I have seen this site : Step 2: Interfacing the relay modules to the Arduino | Hobbyist.co.nz, and they connect the VCC to 5v on arduino and GND -> GND, so I did it same. With only one relay or the relay board only, it is OK and everything works fine, but when I connect multiple relays in pararel, then there is the problem I wrote about.

Yeah I suspect multiple relays are drawing too much current.

Does the datasheet for that module say what current the coil draws? (Not to be confused with the current the relay can switch on the other side.)

According to this (same relay, different module) the relay draws 85mA. If my memory serves, you shouldn't draw more than 200mA from Arduino 5V (I may have that wrong) so 2-3 of those and you're over that limit.

I found an old thread: http://forum.arduino.cc/index.php?topic=50287.0

I was right and wrong on the 200mA: 200 is the max total output from the i/o pins, all pins combined, not to be confused with the 5V pin.

But the 5V seems to be able to supply whatever you're putting in, less presumably the current the chip might be putting out. So if running from USB you have 500mA total to use but I'd stay well clear of that on principal.

In any case, I don't think it's "elegant" to power equipment from a uC which is not meant to be a power supply, it's for reading inputs and controlling (as opposed to powering) equipment.

JimboZA:
According to this (same relay, different module) the relay draws 85mA. If my memory serves, you shouldn't draw more than 200mA from Arduino 5V (I may have that wrong) so 2-3 of those and you're over that limit.

The relay datasheet says 0.36W, so 72mA at 5V. Add to this the "15--20mA driver current"
due to the unnecessary opto-coupler the module seems to have and you get about 90mA
per relay or 0.72A for all 8 (some of that current is via the ATmega chip of course).