Now the firmware is finished, it's time to test the analog electronics. The circuit board is starting to look nice after the high-voltage supply and all surrounding analog components are soldered. Unfortunately I immediately found the entire board must be scrapped and revised (it's v0.00 for a reason...). The old prototype used a charge pump voltage doubler to bias the gate drive, which was deleted in the new design, and it was a fatal mistake.
The new high voltage's power supply is derived from an 1:2 isolation transformer and it already doubles the voltage, which was why I deleted the charge pump doubler. But it's an unregulated supply implemented by a quick and dirty push-pull driver chip. When the high-voltage is turned on, the voltage drops back to 5 V, causes the flyback chip to malfunction and stops switching. Worse, its gate drive actually get stuck on, turning the MOSFET into a permanent short circuit / dummy load. The fail-safe logic I programmed into the firmware saved everything from burning up by switching the power off after a timeout. #electronics
I just figured out the failure mode of the malfunctioned flyback chip. The flyback controller turns the transistor on, wait for inductor current to ramp up, and turns off the transistor only after the peak current comparator trips. If the power supply drops out after an overload, the original peak current target is never reached, now the transistor is permanently on! It's not that the gate drive malfunctioned and stuck high, it's actually working exactly as designed. #electronics