Sunday, June 9, 2013

Analog Detour: Variable Power Supply

It's been several weeks since my last post.  I've been busy with the Raspberry Pi, learning Linux, etc. building towards an RF base station, data logger, web server for the home energy monitor project.  I'll be posting about that soon, but first I've got a couple small analog projects to share.

I was at Radio Shack checking out their clearance table and came across a Velleman 1A variable power supply kit, for only $5, and couldn't resist.  I've already got several power supplies, but none are variable.  The kit includes a PCB, LM317 adjustable voltage regulator, resistors, caps, and bridge rectifier.  It came with a trimpot, that I upgraded to a front panel mini-pot with a knob.  The kit doesn't include a transformer, but I already had a 12.8 Vac, 1.2A transformer from my junk box.

The LM317 is an interesting twist on three terminal regulators: instead of Input, Common, and Output terminals, the LM317 has Input, Adjust, and Output terminals.  Here's a typical application, taken from the TI data sheet:

The LM317 adjusts the Output voltage to maintain 1.25V across R1.  IAdj is close to zero, so the current in R2 is essentially the same as the current in R1.  In other words there is no appreciable load on the voltage divider formed by R1 and R2.  Therefore the output voltage is very close to:

V0 = 1.25V * (1 + R2/R1)

I wanted my supply to have two output ranges, to make it easier to set the desired voltage.  After several iterations on the solderless breadboard, I settled on the circuit below.  I experimented with the values for R1, based on the the 10K linear mini pot I already had for the front panel. 

I also wanted an analog voltmeter, mostly because they look cool, and also because it's darn handy to adjust the output, without having to drag out a DVM.  I found this one on Amazon, and it worked out great.

I also added the protection diodes shown above and discussed in the TI data sheet.  These protect the LM317 from reverse currents, under various fault conditions, e.g. connecting a higher voltage supply in parallel with the output, or shorting the input.  Probably never needed, but they're cheap insurance!

Here's the complete schematic:

The LM317 does require a minimum load current, so I added the 1K resistor across the output.  Since meter is 10V, but the higher voltage range tops out at more than 15 volts, I added a range doubler switch for it.  Here are some photos of the build:

I used heavy-duty double sided 3M tape, to mount the top of the 2200uFd cap to the bottom of the mini-pot. 

The trimpot on the back of the meter is to adjust the 2X calibration.

Here the supply is set for 12 volts.  I also got a new Epson Labelwriter LW-400, and put it to good use.

Next up: a cellphone headset booster amp.


  1. This comment has been removed by the author.

  2. This comment has been removed by the author.

  3. I have been reading for the past two days about your blogs and topics, still on fetching! Wondering about your words on each line was massively effective. Techno-based information has been fetched in each of your topics. Sure it will enhance and fill the queries of the public needs. Feeling so glad about your article. Thanks…!
    selenium training in chennai
    selenium online courses best selenium online training
    selenium testing training
    selenium classes

  4. This comment has been removed by the author.

  5. Such a wonderful article and I feel that it is best to write more on this topic. Thank you so much because i learn a lot of ideas about it. Keep posting...
    Digital Marketing Course In Kolkata
    Web Design Course In Kolkata