I have a cycle of 3s on 9s off. At times it runs for several minutes, other times it starts crashing and restarting the ESP32 after a couple of seconds of the pump turning on.
I added a flyback diode 1N4007, but I didn’t notice a difference. Added capacitors to try to minimise the noise, but it doesn’t seem to make much of a difference.
I think this is the main part of the error
main_task: Returned from app_main() Guru Meditation Error: Core 0 panic’ed (Interrupt wdt timeout on CPU0).
It works fine when I cycle 1s on 1s off.
I’m new to this world, I assume I’m doing something fundamentally wrong
After doing some more testing, I realised that if I remove the power from the MOSFET VIN or if I remove the pump from the VOUT, it doesn’t crash. So it might not be a software issue?
You may be getting induced currents into the long leads to the ESP32. You could try shortening the wires or putting some ferrite chokes to stop the spikes from getting to the ESP. If you have an Oscilloscope, you may be able to see them.