15kV high voltage pulse generator circuit - how to have digital control?
I assume you have drawn the schematic incorrectly since you said that this works, but what you have drawn can never work. 

In your first schematic the polarity for the N-Chan IRF530 FET shown is definitely incorrect. 

Lets start by correcting the schematic, I think it should look like this when you use a FET:







simulate this circuit &ndash; Schematic created using CircuitLab

There are a couple of problems with the circuit above:


The IRF530 is only rated to 100 V and there is a likelihood of the back EMF generated to hit 5-600 V. If the output breaks over then it would reduce the back EMF generated, but if you move the output terminals far enough apart to prevent breakover, the voltage developed across the FET could rise considerably above 500 V. If you say you have this working, I must assume that the IRF530 is entering avalanche but it seems likely that it would fail eventually.
The VGS(th) for the IRF530 is 4 V maximum, that means there is a likelihood that some devices would not start oscillating at 4.2 V ….and even more in the range of devices may not work down to 3. 6 V (If you are using a LiIon battery).
If you are using an MCU that works at 5 V you are in a better position and the IRF530 would reliably start with a 5 V supply.


A more suitable device for this application may be the Infineon IPA50R380CE. This device supports a minimum of 500 V across the drain/source and has reasonable avalanche capability. This device would start oscillation down to about 3.5 V so would work for a LiIon battery implementation as well as a 5V implementation. 


  Providing digital control 


To enable an MCU to turn the high voltage generator on/off you could take a couple of approaches:


Switch the power supply on/off (which is what you tried to show in your second schematic, but what you showed would not work). This would require a P-Chan FET to turn the supply off/on. 
Clamp the feedback so that the generator cannot start. 


I've chosen to use #2 and updated the schematic to show this approach:







simulate this circuit

Note: This circuit appears to have been originally designed for use with a BJT, and the changes to use a FET complicate the circuit somewhat (since there is no equivalent to the base current). I give no gaurantee that the schematic shown above will work for you, and you'd need lots of details on the transfomer to check exactly what is needed.