# Buck converter, duty cycle has inverse relationship with Vout?

I've been trying to design a DC-DC step down (buck) converter for a school project, and have been getting unexpected results. I'm using a PWM signal from an arduino to step down the voltage, and have been working with the assumption that the duty cycle (that is, TimeOn/Period) is equal to the ratio of Vo/Vs.

However, after testing with an oscilloscope (to view duty cycle of pwm) and multimeter (to view output voltage), it turns out that my output voltage is decreasing with an increase in duty cycle. Vo/Vs has an inverse relation to the duty cycle. What could I be doing wrong? Thanks in advance

• The transistor "on" duty cycle is proportional to the output voltage. Depending how you drive the transistor, though, it might be "on" when your control signal is low rather than when its high, so the transistor on duty cycle would be the complement (1-x) of the controller's output pin's duty cycle. Commented Apr 1, 2019 at 23:06
• What that means is you should share a schematic that includes the connection from the controller (Uno) and the buck converter's pass transistor. Commented Apr 1, 2019 at 23:07
• Sorry I haven't had a chance to make a schematic, the PWM signal goes from pin D9 to the gate of the P-channel MOSFET. The source is connected with 5V in, and the drain leads to the diode and inductor. Maybe I'm not driving with enough voltage?
– Nick
Commented Apr 1, 2019 at 23:14
• So, what voltage on the gate of the FET will turn it on? Commented Apr 2, 2019 at 0:33

Are you measuring the duty cycle at the output pin of the Arduino by any chance?

Because if you invert the signal, as the transistor does, your duty cycle is the opposite of what you are measuring.

Others may have said this, but a PFET connected to V+ is off when the gate is high and on when the gate is low. I am not sure how you are measuring duty cycle so perhaps you have corrected for this, I can't tell. This is one of those super confusing things, so I apologise if it is not clear. It isn't to me either.

It is likely that you have the FET polarity when it is on opposite to what you are expecting. If so, a look at FET data sheet and uC (microcontroller) signals and work out what should happen when.

• For a PFET (P Channel MOSFET) source should be most positive, drain should connect to load and FET is on when gate is below Vs.

• For an NFET (N Channel MOSFET, drain should be most positive, source should connect to load and FET is on when gate is ABOVE Vs.

Your query can very probably be easily resolved if you provide adequate information to allow us to properly determine what you are doing.

What voltage is Vs?
What is the FET type? (please provide a part number and a data sheet link) What is Arduino Vdd (3v3, 5V, ...?)
What is the polarity of the PWM signal that you expect to turn the FET on? (0V, 5V, ...?)

As shown in your diagram you have a wrongly connected P Channel FET.
As seen on your breadboard you have connections for an N Channel FET - gate would need to be driven ABOVE Vs to operate.