Author Topic: Adding digital current and voltage control to switch mode power supply  (Read 9481 times)

0 Members and 1 Guest are viewing this topic.

Offline yashrkTopic starter

  • Frequent Contributor
  • **
  • Posts: 274
  • Country: in
  • A MAKER, AN ENGINEER, A HOBBYIST FOR LIFE
    • My Personal Blog
I am thinking of using DC to DC (switch mode)(buck) converter ic to use in my bench power supply which will be controlled by a micro-controller but I don't know how to control voltage and current in this type of IC's. (e.g. LM2596)

I have done some similar thing (actually what Dave did) with Linear Regulators by using PWM in arduino and filtering to a DC voltage then going through a comparator and then comparator which signals transistor then it pulls adj pin to ground, is it the same with this buck IC ?

Not decided which IC to choose yet but I can choose that my self, just help me with the voltage and current control thing. (please suggest any IC if it has that capability to do it on its own or has some provision).

Help me with any way to make my bench power supply.

Links to the site or circuit diagrams will be awesome. Thank you for your time :)

#Feeling awesome to be here, mine first post#
Find me and things I'm working on - https://www.yashkudale.com/
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8540
  • Country: us
    • SiliconValleyGarage
Re: Adding digital current and voltage control to switch mode power supply
« Reply #1 on: February 11, 2014, 08:13:05 pm »
bad idea.
been tried a billion times before. never works right.

the problem i when you change output voltage / current draw you really need to adapt the inductor to get any kind of efficiency out of it. it's gonna get VERy noisy very quickly.

switchers are designed for a static operating point.
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline yashrkTopic starter

  • Frequent Contributor
  • **
  • Posts: 274
  • Country: in
  • A MAKER, AN ENGINEER, A HOBBYIST FOR LIFE
    • My Personal Blog
Re: Adding digital current and voltage control to switch mode power supply
« Reply #2 on: February 11, 2014, 08:40:49 pm »
Thanks for the reply but see this video which dose what I want but dunno how ?
 :scared:  |O
Find me and things I'm working on - https://www.yashkudale.com/
 

Offline yashrkTopic starter

  • Frequent Contributor
  • **
  • Posts: 274
  • Country: in
  • A MAKER, AN ENGINEER, A HOBBYIST FOR LIFE
    • My Personal Blog
Re: Adding digital current and voltage control to switch mode power supply
« Reply #3 on: February 11, 2014, 09:33:35 pm »
In LM2596 buck converter there is a pin called ON/OFF so I was thinking if I design it to make 20v max output (fixed) and use ON/OFF pin to control the amount of time the LM3596 stays on and thus controlling the output voltage, is it possible to do so ? even if  I could do that then how will I control the current ?  I have added a part of LM2596 datasheet.


I searched on the web and came across this circuit  <http://m.eet.com/media/1054677/Figure02.jpg>but I was unable to understand working of the circuit, if any one can figure out the circuit please explain it.

Thanx
Find me and things I'm working on - https://www.yashkudale.com/
 

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3030
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: Adding digital current and voltage control to switch mode power supply
« Reply #4 on: February 11, 2014, 10:25:07 pm »
In simple terms to make an adjustable 2596, feedback is effectively driven from a pot from output with the wiper (connected to feedback) set so that IIRC 1.25v is present on the feedback pin when  the desired output voltage is reached, the higher the output voltage is (with respect to the desired) the higher the feedback voltage (with respect to the reference 1,25) and the 2596 alters to reduce the output until equilibrium is reached (1.25v at the feedback). 

So if you need to control the voltage programatically  what you need to do is sense the output voltage yourself and calculate and supply your own feedback voltage as appropriate (or.. use a digital pot if you can get one with high enough resolution).

If you know the desired output voltage, you can work out the current which would be present through an imaginary potentiometer and thus you can figure out the resistances at each end of the pot which would give 1.25v at the wiper, Ohm's law.

If you know the imaginary resistances at your desired target output voltage, and you know the actual output voltage (which you measure) you can again use Ohm's law to calculate the voltage at the wiper of your imaginary pot.

Then feed that voltage to the feedback pin and start the loop again.

« Last Edit: February 11, 2014, 10:27:09 pm by sleemanj »
~~~
EEVBlog Members - get yourself 10% discount off all my electronic components for sale just use the Buy Direct links and use Coupon Code "eevblog" during checkout.  Shipping from New Zealand, international orders welcome :-)
 

Offline Neverther

  • Regular Contributor
  • *
  • Posts: 129
Re: Adding digital current and voltage control to switch mode power supply
« Reply #5 on: February 11, 2014, 11:00:44 pm »
I am using 2577 followed by 2596 for poormans supply. Threw 10turn Bourns pots there and crammed it into old VFD casing with outputfilters from old ATX PSU. That little thing can give 6A for short bursts if needed...

Current control is rather easy, almost every switchmode can be converted to CC supply.
Measure current with shunt (usually on the low side). If voltage exceeds desired value, feed voltage to the feedback of the regulator.
Regulator sees feedbackvoltage being too big -> lowers the output and bypasses the CV feedback.
If you use opamp on the sense side, you need to slow it down with some filtering so the feedbackloop wont go unstable (average current limiting). Controlling the opamp reference with PWM DAC shouldnt be too hard.

Highside limiting can also be done with PNP and couple resistors. Shunt on highside with PNP across it with limiting resistor. As current rises, voltage across shunt rises and transistor turns on. Feeding the outputvoltage (through a resistor) to the feedback pin. Reference can be controlled with opamp and some unholy tricks, but generally not worth it as only plus is faster operation (less averaging).

Controlling the voltage with micro is other issue. Never tried it myself as I just convert different supplies to CC for driving leds.
As the feedback comes from high voltages the micro cannot withstand, a quick look at the low side of feedback comes to my mind.
Perhaps a digipot between Gnd and feedback pin?
Digipots across the whole feedback voltage might be issue as common digipots cannot take 25V on the input.
Opamp adjustable voltage buffer as a high impedance sink on the feedback (poormans digipot, calibrate the output table for each reference).
Reverse engineer the one on video? :p
Check the ucurrent videos, it might have some tricks.

And for you to know what output of switchmode actually looks (powered by 16v IBM laptop brick with horrible output, 1.4V p-p, 0.5v average noise). LM2577 + LM2596 setup driving a led:
Constant voltage 14.5V around 0.5A
Constant current 14V around 0.3A  <-- this is using lowside shunt with opamp feedback, ringing does not occur with car battery.
And same values with atx filter bypassed (only ceramics across rails):
Constant voltage
Constant current

Constant voltage setup with car battery (constant current showed no difference in waveforms):
Filtered
Unfiltered

Switchmodes aren't bad.
Not the best if you work on some precision amplifiers or if you manage to hit the resonant frequency, but they are usable for generic stuff.
 

Offline yashrkTopic starter

  • Frequent Contributor
  • **
  • Posts: 274
  • Country: in
  • A MAKER, AN ENGINEER, A HOBBYIST FOR LIFE
    • My Personal Blog
Re: Adding digital current and voltage control to switch mode power supply
« Reply #6 on: February 12, 2014, 05:21:45 pm »
Thanks for the reply guys, really appreciate it   :-+
Find me and things I'm working on - https://www.yashkudale.com/
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf