Hello,
I am seeming to have some interference issues when relays turn off switching 24VAC for solenoids.
In my testing, I have no issues with the 24VAC transformer unplugged.
But with the 24VAC transformer plugged in and turning solenoids off and on, I am having intermittent arduino restarts, (only when relays shut down, solenoid off).
Arduino and relay board ran from 12 VDC transformer.
Solenoids are ran from separate 24VAC transformer.
In the control box the mega 2560 is behind the relay board.
I have also just tried putting a metal plate in-between the 2560 and the relay board which doesn't seem to help much.
One question about the metal plate, should it be grounded to earth ground?
Also, would adding a snubber or varistor on the load side of solenoid help with this issue?
The last picture is of the control box with the plate installed.
Hi,
Transformers are inductive loads.
Inductive loads when operated by relay (on or off), generate high frequency pulses known as spikes. (electrical noises)
These noises cause problems in the operation of microcontrollers.
As you mentioned, if you use your project without connecting the transformers, it works normally, but when connecting the transformers, it has resetting problems, most likely the problem is these electrical noises.
One solution used by designers' is the use of snubbers:
First off have the solenoids you are switching have reverse diodes across them to suppress the back EMF you get when they turn off.
Yes it would help.
Yes
Interference is a tricky thing to eliminate and it is more trial and error than a solid engineering problem. No one thing is likely to cure it, but the more mitigation measures you use the more immune a system will become.
You could also try increased power supply decoupling into the Arduino, using a pi filter.
I also moved your post here as where you originally posted it was not suitable for problems with your project, only the installation of the IDE.
No, I do not. I am running AC voltage but I believe there might be diodes for AC as well, not sure though?
According to that diagram, does that mean voltage is trickled through all the time whether switch is open or closed?
I guess that would be another question I would have, how to size the cap and resistor? And where to incorporate it in?
Does a varistor do something similar to a snubber or would a snubber circuit be the better method?
The 24VAC transformer has a "line" and a "common".
I will have to try looking up more info on this as I'm not really sure.
Sorry about that, the category selection throws me off sometimes.
So you cannot/ will not supply a drawn schematic then...??
Should be No.1 on your list of priorities for any future project.
Come back to it at a later time and even you will wonder "what the heck is this..??"
Please post a circuit diagram, not a Fritzy.
Sorry but Fritzy images do not show the proper information needed to troubleshoot your circuit.
An image of a hand drawn circuit will be fine.
Please include, component names, pin labels and all power supplies.
Here is an example.
Question;
What is the three legged TO-220 device in the middle mower part of the protoboard?
If it is a 3 pin regulator, where are its bypass capacitors?
No, right now it's connected to the outlet ground.
I originally tried on the same ground as 2560 but still had troubles, so then tried the outlet ground.
Sorry but I cannot provide and accurate drawing without taking everything apart.
I made this over 2 years ago and did some changes on the fly so my fritzing is not completely accurate either.
Not the proper way, but I can't change the past.
This has been running fine a couple years other than the occasional board reset after a solenoid shutdown. The restarts happen one day and not the next. I have no other issues other than that.
And the solenoids run from their own 24VAC power supply.
I have a garage heater controlled from one relay as well and have no issues in the winter (when not running sprinkler zones) at all.
I thought I may have found a problem, I had wires for clock module running in parallel with some 24vac zone wires. I rerouted those and then tried running a manual single zone a couple times with zero issues. Problem solved! Well maybe not, after rerouting and testing a couple times with no issues, I put the cover back on and tried the same zone again, it reset again right after zone shutdown. So not solved yet.
The board would run forever if I never shut a sprinkler zone off.
I thought that in response to my similar comment on an earlier thread, someone said that they were not necessary for a 7805?
Notwithstanding that it is nicely mounted, the harem-scarem wiring is part of the problem.
You must lash it all together so that both sides of every circuit are tightly together and then keep the bundles carrying the 24 V quite separate from those carrying power and logic to the Arduino and relay board. I do not know that board but for a low-level trigger opto-isolated board, the ground should not connect to the Arduino.
So you can see the problem with Fritzy.
You have 10uF caps on the input and output of the regulator, as close to its pins as possible?
I would guess that your problem is position of wiring and age of your valves, if it has worked okay for so long.
Keeping the 24Vac well away from other wiring may help.
Definitely fit some snubber circuitry.
Can you isolate the fault to one particular valve?
Yes, know what I know now about electromagnetic waves and such, I would have done my layout a little different. I do have the wires "fairly" isolated with moving the clock module yesterday. The only ones that are not are the ones running the second esp8266, and that only turns on once a day and never the same time as the zone valves.
I should have the caps according to specs, I just cant see them.
Behind that plate I put in yesterday is:
-the power coming in for relay board, 2560 and two esp8266
-a pcb board stacked on top of the 2560 mounted on it's side behind the metal plate
On that pcb is:
-power components
-the two RGB LED components
-the two pushbutton components
-components for temp sensor
-and the one esp8266 with relevant parts
I have always had intermittent restart issues the last couple years, at first I thought it was a code thing till I dug into more now, and now knowing it's an interference issue.
Valves are about 10+ years old but all work as they should.
No it's not really pinpointed to one valve.
One thing I thought I should yet do in my code is putting a short "delay" in-between shutting down the zones and the master.
I do sometimes run two zones at once.
I was just looking up the specs for the pump start relay and that seems to take a fair bit of power as well, but in my testing, I've never had restart issues from shutting down the relay for the pump relay.
It's not a matter of "If I had known". The point is to fix the wiring. Lash it together so that the two wires to each relay contact are bundled. Since there are commons, then the wires must be bundled with those commons.