Use an N channel depletion MOSFET: I don't know how to implement it as I will need a negative Vgs to turn it OFF.
I have previously used a normally-on transistor switch in a 1300 V impulse generator I built with great success. The working voltage is much higher, but the design is potentially a useful solution to similar problems like this one as well.
In that project, the high-voltage capacitor bank must be immediately discharged when the control voltage is lost. I considered the use of a bleeding resistor, but rejected the idea as it would increase the quiescent current significantly, forcing the use of a more powerful high-voltage supply than necessary. I also considered the use of a mechanical relay but didn't use it due to concerns of finding one with a suitable rating and the additional board space required.
Negative Gate Bias Generation
If the required negative bias is not lower than -5 V, it can easily be generated using the classic and inexpensive LM2776 charge pump chip to build a rail inverter with just two capacitors, and it's directly controllable from a microcontroller using its ENABLE
pin.
If the required negative bias is lower than -5 V (or high-voltage SiC JFETs, the gate voltage can be as high as -20 V). One can use a DC/DC converter as general-purpose DC/DC ICs are also widely available by multiple chipmakers, use the search engines. Three topologies are possible:
Buck-boost converter
The standard solution.
Buck converter
Ordinary buck converters for positive supply can "abused" as an inverting buck-boost converter by connecting it in a way that moves the ground reference. See TI application note: Working With Inverting Buck-Boost Converters. A limiting factor is the voltage rating of the buck converter, which is the distance between the positive and negative voltage.
Cuk converter
This is the solution I used, based on the LM2611 controller. Input is 10 V. Output is -20 V. This is arguably overkill as it requires two inductors and provides no value other than generating a negative bias. But the inherent capacitive DC isolation is a plus - in case the transistor fails with a short circuit, no DC current flows. When combined with a capacitor with a high-voltage rating and a clamp at its output pin, it can also prevent high-voltage from backfeeding into the controller in case of a fault.
To guarantee an eventual discharge when the control voltage is completely lost, the ENABLE
pin is set to low by default using a pull-down resistor, and the negative output also has a bleeding resistor. Furthermore, the microcontroller output is high-impedance upon reset, with the brown-out detector enabled is fused, so a slight voltage drop (due to power disconnection) would also immediately reset the microcontroller, discharging the capacitor bank earlier than a "passive" discharge.
DC/DC converters lack galvanic isolation, but the ENABLE
pin can be paired with an external one. In my project, the high-voltage side is controlled by a separate microcontroller, isolated from the low-voltage side with a pre-existing galvanic isolation barrier, so the destruction of the microcontroller is not an issue. However, in most designs with only a single microcontroller, optical isolation is strongly recommended. Photovoltaic driver like VOM1271 as recommended by winny can be a great choice for this use case, hitting two birds with one stone (on the other hand, a DC/DC converter is much easier to find than a photovoltaic driver).
Transistor Selection
Suitable normally-on transistors for high-voltage applications not that common, but useful specialties do certainly exist on the market. For exmaple, IXYS (now Littelfuse) offers N-Channal Depletion Mode MOSFET from 100 V to 1700 V.
High-voltage JFETs using Silicon Carbide (SiC) are also new promising solution. (Who knows people are still making new JFETs these days? Wide-bandgap semiconductor is a game changer.) Like depletion-mode MOSFETs, they're normally-on. UnitedSiC (now Qorvo) has plenty of special HV normally-on JFETs from 1200 V to 1700 V.
Speaking of price. So far, the cheapest part I know is UF3N170400B7S (1700 V, 400mΩ, 5A), they cost only $9 on Digikey and Mouser, presumably due to its non-standard SMD package and low demand. UnitedSiC's 1200 V parts are more expensive, currently sold at $15, an 1.5x expense. The HV depletion MOSFET offerings by the competition from IXYS/Littelfuse are also currently more expensive than this part.
Beware that these high-voltage JFETs switches often have an integrated MOSFET in series to overcome its normally-on "problem" to make a normally-off switch. Read the datasheet to make sure you're buying the normally-on raw JFET. Another potentially confusing aspect of the special UF3N170400B7S is that it has four terminals. There's an extra terminal called "KS". It probably means "Kelvin Source", which is physically the same thing as the "Source". It's just an extra path, meant to be connected straightly to the driver output rather than the common ground plane/rail. This avoids corrupting the driving signal due to ground bounce at the "Source" while a high current is being switched by the FET.