Arduino Uno buck converter shield

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 :wink:

IMG_0651[1].JPG

IMG_0652[1].JPG

IMG_0650[2].JPG

IMG_0649[1].JPG

Update...

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 - Buck converter - Wikipedia -

it is a DC DC converter.

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.

Here is a couple of testing videos

Update...
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 Error

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.

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

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

Dan

Thanks

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.

#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.

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.

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.

https://www.google.com/search?q=2+*+20A+%2F+(8+*+126+kHz+*+20+mV)+in+uF

6 V * ( 1- (6 V / 25 V) - Google Search)+%2F+(20+A+*+126+kHz)+in+uH

sqrt((8 * 1980 uF * 20 mV) * 6 V * ( 1 - (6 V / 25 V) - Google Search)+%2F+(2+*+1.8+uH))+in+A

https://www.google.com/search?q=2+*+20A+%2F+(8+*+1980+uF+*+20+mV)+in+kHz

6 V * ( 1 - (6 V / 25 V) - Google Search)+%2F+(20+A+*+1.8+uH)+in+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.

Found a nice calculator:

http://schmidt-walter.eit.h-da.de/smps_e/abw_smps_e.html

And a good article on selecting inductors:

http://powerelectronics.com/dc-dc-converters/buck-converter-design-demystified

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.

Prototype 20A converter, in progress. Still waiting on a couple of components. This costs $30. If it works as expected, I'm going to order parts for a bunch of them.

I'd rather have Arduino shields. But it looks like there isn't enough interest to get that done.

Estimating losses by component

Sorry mate. Havent checked on this thread for a while.
Iv'e got a little time at the moment so I can do a little more testing. I am going to re-design the board again and make a few little changes.
I'm going to get rid of the hall effect sensors as they are not very accurate and drift alot!
I'm also going to move the pins around and increase the capacitance. You will be able to jumper any PWM pin to the mosfet driver.

Where do you live benjamindees?

Hi antman,

would you please share the schematic for your buck converter?

Is it possible to connect the output of these in series?

Thanks.
Carter

Hey Antman,

I'd also be really interested in your schematic. I had a project to build a peltier driven heating and cooling device that has largely floundered because of the design and (mostly) assembly of the buck converter. A schematic for this would be really helpful.