Take the 2-minute tour ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

I am attempting to control a switching power supply from my microcontroller. I am using a LT1377 from linear.

In the diagrams in the datasheet, a voltage divider is used to drive the feedback pin. Is it possible to replace that with a signal from my microcontroller?

EDIT: Thanks for the answers. I am waiting for parts to come in to be able to test the different solutions.

share|improve this question
add comment

2 Answers

You can control an LT1377 with a microcontroller but not directly in the manner that you imply.

Agh - system trashed my answer :-( - I'll blame Olin :-)
Again and briefer.

LT1377 datasheet here See circuit diagram below.

(1) PWM output voktage fed back to pin FB.
Place a transistor in series with R2

As PWM duty cycle = switch on time decreases the voltage at FB will decrease and Vout will rise to compensate. PWM output from R1 will need to be filtered and loop response time will increase.

(2) Add external error amp. Feed R1/R2 output to a comparator. Other terminal of comparator = DC derived from PWM from microcontroller. This has the advantage of working at the speed of the comparator and can be as fast as the IC was originally. This is probably the technically best solution at the cost of one comparator section.

(3). Feed voltage from R1/R2 AND filtered PWM output into FB pin. As PWM based DC rises it needs less input from R1/R2 to reach Vref and Vout will drop. This is the lowest cost solution. Control range may be imited.

enter image description here

share|improve this answer
add comment

It is possible, but won't likely result in what you intend. You need the feedback input to receive a representation of the output voltage else the output won't be regulated. If you want to use this chip to do the switching but have the micro control the output voltage, then you need to add a voltage from the micro to the feedback signal, not replace it. With only the micro controlling the feedback signal, the chip will basically slam full on or full off, depending on whether the feedback voltage is above or below the threshold.

The best way would be to have a analog signal derived from the micro (low pass filtered PWM is the easiest) control a current source that dumps additional current onto the feedback node. The more current it dumps, the lower the output voltage. Therefore adjust the resistors to get the highest output voltage you ever want, and additional current will adjust it down from there.

One reason for using a current source is that this won't interfere with the switcher chip's compensation. You could resistor-add another signal, but that changes the dynamics of feedback changes as a function of output changes, which will invalidate compensation assumptions the chip may have been designed for.

A totally different possibility is to lose the switcher chip and do the whole switching power supply control from the micro. I have done that many times. With a sufficiently fast A/D in the micro, you can get quite respectable switching frequencies. Each switching cycle, the micro gets the latest A/D reading, does some math to determine the switch on time for this pulse, adjusts PWM hardware to produce the desired pulse width, starts a new A/D conversion, and does it all again. Lots of embedded power supplies work that way.

share|improve this answer
 
What about using a digital potentiometer in place of R1? –  TwistedTech Aug 30 '12 at 0:38
 
@Twisted: Yes, a digital pot can work if you only need to adjust the regulated output level slowly and the resolution is sufficient. In that case I would add it between R1 and R2 with the tap driving the feedback input of the chip. Size R1 and R2 so that the full range of the digital pot maps to the full range of the output voltages you want to achieve. –  Olin Lathrop Aug 30 '12 at 11:42
 
A EEVBLOG YouTube example of PWM control of a power supply here. Actually #4 of 10. Obviously this can be accomplished in different ways. –  rdivilbiss Aug 30 '12 at 23:19
 
@rdivilbiss I actually watched that video before posting this, it was quite educational. Unfortunately that video is talking about linear regulators, not switching regulators. –  TwistedTech Aug 30 '12 at 23:23
 
@TwistedTech I'm glad you found those videos. Sorry they didn't directly address your issue though :( There is excellent help here and I'm sure they will help you get a workable solution. –  rdivilbiss Sep 1 '12 at 14:49
show 3 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.