Why High-Side Buck Converter Fails: Solving the P-MOSFET Gate Charging Problem

This note is about troubleshooting a simple Arduino-controlled high-side P-channel buck converter and explaining why it fails even though the basic buck formula and component values look correct. It focuses on the real problem: the IRF4905 MOSFET gate is not being charged fully during the PWM off-time because the gate drive is too weak, so the MOSFET never turns off properly and the output voltage rises toward the input instead of dropping to the expected 6 V at 50% duty. The post walks through the PWM timing, gate charge/discharge concept, the gate time-constant estimate, the measured waveforms, and the practical solution of using a much stronger gate drive or a proper push-pull driver stage.

For the complete Buck Converter design with feedback, protection features see Arduino PI Synchronous Buck Converter | DIY DC DC Converter Design

 Below is circuit diagram of simple Arduino P-MOSFET High side buck converter circuit diagram. It uses IRF4905 P-channel MOSFET at the high side. The 2N2222 BJT is used as inverter/level shifter.

Arduino P-MOSFET High Side Buck Converter Circuit

The inductor and capacitor value can be calculated using the Buck Converter Calculator: Calculate L, C, and Duty Cycle. Here I have used L1=220uH and C1=37uF for 31.2KHz PWM switching frequency using Arduino. That is, the Arduino is configured to produce 31.2Khz PWM signal using Timer 1. That is 8-bit Phase Correct PWM mode with no prescaling (CS10) to establish a 31.2 kHz switching frequency on Pin 9 (OC1A). The duty cycle is set to approximately 50%, so the output is 50% of the input voltage. Here 12V battery source has been used and so the output is 6V.

The Arduino code is below.


const int pwmPin = 9;

void setup() {
  pinMode(pwmPin, OUTPUT);

  // Set Timer 1 to Phase Correct PWM mode, frequency ~31.3 kHz (prescaler = 1)
  TCCR1A = _BV(COM1A1) | _BV(WGM10);
  TCCR1B = _BV(CS10);
}

void loop() {
  // Set duty cycle (0 to 255)
  // e.g., 128 ≈ 50% duty cycle
  analogWrite(pwmPin, 128);
}

When the circuit was simulated the output voltage was reaching 9V to 12V. The expected output is 6V with 50% duty cycle. So, what went wrong? The circuit schematic is right, the inductor, capacitor value is right.

After plotting the graph of various important signal in the buck converter circuit, it was found that the Q2 MOSFET IRF4905 was not turning off properly. This had to do with gate charging time less than the PWM off state time. So to understand this and to solve the problem lets see the graph closely.

Below are graphs showing various important signal like the Arduino PWM signal at its pin 9(Vpwm), the MOSFET gate voltage (Vg), the switching node voltage(Vsw) and the output load voltage(LOAD).

probes on Buck converter circuit

graph of Buck Converter Signal

graph of Buck Converter Signal

graph of Buck Converter Signal

From the last graph you can see that the gate voltage Vg only reaches around 2V when the Q1 switch is off. With Q1 switched off, the gate voltage should rise to 12V but it rises only upto 2V. 

In the circuit, when PWM output is 0V, the Q1 is off, and the gate voltage Vg should rise to 12V via the R1=10KOhm resistor, but this isn't happening and the output is 12V instead of 6V because the P-MOSFET IRF4905 never turns off. 

It means that the gate voltage never reaches 12V and so the Q2 P-MOSFET is never turned off. This is happening because the charging time of Q2 MOSFET is larger than the PWM off state time interval. For example, lets say the Q2 MOSFET requires 10 second to charge its gates capacitance and therefore gate voltage. But say PWM signal off state time interval is just 4 seconds, and so the gate voltage is charged only for 4 second instead of 10 seconds. This is why the buck converter circuit is not working as intended.

So, we need to find out both the PWM signal turn off time and the time for MOSFET to charge. The PWM signal turn off time (during which the MOSFET gate charges up to Vcc=12V) can be calculated by calculating the time period of the PWM signal, then dividing by 2 to get the off-state time, since it is a 50% duty cycle so ON and OFF states equal time. Similarly, the gate charging time of the MOSFET can be calculated by knowing the time constant for the MOSFET IRF4905 input capacitance to charge through the resistor R1(10Kohm).

How I got the time constant

I treated the gate as a capacitor charged through R1 when Q1 turns off.

  1. Gate capacitance. The IRF4905 datasheet gives Ciss ≈ 3.4 nF.
  2. Time constant. Ï„ = R1 × Ciss = 10 kΩ × 3.4 nF ≈ 34 µs.
  3. Time available. The Arduino code sets Timer 1 to phase-correct PWM with no prescaler, so f = 16 MHz / 510 ≈ 31.4 kHz and T ≈ 31.9 µs. At 50% duty the gate has about 16 µs to charge during each off period.
  4. How far it gets. Vg(t) = 12 V × (1 - e^(-t/Ï„)). At t = 16 µs that is 12 × (1 - e^(-0.47)) ≈ 4.5 V.
  5. How far it needs to go. To turn off a P-MOSFET, the gate must come within |Vth| (2-4 V) of the source, so about 8-10 V. Reaching 10 V takes t = Ï„ × ln(12/2) ≈ 1.8Ï„ ≈ 61 µs, nearly four times the 16 µs available.

As a cross-check using charge: the gate needs about 120-180 nC to switch. R1 can supply at most 12 V / 10 kΩ = 1.2 mA, and 1.2 mA × 16 µs ≈ 19 nC, only about 10% of what’s needed.

The 4.5 V estimate is higher than the roughly 2 V in the simulation graph. This is because the simple RC calculation ignores the Miller effect: while Vds changes, Cgd is effectively multiplied, so the real capacitance seen is larger than Ciss. The conclusion is the same either way, and the gate also gets discharged hard by Q1 (a fast path through R3, Ï„ ≈ 0.2 µs) at the start of every on period, which is why the red trace looks like a sawtooth.

Design rule

The gate must be able to fully charge or discharge within the shortest phase of your duty range:

  • R × Ciss ≲ t_min / 5, where t_min is the shortest on or off time. For 16 µs this gives R ≲ 940 Ω, so my 330-470 Ω suggestion gives Ï„ ≈ 1-1.6 µs.
  • For clean edges, the drive current should be about Qg / t_switch. Switching 180 nC in 100 ns needs about 1.8 A peak, which is why real designs use drivers.
  • Average gate current is Qg × f = 180 nC × 31.4 kHz ≈ 5.6 mA, and gate drive power is Qg × Vg × f ≈ 68 mW.
  • The worst case is at the extremes of duty. At 90% duty the off-time shrinks to about 3 µs, so a weak pull-up fails even sooner.

Solutions

The solutions to this problem are:
  1. Make the pull-up much stronger: change R1 from 10 kΩ to about 330-470 Ω. Q1 can easily sink 12 V / 470 Ω ≈ 25 mA, and the gate time constant drops to a few µs, so Vg should swing close to 0-12 V. This is the quick fix for the simulation, though it wastes a bit of power in R1 while Q1 is on.
  2. Use a proper gate driver: a push-pull (totem-pole) NPN/PNP stage, or a driver IC, so the gate is actively driven both ways. This is the better approach for real hardware.
  3. Use a P-MOSFET with lower gate charge, since the IRF4905 is overkill for a small load.
  4. Use a P-MOSFET with Bootstrap circuit:How to Add a Bootstrap Circuit to a High-Side N-Channel MOSFET Buck Converter
I tried the resistor solution first; this gave me the following graph.
buck converter signal waveform

It shows that the output is lowered to 9V and the gate voltage reaches almost 12V as required but is not sufficient. This means gate charging time is still higher than the PWM signal off time. 

Video demonstration:


2nd video:



Buck converter can also be designed using N-channel MOSFET at the high side, but we need bootstrap circuit to raise the gate voltage of the switching MOSFET. This is described in detail in Why High-Side N-Channel Buck Converters Fail.

Post a Comment

Previous Post Next Post