Once I connect the Neutral which goes to a 220V to 380V transformer and fire the mosfet for just 1ms it kills the MOSFET. The MOSFET is rated 1000V and continuous current of 2.5A, PEAK pulse 5A. The transformer is just 220V to 380V step up transformer that is just 1VA.
Energy across the primary side of the transformer appears when the MOS is off and this energy is converted into voltage and this can be very high depending on inductor value and ON time pulse width.
As KlausST said, a snubber circuit must be used to prevent this energy discharging over the transistor.
Well I guess the snubber circuit doesnt work. In theory it should. Not really sure what the issue it. There was no load on the secondary side.
The Resistor was 62ohms and the cap was 680uF. I put an MOV across the L and N of the transformer as extra protection. Snubber circuit was something like this
Not sure why its not working. The MOSFET works great when its not connected. The switch is placed on the neutral side of the incoming AC source. Once turned on its permanently shorted.
I would rather try with bipolar TVS diodes or varistors than a snubber, giving better defined peak voltage.
Recent MOSFET have a considerable avalanche energy rating, it's no completely clear to me why the MOSFET was damaged. Are you sure that the connected transformer is healthy?