12 Volt PWM driver for 3.3 V MCU

Hi,

I want to generate 10volt PWM signal at ‘PWM_OUT’. The following is the schematic for generating from 3.3V PWM signal coming from MCU at ‘PWM_MCU’.

However, when there is no PWM_MCU, I expected 0V at PWM_MCU, but its around 5.5V.
Any idea why?

Thanks and Regards,
WI

OP's image: |500x240

That doesn't look like PWM out. More like an analog out. The 4k7 resistors and 10uF capacitor make a pretty strong low-pass filter.

Some of the other resistors look too high. 22k on the gates of the MOSFETs seems high.

So what is the voltage at R11 when there's "no PWM" at the input? What do you consider to be "no"?

That circuit appears to show a shared ground. Therefore there's no point using the opto-isolator. You could skip that part entirely.

Sorry for not explaining earlier. Yes its an PWM to analog converter. The intent is to get 0V and 10Vat 'PWM_OUT' for 0% and 100% duty cycle respectively. R13/R14 have been reduced to 470ohms and R11 has been replaced by 0 ohms.

Anyways, thanks for the analysis. The BS250 part was faulty causing unexpected results. After replacing it and also doing the resistor changes mentioned above, the circuit works fine.

Well the optocoupler will be pretty slow with that 4k7 pullup on the output, why not just use a MOSFET driver chip to level shift up, fast as you could ever want, one chip, simple (well you need the RC filter on the output and a decoupling cap too). Much simpler solution, and can drive very low impedances too if wanted.