Hello,
I have a custom esp32-based PCB that controls 2 power relays that drive a 32A load.
Until recently the board worked fine and didnt have a problem driving the relays. But today one of the boards stoped working,
due to one of the pins that controls the relays. Upon closer inspection the pin is still controlled via softwere, but it can only output 0.6V instead of the regular 3.3V needed to drive the transistor for the 12V relays.
Here is the circuit diagram for the relay control part of the circut:

The transistor in question is a Diodes Incorporated 2N7002E-7-F
My first theory was that some type of voltage spike from the relays caused damage to the pin due to overvoltage,
and sure enough, after measuring the turn-on signal on the pin of a new working esp32 board, I found the voltage spike.

My question is how can i deal with this spike so it does not cause any more damage or reliability problems on the board?
I have a custom esp32-based PCB that controls 2 power relays that drive a 32A load.
Until recently the board worked fine and didnt have a problem driving the relays. But today one of the boards stoped working,
due to one of the pins that controls the relays. Upon closer inspection the pin is still controlled via softwere, but it can only output 0.6V instead of the regular 3.3V needed to drive the transistor for the 12V relays.
Here is the circuit diagram for the relay control part of the circut:

The transistor in question is a Diodes Incorporated 2N7002E-7-F
My first theory was that some type of voltage spike from the relays caused damage to the pin due to overvoltage,
and sure enough, after measuring the turn-on signal on the pin of a new working esp32 board, I found the voltage spike.

My question is how can i deal with this spike so it does not cause any more damage or reliability problems on the board?