New: the AI firewall watches the whole platform and explains each incident in plain words. See how it works

Reply To: Pi restarts every time the rule that turns on the pump relay at sunset runs

Translated from Türkçe by AI ·

I had almost the same thing happen at home; an electrician friend solved it and I learned from him. There are two problems.First, the JD-VCC jumper. As long as it is fitted, the optocoupler on the board isolates nothing: the relay coil is also powered from the Pi’s 5V and the grounds are common. The pulse produced when the relay coil releases goes straight onto the Pi’s supply. To do:

  • Remove the jumper.
  • Power JD-VCC and the coil-side GND of the board from a separate 5V adapter (a cheap 5V 1A is enough).
  • From the Pi to the board, only VCC (3.3V works too, for the optocoupler LED) and IN1 should go. Do not connect the Pi GND to the coil-side GND.

Second, the contactor coil. The diode Ayşe mentioned is for DC coils; yours is 230 V AC, so a diode won’t work there. Put an RC snubber across the coil terminals (100 Ω + 0.1 µF X2, sold as a ready-made module) or a varistor. The arc when it releases causes noise on the relay contacts, and if the wires run past the Pi it leaks in there too.Even once these are done, keep the Pi 20-30 cm away from the relays, and do not run the 230 V wires in the same channel as the Pi’s GPIO wires.And on the Hermetry side: after sending the pump.set command, have the device report the pump’s actual state (wire the contactor’s auxiliary contact to an input and send it as pump.running). That way, even if the Pi is reset, the rule shows what the device reports rather than what was “sent”.

Ağ geçidi yine bağlanıyor…
Accepted solution♥ 4