linear1 forums
[part of the linear1 network]
+ [linear1 case mods]
+ [LED Center]
+ [privacy policy]
Welcome, Guest. Please login or register.
March 20, 2010, 09:45:35 PM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Login Register

linear1 forums  |  LED discussion  |  Microcontroller madness  |  Topic: PIC based boost regulator « previous next »
Pages: [1] 2 Print
Author Topic: PIC based boost regulator  (Read 12680 times)
justDIY
Microcontroller Madman
Administrator
Smart like tractor
*****
Offline Offline

Posts: 1652


UFOric


WWW
« on: December 18, 2005, 01:29:58 PM »

Moderator note:  I have split these posts off from the buck thread, since this is about a boost regulator.

following surjectors inspiration and the 'standard' schematic for a step-up converter, I have a pic-powered switch mode power supply!

I don't have much selection for inductors, right now I'm using a big solenoid coil - it is a truely massive air-core inductor.

I'm using the pic's internal PWM hardware, with an operating frequency of 20kHz (the fastest I can go with my current pic setup)

Parts I'm using:
5v 3a switching power supply feeding the PIC and the breadboards.
IRFU3711 smps switch (hehe, rated at 100a+)
basic 1N4001 rectifier
10uF 50V electrolytic cap. on the input and output
12v pull-down solenoid

Right now, there is no regulation, just conversion... I'm manually setting the duty cycle to keep a safe forward voltage across a series string of leds... I can't seem to source enough current to 'max out' current for 9 leds... however I am able to fully light smaller strings.  For example, at 80% duty cycle, I can drive 5 series leds at 20mA... 63% yeilds 25mA into 4 leds.   There's nothing scientific about my testing... I just grabbed piranha leds I had laying about, right now I have 2 blue and 3 yellow in the string of 5... at 20mA the VF reads 12.21v.  Duty cycles over 80% start reducing the output voltage and current, so that's the peak I guess for my setup.


* picboost1.gif (2.23 KB, 419x227 - viewed 1746 times.)
« Last Edit: December 19, 2005, 09:49:25 AM by justDIY » Logged

Want to contact me directly? gmail gordonthree
My Project Blog - http://projects.dimension-x.net

Favorite numbers:
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
SurJector
Smart like tractor
***
Offline Offline

Posts: 107


« Reply #1 on: December 18, 2005, 01:49:04 PM »

IRFU3711 smps switch (hehe, rated at 100a+)
Do you have any advice on MOSFETs for somebody looking into it ? Your IRFU3711 is not available at my retailer (hint: it's in the US but cheaply ships to Europe), but I see an IRF3905 with similar characteristics (RDS and VDmax). Are there specific things to take into consideration besides those ?

While I'm here asking general question, what about general purpose PICs (I was thinking about 8 and 18leads, probably PICs because I've understood the programming process)
Quote
basic 1N4001 rectifier
...
Duty cycles over 80% start reducing the output voltage and current, so that's the peak I guess for my setup.
If I understand correctly the 1234523 datasheets I've looked at in the past 2 days, you'd have better results with a better diode.
Logged
justDIY
Microcontroller Madman
Administrator
Smart like tractor
*****
Offline Offline

Posts: 1652


UFOric


WWW
« Reply #2 on: December 18, 2005, 02:37:24 PM »

Do you have any advice on MOSFETs for somebody looking into it ? Your IRFU3711 is not available at my retailer ... similar characteristics (RDS and VDmax). Are there specific things to take into consideration besides those ?
I chose the 3711 for the two reasons you mentioned - lowest possible RDSON and decent VDSS ... also make sure the fet is rated as a 'logic level' control - VGS of 4.5v or less

I like the 3711 because it comes in an I-PAK package, simlimar in size to a to-92 but squished, and with a short metal tab on the back.

Look for something in the IRL series .. hehe IRL3713 is rated for 30V 260A  Shocked

you'd have better results with a better diode.
better diodes are on order ... I've ordered various high efficency schottky (recommended in ds's everywhere)

you'd have better results with a better diode.
While I'm here asking general question, what about general purpose PICs (I was thinking about 8 and 18leads, probably PICs because I've understood the programming process)

go with a 16F7X7, 16F87Xa series, 16F88 or anything in the 18F range.   I don't have much experience with the small pics (8 pin), they tend to be very limited in programming space (and my programs tend to bloat).   The 7x7 is nice with three hardware pwm generators (great for RGB led applications), the 87XA is a mature 'high end' 14-bit core device, and the 16F88 is a new small pic with lots of features.   The 18F range introduce 16-bit memory and eliminate a lot of the programming bottlenecks the 14-bit devices have.  most of the 18F also support self-programming, so once you load them with a bootloader, updating the programming is very simple.

I'm not sure what's available in the *nix world in terms of pic programming software, if you let me know what software you intend to use, I can look up what pics it supports and let you know which ones would be good to start with.

Logged

Want to contact me directly? gmail gordonthree
My Project Blog - http://projects.dimension-x.net

Favorite numbers:
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
justDIY
Microcontroller Madman
Administrator
Smart like tractor
*****
Offline Offline

Posts: 1652


UFOric


WWW
« Reply #3 on: December 18, 2005, 03:01:57 PM »

I think my huge inductor was holding back the current delivery abilities of my little power supply.

I spent about 30 min wrapping some 30ga kynar wire around a little ferrite ring I scavenged off something.   I don't know how many windings I have on the ring, but its a lot.

I also increased the operating frequency at the expense of some resolution - the pwm is now running at 30kHz.  The power supply produces high voltage at much lower duty cycles now... at 35% I'm seeing 24.3v across my 9 leds, with a drive current of 11.75mA.

However, if I try to go much past 35%, my transistor becomes uncomfortably warm.  I suppose that is to be expected, as the transistor is basically shorting GND to V+ through the coil.   The huge coil I was using before must have had such a high resistance, that it was only conducting tiny amounts of current, even at high duty cycles.

Any suggestions how I can squeeze more current out, without killing my transistor?

Update:

in my trial and error process, I went back to 20khz, and substituted my 110a mosfet for an 8a TIP101 darlington.   I attached a 10 watt heatsink to the darlington (just in case).

At 77% duty cycle, I have 20mA at 25.3 volts, or 1/2 watt!.  I don't know how much current is being consumed by the circuit to achieve this output; I will have to measure that next - both my meters are hooked into the led string, measuring current and voltage.

The heatsink on the switch is luke-warm.

I am going to try higher frequencies now. - well, higher freqs just caused the inductor to heat up something awful.   So i tried lower freqs ... currently at 5kHz, I can hear a faint whine from the inductor, but achieved 20mA at only 33% duty cycle.  The inductor is running cooler now, and the whine gets louder when you get close to it with fingers!

I have maxxed out my LEDs at 25mA and 25.5VF at 38.8% duty cycle.   The inductor is warm, the transistor is barely warm.

Time to take a break - but when I return, I'll try to get some current sensing feedback working.   

One more update:

I updated my led string to be 10x white leds, so ~30 volts

for output of 30v@25mA, the input current is 5v@1.16A (measured on the 10A scale)

so ...
30 * 0.025 = 0.75
5 * 1.1 = 5.5

unless I messed up my math somewhere, that is some poor efficiency, 5.5 watts in for 750mW out!

I think the inductor is the culprit - it is getting damn hot with 10 leds Wink
« Last Edit: December 18, 2005, 04:03:31 PM by justDIY » Logged

Want to contact me directly? gmail gordonthree
My Project Blog - http://projects.dimension-x.net

Favorite numbers:
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
justDIY
Microcontroller Madman
Administrator
Smart like tractor
*****
Offline Offline

Posts: 1652


UFOric


WWW
« Reply #4 on: December 18, 2005, 10:49:08 PM »

hrmmph...

I've setup the A2D portion of my little power supply... and I'm not liking the results.

I have the PIC measuring the voltage drop across a 100 ohm resistor (I've tried various values) ... I'm feeding my led array 11mA, and my volt meter reads 1.1v across my resistor... but the PIC is all over the board ... from 0.8 to 1.4v ... hmm, whats odd is those numbers are +/- 300mV ... I'm sure that's not an accident?!

I even measure the voltage 10 times and take the average, no help.   I wonder if it is switching noise effecting the pic or something... any ideas how to filter it out?  I've tried using a twisted pair, one wire to ground, one wire sampling - no difference.  I also tried a .1uf cap between the ad input pin and ground.

i'll keep at it
Logged

Want to contact me directly? gmail gordonthree
My Project Blog - http://projects.dimension-x.net

Favorite numbers:
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
SurJector
Smart like tractor
***
Offline Offline

Posts: 107


« Reply #5 on: December 19, 2005, 06:10:50 AM »

Quote
I have the PIC measuring the voltage drop across a 100 ohm resistor (I've tried various values) ... I'm feeding my led array 11mA, and my volt meter reads 1.1v across my resistor... but the PIC is all over the board ... from 0.8 to 1.4v ... hmm, whats odd is those numbers are +/- 300mV ... I'm sure that's not an accident?!
That'd be easier with a scope ! You are still using a toroidal inductance, I think this reduces electromagnetic field. You might have mighty losses in your circuit that explain the high current ripple. I've also read that the ripple is the sum of the AC ripple plus ESR of output capacitor times output current. In your case though, 0.3V/11mA=27ohm, it's probably not the only explanation (to reduce the ESR, you can add a second capacitor in parallel; in the (TexasInst) TPS61100 datasheet, they put a 2.2uF ceramic capactior in parallel with the "main" one.

On my side of the Atlantic, I've tried the buck regulator with an NE555. It works, but the NE555 is really hungry, and it gets really bad when the switching frequency becomes high. I'll post a schematic.
Logged
justDIY
Microcontroller Madman
Administrator
Smart like tractor
*****
Offline Offline

Posts: 1652


UFOric


WWW
« Reply #6 on: December 19, 2005, 10:00:14 AM »

That'd be easier with a scope ! You are still using a toroidal inductance, I think this reduces electromagnetic field. You might have mighty losses in your circuit that explain the high current ripple. I've also read that the ripple is the sum of the AC ripple plus ESR of output capacitor times output current. In your case though, 0.3V/11mA=27ohm, it's probably not the only explanation (to reduce the ESR, you can add a second capacitor in parallel; in the (TexasInst) TPS61100 datasheet, they put a 2.2uF ceramic capactior in parallel with the "main" one.

I seem to remember the datasheets recommending tantalium capacitors specificly for their low ESR ... I'm sure these general purpose aluminum I'm using aren't the best ... I just grabbed parts I had laying around (hey, I was using a solenoid for an inductor remember?!).   I'll parallel up a few 1uF and see if it helps any

Good call on the scope - I'll check out what exactly my current looks like... and measure the ripple.


On my side of the Atlantic, I've tried the buck regulator with an NE555. It works, but the NE555 is really hungry, and it gets really bad when the switching frequency becomes high. I'll post a schematic.

I'll try rewiring for a buck converter next ... since it doesn't look like I'll be getting very much further on this one without some better parts.
Logged

Want to contact me directly? gmail gordonthree
My Project Blog - http://projects.dimension-x.net

Favorite numbers:
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
justDIY
Microcontroller Madman
Administrator
Smart like tractor
*****
Offline Offline

Posts: 1652


UFOric


WWW
« Reply #7 on: December 19, 2005, 06:11:18 PM »

with the output current set to 7.6 mA ... my scope is reading ~770mV? across a 100ohm resistor, which is what my volt meter reads as well.

the line shows little peaks, and then a gradual slope down, and another peak

The scope measured the peaks at about 180mV ... I take it the peaks are the switch kicking off, dumping current from the inductor into the capacitor?


Logged

Want to contact me directly? gmail gordonthree
My Project Blog - http://projects.dimension-x.net

Favorite numbers:
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
justDIY
Microcontroller Madman
Administrator
Smart like tractor
*****
Offline Offline

Posts: 1652


UFOric


WWW
« Reply #8 on: December 19, 2005, 06:33:32 PM »

I started playing with capacitors on the input and output ... output caps made little difference, except the bigger they are, the longer it takes to 'build up' the boost voltage

however, input caps made a huge difference ... I just started piling on caps in parallel around the connection between the two breadboards ... peak to peak ripple is down to 70mV now!  and - the pic is getting better results reading the correct voltage across the resistor - it is still getting some wild values from time to time however.


Logged

Want to contact me directly? gmail gordonthree
My Project Blog - http://projects.dimension-x.net

Favorite numbers:
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
justDIY
Microcontroller Madman
Administrator
Smart like tractor
*****
Offline Offline

Posts: 1652


UFOric


WWW
« Reply #9 on: December 19, 2005, 07:34:13 PM »

woohoo

I now have a 'regulated' boost converter.

The PIC is sampling the voltage across the current sense resistor ~10000 times a second, and adjusting the duty cycle of the pwm up or down to compensate.

I've tested it using a piece of wire to short across the leds, simulating a failed diode - if it wasn't for the realitively high capacitance I have on the output (30uf), the current would drop instantly, right now, it takes a few 100 mS for the diodes to discharge the caps.

The code takes 830 bytes (out of 32000) - there's no reason it wouldn't fit on a 6 or 8 pin PIC - specificly the 12F683 ... it has 10bit ADC and a 10bit PWM generator, along with a high speed timer that I'm using to sample the voltage - all in a nice 8 pin DIP or SOIC package

I need to work on getting the ripple down and fine tuning the regulation a bit ... I'm aiming for 1 volt on the resistor, and currently have 985mV, which is within my hystersis window of -100 / +50 mV

now to play around a little, having the buttons adjust the current set point, rather than the duty cycle - letting the software perform the regulation.
« Last Edit: December 19, 2005, 07:41:45 PM by justDIY » Logged

Want to contact me directly? gmail gordonthree
My Project Blog - http://projects.dimension-x.net

Favorite numbers:
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
SurJector
Smart like tractor
***
Offline Offline

Posts: 107


« Reply #10 on: December 20, 2005, 02:45:23 AM »

woohoo

I now have a 'regulated' boost converter.
Great !
Quote
The code takes 830 bytes (out of 32000) - there's no reason it wouldn't fit on a 6 or 8 pin PIC - specificly the 12F683 ... it has 10bit ADC and a 10bit PWM generator, along with a high speed timer that I'm using to sample the voltage - all in a nice 8 pin DIP or SOIC package
See: an 8pin PIC can be usefull !
Quote
I need to work on getting the ripple down and fine tuning the regulation a bit ... I'm aiming for 1 volt on the resistor, and currently have 985mV, which is within my hystersis window of -100 / +50 mV.
I don't know what precision you can get on the voltage, but you'd want the resistor voltage as low as possible: this 1Vx<whatever mA> is just thrown out of the window !
Logged
justDIY
Microcontroller Madman
Administrator
Smart like tractor
*****
Offline Offline

Posts: 1652


UFOric


WWW
« Reply #11 on: December 20, 2005, 09:01:15 AM »

I think i understand why many regulators have chosen a higher refrence voltage - its because of the ripple.

Linear has some that only use 100mV - however, with 70mV of ripple, 100mV isn't very useful to me.  It would be nice to get a lower voltage but I need to make some headway on the ripple!

lets say i'm running a string of power LEDs at 500mA
using the formula P=I2R and V = P / I

0.52 X 10 = 2.5 watts (not good) ... 2.5 / 0.5 = 5 v
0.52 X 1 = 0.25 watts (not bad) ... 0.25 / 0.5 = 500mV
0.52 X 0.5 = 0.125 w (good) ... 0.125 / 0.5 = 250mV

choosing 1 ohm to 1/2 ohm resistor for a 1/2 amp boost regulator wouldn't be too terrible - but 250 +/- 70 is pretty poor ... so I think 1 ohm would be the good choice there.

how about a 4+ watt 1500mA luxeon 3
using the formula P=I2R and V = P / I

1.52 X 1 = 2.25 watts (not good) ... 2.25 / 1.5 = 1.5 v
1.52 X 0.2 = 0.450 watts (ok) ... 0.450 / 1.5 = 300 mV (ok)
1.52 X 0.1 = 0.225 watts (not bad) ... 0.225 / 1.5 = 150 mV (bad)

it looks like 0.15 - 0.2 ohm would be good for a 1.5 amp boost regulator - but you're still stuck with some heat in the resistor - and the ripple is still going to give you problems.

Quote
I need to work on getting the ripple down and fine tuning the regulation a bit ... I'm aiming for 1 volt on the resistor, and currently have 985mV, which is within my hystersis window of -100 / +50 mV.
I don't know what precision you can get on the voltage, but you'd want the resistor voltage as low as possible: this 1Vx<whatever mA> is just thrown out of the window !

the A2D has a 10 bit resolution, but returns a 16 bit number for some reason ... so I'm not sure what my precision is at this point.   It can deffinately read down in the 100mV range without a problem on circuits without any noise.  The other issue is the voltage window is 'huge' right now, from 0 to 5v ... if I used a resistor network to generate say a 500mV refrence voltage for Vref+, then my 10 bit resolution would be spread over 0 to 500mV instead of 0 to 5000mV - the downside there is, more external parts.   Some pics have a programmable internal voltage refrences, but not any of the 8 or 14 pin units.  Alternately, I could run the pic at 3v, that would shave 2 volts off the A2D range - every little bit helps right?
Logged

Want to contact me directly? gmail gordonthree
My Project Blog - http://projects.dimension-x.net

Favorite numbers:
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
SurJector
Smart like tractor
***
Offline Offline

Posts: 107


« Reply #12 on: December 20, 2005, 10:19:52 AM »

Ok about the ripple, I'd not thought on this one (but I've never seen the ripple either !). If you change the resistor, do you have a similar value of the ripple voltage (let's say a "voltage ripple") or is the ripple roughly proportional to the resistor value (let's say a "current ripple") ?

As for the voltage reference, you can use a diode (Zener or standard) and a resistor (two more components) (on the NE555 there are already resistors inside, so that's only one !).

As for the result of the A2D, 16 bits are there just because the registers are 8 bit-wide... They say somewhere in the datasheet that the result is shifted either left or right inside the 16 bits.
Logged
justDIY
Microcontroller Madman
Administrator
Smart like tractor
*****
Offline Offline

Posts: 1652


UFOric


WWW
« Reply #13 on: December 20, 2005, 11:15:36 AM »

I'll try a 10 ohm resistor and see what gives ...

also my 'better diodes' just arrived, 1n5819(i think) schottky rectifiers

ps:

I found an article in EDN regarding using a PIC as a boost controller

http://www.edn.com/article/CA382783.html

their circuit is a little different than mine - I'm going to try it out
« Last Edit: December 20, 2005, 11:49:18 AM by justDIY » Logged

Want to contact me directly? gmail gordonthree
My Project Blog - http://projects.dimension-x.net

Favorite numbers:
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
SurJector
Smart like tractor
***
Offline Offline

Posts: 107


« Reply #14 on: December 20, 2005, 12:04:43 PM »

ps:

I found an article in EDN regarding using a PIC as a boost controller

http://www.edn.com/article/CA382783.html

their circuit is a little different than mine - I'm going to try it out
I think the only real difference is the RIF which is used to control the maximum current going through the inductor (which is probably a good idea if you risk going into saturation). You have RVF1 substituted by your load because you want a current generator, not a voltage generator.

By the way, I notice in their output voltage the same peak. I've not yet tried to understand it (but I think I don't have sufficient knowledge).
Logged
Pages: [1] 2 Print 
linear1 forums  |  LED discussion  |  Microcontroller madness  |  Topic: PIC based boost regulator « previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.422 seconds with 20 queries.