1

I want to dim an LED and have connected a P-channel MOSFET to switch the high side. I added a N-channel MOSFET as a driver. The schematic is attached below. I'm applying a PWM sine signal from an STM32.

Problem: If I measure the voltage on the drain of the N-channel SI2302 to ground, I see that the voltage is increasing from 0 to around 1.5 V and after that it's saturated at 5 V for the rest of the cycle until the duty cycle drops again. So instead of a nice oscillating sine curve from 0 to 5 V, I get a partial sine curve which is somehow clipped... The voltage between drain of the P-channel MOSFET and ground is always at 5 V except for a short drop to 0 V.

How do I prevent the circuit from saturating?

enter image description here

winny
  • 13,064
  • 6
  • 46
  • 63
lazerlini
  • 57
  • 6

1 Answers1

4

That 10 kΩ pull-up resistor (R29) is too high value for any somewhat high frequency switching.

A MOSFET has some gate capacitance, that must be charged/discharged for the device to switch on/off. Charging that capacitance takes some time, and with low enough drive capability, pretty long time.

With low PWM frequency and lower value of R29 you could possibly get away with driving the MOSFET like this. For less heat losses in the P-MOSFET and/or for higher PWM frequency, you should use proper push/pull driving for the gate of Q7.

Klas-Kenny
  • 4,283
  • 5
  • 24
  • Thanks a lot! You were right, decreasing the pullup to 1k and decreasing the PWM frequency to ~1kHz fixed the problem! Thanks also for the additional hint for higher frequencies, I'll keep that in mind for future projects. – lazerlini Jan 18 '22 at 16:24
  • 1
    @lazerlini for a proper push-pull driver with a discrete components you can take a look at this Q: https://electronics.stackexchange.com/questions/281295/bjt-push-pull-for-a-mosfet or you can get a driver IC instead, which basically does the same. – NStorm Jan 18 '22 at 17:00