Capacitor across 5v/GND Does this really work?

So I am using a Ard Mega to control a pinball machine from 1965 and actuating the coils causes the thing to reset. The flippers seem to be the worst, but any coil can do it.

Now I read that a 1000mfd capacitor will reduce voltage drops, spikes, whatever that are causing this.

As someone who is new at this, has anyone ever done this?

most likely it's interferance on the i/o lines. An easy check, power the 5v from a battery/usb power pack, see if interference still occurs.

I tried it with an isolated power supply and the same thing.

Then it's picking up noise - as I recall, some/many of the coils on pinball machines of that order are controlled directly by a switch, and for the flippers, physically trigger the EOS switch that disconnects the high power coil. Those sparks produce a lot of EMI, which will be picked up by the wires connected to the arduino and cause problems. Modern pins with electronic controls use solid state switches (ie, MOSFETs or BJTs) for switching the coils, so they don't generate nearly as much EMI. This will be tricky to deal with as long as those parts of the pinball machine are left in place.

Is the Arduino running the whole thing? You'll probably have to "simplify" to figure-out what's causing it.

All of your solenoids and relay coils should have a [u]flyback diode[/u].

What's driving the coils? A relay? MOSFET or transistors? (I assume the flippers are simply directly-connected to switches?)

If you are getting noise or "false triggers" on the inputs, you may need to lower the impedance (lower-value pull-up resistors, for example) but a false trigger or "bad input reading" won't cause a total processor reset.

If you are getting excess voltage (or negative voltage) on an input, that might cause a reset.

...Usually, a capacitor on the power supply will "help" to reduce power supply spikes/noise, but it looks like that's not your problem.

If you're using the on-board voltage regulator (or a separate regulator for the Arduino), the regulator will do a pretty-good job of filtering-out positive spikes (with or without an extra capacitor).

A capacitor can help with the negative spikes/dropouts because the capacitor sort-of acts like a battery to "hold-up" the voltage. The capacitor will work better with a diode in series before the capacitor so the power supply can charge-up the capacitor, but the diode prevents current from flowing the other way so the power supply, or other loads, can't discharge the capacitor... It can only supply power to the Arduino.

Well I tried running the mega from a 9v battery with the power to the relays being supplied by a 5v adaptor and still no luck. These coils are all 53vac, so maybe thats the problem.

As far as the relays, I first tried a strip of SSRs, they didnt work, so I tried a strip 8 of the em relays, both did the same thing.

None of the solenoid coils have any time of electronics, this was 1965! I am willing to try anything, but I am self taught in all this so need help.

Thank you for that.

As someone who is new at this, has anyone ever done this?

Yes everyone who has any sense does this, see:- De-coupling

with the power to the relays being supplied by a 5v adaptor and still no luck. These coils are all 53vac, so maybe thats the problem.

Yes that would do it, supplying 10 times less voltage than it needs and D.C. when in needs AC is not going to work well.

No, what i meant was power to the relays controlling the solenoids was from a separate dc power supply. the power to the solenoids comes from the original transformer.

You can’t drive a relay directly with an Arduino pin. You need a transistor and you need the reverse biased diode across every relay pin.

Draw a schematic and post that so we can see what you have.

board and sainsmart relays, flipper solenoid and transformer for solenoid.

ok it wouldnt take the pictures, let me try again

this is the transformer.

What part of

Draw a schematic and post that so we can see what you have.

Are you having difficulty in understanding?

pictures keep getting rejected

I hope this one worked.

my drawing skills are lousy!

Let's hope it's just the drawing skills then...

Hmm, nope :disappointed_relieved:
The relay board has the fly-back diodes (the copper-red parts just visible between the opto-couplers and relays), but an artwork like that destroys the purpose of those diodes, and then some.
You can't just use any kind of wire you happen to have laying around, jam it into a header and expect it to work flawlessly.

There's a thread about this kind of things in the "Bar - Sports" section.

Are you talking about the cat5 wire? What is wrong with using that? What should it be?

In such a project the physical and electrical portions of the wiring are both important.

I suspect the noise is coming in on multiple wires. Each wire should be considered an antenna capable of picking up enough energy to reset the arduino.

As Grumpy-Mike suggested, put the arduino in a metal box. Every wire entering (or leaving) the box must have at least a 0.1µF from the wire to the box, right at the point of entry into the box. Even the ground from the arduino supply. BTW I would use an external AC adapter and bring the DC in through the metal box. Again with capacitors.

I would ground the metal box to earth ground.

Remember, lead length on the capacitors is not your friend. You must keep the leads below 1/4 inch or better yet use SMD with some sort of prototyping board.

Good luck.