I'm making my project and I managed to kill 2 ESP32 boards. First time I thought it was just accident (me shorting 2 wires) because my cables were messy, but it happened again and the circumstances were pretty similar, so I suppose that the fist time it happened was the same problem.
Situation
Servo was spinning for about 2 minutes without any problem, but when I switched the switch it stopped and my ESP was fried. The switch is supposed to stop the servo, but turn it on again when not switched.
This situation alone happened many times without causing the MCU to burn out. I can't think of any thing that was different from the usual when it happened.
What I mean by fried
The ESP's main chip gets 90℃ just connected to 5V and doesn't respond to uploading/run any code that was previously there.
My idea of what the problem migth be
Maybe there is voltage spike when the servo stops, but I thought that the power should not go through the MCU because it should find the path of least resistance (going directly from the source)
I don't have electrical background and I only know the basics so I write here if anyone with more experience and expertise might know what happened and how to prevent such thing from happening ever again.
Thank you very much in advance.
EDIT: Board data sheet here