In this blog post, I want to explain a basic buck converter circuit, which is designed to step down a higher DC voltage to a lower DC voltage efficiently. The circuit starts with a 12V battery (BAT1) as the input source. Capacitors like C1, C2, and C3 are used for filtering and stabilizing the voltage, while inductors such as L1 help smooth the current to the load.
The diodes D1 through D4 provide rectification and protection; for instance, D1 and D3 are Schottky diodes that ensure fast switching with minimal voltage drop, and D4 is a transient voltage suppressor for overvoltage protection. The MOSFET Q4 acts as the main switching element controlled by the transistor network Q1, Q2, and Q3, which together regulate the output voltage.
Resistors R1 through R6 set biasing and feedback levels to maintain stable operation, and additional capacitors like C4, C5, C6, and C7 further filter the output to reduce ripple. Fuses FUSE#001D and FUSE#001E provide current protection for both the input and output sides. Finally, a 7805 linear regulator (U1) ensures a steady 5V supply for sensitive components, and the LOAD represents the device or circuit powered by this buck converter.
This circuit demonstrates a simple yet effective way to convert higher voltage to a lower, regulated voltage suitable for electronics projects. It’s a great starting point for learning about switching regulators and power management.
Arduino Code
const int pwmPin = 9;
void setup() {
pinMode(pwmPin, OUTPUT);
// Timer 1, Phase Correct 8-bit PWM, inverting, prescaler = 1 (~31.37 kHz)
TCCR1A = _BV(COM1A1) | _BV(COM1A0) | _BV(WGM10);
TCCR1B = _BV(CS10);
OCR1A = 128; // MOSFET on-time = OCR1A / 255 (128 ≈ 50%)
}
void loop() {
}
Graphs
The graph below shows the behavior of a buck converter over a very short time interval.
Here’s a breakdown of waveforms in the graph.
Vpwm: The PWM (Pulse Width Modulation) control signal for the MOSFET. Initially high (~0.736 V), it quickly drops and oscillates, showing how the switching duty cycle changes to regulate the output.
Vg: The gate voltage applied to the MOSFET. It rises sharply as the transistor turns on and falls when it turns off, reflecting the switching transitions.
Vsw: The voltage at the switching node (the junction of the MOSFET, diode, and inductor). It shows fast spikes and oscillations corresponding to the MOSFET switching and inductor current changes.
Vload: The output voltage across the load. It starts near zero and gradually rises toward the regulated voltage, demonstrating how the buck converter smooths out the input to provide a stable output.
In essence, this graph captures the dynamic response of the buck converter: the PWM signal drives the MOSFET, which switches the voltage at the inductor, and the output capacitor filters this to produce a relatively steady output for the load. Early time steps show rapid transitions, while Vload slowly stabilizes as the converter reaches steady state.
A practical example of this circuit is powering a microcontroller-based project, such as an Arduino or Raspberry Pi, from a 12V car battery. The buck converter efficiently steps down the 12V to 5V, providing a stable supply for the sensitive electronics while minimizing heat and power loss compared to a linear regulator.
Related blog posts:
- How to convert the high side p-mosfet to high side n-mosfet buck converter
- Why High-Side Buck Converter Fails: Solving the P-MOSFET Gate Charging Problem
- Arduino PI Synchronous Buck Converter | DIY DC DC Converter Design


