Introduction: Variable Lab Power Supply (1 - 24 V, 0 - 1 A)
A rite of passage for many electronics hobbyist is to make their own power supply. Ready-made power supplies have become quite low cost but making your own is a good exercise in building electronics. In this example, I am taking the easy route by using a commercial power-supply module based on the LM2596 that includes most of the functionality to make a nice variable power supply that can deliver 1.25 V to 25V and 0 to 1 A of current.
In addition, to the power supply module I used ...
1. A project case (had a bunch of these at home with nice aluminum front and back panels)
2. A source of 24 V. Used a discarded plug-in power supply from a broken power stapler.
3. Two single-turn 10,000 ohm potentiometers (part of an assortment I had bought from ebay). A multi-turn potentiometer would provide more accurate adjustment but did not have 10 kb values. So I added two 1,000 ohm pots in series to the 10k ohm for fine adjustment. I replaced the variable resistors (for adjusting voltage and current) that were soldered on the power supply module with regular potentiometers as the small variable resistors cannot be used for more than a few hundred adjustment cycles.
4. A power switch rescued from old electronics
5. An IEC AC socket, again recycled from old electronics.
6. One red and one black three-way banana plug terminals
7. A fuse holder
8. Hookup wires. Some from a Cat 5 Ethernet cable (to connect the potentiometers to the board). The others from the AC adapter itself.
9. Hardware. Bolts, nuts, stand-offs.
Step 1: Ready Made Power Module From Ebay
The module contains the LM2596 chip, two 3 digit LED displays that show the volts and current and has a very small form factor.
You could potentially pack this in an Altoids can.
I have copied pictures from their website to show the different parts of the module.
The first thing you should do when you get the board is hook it up temporarily to get familiar with it and confirm that it works.
Then desolder the two trimpots (the blue ones) for the voltage and current adjust.
Step 2: Drilling Holes in the Front and Back Panel
I needed the following holes and cutouts
1. A rectangular cutout for the digital LED display (volts and amps)
2. Four holes for small bolts to hold the power supply board against the front panel
3. One hole for the small screw on the LED brightness adjustment trimpot to poke through.
4. One hole for the status LED's to show through.
5. Four holes for the 4 potentiometers
6. One rectangle for the power switch
7. Two holes for the banana plug terminals.
So dremel, hole reamers, and files to the rescue.
I think this part of the project took the longest time.
Step 3: Preparing the Front and Back Panel
Please do check for proper fit and adjust the holes accordingly. One of the holes for the variable resistor that adjust LED intensity was also off, so I ended up increasing the size of the hole to squeeze the adjustment screw into the circle. The LED display area was initially divided into two regions (left for the volt display and the right for the amps display). I ended up removing the thin piece of aluminum that divided the two regions because I struggled with centering the LED display.
Debur with a file. Clean up as much as you can.
Then apply labeling on the cleaned aluminum surface with whetever your favorite method is. I used a nail-polish-remover transfer method described in another instructable. I then applied a layer of acrylic varnish on the front of the panel and let it dry.
Step 4: Connecting the Parts Onto the Back Panel
Then desolder any wires that may remain from prior use.
Use of a fuse holder is optional. I have quite a few of these that I had harvested from scrapped electronics so did decide to use one for extra safety.
I had gone overboard on labeling my back panel with the nail-polish-remover transfer method from a laser printout that I have described in another instructable. The transfer was sealed with acrylic varnish.
Step 5: Connecting the Parts Onto the Front Panel
Connect potentiometers.
I first connected the potentiometers as they seemed the most complicated. It was easier to wire the potentiometers after they were attached to the front panel. Wire them as shown in the wiring diagram. Make sure your solder joints are ok. Recheck that the wiring is correct by referring to the wiring diagram.
Banana plug sockets
Attach the banana plug sockets to the front panel. Then connect the DC output wires to the banana plug socket terminals. At the Power supply board these screw into the terminal block. At the banana plug socket end they were soldered. Make sure that the positive wire goes to the red banana socket and the negative wire goes to the black banana socket.
Connect the DC in wires to the screw terminals on the power supply board. Now attach the boards with the 4 bolts, 4 standoffs and 4 nuts. I placed a small piece of brass on the top of the power supply IC and added a few spots of hot glue to hold it in place. The brass piece pressed against the aluminum front panel and so the whole thing served as a heat sink. You can skip the heat sink but then the board may only be able to handle about 15 W instead of 25 W.
Power switch
Now wire the AC connections. Solder two wires to the lower two terminals of the power switch. One wire was marked with a gray line which I used for the "live" wire. Solder two more sets of wires to the middle two terminals of the switch. Again gray wire was attached to the left pole of the switch. You may have a different switch (a 1 pole switch) and you may need only two wires instead of the four I have in my set up.
Step 6: Getting It All Together and Final Test
Now take the other ends of the bottom two wires you had connected to the switch and solder these to the AC socket. If you have a 1 pole switch you will only connect to Live. Solder the other end of the live wire (gray) connected to the middle terminal of the switch to the fuse holder terminal. Solder a wire between the other fuse terminal and the plug-pin on the AC adapter (narrower blade - if you have a polarized AC adapter). Solder the remaining wire from the power switch to the other plug-pin of the AC adapter. Double check everything.
DC in
Clip the DC output wires on the AC adapter, and check to confirm which wire is positive and which is negative. Then connect the positive wire to the screw terminal marked positive and the negative wire to the screw terminal marked negative on the power supply board. I placed a diode in between the positive output of the AC adapter and the positive input of the power supply board to reduce the voltage by about 1 V. My AC adapter was showing a voltage output of nearly 28V. The diode also helps to make sure that only positive voltage goes into the positive terminal. You could skip the diode.
Final test
Attach everything temporarily into the chassis/box. Place a 2A fuse into the fuse holder, make sure the power switch is off and plug in the AC. Turn on the power switch, the display should light up with a voltage. Turn the potentiometer to make sure that the voltage changes.
If the display works. Finish packing and attaching the components into the chassis/box. Cover open connections with electrical tape (or use shrink tubing, which I should have ...). Glue the AC adapter to its location. Check once more.
Pat yourself on your back for just having constructed a very useful little variable power supply!