uC Controlling Boost Converter

Thread Starter

espire

Joined Dec 18, 2007
24
Hi All,

I am intending to build a boost converter with input ranging from 85Vdc to 265Vdc.
Output will be fixed at 400Vdc.

Any suggestion how i can control the uC to output the varying PWM automatically.

Thanks
 

mrmeval

Joined Jun 30, 2006
833
You can use a microcontroller and a pretty simple one for a single voltage. You would use the on board ADC to control the pwm.

It's not easy.

You would have to develop a divider network on the output side to scale the voltage to the range the uC can accept.

Then you need to develop the code to read the ADC and generate the PWM to track that and also be accurate.

That doesn't begin to help with the switcher which will be a substantial learning curve and probably should be designed first.

I've not done it. I've repaired them and know a small amount about them.

Your design seems to be odd, what is it for?
 

Thread Starter

espire

Joined Dec 18, 2007
24
You can use a microcontroller and a pretty simple one for a single voltage. You would use the on board ADC to control the pwm.

It's not easy.

You would have to develop a divider network on the output side to scale the voltage to the range the uC can accept.

Then you need to develop the code to read the ADC and generate the PWM to track that and also be accurate.

That doesn't begin to help with the switcher which will be a substantial learning curve and probably should be designed first.

I've not done it. I've repaired them and know a small amount about them.

Your design seems to be odd, what is it for?
I had come up with a divider network to scale the output to about 3V.
By reading the feedback into the ADC, how can i make the controller output the required pwm automatically.
 

hgmjr

Joined Jan 28, 2005
9,027
I had come up with a divider network to scale the output to about 3V.
By reading the feedback into the ADC, how can i make the controller output the required pwm automatically.
Many of the newer generation of microcontrollers have built-in features that faciliatate PWM signal generation. I know for a fact that ATMEL's AVR series has a PWM function that is very straight forward to implement. I believe that PICs are similarly endowed. Most of the AVR micros have a built in analog comparator that can come in handy for comparing the output for the purpose generating an error signal for use in adjusting the PWM under software control.

hgmjr
 

Thread Starter

espire

Joined Dec 18, 2007
24
Many of the newer generation of microcontrollers have built-in features that faciliatate PWM signal generation. I know for a fact that ATMEL's AVR series has a PWM function that is very straight forward to implement. I believe that PICs are similarly endowed. Most of the AVR micros have a built in analog comparator that can come in handy for comparing the output for the purpose generating an error signal for use in adjusting the PWM under software control.

hgmjr

I am confused whether this will work for varying input voltages.
:confused:
 

beenthere

Joined Apr 20, 2004
15,819
The purpose of the feedback is to let the uC know when to terminate the on time of the PWM to keep the charge on the output filters at the desired level. Using higher voltages means less on time.

Your challenge is in the percentage of regulation. You may have arranged a divider to drop the output voltage to 3 volts, but you also have to think of the number of bits in the A to D converter that reads this voltage.

An 8 bit converter is good to one part in 256. For 5 volts FS, that's 19.5 mv/bit. If +/- 20 mv is good enough regulation, there you are. Keep in mind that the actual output voltage is 133.33 times the voltage out of the divider. That means that the output regulation will be 133 times as coarse as the control, or +/- 2.6 volts. If the output need a tighter control, then you will need to use a better A to D.

10 bits gives four times the resolution, so your output can be regulated to +/- 65 mv. And so on. This part of the boost converter may drive the selection of the uC.
 

Thread Starter

espire

Joined Dec 18, 2007
24
The purpose of the feedback is to let the uC know when to terminate the on time of the PWM to keep the charge on the output filters at the desired level. Using higher voltages means less on time.

Your challenge is in the percentage of regulation. You may have arranged a divider to drop the output voltage to 3 volts, but you also have to think of the number of bits in the A to D converter that reads this voltage.

An 8 bit converter is good to one part in 256. For 5 volts FS, that's 19.5 mv/bit. If +/- 20 mv is good enough regulation, there you are. Keep in mind that the actual output voltage is 133.33 times the voltage out of the divider. That means that the output regulation will be 133 times as coarse as the control, or +/- 2.6 volts. If the output need a tighter control, then you will need to use a better A to D.

10 bits gives four times the resolution, so your output can be regulated to +/- 65 mv. And so on. This part of the boost converter may drive the selection of the uC.

I think I will settle for the 8-bit ADC first.

The purpose of the feedback is to let the uC know when to terminate the on time of the PWM to keep the charge on the output filters at the desired level. Using higher voltages means less on time.

Yes, I wana know how I can get this going for the uC.
Had been losing sleep over this.
Many Thanks
 

mrmeval

Joined Jun 30, 2006
833
The arudino is easy to use since it's an all in one system with a free IDE (compiler, editor, uploader,ect). http://www.arduino.cc/

It is not the only one, it's the one I'm familiar with. The clones can be much cheaper and cheaper still if you buy a kit and build it.

atmega168 used in the arduino and clones does 10 bit adc (0-1023) , the pwm is 8 bit (0-256)
It has several adc, pwm and digital I/O pins.

You read the ADC and it is proportional to the voltage on the output. You'd use that to figure what to tell the PWM to go to and then set a pin to output that.

This is NOT a working program, there is more to it but the critical lines are reading an adc value and writing a pwm value.

readadc = analogRead(analogPin); // read the input pin for adc

//Here you could calculate what to write to the PWM, there are ways to compact it and reduce //code size.

analogWrite(pinforpwm, val); //write the calculated PWM value, you could do the calculation //here for compactness.

// Note: analogRead values go from 0 to 1023, analogWrite values from 0 to 255

This of course would be looping over and over as fast as possible.
If you have access to some other microcontroller that's supported by your school or you get it cheap use it. ;) Learning on one will teach you the basics of all of them.
 

Thread Starter

espire

Joined Dec 18, 2007
24
The arudino is easy to use since it's an all in one system with a free IDE (compiler, editor, uploader,ect). http://www.arduino.cc/

It is not the only one, it's the one I'm familiar with. The clones can be much cheaper and cheaper still if you buy a kit and build it.

atmega168 used in the arduino and clones does 10 bit adc (0-1023) , the pwm is 8 bit (0-256)
It has several adc, pwm and digital I/O pins.

You read the ADC and it is proportional to the voltage on the output. You'd use that to figure what to tell the PWM to go to and then set a pin to output that.

This is NOT a working program, there is more to it but the critical lines are reading an adc value and writing a pwm value.



If you have access to some other microcontroller that's supported by your school or you get it cheap use it. ;) Learning on one will teach you the basics of all of them.

I know boost converter work on the principle Vo=Vi/(1-D)
Let say for varying input of 85-265 Vdc to output 400Vdc.
The duty cycle is 79% for 85Vdc, whereas the duty cycle is 34% for 265Vdc.
Since the output for both cases is 400Vdc, the feedback is still 3V.
How would the controller know whether to output 79% or 34% with respect to the varying input.
:confused:
 

beenthere

Joined Apr 20, 2004
15,819
Have you thought about feedback control at all? The controller increases the PWM duty cycle if the scaled voltage drops under 3. And drops the duty cycle if it rises above 3 volts.
 

Thread Starter

espire

Joined Dec 18, 2007
24
I have tried as mentioned below.
Boost Converter
Vo=Vin/(1-D)

Re=emulated resistance

To create unity power factor,

Re=Vin/Iin

Iin=Vin/Re

Iin=[Vo(1-D)]/Re

Assuming input current = inductor current
K(iL)=sense inductor current * gain

K(iL)=[Vo(1-D)]/Re

Verr=Vref-Vo

Verr=Vo/Re

K(iL)=Verr(1-D)

k(iL)/Verr = (1-D)

I managed to get an almost unity power factor from the boost converter, but the output voltage take quites a while before it settle down and tends to fluctuate.

Can anyone tell me where should i improve to get a better response on the output voltage.

Many Thanks.
:)
 

Thread Starter

espire

Joined Dec 18, 2007
24
This is a functioning circuit.
I had done a rough sketch and the schematic is as shown below.



ADC1 is the feedback voltage.
Since the Vo is 400V, I had use voltage divider to lower it to 3V.
ADC2 is the sensing of inductor current.
I had put in the sensing resistor to feed in the voltage to ADC2.

PWM is use to output the required duty cycle to the MOSFET.
 

hgmjr

Joined Jan 28, 2005
9,027
What is the value of your inductor?

Is your catch-diode a schottky-type? What is its part number?

What is the value of your load resistor?

What is your PWM frequency?

What MOSFET are you using?

These are but a few of the things that would be needed to help us determine where any design weaknesses my reside.

hgmjr
 

Thread Starter

espire

Joined Dec 18, 2007
24
What is the value of your inductor?

Is your catch-diode a schottky-type? What is its part number?

What is the value of your load resistor?

What is your PWM frequency?

What MOSFET are you using?

These are but a few of the things that would be needed to help us determine where any design weaknesses my reside.

hgmjr
The value of my inductor is 124mH
The diode is Silicon Carbide Schottky Diode SDP04S60.
The value of my resistor bank is 680 ohms.
The MOSFET is SPP20N60C3 Power MOSFET.

Thanks
 

hgmjr

Joined Jan 28, 2005
9,027
Thanks for the values. That should prove helpful.

It is still important to know the frequency of the PWM signal in order to calculate whether the switcher is operating in the continuous or discontinuous mode.

hgmjr
 

Thread Starter

espire

Joined Dec 18, 2007
24
I had set the frequency to 40KHz.
What do you think I had neglected, that makes the output voltage to take some times to reach the required value.
:confused:

Thanks
 

hgmjr

Joined Jan 28, 2005
9,027
I suspect that your inductor is a little on the high side.

You have indicated that the inductor is 124 milliHenries (mH). I think that 124 microHenries (uH) would be closer to the value you would need for 40KHz. Another important parameter for your inductor is that it have as low a DC resistance as possible. It would be a good idea if you could measure the DC resistance using an ordinary ohmeter and see what you get. A fraction of an ohm is desireable.

hgmjr
 

Thread Starter

espire

Joined Dec 18, 2007
24
I suspect that your inductor is a little on the high side.

You have indicated that the inductor is 124 milliHenries (mH). I think that 124 microHenries (uH) would be closer to the value you would need for 40KHz. Another important parameter for your inductor is that it have as low a DC resistance as possible. It would be a good idea if you could measure the DC resistance using an ordinary ohmeter and see what you get. A fraction of an ohm is desireable.

hgmjr
sorry there is a typo
its 1.24mH
 
Top