Boot Converter
Moderators: adafruit_support_bill, adafruit

Boot Converter

by upnxwood16 on Mon Jun 18, 2012 5:58 pm

so I lifted someones code on this forums to use it as a boost converter along with the boost converter schematic on LadyAda's page.

//Boost Controller
TCCR1B = 0; // stop timer1
DDRB |= (1 << PORTB1); // same as pinMode (9, OUTPUT)
OCR1A = 460; //low brightness
TCCR1A = (1 << COM1A1) | (1 << WGM11); // 9 bit fast pwm
TCCR1B = (1 << WGM12) | (1 << CS10); // restart timer1, prescaler = 1

While it does work, I have to set it at 460 to get about 68.6V unloaded and when I connect it to my circuit, it goes down to 40V. I just wanted to make sure this was correct as all the settings I see should be around 90 for brightness on the firmware downloads.

This is my first foray into something deeper than the basics and I have been reading about the timers.

Thank you
upnxwood16
 
Posts: 2
Joined: Mon Jun 18, 2012 5:51 pm

Re: Boot Converter

by adafruit_support_mike on Tue Jun 19, 2012 6:28 pm

It's normal to see a boost converter's voltage drop when you connect it to the load.

To understand switch-mode power supplies, it helps to think of the output capacitor as a rechargeable battery and everything else as the charger.

If we expand the timescale and replace the output capacitor with an actual battery, the system mechanics stay pretty much the same. As you draw power from the battery, its voltage drops. If you draw a lot of power, it drains quickly. If you only draw a little power, it drains slowly. If you connect a charger that comes on, say, once per day, the battery will start with a full charge every 24 hours.

If you graph the battery voltage, you'll see a series of rising and falling curves.

The rising parts of the curve occur when the charger is on. The slope of the curve will depend on the difference between the power the charger can supply and the power the load wants to draw. If the charger provides a lot more power than the load wants to draw, the battery will charge quickly. If the charger only supplies a little more power than the load wants to draw, the battery will charge slowly.

The falling parts of the curve occur when the charger is off. This time, the slope just depends on the amount of power the load wants to draw. More draw gives you a steeper curve, less draw gives you a flatter curve.

If you connected a very slow-moving voltmeter to that circuit, it would show you the average of those curves across the whole cycle. If you didn't connect anything but the VOM, you'd see a high voltage because the VOM doesn't draw much power. If you also connected a load that draws lots of power, you'd see a lower average voltage from the steeper charging and discharging curves.

A switch-mode power supply works pretty much the same way, but the charge/discharge cycles are on the order of kilohertz or megahertz, not cycles per day. The difference between the high and low points of the charge/discharge curve is called 'ripple', and should be within a calculated range if your converter is working correctly.
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 10870
Joined: Thu Feb 11, 2010 2:51 pm

Re: Boot Converter

by upnxwood16 on Tue Jun 19, 2012 7:55 pm

Thank you for all the info! I guess my concern came into that I had to set ocr1a to 480 when I thought it went from 0 to 256.
upnxwood16
 
Posts: 2
Joined: Mon Jun 18, 2012 5:51 pm

Re: Boot Converter

by adafruit_support_mike on Thu Jun 21, 2012 6:07 pm

Ah.. no worries there. They're all 16-bit registers, so you can go up to 65535.

There *is* a bit of behind-the-scenes magic involved in setting the 16-bit registers through an 8-bit bus (bascially it happens in two steps), but as long as you aren't using interrupts that shouldn't cause any problems.
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 10870
Joined: Thu Feb 11, 2010 2:51 pm