I am designing a PCB with a 5V relay that controls an external DIN mounted latching relay (red line with the "1."):
The problem I have, is that the ESP32 often restarts after turning the latching relay on/off. This only happens if the latching relay is connected. I don't have any problems when the 5V relay triggers without being connected to anything.
When I connect the oscilloscope to the 3.3V rail, I can see a spikes from -40V to 50V (Vpp ~ 90V)
This is my schematic for the Power Supply and relays:
RAC PS datasheet: datasheet
Relay PCN-105D: datasheet
Project full schematic, layout, etc: github
Can those spikes be the responsible of the ESP32 restarting?
What can I do to fix that?
Thanks!
[Edit]
My probe is connected to the thermal pad of the TO220, and to a pin header where I expose the GND:
And this is my entire setup