Ill try to make this as quick as possible, but heres what i got....
We installed a goal horn at a local ice arena and wanted an automatic button to play the horn, i thought hey this is a great time to dip my toes into the arduino world! Long story short, its working but not exactly how i want it to... Im an electrician by trade, so wiring relays and the such are completely within my grasp.
Heres how i have it setup. The horn itself is run off of compressed air, so there is an air solenoid to sound the horn. Due to distance i used a 120v AC solenoid. Im using a very simple code that when a momentary button is pressed it sounds the horn 3 times using a opto isolated relay to switch the 120v.
Heres the problem;
When the momentary button is depressed, it triggers the relay and it sounds the horn three times as it should. But sometimes when the relay finishes its cycle it triggers the solenoid to start its cycle again. im certain this is some kind of interference with the 120v circuit as the relay performs flawlessly when the 120v is not connected to the relay.
My question would be where to start?
Heres the code... and attached is the wiring diagram.
So tonight while I was at the rink I put a 1k resistor on the switch. It seemed to help but did not cure the problem. The self triggering was less frequent.
Question. How big/small can I go with the resistors? Maybe try a 470ohm next?
I ordered ferrite rings and a solid state relay to try tomorrow. The relay might not be large enough, rated at 2a for 120v. I have to check the coil and see what the amp draw is.
Solid state relays DO NOT have coils. That is what solid state means in relation to relays. Oh, Are you referring to the solenoid valve?
If the solenoid is on for just a short time and that seems to be the case, the SSR will not heat enough with more than 2 A to be a problem. Heat kills, but your SSR may also have a heat sink. Some do, some don't.
I would try installing a larger relay with say a 24vac coil, mount this very close to the solenoid.
This should move the high volts away, use your current relay to drive the larger.
In all honesty I’m thinking the problem is something unrelated to my system. I built a second setup at home and cannot replicate the problem. I intentionally inter tangled the 120v with the arduino circuits and cannot get it to not work lol it works perfect every time.
Where the button and arduino board is located is in the score box for the arena. There is equipment in there for the score board and audio system. Maybe the ferrite rings will help tomorrow? Also going to check the ground on the arenas 120v power
could be a bad button.
curious, how long is the wire?
im in the bowling industry, lol, seen my share of rats nests of wires.
i pull allot of 220vac solenoids, every minute, every day.
but i dont pull 220 i pull 24, keep equipment at least a few feet away from machines.
no issues, but yes, reset buttons fail, wires can give bad connections and gremlins can easily be induced.
The 2 conductor wire for the button, should be shielded and definitely keep away from HV lines.
275' of 120v, driving allot of copper crazy.
switch this control line to be low volts, 24vac would reach and yes, industrial grade relay to control solenoid.
oh and no worries, bowling lanes break on people they know can fix them, you should be honored.
one more thing, just thinking, if you don't need to play one directly after another add another delay to your sketch at the end so it sits there for say like 5 secs or so.
you got allot of electrons, take a bit to dissipate, if they have a way to go and hopefully not into your board.