For many hours I was trying to simulate in LTspice XVII an optocoupler driver for MOSFETs in an inverter. My project is to build a SMPS with linear voltage stabilizer (I didnt put it on the schematic yet) that is conotrolled by AVR microcontroller. I've managed earlier to succesfully drive a MOSFET through an optocoupler but I couldn't succesfully apply it to my main schematic.
Here is the picture of my schematic of LTspice:
I don't know what seems to be the problem. My guesses are that I've made mistake somewhere in the schematic (most likely) or the optocoupler isn't capable of switching at 20 kHz.
Here is what I tried to solve:
- I've tried changing the PULSE voltage source (microcontroller output) frequency to 200 Hz and the voltage on the 10k resistor at least dropped to 0 V (at 20 kHz it varied from ~10V to 15V).
Here is the picture of the voltage on the resistor (I suppose that is the Vgs) (10k - blue, 1k2 - green):
Changing resistance of the 10k resistor to 1k2 (with the pulse voltage freq = 20 kHz) and the voltage also managed to drop to 0 V.
I've connected te ground of the resistor to the source of the MOSFET - but that short circuited the primary winding of the transformer.
Question:
- How can I make this optocouplers to drive the MOSFET transistors, so that the transforer works (right now there is no voltage on the primary winding).
- (In case the simulation works properly) What would you suggest to reduce Vgs rise time? Are Totem Pole optocouplers faster and also can be applied to driving MOSFETs?
Thanks in advance for any help.