Go Down

Topic: Problem with relay wiring (Read 1 time) previous topic - next topic



I have a problem when wiring a 5V controlled reed relay. I wired it using this schematic http://www.arduino.cc/playground/uploads/Main/relays.pdf.

The problem is, when the relay's coil is active (so the switch is on), something weird starts happening with my LCD. It takes a while, but the LCD starts loosing contrast, then the displayed characters get all mumbled up, it's like the lcd is getting too much current or something, i'm surprised i haven't fried it yet. Now when this starts happening, if i deactivate the relay, everything get's back to normal (if i do it before the chars get mumbled up) and if i reconnect the relay, it starts happening again immediatly.

This only happens if my board is connected to an external power supply. It doesn't happen if powered via USB. My adapter is 12V, 500mA. I just don't get it, is it possible arduino'ss GND is being overwhelmed? Or some current leaking somewhere perhaps..

Any ideas would be greatly appreciated. I can post schematics if neccessary, but lcd is completely separated and has nothing to do with the relay.. Also, the LCD was wired by this tutorial on adafruit http://learn.adafruit.com/character-lcds/wiring-a-character-lcd.

Thanks. Cheers, Val


Maybe the relay is pulling a lot of current (100mA or more) and the on-board regulator on the Arduino is overheating, then starting to shut-down - measuring the 5V rail to see if it is falling when the LCD starts to misbehave might help diagnose this.

Also testing the regular chip for being hot (carefully with a finger - don't get burnt!) would be useful.  It'll be the chip near the power jack that's at least warm if not hot.

Running from USB means that regulator is not used.

Or the 12V supply might be performing below spec (was it cheap and unbranded?)
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]


Aug 02, 2012, 01:46 am Last Edit: Aug 02, 2012, 01:48 am by valekovski Reason: 1

Thank you for your reply! That was it. The voltage starts dropping very fast and the regulator becomes very hot.. I'm also using the Ethernet shield, and i've been reading that regulator overheating is a known issue, since the shield draws too much current, which really sux, so i'll try switching to a lower voltage adapter, maybe 7 or 9V.

The adapter is a bit old, i used an adapter i got with my previous router. I'm a computer engineer and a bit of a noob when it comes to electronics, so would you be as kind and suggest any solutions? I'm guessing wiring the relay through external power source, like a battery, would solve the problem. But i would like to avoid using an additional power source if possible..

Thank you very much for you help! Cheers, Val

PS: I've also meassured the current draw from the relay, it's a bit lower than 100mA, at times "only" 50mA, but you're quite correct, it draws quite a bit of current.


Ah yes, ethernet boards take 150mA or so to start with.

One approach is to add a 10V or 8V regulator chip between the power supply and the board's Vin - thus spreading the heat between two regulators (8V is ideal, but I think fairly difficult to locate, 10V are more common, perhaps 9V too).  Or you can use an external 5V regulator (with better heatsinking) to take the 12V directly to 5V pin.  Or even add a small cooling fan pointed at that part of the Arduino board.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]


Aug 02, 2012, 06:17 pm Last Edit: Aug 02, 2012, 06:26 pm by valekovski Reason: 1

Sorry for the late reply. Hm, i didn't know i could just wire it up directly to these pins, if the voltage is right, have to read up on that, thanks. I'm guessing those are the pins on the POWER  header of the board?

I think i'm gonna start by buying a 7V, 1A adapter, should be enough to output 5V and the regulator should heat a lot less (even if drawing so much current), am i correct? Also, i think i'm gonna buy a solid state relay instead of a coil based one. As far as i understand, they use up a lot less current.. Maybe it will be enough for starters, what do you think?..

Thank you very much for your help, you have been very helpful, i probably wouldn't even be able to diagnose the problem in time without your posts :) Cheers, Val

PS: I thought about using cooling fans as well, but that seems kinda lame for such a simple application (it's a web controlled thermostat, and i don't want it to hum like a full blown barebone server machine) :D



Well i've decided to go with a 7V, 1A adapter, should be good enough to not fry the voltage regulator, haven't tested it yet. Tho if i have two relays and with the ethernet shield drawing a low of current, that's aproaching the limit. Arduino can draw 800 mA max, according to specs, but i wouldn't go much higher than 400, maybe 500.

So could i wire the relay through the Vin pin, to power the relay's coil (100mA or so)? As far as i know, Vin avoids the voltage regulator altogether. But if i wire it up this way, i'm guessing i would have to use some sort of a resistor, so the relay's coil wouldn't suck too much current, yes?.. Or at least for Vin voltage to drop from 7 to 5V, since 7V is too high for the coil probably. Can someone please confirm this, i'm not good with electronics, yet :)

Thanks for the help. Cheers, Val


A 5V relay run on 7V is not really a horrible match.  The relay is rather forgiving of over or under voltage by a volt or two.  Your current draw will change slightly (ohms law applies here).  You could tame the 7V a bit by adding a rectifier diode (or two) at the VIN pin before the relay...  the resulting PN Juntion voltage drop, though minor, will bring you closer to the  ideal relay voltage without resorting to another regulator.  


I initially got a 5v relay board also and it just takes too much current to activate the relays. So I switched to 12v relay board.
If you are stuck with the 5v relay, instead of getting a 7v power supply, you can get a dc-dc buck converter for like $1 shipped (I got 2 for $1) and it can step down 12 to 5 v very efficiently (without getting hot) compared to using the linear regulator. Search ebay for LM2596.



Thanks for replying. Yes, i've considered that too, unfortunately, i also have an ethernet shield, which draws about 150mA as it is, so using 12V power supply is out of the question. So yes, i'm stuck with a 5V or 7V relay. I would like to avoid bypassing the regulator altogether, since apparently it's not recommended, no idea why.. Also, i need a 20A relay, so 5V might be out of the question too, since they're hard too get from what i've seen :D

Either way, i have another problem. Sometimes when i switch off the relay, my LCD gets all wonky, displaying all sorts of weird characters.. Any ideas why that might be? I figured it might have something to do with the back current induction from the coil when it pops back off.. But i have it wired as the schematic shows, the power diode is supposed to make sure that doesn't happen heh. I'm also concerned that if i increase the voltage to control the relay, the back current surge might be larger, not sure about that tho..

Thank you again for all your input, probably couldn't have done it without you. So i'll let you know how it works out, hopefully i won't fry my board in the process :D

Cheers, Val

Go Up