Go Down

Topic: Arduino Uno buck converter shield (Read 23144 times) previous topic - next topic


Hey guy's

I have been working on a buck converter shield that is compatible with the Arduino Uno and I thought it would be nice to share my experiences.
I have been wanting to buy something like this for some time but haven't been able to find anything on the market. My end goal is to be able to make a solar maximum power point tracker and also a power supply with an LCD display where the voltage and current can be infinitely variable. There should be heaps of uses for this shield from driving high power led's to motors and battery chargers. My programming skills are a bit limited and rusty but i have tested some basic PWM driving of the shield and it is working well. I'm going to need to brush up on my programming to make anything usable.

The specs are:
ACS712 20 amp current sensor for input current monitoring
ACS712 20 amp current sensor for output current monitoring
Voltage divider for input voltage sensing
Voltage divider for output voltage sensing
Synchronous mosfet driver with diode emulation mode. This can be switched on and off to increase efficiency at low load.
35 volt maximum in
10 amps is the maximum load i have tested so far. The unit is staying cool to the touch at this current with no heatsinking.

Im going to do some more testing and will post my results.
Let me know your comments  ;)



I have managed to use the Timer1 library to test the shield at different frequencies and monitor the performance. At 50 KHz the inductor makes no audible noise. The mosfets also run very cool at up to 10 amps. Once you go over about 11 amps the inductor saturates and heats up very quickly. This also causes the mosfets to have a bit of thermal runaway.
I have worked out that more capacitance is needed. I might extend the board to make some room for more electrolytic capacitors. I also want to add some ceramic caps to.


for those less educated in electronics like myself - http://en.wikipedia.org/wiki/Buck_converter -

it is a DC DC converter.
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)


Yes Rob. This is a DC to DC converter. It basically varies the output voltage/ current depending on the PWM signal that the arduino gives it. A 50% duty cycle will drop the input voltage by 50% depending on the load condition.


New headers added to stack boards in the usual Arduino uno format. This means i could stack the buck converter shields to increase power levels. I can also add a keypad LCD shield on top too!


I have worked on adapting Tim Nolan's Arduino peak power tracking software onto this shield today. See http://www.timnolan.com/index.php?page=arduino-ppt-solar-charger

It actually works quite well but i could not get the current sensing to work properly with the ACS712 current sensor. The tracking works but the values are way off. I have tried implementing my own code into the current sensing section but have not had any luck. Does anybody have any ideas?
This is his code for the current sensing section.

Code: [Select]
void read_data(void) {
  sol_amps =  ((read_adc(SOL_AMPS_CHAN)  * SOL_AMPS_SCALE) + 5) / 10;    //input of solar amps result scaled by 100

My code looks like this

Code: [Select]
sol_amps = ((sensorValue1 - 511) * 50.00 / 1023);


Very cool, I have been trying something similar with a boost converter but I have had trouble using the timer1 library. Basically I have found you have to be really careful what frequency you choose if you want the PWM to evenly step between duty cycles when regulating input.  For example at the moment I have a boost converter running at 62500Hz as 16Mhz/62500 = even number that is a factor of 1024.

What I don't get is why PWM resolution seems to be half what I thought it would be. 16Mhz crystal on the arduino, and a 62500Hz frequency of PWM only gives me 128 levels of resolution or 0.78% change in duty cycle. Surely it should be 16e6/62500 = 256 or 0.39%....

Has anybody got any ideas? Any help would be much appreciated




This is the basic code that I have been using. I haven't got an ocilliscope to check the output but the buck converter responds well.

Code: [Select]

#include <TimerOne.h>

#define PWM_PIN 9        // the output pin for the pwm

void setup()
  Timer1.initialize(20);                 // set a timer of length 20 microseconds
  Timer1.pwm(PWM_PIN, 50);              // setup pwm on pin 9, 50% duty cycle

void loop()



So are you going to manufacture these or what?  I would buy about 10 of them as long as you add some heatsinks and they reliably handle large loads.


I need to find the time to refine the design a little more before making any more. I need to add some better/ more capacitors and probably some heatsinking too. In the current format it will handle 10 amps all day every day. I ran it for a few days at 10 amps without any issues.
If there was a genuine interest I would look into making a small run of them. I lost a bit of interest due to my limited programming skills.


Jan 05, 2014, 06:13 am Last Edit: Jan 05, 2014, 07:46 am by benjamindees Reason: 1
I'm thinking you should be using smaller inductors and capacitors and a higher frequency.

Have you done any efficiency testing?  Considering the fixed cost of an Arduino shield, supporting 20A would be much more useful even if it's less efficient.


Jan 05, 2014, 08:07 am Last Edit: Jan 06, 2014, 03:14 am by benjamindees Reason: 1
To back up what I'm thinking with some numbers, I took the equations here and turned them into Google Calc queries.  I filled in the voltages with one of my use cases and upped the amperage to 20A, adding two more capacitors and replacing your inductor with this one.  Seems to work out at around 126 kHz.






edit: On closer examination, these equations are based on the minimum inductor size.  So they are somewhat overkill.  See below.


It looks pretty impressive.  Given that the inductor is the limiting factor, have you thought about using capacitors only?  It should be possible, though I have found very little info on making a step-down regulator without inductors.  I did find this article on switched capacitor regulators:
The electronic design articles I've read have been consistent in stating that the efficiency losses are mostly in the inductor, not the capacitors.


Jan 05, 2014, 10:23 pm Last Edit: Jan 06, 2014, 03:21 am by benjamindees Reason: 1
Found a nice calculator:


And a good article on selecting inductors:


But everything I've seen indicates that this inductor is oversized.  The calculator above assumes a ripple current ratio of 0.4.  The article recommends 0.3.  For reasonable voltage differences (eg. 26v-6v) at 50kHz, with this design the ratio is only 0.1.  The inductor could easily be replaced with one that could handle higher amperages.

Go Up