I would like to build a DIY solid state relay for my car to enable some circuits (less than 1A current absorption) only when the accessories are powered up (independently from engine on or off).
I have some spare IRF4905 P-MOSFET, some optocouplers, some TVS diodes 18V and various Zeners.
My idea was this one (I found no optocoupler in Circuitlab, I made it myself more or less). I omit from the schematic the diode protecting from inverse voltage.
IRF4905 accepts at most Vgs=20V. In a car I could get short spikes higher than that. Hoe can I protect it using a 18V TVS diode or various Zener I have?
An idea could be to do this, since the IRF4905 requires only 4V of Vgs for complete turn-on.
Would that work? other ideas? Or should I really use a traditional mechanical relay?