Case #1: I have a pump station with an autonomous 240V pump motor switched by a 240V pressure switch, feeding a pressure tank to a max. pressure. After said tank are four 24V solenoid valves (250mA inrush, 180mA holding), controlled by a 5V-fed relay board (Sainsmart). This relay board is connected to microcontroller (Arduino UNO) outputs via optocoppler.
The relays come ON|OFF in series. Once the last one switches OFF, the pump motor still runs due to the switch-OFF-pressure not reached yet. A few seconds later the pressure is up, the pump switches OFF -- and here comes the problem -- the microcontroller reboots (when the motor switches OFF).
There is a single phase 240V supply for all of it. The solenoid valves get their power from a ring-core transformer 50VA. The microcontroller has a 240V/5V switched plug-in power supply with 2A (<200mA required).
Case #2: Another scenario: the 240V/5V connected microcontroller controls a small relay (5A), which switches 240V (with snubber) for a bigger 25A DIN-mounted relay (contactor), which switches a 3kW resistive heating element for a hot water system. On occasion, the microcontroller reboots when it switches on the load.
I see the same problem in both cases. But what could be the problem/solution?
100uF with 0.1uF in parallel to 5V Vcc/GND?
Case #1: the trials...
1. use a 4k7 and parallel 100nF from +5V Vcc to RESET. No change.
2. use a 1,000uF capacitor parallel to +5V Vcc and GND. No change.
Case #1: the solution...
3. add a snubber (104 in series with 100R) parallel to the relay contacts.
No more rebooting problems! :)
Thanks for all the input; it triggered a lot of research and validation, resulting in some learning... more so to create more robust circuits, when it comes to inputs into uC devices.