Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: aruna1 on October 30, 2010, 09:03:02 PM

Title: adjustable power supply circuit help
Post by: aruna1 on October 30, 2010, 09:03:02 PM
Hi
I want to build a adjustable power supply system that can adjust output voltage using a pwm channel of a micro-controller.

output requirement is 0-15v and about maximum 3A.
and should be a linear regulator (as I'm still learning switching regulators and have no good idea about them)

basic idea is adjust the output by varying pulse width and feedback output voltage to the same micro-controller to keep output constant.

Any idea how to achieve this? any regulator IC I can use for this?

thank you
Title: Re: adjustable power supply circuit help
Post by: waltr on October 31, 2010, 01:32:00 AM
There are many ICs that are designed to regulator a switching power supply. LT (linear Tech) and AD (Analog Devices) both makes a number of them. Check their web sites for data sheets and app notes. The most difficult part of the switching power supply design is the transformer.

There are also adjustable linear regulators. The LM317 is the most common but can only supply 1A. However, there is a higher current version or a pass transistor can be added to the LM317 to supply higher current. Google the data sheet for details.
Title: Re: adjustable power supply circuit help
Post by: aruna1 on October 31, 2010, 05:24:18 AM
There are many ICs that are designed to regulator a switching power supply. LT (linear Tech) and AD (Analog Devices) both makes a number of them. Check their web sites for data sheets and app notes. The most difficult part of the switching power supply design is the transformer.

There are also adjustable linear regulators. The LM317 is the most common but can only supply 1A. However, there is a higher current version or a pass transistor can be added to the LM317 to supply higher current. Google the data sheet for details.
hi waltr
it seems you didn't understand my question
what i want is to control a linear regulator using a pwm signal.
normally output voltage of linear regulator like LM317 is decided by a voltage divider at adjusment pin.

what i want is to replace this voltage divider with a digital mechanism.a rotary encoder may be. so when i vary pulse width of pwm signal using the rotary encoder,output of LM317 varies accordingly.
thank you
Title: Re: adjustable power supply circuit help
Post by: billhowl on October 31, 2010, 09:05:31 AM
PWM controling a LM317
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=33798 (http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=33798)
DAC control adjustable power supply
http://www.linuxfocus.org/English/June2005/article379.shtml (http://www.linuxfocus.org/English/June2005/article379.shtml)
http://www.linuxfocus.org/English/September2005/article389.shtml (http://www.linuxfocus.org/English/September2005/article389.shtml)
(http://www.electro-tech-online.com/attachments/microcontrollers/32974d1251452611-digital-control-voltage-using-lm317-adjusting-regulator-output-digitally.gif)
http://www.electro-tech-online.com/microcontrollers/96957-digital-control-voltage-using-lm317.html (http://www.electro-tech-online.com/microcontrollers/96957-digital-control-voltage-using-lm317.html)
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1277815328 (http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1277815328)
Title: Re: adjustable power supply circuit help
Post by: waltr on October 31, 2010, 09:09:34 AM
I would not use PWM to control an LM317 but use a Digital to Analog method like Billhowl shows.
Title: Re: adjustable power supply circuit help
Post by: Soeren on October 31, 2010, 02:42:11 PM
Hi,

I want to build a adjustable power supply system that can adjust output voltage using a pwm channel of a micro-controller.
It can be done with a suitable high PWM frequency and an integrator (plus glue), but it's much easier with a D/A-C.


output requirement is 0-15v and about maximum 3A.
The important thing is to get a stable voltage, you can always scale that up as needed.


and should be a linear regulator (as I'm still learning switching regulators and have no good idea about them)
Linear or switcher, it's all about comparing the set voltage from the controller to the actual output voltage and let it adjust accordingly, so no difference in the interface circuitry.


basic idea is adjust the output by varying pulse width and feedback output voltage to the same micro-controller to keep output constant.
With a D/A-C, it's just set and forget - no need for feedback to the controller.


Any idea how to achieve this? any regulator IC I can use for this?
The very easy way to do it is using eg. a MAX5120A (12 bit SPI-controlled D/A-C) and an op-amp to buffer and amplify the 0..5V output to control the regulator (whether linear or switcher).
Title: Re: adjustable power supply circuit help
Post by: aruna1 on October 31, 2010, 06:52:53 PM
Hi,

It can be done with a suitable high PWM frequency and an integrator (plus glue), but it's much easier with a D/A-C.


can you explain this more? why integrator (not a low pass filter) and what is glue (i hope its not bonding agent  :P) ?
Title: Re: adjustable power supply circuit help
Post by: aruna1 on October 31, 2010, 06:57:07 PM
PWM controling a LM317
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=33798 (http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=33798)
DAC control adjustable power supply
http://www.linuxfocus.org/English/June2005/article379.shtml (http://www.linuxfocus.org/English/June2005/article379.shtml)
http://www.linuxfocus.org/English/September2005/article389.shtml (http://www.linuxfocus.org/English/September2005/article389.shtml)
(http://www.electro-tech-online.com/attachments/microcontrollers/32974d1251452611-digital-control-voltage-using-lm317-adjusting-regulator-output-digitally.gif)
http://www.electro-tech-online.com/microcontrollers/96957-digital-control-voltage-using-lm317.html (http://www.electro-tech-online.com/microcontrollers/96957-digital-control-voltage-using-lm317.html)
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1277815328 (http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1277815328)


hi about above circuit,why use a FET? as a voltage control resistor? cantwe simply give a reference voltage to adjusment pin of LM317 and get reference voltage + 1.25V in output?
Title: Re: adjustable power supply circuit help
Post by: billhowl on November 01, 2010, 09:09:24 AM
In operation, the LM317 develops a nominal 1.25V reference voltage, VREF, between the output and adjustment terminal. The reference voltage is impressed across on the current set resistor R1 connected between the adjustment terminal and the output terminal (usually 240 ohms) and, since the voltage across R1 is constant and the current also constant, the output voltage will be voltage divider between the R1 and the output set resistor R2 or Radj.
If you simply give a reference voltage to adjustment pin, there will be no error voltage feed back from the output pin then the internal comparator will not able to function as the current follow through R1 will not be constant.
Title: Re: adjustable power supply circuit help
Post by: aruna1 on November 01, 2010, 09:59:59 AM
In operation, the LM317 develops a nominal 1.25V reference voltage, VREF, between the output and adjustment terminal. The reference voltage is impressed across on the current set resistor R1 connected between the adjustment terminal and the output terminal (usually 240 ohms) and, since the voltage across R1 is constant and the current also constant, the output voltage will be voltage divider between the R1 and the output set resistor R2 or Radj.
If you simply give a reference voltage to adjustment pin, there will be no error voltage feed back from the output pin then the internal comparator will not able to function as the current follow through R1 will not be constant.


oh i see,
well i was thinking of doing feedback error control using the same micro controller.that is I measure the out put with ADC and adjust PWM accordingly.

anyway Is there any other ways I can achieve this other than with LM317?
thank you
Title: Re: adjustable power supply circuit help
Post by: WhomBom on November 02, 2010, 03:41:13 AM
(http://img688.imageshack.us/img688/6088/71265763.png)

would this work?  the idea is the higher the pwm frequency the closer the Transistor's IN voltage would get to 0V. Thus decreasing the current through the resistor and increasing the transistors resistance
Title: Re: adjustable power supply circuit help
Post by: aruna1 on November 02, 2010, 07:52:45 AM
(http://img688.imageshack.us/img688/6088/71265763.png)

would this work?  the idea is the higher the pwm frequency the closer the Transistor's IN voltage would get to 0V. Thus decreasing the current through the resistor and increasing the transistors resistance
Hi i believe that will not work,how ever if replace BJT with a MOSFET it might work
Title: Re: adjustable power supply circuit help
Post by: waltr on November 02, 2010, 09:36:15 AM
That circuit will just cause the LM317 to go between 1.2V and the maximum voltage. You need to add an integrator and then use a FET as a variable resistor.

The circuit is rather simple so do wire it up and give it a try. Just use an O'scope the monitor the input and output and use a load resistor instead of an expensive processor during testing. If nothing else you'll learn something.
Title: Re: adjustable power supply circuit help
Post by: aruna1 on November 02, 2010, 09:57:59 AM
That circuit will just cause the LM317 to go between 1.2V and the maximum voltage. You need to add an integrator and then use a FET as a variable resistor.

The circuit is rather simple so do wire it up and give it a try. Just use an O'scope the monitor the input and output and use a load resistor instead of an expensive processor during testing. If nothing else you'll learn something.
hi are you refering to WhomBom's circuit of billhowls circuit?
Title: Re: adjustable power supply circuit help
Post by: waltr on November 02, 2010, 12:13:00 PM
Yes, I am replying to the last circuit posted (WhomBom's).
Title: Re: adjustable power supply circuit help
Post by: aruna1 on November 03, 2010, 10:20:05 AM
Yes, I am replying to the last circuit posted (WhomBom's).
aha,  thanks :)
Title: Re: adjustable power supply circuit help
Post by: WhomBom on November 04, 2010, 08:37:25 AM
That circuit will just cause the LM317 to go between 1.2V and the maximum voltage. You need to add an integrator and then use a FET as a variable resistor.




I guess you assume the bjt is used as a switch here? if it is in the active region it would work right?

the pwm-resistor-capacitor piece of the diagram actually is an (passive) integrator by the way.


-edit: the bjt won't work, you will need a FET but i think the integrator part will work.

Perhaps another method; use a ldr and have the pwm flash a led at it in a closed dark box, the bigger the duty cycle, the more light and less resistance by the ldr...