Arduino Forum

Development => Other Hardware Development => Topic started by: antman85 on Sep 29, 2013, 07:31 am

Title: Arduino Uno buck converter shield
Post by: antman85 on Sep 29, 2013, 07:31 am
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  ;)
Title: Re: Arduino Uno buck converter shield
Post by: antman85 on Oct 03, 2013, 01:36 pm
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.
Title: Re: Arduino Uno buck converter shield
Post by: robtillaart on Oct 03, 2013, 03:14 pm
for those less educated in electronics like myself - http://en.wikipedia.org/wiki/Buck_converter -

it is a DC DC converter.
Title: Re: Arduino Uno buck converter shield
Post by: antman85 on Oct 03, 2013, 11:49 pm
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.
Title: Re: Arduino Uno buck converter shield
Post by: antman85 on Oct 03, 2013, 11:58 pm
Here is a couple of testing videos

http://www.youtube.com/watch?v=1fpqvkJHmso

http://www.youtube.com/watch?v=ZjV_cDcMys8
Title: Re: Arduino Uno buck converter shield
Post by: antman85 on Oct 04, 2013, 01:22 pm
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!
Title: Re: Arduino Uno buck converter shield
Post by: antman85 on Oct 05, 2013, 12:41 pm
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);
Title: Re: Arduino Uno buck converter shield
Post by: Spuds_Dad on Oct 07, 2013, 10:52 am
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


Title: Re: Arduino Uno buck converter shield
Post by: antman85 on Oct 07, 2013, 11:05 am
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.

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()
{



}

Title: Re: Arduino Uno buck converter shield
Post by: benjamindees on Jan 05, 2014, 02:31 am
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.
Title: Re: Arduino Uno buck converter shield
Post by: antman85 on Jan 05, 2014, 02:53 am
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.
Title: Re: Arduino Uno buck converter shield
Post by: benjamindees on Jan 05, 2014, 06:13 am
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.
Title: Re: Arduino Uno buck converter shield
Post by: benjamindees on Jan 05, 2014, 08:07 am
To back up what I'm thinking with some numbers, I took the equations here (http://www.eetimes.com/document.asp?doc_id=1272335) 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 (http://www.mouser.com/ProductDetail/Bourns/SRP1250-1R8M/?qs=sGAEpiMZZMsg%252by3WlYCkU7%252bI2Fr4H6MuoMB%252bpd5n3zE%3d).  Seems to work out at around 126 kHz.

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

https://www.google.com/search?q=6+V+*+(+1-+(6+V+%2F+25+V))+%2F+(20+A+*+126+kHz)+in+uH (https://www.google.com/search?q=6+V+*+(+1-+(6+V+%2F+25+V))+%2F+(20+A+*+126+kHz)+in+uH)

https://www.google.com/search?q=sqrt((8+*+1980+uF+*+20+mV)+*+6+V+*+(+1+-+(6+V+%2F+25+V))+%2F+(2+*+1.8+uH))+in+A (https://www.google.com/search?q=sqrt((8+*+1980+uF+*+20+mV)+*+6+V+*+(+1+-+(6+V+%2F+25+V))+%2F+(2+*+1.8+uH))+in+A)

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

https://www.google.com/search?q=6+V+*+(+1+-+(6+V+%2F+25+V))+%2F+(20+A+*+1.8+uH)+in+kHz (https://www.google.com/search?q=6+V+*+(+1+-+(6+V+%2F+25+V))+%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.
Title: Re: Arduino Uno buck converter shield
Post by: ralphd on Jan 05, 2014, 08:46 am
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:
http://power.eecs.berkeley.edu/publications/COMPEL_2010_Future_of_Integrated_Power_Conversion_The_Switched_Capacitor_Approach.pdf
The electronic design articles I've read have been consistent in stating that the efficiency losses are mostly in the inductor, not the capacitors.
Title: Re: Arduino Uno buck converter shield
Post by: benjamindees on Jan 05, 2014, 10:23 pm
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 (http://www.mouser.com/Search/ProductDetail.aspx?R=2300HT-100-H-RCvirtualkey54200000virtualkey542-2300HT-100-H-RC).
Title: Re: Arduino Uno buck converter shield
Post by: benjamindees on Jan 18, 2014, 08:38 pm
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.
Title: Re: Arduino Uno buck converter shield
Post by: benjamindees on Jan 24, 2014, 05:51 am
Estimating losses by component (http://electronicdesign.com/power/fundamentals-buck-converter-efficiency)
Title: Re: Arduino Uno buck converter shield
Post by: antman85 on Jan 24, 2014, 10:57 am
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?
Title: Re: Arduino Uno buck converter shield
Post by: CarterX on Mar 12, 2014, 01:42 am
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
Title: Re: Arduino Uno buck converter shield
Post by: basline on Apr 18, 2014, 06:10 am
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.
Title: Re: Arduino Uno buck converter shield
Post by: Rusdy on Apr 26, 2014, 11:34 pm

Very cool, I have been trying something similar with a boost converter...



Hi Dan,
It's been awhile since your last post, how's your boost converter going?

I've built the boost converter with mppt to charge ebike battery using solar panel, but most (pretty much all) arduino uno processing power goes to the custom pwm, as I need pwm freq faster than 50kHz. I should research to uno pwm capability better shouldn't I?

Anyhoo, trying to fly my flag here, my boost mppt charger, works well and tested, here:
http://epxhilon.blogspot.com.au/2014/04/bmppt-solar-charger-2.html

Title: Re: Arduino Uno buck converter shield
Post by: antman85 on Jun 24, 2014, 11:04 am
Hi Rudsy

I just stumbled on your blog showing your MPPT boost converter. Great job! It looks like you have really nailed the software.
I have been working on a new buck converter shield for the last week and I've just ordered the parts to put it together. Hopefully if it all goes well I might be able to adapt my hardware to work with your software. I could even look at making a boost converter instead of a buck.
See the progress here
http://forum.arduino.cc/index.php?topic=247320.0
Where are you located?
Title: Re: Arduino Uno buck converter shield
Post by: SHARANYADAS on Jan 10, 2018, 12:05 pm
Where is the circuit diagram?I am intended to built one for MPPT solar charge controller construction for my home use.I know it's a bit late!But i will be greatfull if you provide the circuit diagram....