# Project: Digitally selectable voltage voltage regulator using LM317

Discussion in 'The Completed Projects Collection' started by dileepchacko, May 21, 2008.

1. ### dileepchacko Thread Starter Active Member

May 13, 2008
102
1
Here a simple digitally selectable voltage voltage regulator using LM317
It can provide maximum 1500mA. Diode D1 and D2 is for protection from short circuit. Vs2,Vs3,Vs4,Vs5 is jest for simulation purpose. You can connect the 4 input to an TTL logic. Even you can change the resistor value and get 16 combination of voltages.

Design Equation

where Vout= Output voltage from voltage regulator
R2= Equivalent resistance of R6,R7,R8 and R9 (parallel combination)
R1= 120Ohm

• ###### Digitally selectable 1.5A voltage regulator.pdf
File size:
62 KB
Views:
1,666
PaulC likes this.
2. ### Wendy Moderator

Mar 24, 2008
20,764
2,534
Think binary as well as digital, if R2 = 1K, R3 = 2K, R4 = 4K, and R5 = 8K.

Or maybe R2 = 125, R3 = 250, R4 = 500, and R5 = 1K.

Or some variation thereof. The advantage is a wider range, and just as controllable.

PaulC likes this.
3. ### thingmaker3 Retired Moderator

May 16, 2005
5,072
6
Bill is correct, as usual. With all four collector resistors the same value, an input of 0101 will yield the same output as 1010 or 1001.

PaulC likes this.
4. ### Wendy Moderator

Mar 24, 2008
20,764
2,534
I was thinking of this circuit while driving, 4 bits could be useful, but 8 should be better. If you have a 25V max output you should be able to get within .1V, which is usually good enough for a lot of projects. 8 bits is a standard byte in the computer world.

I'm not sure how linear the output would be though, I may graph it just to see. I wouldn't use transistors myself, something like a 4051 CMOS would be more likely if the current requirements were in spec (or close).

PaulC likes this.
5. ### SgtWookie Expert

Jul 17, 2007
22,182
1,728
The posted circuit is extremely similar to an entry on page 21 in National Semiconductor's datasheet for the LM117/LM217/LM317.

Link to datasheet on National's site: http://www.national.com/ds.cgi/LM/LM117.pdf
See the attached excerpt.

• ###### LM317DigitallySelectableOutput.PNG
File size:
18.2 KB
Views:
866
PaulC likes this.
6. ### beenthere Retired Moderator

Apr 20, 2004
15,815
282

It's a handy technique for selecting output voltage from a homemade bench PS.

PaulC likes this.
7. ### gogo2520 New Member

Sep 16, 2008
3
1
Hello
I made a made one sort of like that, I found the project at http://members.shaw.ca/roma/ about three years ago. If I remember right the transistors were backwards on the PCB but that was easy to fix. I like the push button selector. I had fun making it and still use it today
Have fun
gogo

PaulC likes this.
8. ### italo New Member

Nov 20, 2005
205
1
You sure 25v 4051 is only good to 20v. Iguess it will work once.

PaulC likes this.
9. ### Wendy Moderator

Mar 24, 2008
20,764
2,534
You're right, just looked up the spec sheet of the CD4051, while you could use it in binary mode it would use more resistors and only be 3 bit.

Last edited: Jan 8, 2009
PaulC likes this.
10. ### tirnasjimmy New Member

Jul 28, 2011
2
0
The statement "R2 is the equivalent resistance of R6,R7,R8 & R9 in parallel" should read " R2 is the equivalent resistence of R2,R3,R4 & R5 in parallel."

Also R2 is used twice. once, presumably, as the resistor in the datasheet formula for the LM317 and again as one of the 4 switchable resistors.

Values of resistors R6 to R9 are irrelevant as long as they are big enough to protect the BJT base-emitter junction from current overload and small enough to allow the BJTs to saturate.