Solenoid not firing

I am building a pinball machine and have solenoids that control the flippers. The solenoids are hooked into a power supply and relays. Everything works fine when the power supply is off the relays click when the button is hit and all other aspects work. When I turn the power supply on to activate the solenoid with a button the solenoid fires a couple times before either locking up in the on position on stopping all together. I have the breadboard hooked into wall power to power the relays and the Arduino hooked into wall power as well. The breadboard and Arduino are connected with a ground cable but not 5v. I assumed the power was drooping out on the Arduino as before i had 5v from the Arduino hooked into the breadboard and firing the solenoids multiple times would cause the Arduino to reset or lock out. My wiring is a mess but correct. I've thought about a magnetic field as a problem only happens when the power supply is on. video of problem
This is my wiring diagram for the solenoids and relays.


I can provide my code if needed too but I don't believe that is the problem.
Any help is much apricated, thank you in advance.

Do You have kick back, free wheel, diodes connected across each solenoid?

Just to be clear, is the solenoid power supply also powering or connected to the Arduino?

No the power supply is only connected to the solenoids and relays

No i have thought about adding diodes,would that help?

You bet it will make a difference! The relay contacts will get burned down by the sparks and sparks cause RF, radio like signals that can put any electronics out of business!

Think like this: Note the direction of the current through the coil. When the relay goes off the electromagnetic field forces the current to continue. The kick back diode will allow that current to flow and the electromagnetic field is discharged.
To be sure, make a little schematics showing You get it right. Plus and minus of power supply, the relay contacts and the solenoid....

Welcome to the world of EMI! There are a lot of these gremlins floating around and apparently they found your project. The biggest generator of these is when a magnet field is de energized, such as a relay or solenoid coil. Routing of the wires is important. Signal and power should cross at right angles (least energy transfer to signal line). All of the DC grounds need to be connected together. From your description you need to start with the solenoids and relays and implement the suggestions given such as add diodes. No guarantee this will solve the problems but it will help.

The Arduino 5v may be insufficient to drive the relay.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.