How to build DIY Arduino-controlled synchronous buck DC-DC converter

Here I wanted to share Arduino-controlled synchronous buck DC-DC converter design that steps down a 12V input to a regulated lower output voltage (such as 5V) using a 50 kHz high-frequency PWM signal generated by the ATmega328P to drive an IR2104 high-and-low side MOSFET driver and a synchronous half-bridge power stage (IRLB8721, IRLB8721).

I had tested a buck converter designed with Arduino as PID controller in my previous blog post How to design Arduino buck converter with feedback. That buck converter had several short comings and so here is an improved version of the DIY Arduino Buck Converter.

Arduino-controlled synchronous buck DC-DC converter Circuit Diagram:

Arduino PID controller Buck Converter Design Created by ee-diary.net C1 470uF L1 330uH 220 H16.000E5C ATMEL MEGA16U2 1526 PH 22X4ZA A0 A1 A2 A3 A4 A5 RESET 3.3V 5V GND GND Vin IOREF ANALOG IN POWER 47 25V VT 47 25V VT 103 103 TX RX L ~5 4 ~3 2 RX < 0 TX > 1 ~11 ~10 7 ~6 13 12 GND AREF DIGITAL(PWM~) 8 ~9 ICSP 103 ON UNO Arduino ATMEL ATMEGA328P U 0 1 2 3 4 5 6 7 8 9 10 11 12 13 A5 A4 A3 A2 A1 A0 DC Voltage Battery 12V R3 15k R4 10k LAMP 5V LOAD=24Ohms 25% RV1 10k VCC 1 SD 3 VB 8 HO 7 VS 6 LO 5 IN 2 COM 4 U1 IR2104 C2 100uF C3 100nF R1 10k R2 10k Q1 IRLB8721 Q2 IRLB8721 D1 UF4007 R5 10 R6 10 C4 1uF Tx Rx B1 12V

Features

  • Microcontroller-Based Digital Control: Uses an Arduino Uno running a 1 kHz closed-loop PID control algorithm with input-voltage feedforward. It uses Fast PWM mode for PWM switching.
  • Synchronous Rectification: Employs dual N-channel MOSFETs (IRLB8721, IRLB8721) and an IR2104 driver to improve efficiency compared to standard diode-freewheeling buck converters.
  • Flexible Setpoint Control: Output voltage can be adjusted dynamically via a potentiometer (RV1) on analog input A0 or by entering a target voltage directly through the serial monitor.
  • Protective Features: Includes software current limiting with foldback, under-voltage lockout, and auto-retry (hiccup) protection modes.
  • High-Frequency PWM: Utilizes Timer1 configured for 50 kHz fast PWM on pin 9 (OC1A) with a 320-step resolution.

Advantages

  • High Efficiency: Synchronous rectification drastically reduces conduction and switching losses during freewheeling periods.
  • Precise Regulation: Feedback loop via voltage divider R3/R4 on A1 ensures steady output voltage under varying load conditions.
  • Cost-Effective & Adaptable: Combines open-source hardware flexibility with robust power management components ideal for prototyping and educational use.

Program Code



Video Demonstration



Test Results

When POT is set to 25%, the output waveform:

Arduino PID Buck converter output voltage

When POT is set to 50%, the output waveform:

Arduino PID Buck converter output voltage

When POT was set to 75%, the output voltage waveform is shown below:

Arduino PID Buck converter output voltage


Related tutorials and downloa links:



Post a Comment

Previous Post Next Post