I'd like to build a power supply for my desk. I've found a few projects based on the L200 adjustable voltage regulator.

In the example below, how could I replace R3 with a microcontroller, so that varying the current limit can be automated?

Likewise, how can R2/R1 be controlled?

Is there a better device for a task like this?

link|improve this question

The picture is no longer available, could you re-upload? – hlovdal Sep 5 '11 at 0:24
feedback

5 Answers

up vote 3 down vote accepted

Use an MCU as a switching regulator, with a suitable MOSFET and inductor. Microchip has several application notes on such techniques.

link|improve this answer
5  
Could you provide some links to those application notes? – endolith Jan 19 '11 at 21:22
The open-source pickit2 uses a PIC to control a switching regulator. See augroups.blogspot.com/2009/05/… for a brief explanation (it's "the VPP signal generation circuit"). Some people, such as myself, like to see the complete circuit in context -- see microchip.com/pickit2 for the complete schematics. "AN1086 - Switching Power Supply Design" microchip.com/stellent/… "Lighting Design Center" microchip.com/stellent/… – davidcary Feb 11 '11 at 20:28
1  
you could at least have given us a link. – Federico Russo Jun 12 '11 at 8:42
Why the downvote? There are some links in davidcary's comment. – Leon Heller Jun 12 '11 at 9:17
feedback

To replace R2 you can use a digital potentiometer or "digipot". It acts like a resistor where the resistance can be controlled over a digital bus such as SPI. It might also work for R3 but I'm not sure how much current it has to carry; if it's small a digipot would work there as well of course.

A switching approach might be smarter though, since it would be cheaper and more efficient although more complicated to design.

link|improve this answer
IMHO it is worth noting that digipots tend to be on the expensive side. :) – jpc Jan 22 '11 at 19:18
feedback

Pin 3 is a ground. Use this to your advantage; the outputs on a microcontroller can be set to either tristate or ground. Then, using an array of resistors, you can program the voltage by pulling down binary combinations. For best results use binary or close to binary values, for example, 10, 22, 39, 82, 150, 330, 680, 1.2k... It's limited in resolution to 2^n steps, where n is the number of resistors. Not sure how to control current limit but you could try a similar approach with an op-amp as a current limiter and a similar voltage divider as a reference and just set the regulator current at a high limit so a short doesn't damage it.

link|improve this answer
feedback

Consider using a DAC output and a high resistance (relative to R1) to inject / sink current into the pin 4 network to facilitate a 'trim' feature.

Controlling the OCP limit would most likely require a digipot, as would significant adjustment of the setpoint.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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