Boost Convertor / Simulation

Thread Starter

spinnaker

Joined Oct 29, 2009
7,830
I want to build a boost converter for an LCD display back light. I am going to need 5V my supply for the PIC can take a max of 3.6 V so I plan to use 2 AA batteries.

Yeah I know it is probably easier to use a display with no back light but I have a bunch of these on hand and they are much more readable with the back light. Plus I would like to learn something about boost converters.

I have designed a simple boost converter based on the information I found here.

See the LTSpice schematic and simulation below. I have also included the LTSpice file.

I seem to be getting the voltage I need but I am getting a bit of ripple.
Will this be OK for the LCD or maybe should I increase the value of C1?


Is there another recommended version for L1? Maybe something more common?


I really have not used LTSpice much.

Toward the end of the simulation the voltages go to heck. Is this just because the simulation is ending?
 

Attachments

ajm113

Joined Feb 19, 2011
174
I'm not quite sure since I've haven't ran your schematic in my own, but I'll let you know if it is if mine fails, but why not go for 4 double A batteries and just use a voltage regulator for your PIC? Or... Use 2 resistors to divide the volts in half when you use 4 double A batteries?

EDIT: Iv tested this circuit in my sim, and all it appears to be doing is letting the voltage build and build very very slowly, I'm not quite sure if I see that schamatic working too well, but then again I forget that the sim I'm using isn't 100% accurate all the time ether.
 
Last edited:

SgtWookie

Joined Jul 17, 2007
22,230
You've set up a pulse input; you have a starting voltage of 0v, an ON voltage of 3v, and then you have a rise time of 100nS, a fall time of 100nS, and 32768 cycles of that.

So, since you have not specified an ON nor OFF time, your frequency will be 1/(100nS+100nS) = 1/.2u = 5MHz. That's really a good bit too fast.

Try adding ON and OFF times of 5uS and 10uS; that will get your frequency down to around 100kHz, which is in the ballpark correct for that size inductor.
Remove the 32768 number of cycles at the end; just blank that field out.

Increase C1 to at least 100uF.
Cut your .tran duration to 20mS, and check the Startup box.

You still won't have any output voltage regulation, as there is no feedback.

You might change the diodes to Schottky diodes. You'll lose too much voltage across a 1N4148/1N914, particularly under load.
 

Thread Starter

spinnaker

Joined Oct 29, 2009
7,830
You've set up a pulse input; you have a starting voltage of 0v, an ON voltage of 3v, and then you have a rise time of 100nS, a fall time of 100nS, and 32768 cycles of that.

So, since you have not specified an ON nor OFF time, your frequency will be 1/(100nS+100nS) = 1/.2u = 5MHz. That's really a good bit too fast.

Try adding ON and OFF times of 5uS and 10uS; that will get your frequency down to around 100kHz, which is in the ballpark correct for that size inductor.
Remove the 32768 number of cycles at the end; just blank that field out.

Increase C1 to at least 100uF.
Cut your .tran duration to 20mS, and check the Startup box.

You still won't have any output voltage regulation, as there is no feedback.

You might change the diodes to Schottky diodes. You'll lose too much voltage across a 1N4148/1N914, particularly under load.
Thanks Wookie.

Part of my problem is not fully understanding all of the settings of LTSpice. I ASSUMEd that the period and on time was not needed if I entered cycles.
I guess I am going to have to find an LTSpice tutorial for dummies. :)

I made the changes you recommended and looks like I am getting about 7.1 V. Do I need to play with the duty cycle?

I am not locked into the 56u coil as I have not purchased one yet so if that can be changed to a readily available value then all the better.

The reason I picked 32,768 is because that is going to be the OSC frequency of my PIC but I got to thinking that if I want PWM to drive Q1 then the PIC will only be capable of 8,192 HZ.


What I was going to do was to have the PIC regulate the voltage.
 
Last edited:

Thread Starter

spinnaker

Joined Oct 29, 2009
7,830
but why not go for 4 double A batteries and just use a voltage regulator for your PIC? Or... Use 2 resistors to divide the volts in half when you use 4 double A batteries?
I was thinking of something like that but did not want to have the voltage drop across the regulator.

But you gave me another idea. I could use 3 batteries in series. Tap between batteries 2 and 3 for my 3v. Then I might be able to get away with 4.5 for my backlight.

But I would still like to build the boost converter anyway even if it turns out not to be used in my final project.
 

Thread Starter

spinnaker

Joined Oct 29, 2009
7,830
You need 5V:

AT WHAT CURRENT?

That will define the best choice for a power supply solution.
Just enough to power the LCD and backlight. Maybe around 155ma


But I am thinking it is not going to be practical at the frequencies I will have available. But I could be wrong.
 

SgtWookie

Joined Jul 17, 2007
22,230
Part of my problem is not fully understanding all of the settings of LTSpice.
It takes a good while even if you're used to this kind of thing.
I ASSUMEd that the period and on time was not needed if I entered cycles.
Nope, those are necessary.

I guess I am going to have to find an LTSpice tutorial for dummies. :)
Did you join the Yahoo! LTSpice users' group? If not, you should.
The Help file that comes with it is actually pretty good. It helps a lot if you try some of the examples in it.

I made the changes you recommended and looks like I am getting about 7.1 V. Do I need to play with the duty cycle?
How else are you going to get the voltage down? ;) Keep Tperiod the same, just change Ton.

I am not locked into the 56u coil as I have not purchased one yet so if that can be changed to a readily available value then all the better.
It's basically how much ripple current you want through the inductor. The smaller the inductor, the larger the ripple current. The higher the Tperiod (lower frequency), the larger the ripple.

The reason I picked 32,768 is because that is going to be the OSC frequency of my PIC
You chose apples because of oranges? :)

The cycles parameter is useful if you want a signal/voltage event to occur a specific number of times. I usually leave this field blank.
but I got to thinking that if I want PWM to drive Q1 then the PIC will only be capable of 8,192 HZ.
If you're going to drive a boost converter with the PIC, you'll really need "full throttle." (4MHz or more). Otherwise, you won't have sufficient adjustment available for the PWM%, nor enough machine cycles left to do anything.

What I was going to do was to have the PIC regulate the voltage.
You should regulate the current instead.
 

SgtWookie

Joined Jul 17, 2007
22,230
You currently (pun intended) have no method to regulate either voltage OR current.

One way to measure current is the voltage drop across a resistor when current flows through it.

One way to measure voltage is to use a voltage divider from your output and compare that to a reference voltage.

Either way, if you're going to control it from your PIC, you'll either need to do calls to an ADC and adjust the PWM according to what you find, or use comparators to trip at high/low values and adjust PWM then, or .... etc.

You could use a dedicated PIC for that purpose (perhaps signal sleep or regulate on an input pin) or perhaps a 555 or purpose-built LED driver IC if you want to forget about using the PIC for the boost regulator.
 

Thread Starter

spinnaker

Joined Oct 29, 2009
7,830
You currently (pun intended) have no method to regulate either voltage OR current.

One way to measure current is the voltage drop across a resistor when current flows through it.

One way to measure voltage is to use a voltage divider from your output and compare that to a reference voltage.

Either way, if you're going to control it from your PIC, you'll either need to do calls to an ADC and adjust the PWM according to what you find, or use comparators to trip at high/low values and adjust PWM then, or .... etc.

You could use a dedicated PIC for that purpose (perhaps signal sleep or regulate on an input pin) or perhaps a 555 or purpose-built LED driver IC if you want to forget about using the PIC for the boost regulator.
Yep, I had already planned on using an ADC input to monitor the boost converter. I have not yet measured current but have a few projects where I measure voltage. But then again it is pretty much the same, just how the external circuit is configured.

I might be getting way to complicated for this project since I think I might have a solution with batteries posted above but it is still an interesting challenge.

Since my PIC won't have a clock speed sufficient to drive the boost, I did consider using a 555 to drive the boost. But what I would like to figure out is how to control the 555 with the PIC.
 

SgtWookie

Joined Jul 17, 2007
22,230
Instead of having the PIC control the display, you should have a momentary button for a human to push. No sense in keeping the backlight on if there is no one around to read the display.
 

Thread Starter

spinnaker

Joined Oct 29, 2009
7,830
Thanks. Already in my plan. I have a battery operated project working right now that does just that. But the supply is 12V (regulated to 5V with a off the shelf buck puck).

The PIC turns the light on when button is pushed for X seconds. When time elapses the light goes off.
 

thatoneguy

Joined Feb 19, 2009
6,359
PIC SMPS w/12F675

There is a constant current one there as well. The code is simply a loop determining duty cycle, you could easily add an ADC to sense resistor or output to make it regulated constant current or regulated constant voltage.
 

SgtWookie

Joined Jul 17, 2007
22,230
I thought of pointing him to Roman Black's site yesterday, but ruled it out due to both his low clock frequency and far higher current requirement.

It would take a very large value inductor and output caps to get reasonably steady current through the backlight at his clock speed.
 

thatoneguy

Joined Feb 19, 2009
6,359
I was thinking of having the 12F675 as a second PIC, running at 4Mhz internal, to run as the regulator. Use another input pin for Enable when the backlight should be on.

A charge pump may be workable, if the LCD backlight is rated for 6.5V.
 

tom66

Joined May 9, 2009
2,595
Recently, I repaired a Samsung Plasma TV. When I looked at the service manual, I saw a very neat circuit for generating the 33V supply from the 9V output on the SMPS. The 33V supply is low current, a few mA max, and is used to bias the tuner. (A 33V zener is present in the original circuit to stabilise the voltage at 33V.) I thought it was very clever - the transistor seems to oscillate around the circuit created by L2, C3 and C5.



It's a nice circuit - but whenever I tried to draw more than a few mA from it, it just didn't want to know. The output usually sagged. The problem is the cap C6. But if you remove that (or make it large), you load the oscillator's "tank" or whatever it is called, and the circuit will stop oscillating. Clearly, a redesign is necessary.

I'm a noob with transistor circuits, and with SMPS design, but a bit of rearranging gave me this. I moved the load from the tank to the centre tap of the inductors, and I changed the split diode configuration (which is part of a second stage boost - I think) to a single diode flyback.



It uses very few components (10 or so) but is surprisingly efficient (60-70%) and capable of outputting >4V from a 2.5V input. It operates at close to 6-7 MHz! This might be a bit too high... but I'll leave that to someone who knows what they are doing.

The majority of the losses occur in Q1 and D1. This is typical of an SMPS. A hard turn-off circuit would be ideal for Q1, as most of its losses occur there. That could improve the efficiency, at the cost of extra components.

It has a limited form of over current protection; the circuit will continuously attempt to restart if the load is too heavy.

The output isn't regulated, it would probably require a second transistor to do that (although I have an idea that would require only a diode but I'm not sure if will work.)

For 3V in, it gives ~4.8V out at up to about 60mA.
 

Attachments

SgtWookie

Joined Jul 17, 2007
22,230
Tom,
Didn't you mean to start a new thread with those circuits?

I have to wonder that, because they certainly don't meet spinnakers' requirements very well:
There's no enable/disable input.
It has no provisions to regulate the output current.
The output current is roughly 1/2 what is required.
70% is really not all that efficient.

Sure, it may be possible to fix all of that stuff - but we'd be reinventing the wheel here.
 
Top