Hello,
I have a problem with my hydroponics control circuit. It works the way I expected it would most of the time but sometimes, when the pump shuts off, the Arduino freezes and I have to restart it.
I have not observed this behavior when the pump isn’t connected, which leads me to believe, that it has something to do with pump being an induction load or maybe it is functioning like a generator, when the water flows back down after pump shuts off. Unfortunately, I don’t know much about this stuff. Can someone here give me any advice? "Diagram" attached.
One possibility is that electrical transients from the pump and power wiring are getting into the Arduino by capacitive coupling.
To make that less likely, either use shielded wires for the Arduino and associated circuitry, or put the Arduino and associated circuitry in a separate, grounded metal box and lead wires out to the relay board. Place the pump, relay box and 230V wiring as far as practical from the Arduino.
Thanks, for the reply jremington. I have not considered capacitive coupling. Given the way I have wired things, this might indeed be a problem. I will try to put some more distance between Arduino and anything with 230V.
I see you have connected the 5volt supply to the V-in (raw) pin.
V-in is the input of the onboard 5volt regulator, and needs at least 6volt to make a stable 5volt.
If your 5volt supply is reliable, then connect it to the 5volt pin. Or adjust that buck to ~6.5volt.
I also see you're powering the RTC+display from the 3.3volt pin of the Nano.
You shouldn't draw more than ~30mA from the 3.3volt pin of a Nano.
Are you sure the (unspecified) oled is drawing less than that.
Leo..
Thanks for your advice Wawa.
I’m still bit unsure about snubber circuits. I have tried adding surge protection between the pump and rest of the circuitry and that seemed to improve things. Do you think this RC Snubber would be sufficient?
I will try to increase the voltage to the Vin pin. I previously connected 12V here directly but oled display refused to turn on so I have added the step down circuit.
Snubber board seems ok, if rated for your local mains voltage.
Keep AC wiring away from Arduino wiring.
No real specs with Banggood parts, so who knows.
The oled seems to be able to take 3.3-5volt, so could be powered from the 5volt pin of the nano.
Leo..