Relay power issues.

Hi. I have an Arduino Mega setup with 2 individual relay boards controlling two 240v power outlets. The relays are housed separately from the Arduino and I have connected the two via a standard ethernet cable. The relays I have are both 12v powered and switched via a 5v Arduino digital pin.

I have currently wired the following.

Orange and orange/white ---> 12v+ (from a 12v plug transformer)
Blue and blue/white ---> GROUND (connected to both plug transformer and Arduino GROUND)
Brown ---> Switched +5v from Arduino to relay 1.
Brown/white ---> Switched +5v from Arduino to relay 2.

SITUATION.
One of these relays for some reason isn't working properly. The board is receiving the right power but the relay itself is not clicking/switching. Maybe sticky contacts. The whole thing is already wired and the unused cables of the network cable trimmed so I cannot use them.

MY QUESTION
I have a spare single 5v powered relay board which I could replace the faulty 12v with, but with no wires left to connect it, could I pinch one from the orange pair that I am sending 12v through to the first relay and use that for the 5v to the replacement one? In a less round about summary... can I send 12v+ through a single strand of ethernet cable with a run of only about 30cm?

Thanks, Steve.

Swap the feeds to the relays over and you will see if the fault is the really board or the wiring .
You can also do some checking with a multimeter or by connecting an led and resistor to the Arduino outputs, or to the connections at the relay board.
There is a good chance , if you are switching a big load at mains voltage the relay has failed

hammy:
Swap the feeds to the relays over and you will see if the fault is the really board or the wiring .
You can also do some checking with a multimeter or by connecting an led and resistor to the Arduino outputs, or to the connections at the relay board.
There is a good chance , if you are switching a big load at mains voltage the relay has failed

Cheers for your reply. Yeah I have done that, its definitely the relay as I swapped the switch leads and it was the same, also checked with multimeter and all reading what they should, its just not switching. I got frustrated and resorted to the old 'hit it' fix and it started working for a short while so I'm guessing it is sticking a little. its subsequently stopped again now.

The light is coming on on the board and there is a very faint click but not the clear defined click that there should be.

Are you using a separate power supply ?

This can be quite important with relays as some draw more power than the Arduino can actually supply which will result is a misfire of the relay.

Seen this with some of my relay boards and inevitably a proper power supply for the relays fixes the issue.

ballscrewbob:
Are you using a separate power supply ?

This can be quite important with relays as some draw more power than the Arduino can actually supply which will result is a misfire of the relay.

Seen this with some of my relay boards and inevitably a proper power supply for the relays fixes the issue.

Yes I have a separate 12v plug that is running the constant 12v to the relays and then using the Arduino D29 and D30 to switch them.

And a shared COMMON back to the Arduino ? (often required)

ballscrewbob:
And a shared COMMON back to the Arduino ? (often required)

Oh yes, the grounds are all linked.

It is however working at the moment. I gave it another thump last night and then ran a sketch of just turning it on and off and let it run for a while and it appears to have done the trick and it is working now. However I have now run into another relay related issue...

So I have two groups of relays,
GROUP 1.
I have two 240v plug sockets run by two 12v single relay boards (the ones you have just helped me with) which are wired to 'normally closed' meaning calling LOW turns the socket on.

GROUP 2.
and eight 240v plug sockets run from two 4 way 5v relay boards which are wired to 'normally open' meaning calling HIGH turns the socket on.

All relay boards are receiving their constant power supply via independent wall transformers. They are receiving their switched signals from Arduino digital pins. All grounds are connected together.

I am finding that I can switch around 6 or 7 out of the total of 10 relays but the last three won't trigger. If I turn a couple of the others off then they will. I am deducing that there is not enough power coming from the Arduino to switch the remaining 3.

Does that sound right from what Ive described and how can I fix this? The Arduino is currently powered via a 12v 1500mA wall power transformer plug. (similar to this http://www.itinstock.com/ekmps/shops/itinstock/images/western-digital-s018em1200150-uk-plug-ac-power-adapter-charger-18w-12v-1500ma-[2]-45274-p.jpg)

A link to the source of the second set of relays would be really helpful.

They sound like higher consumption relays ?

Are you running both groups from the single supply ?

Tech specs for the relays will tell you the max current for each relay and dont forget to add a little extra requirement for switch on surge/draw.
EG. if you have 4 relays that require 100mA ea then 4 x 100 + a little extra depending on spec.

Also note that not all power supplies are created equal !
I use quite a few 12 volt supplies but even though I am within the current range they may not operate at 100% duty cycle and a few will drop out once I approach 60% yet will operate fine at a lower current at 100%
As I use so many recycled PSU's for projects, I cant always tell until I get to powering something up for a burn in test.

ballscrewbob:
A link to the source of the second set of relays would be really helpful.
I can't get to the box containing them because it is under my fish tank and it is too cramped but I bought them from eBay and pretty sure this is the one... Here

They sound like higher consumption relays ?
I'm sorry but I have no idea what that means. lol.

Are you running both groups from the single supply ?
Yes I have a 5v supply going into my Arduino housing which then gets sent via Ethernet cable to the relay box about 1 metre away under my fish tank. The one 5v supply goes to both.

How would the 5v supply have any effect on it switching on and off? Doesn't the 5v from the Arduino digital pin switch it? (I'm not being funny, I'm just interested in where you're going.)

ballscrewbob:
Are you running both groups from the single supply ?

No, the first group has its own 5v supply.

This I believe is a link to the data sheet for my relays, however I cannot decipher what is the current needed from all these figures. :-/

If I have got this right, and from looking at other posts this relay needs 71.4mA to work. So x8 totals 571.2mA. My power supply is currently a 5v 600mA so pretty close to the required amount. Plus I may have other things that I thinking are sharing that 5v too (it is wired into a breadboard and I DID spur to others things like an RTC and 3x temp sensors however I have since removed the RTC and think the temp sensors run straight from the Arduino now, but there may be some being used by something I can't remember.)

Do you think using a higher current 5v transformer would work?

I thought the Arduino's 5v solely from the digital pin switched the relay on and off, is that not the case? Does that maybe only tell the board to switch and then that lets the 71.4mA through from the constant supply to switch the gate? I'm sorry, I am still quite a novice at microelectronics.

2 x 4 way = 8 x .45W @ 5V
2 x 1 way = 2 X .45W @ 12V

Thats according to the tech specs for cheapo Songle relays in the 5 to 12 volt range.

So
8 X .45 = 3.6 W @ 5 V
2 X .45 = .9 W @ 12 V

3.6 W @ 5 V = 0.72
0.9 W @ 12 V = .075 A

0.795 total. if my maths are correct ?
And that is not taking into account the coil resistance which would change the math further if memory serves me right.

This problem has come up in the past and almost always its down to a power supply issue. (used the search option at the top of the page)

Is the relay board driven by opto couplers ?
If so, I understand that the ground of the relay coils and the signal ground (arduino ground) are coupled in your setup.
Did you measure the voltage that arrives to drive the opto couplers ? This has to be > than 3.5V in order to activate the relay coils. If your voltage drop from the arduino ground till your relay board is > 1.5V you have problems (since you mentioned that relays don't work when to many are activated)

So I ended up putting a 5v 1a plug on the power that goes directly to the relays which should be enough. It seemed to work but recently the same issue has arose whereby only 4 or 5 will come on at a time. The others will only switch on if one of the others is off.

I even put a 5v 2.5a plug on it and the same thing. Could it be the power supply to the Arduino no enough to switch it? It's currently a 12v 1.5a plug.

The 12 volt relays will randomly fail at 5 volts if they work at all.

The arduino if using the power jack should be above 5 volts (7-10) as the 5 volt circuit is possibly a little unstable if you are only giving it the same as the volts it has to provide (there may even be a slight voltage loss).

12 volt relays should be powered by 12 volts ( +- whatever the spec tolerance is) but I prefer 13.5 on mine
5 volt relays as above but 5 volts but again I go 6-6.5

You seem to be covered as far as current goes.

Sorry, I should have been clearer, the issue is the with the 2x 4-way 5volt relays now.

The 12v issue was a sticky relay I think and working fine now. I just ran a very fast HIGH-LOW sketch and it cleared it.

It's the 5v ones that aren't all working now.

Still suggest raising the Arduino voltage first and if the situation continues then possibly the relay voltage.

Excellent mate will do. However the Arduino is already getting 12v, won't anything higher damage it? Same question for the relays.

I know you can supply more current and it will just use what it needs, but is it the same for voltage?

I'll dig out some higher power transformers in a bit.

In the case of the power to the Arduino it would be fine as the specifications say it can go as far as 20 volts in the power jack but please NEVER go that high !

As for the relays again they allow for a voltage variation.

This is where reading the specs comes in useful.