• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Arduino Uno, ULN2803, Relay, and a 24VDC Pump

Status
Not open for further replies.
I am using an Arduino Uno to drive a single input on a ULN2803 connected to a 12VDC relay. The power for the relay and Arduino are from separate 5V and 12V outputs of the same power supply. The 12VDC relays is used to control a 24VDC pump (power supplied from a separate supply). After a few toggles of the output/relay/pump the Arduino freezes/becomes unresponsive.

I have used ULN2003 and ULN2803 for years. The ULN2803 pin 1 is attached to the Arduino output, pin 10 is connected to 12VDC, Pin 18 connected to the relay coil (the other relay pin also connected to 12VDC). Pin 9 is connected to the arduino ground and also the 12VDC ground, which ends up being the same ground on the 5V/12V power supply. Additionally, I have installed a snubber diode across the 24VDC pump (just in case).

I'm trying to figure out what is causing the Arduino to lock-up. Any thoughts?
 

spec

Well-Known Member
Most Helpful Member
Hy ADWSystems,

What current does the relay coil take?

Try connecting a 100nF disk ceramic capacitor across the 5V supply line and 0V supply line close to the Arduino and another 100nF disk ceramic capacitor across the 12V supply line and 0V supply line near to the relay.

spec
 
Last edited:

MikeMl

Well-Known Member
Most Helpful Member
Does turning the Arduino power off and back on clear it?
How are the grounds to the various power supplies routed?
Do you have a snubber diode on the relay coil?
 
Hy ADWSystems,
What current does the relay coil take?
12VDC 155 ohms, 78mA

Does turning the Arduino power off and back on clear it?
Yes.

How are the grounds to the various power supplies routed?
Separately.? Not in parallel. The 5V/12V grounds go in one direction, the 24VDC for the pump goes in another.

Do you have a snubber diode on the relay coil?
Part of the ULN2803 in use, but I could add another if you think it need it.

Try toggling the relay a number of times without the pump connected to pin the source down.
Max.
I tried toggling the power to the pump and relay in several different ways by hand. None seemed to cause the issue. They include:
1) open-close the fuse to the pump
2) insert-remove the connector to the pump housing
3) there is a momentary push button that signals the Arduino to start-stop the pump (H-O-A in the controls world)
4) adjust trigger levels around the input to start-stop the pump via the program (normally the inputs move and the setpoints are stationary, but the reverse works too to cause the pump to run)
5) connect-disconnect the ULN2803 input to the relay

Nothing caused the fault to occur.

My first thought is a hardware issue as it did occur every time the pump stopped until I added the diode. I suppose it could be software, there is a display on the system but it never looks the same when the program faults.
 

be80be

Well-Known Member
I just got done making a remote out of a cheap doorbell from home depot and while testing it worked great the day I installed it to work a door lock it stopped working. I took the cover off and bang the thing worked put cover on dang here we go agin it stopped.
Well it all looked good but it cost me the job I bring the thing home going to see where the problem was I take it apart and one wire pulled off the relay I must of cut it but some how it didn't cut the insulation. It didn't show moving the wires it worked closing the box it didn't LOL
Sounds like you may have the same kind of problem a hard to see one or find.
Take a break and look at each part every wire and pin. the simple things always bite you on the butt. We easily over look them when we know it should just work.
 

MikeMl

Well-Known Member
Most Helpful Member
...
Separately.? Not in parallel. The 5V/12V grounds go in one direction, the 24VDC for the pump goes in another.
Is the low side of the 24V supply isolated from the low side (0V side) of the 5/12V supplies? (i.e with supplies all off, what does an Ohmmeter show between the 0V of the 5/12V supplies and the 0V of the 24V supply?
 
Is the low side of the 24V supply isolated from the low side (0V side) of the 5/12V supplies? (i.e with supplies all off, what does an Ohmmeter show between the 0V of the 5/12V supplies and the 0V of the 24V supply?
The 5V/12V ground is routed completely separately than 24V ground. the 24V ground goes from power supply directly to the bulkhead connector for the pump. But I hit it with an ohm meter any way, it is an open circuit.
 

MikeMl

Well-Known Member
Most Helpful Member
The 5V/12V ground is routed completely separately than 24V ground. the 24V ground goes from power supply directly to the bulkhead connector for the pump. But I hit it with an ohm meter any way, it is an open circuit.
Then the coupling between the pump side and the Arduino side could be inductive. Separating the 24V wiring as far as possible from the 5/12V wiring is first step. Twisting the 5/12V wiring into a bundle, likewise twisting the 24V into its own bundle, and routing the bundles so that they are at right angles to each other for as far as possible might help.

If the coupling is capacitive, then shielding either of the two bundles will prevent that. So will separating the bundles as suggested above.

One other possibility: Even though the two sets of supplies (5/12V and 24V) are isolated on their output side, they ultimately share a common power feed? Any chance that there is a common-mode impedance between the inputs to the respective supplies and the power company like a filter or skinny line cord?
 
Then the coupling between the pump side and the Arduino side could be inductive. Separating the 24V wiring as far as possible from the 5/12V wiring is first step. Twisting the 5/12V wiring into a bundle, likewise twisting the 24V into its own bundle, and routing the bundles so that they are at right angles to each other for as far as possible might help.

If the coupling is capacitive, then shielding either of the two bundles will prevent that. So will separating the bundles as suggested above.

One other possibility: Even though the two sets of supplies (5/12V and 24V) are isolated on their output side, they ultimately share a common power feed? Any chance that there is a common-mode impedance between the inputs to the respective supplies and the power company like a filter or skinny line cord?
I'm not sure I could add shielded wire, the runs are less than 10 inches inside the cabinet. They are not run in parallel to each other and the 24V power/ground are bundled.

They do share a common power feed using 16g wire. For the total current draw this should be many times more than enough.
 

be80be

Well-Known Member
There a lot of something missing here the op said that there's a display on this are there any inputs to the arduino. The arduino will restart it's self if power is lost and restored. It could be like I posted i had power problem it was cutting the power and when looked at it came back on.
Could be a bad supply feeding the arduino
 
There a lot of something missing here the op said that there's a display on this are there any inputs to the arduino. The arduino will restart it's self if power is lost and restored. It could be like I posted i had power problem it was cutting the power and when looked at it came back on.
Could be a bad supply feeding the arduino
But the display is frozen (ie., not providing updated information). Yes there are inputs, a few potentiometers, a push button, and a DS18b20 temperature sensor. If it looses power and then restored, the arudino resets and moves on. I was watching the unit when the pump started/stopped when the system and display froze. I'm doubting a line side power problem.
 

be80be

Well-Known Member
OK so it's not a line side power problem.
I'm about sure it's not a relay power problem
But to find the problem you need the whole picture including code. Could be just a loop that has no over bounds what to do and doesn't happen much.
 
OK so it's not a line side power problem.
I'm about sure it's not a relay power problem
But to find the problem you need the whole picture including code. Could be just a loop that has no over bounds what to do and doesn't happen much.
That coincidentally only occurs when the relay and/or pump turns on/off?

My feeling is it has to do with the pump or relay. But is it a radiated issue or a transmitted issue? The relay and Arduino are sitting diagonally from each other (lower left and upper right, respectively). I'm going to try turning the relay 180 degrees which will relocate the coil and shift the field effects relative to the Arduino board as well as adding some 100nF caps as previously suggested.
 

be80be

Well-Known Member
20160829_152916.jpg This swiches 15 amps never seen one make the 16f54 stop working I've seen the relay burn up. The uC is right next to the relay
 
Last edited:
View attachment 100970 This swiches 15 amps never seen one make the 16f54 stop working I've seen the relay burn up. The uC is right next to the relay
This is the first time I have come across the issue. A professor in school had a story of a computer that was affected by the contactor and fan motor of the A/C duct in the room. One day while pondering the issue they heard the contactor close and noticed the computer crash. They moved the computer 6 inches and the problem went away.

Just because you haven't seen it, doesn't mean it can't happen. This design seems to be susceptible to it. Now I just need to figure out how to fix it.
 

ChrisP58

Well-Known Member
Most Helpful Member
Does the moment of freeze coincide with when the the relay is energized or de-energized?
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top