I designed this circuit (shown below) to level shift an input PWM (10 kHz 5% duty) signal (from microcontroller, 0/+3V3) to 0 and -12V. When the input PWM is HIGH (+3V3) the output is at 0V while when the PWM is LOW (0V) the output is at -12V.
The circuit operation (actual response graph) can be seen below;
I wish to improve the circuit response hence matching the desired response graph (shown below). I also wish to stay limited to the basic components i.e., resistors, capacitors, transistors (2N3904/2N3906) and opto-couplers (4N25/4N26/4N33). I also need to keep isolation and a small duty cycle PWM input (<= 5%).
Any tips/design changes are greatly apricated, Thanks.