Introduction: Triple Variable Regulated Power Supply
While designing some systems utilizing the Arduino, the Raspberry Pi, and audio gear, I started to see the need for a reasonably flexible power supply – one that could provide a number of voltages, positive or negative. Although variable power supplies are available, I decided to build my own, just to test my skills in a few ways.
Step 1: First Things First - Safety Notice and Precautions
This instructable deals with a device that uses mains voltage. Unless necessary precautions are followed, accidental electrical exposure can lead to injuries or death. It is critical that you follow common-sense safety procedures:
Insulate all the mains components. Test at each assembly step and examine all the wiring carefully before applying mains power for the first time. Use only a 3-pronged grounded cable and plug and be careful about properly wiring hot and neutral leads. The fuse and switches are important for safety – do not ignore them. Use components with the appropriate voltage ratings. Examine mains connectors and cables periodically for signs of wear, and replace appropriate components, as needed.
Step 2: High Level Requirements
- Provide +5 Volts at at-least 1 Amp for Digital use (Arduino)
- Provide +3.3 Volts at at-least 1 Amp for Digital use (Raspberry Pi)
- Provide dual +/- 15 Volts or more at at-least 1 Amp for Analog use
- Provide variable positive and negative outputs
- Have some degree of aesthetics Build safety measures against electric hazard
- Build at low cost, mostly with components I already have
Next, I came up with some thoughts on how I would meet the above requirements:
- Provide +5 Volts at at-least 1 Amp for Digital use (Arduino) - Use a three-terminal positive voltage regulator
- Provide +3.3 Volts at at-least 1 Amp for Digital use (Raspberry Pi) - Use a three-terminal variable positive regulator
- Provide dual +/- 15 Volts or more at at-least 1 Amp for Analog use - Use three-terminal variable positive and negative regulators
- Provide variable positive and negative outputs - Use three-terminal variable positive and negative regulators
- Have some degree of aesthetics:
- Keep controls and indicators of each power supply in its own section
- House all electronics inside an enclosure
- Use LEDs of separate colors for each power supply
- Use color-coded banana plugs
- Use voltmeters for positive and negative outputs
- Use IEC-C14 style “professional-grade” power cable and socket
- Build safety measures against electric hazard:
- Use IEC-C14 3-prong cable and plug
- Ground the case
- Use a fuse
- Put switches on “hot” (live) wires
- Insulate mains voltages inside the unit
- Prevent accidental loosening of screws inside box
Step 3: High-Level Design
This is a fairly standard design utilizing three-terminal voltage regulators. The +5V power supply uses a fixed regulator while there are two additional power supplies (positive and negative) utilizing adjustable three-terminal regulators. While it is common to see 7805, 317 and 337 parts for fixed 5V, adjustable positive and adjustable negative supplies, respectively, I used NTE 960, 956 and 957 parts, because I had them handy.
As the attached schematic shows, mains power comes in through a standard C14 socket and a fuse, Each of the power supplies has its own toggle switch, and the transformers are wired for 120V operation (more details below). Beyond the step-down transformer, a bridge rectifier and a 1000 uF capacitor perform the classic full rectification and smoothing. An LED, mounted on the front panel, indicates power on the secondary side of each of the power supplies.
Unregulated voltage goes into the three terminal variable regulators, which “read” a 5K potentiometer to provide variable output, which is measured by a small voltmeter on the front panel. The fixed 5V regulator is even simpler, since it does not require a potentiometer for voltage adjustment.
There is greater detail provided below on protection diode and voltmeters. Output is provided through color-coded banana posts, one for each power supply.
Some Details on the Transformers: These transformers contain a dual Primary winding, so that they can be used for 120V or 220V mains. If they are to be used with 220V mains, the two primary windings need to be wired in series, and, if they are to be used with 120V mains, the two primary windings need to be wired in parallel. In the latter case, you need to align the “phasing dots” on the two primary windings. The dot orientation indicates the terminals that have the same phase relationship - notice the dot in the attached close-up of the transformer.
These transformers contain a center-tapped secondary winding, which has been left unused in this design. While some dual-supply designs will make use of the center tap to generate positive and negative voltages beyond the diode bridge, I have chosen to use separate transformers altogether for positive or negative supplies, and hence there is no need for using the center taps. This decision allows me to use two smaller transformers that I can turn on and off individually, rather than a large transformer, to get the same output voltage and current from the variable outputs. The smaller transformers would also influence the cost of the unit and the size of the case.
Some Details on the fuse: Here’s one way to think about the fuse: the transformers are putting out 1.5Amps each, and the regulators are able to source 1.5Amps each, and we have two variable power supplies able to deliver 22 Volts each, and a fixed power supply able to deliver 5 Volts. The AC equation thus works out to: 1.5A * (22V * 2 + 5V) = 73.5VA. To calculate the current through the fuse, we get 73.5VA / 120V = 0.6125Amps. So a 500mA fuse would likely blow if all the power supplies are operating at full current, and the next higher up fuse that I had was the 750mA.
Here’s another way to think about the fuse: the three voltage regulators have a max output current of 2.2Amps each, let’s say that’s where they “melt down,” so we need to protect that from happening. Although the transformers are rated at 1.5Amps each, let’s say they can each deliver 2.2Amps. The above equation can be changed to: 2.2A * (22V * 2 + 5V) = 107.8VA, and 107.8VA / 120V = 898mA. We need a fuse less than that, and 750mA is the lower value I could find.
Some Details on R1, R2, R3: These resisters serve a dual purpose – they light the appropriate LEDs to indicate power, and serve to drain the 1000 uF capacitors when the power is turned off. Simple math will show that a few milliamps of current will flow through these resistors; I used resistors rated at 5W because I had them at hand.
Some Details on R4, R5: The NTE datasheets aren’t clear about how the potentiometer affects the output voltage. I referred to the LM317 and LM337 datasheets, and assumed the NTE parts would work the same way. If you follow the equations from the datasheets, you’ll see that higher resistance of the potentiometers results in higher voltage being output. This becomes important when the potentiometer is wired – would a right turn increase the output voltage or decrease it?
Some Details on D1, D2, D3, D4, D5: LM317 and LM337 datasheets describe how protection diodes should be incorporated in the design, to keep output capacitors from discharging into the voltage regulators. While the three-terminal voltage regulators are quite inexpensive, I had the diodes handy, so they would serve as low-cost insurance, as opposed to unscrewing, de-soldering and replacing the voltage regulators.
Some Details on Voltmeters: The DC voltmeters are straightforward – two leads that provide power to the voltmeter and a third lead that senses voltage, and these voltmeters can read down to 0 Volts, as long as they are powered by at least 1.2 volts. This works well for the Voltmeter for the positive power supply, since it is powered directly from the unregulated voltage source. For the voltmeter measuring the negative power supply, we run into a dilemma – it cannot be powered from the unregulated negative supply, unless it is installed backwards (the voltmeter’s positive connected to ground, and the voltmeter’s ground connected to the unregulated negative side), but then we cannot measure the negative output, since the voltmeter is incapable of measuring negative voltages.
Instead of building additional circuitry to deal with this, the solution I came up with was to connect the “sense” input of the voltmeter to its power (Vcc), and connect the voltmeter to the negative side. In order to make the voltmeter work on the negative output, I needed to wire the voltmeter’s positive (Vcc) to ground, and the voltmeter’s ground to the regulated negative output. While this method works, the drawback is that the voltmeter starts operating at 1.2 volts, so I cannot read values (on the negative side) below 1.2 volts.
Step 4: Parts
Although I had most of the parts, I ended up buying a few parts, such as the transformers, metal enclosure and the voltmeters. I decided to use “NTE” voltage regulators because I had previously purchased them from the local Fry’s store.
S1, S2, S3: single pole, single throw, or single pole, dual throw switches, rated at 125V, 2A
TR1, TR2: 18V, 1.5A Center Tapped Transformer (Link)
TR3: 12V, 1A Center Tapped Transformer (Link)
B1, B2, B3: TL402 Bridge Rectifiers (Datasheet), probably rated at 140V, 4A each. While these are rated higher than what’s needed, I had them on hand so they were “free”
LED1, LED2, LED3: Regular LEDs; I picked three colors to indicate three separate power outputs
D1, D2, D3, D4, D5: While 1N4004 (Datasheet) would be overkill, I had them on hand
IC1: NTE956 positive variable regulator (Datasheet). An LM317 can be used, but I had the NTE part on hand.
IC2: NTE957 negative variable regulator (Datasheet). An LM337 can be used, but I had the NTE part on hand.
IC3: NTE960 positive 5V regulator (Datasheet). An LM7805 can be used, but I had the NTE part on hand.
Capacitors: 1,000 uF, 100V X3, 2.2 uF, 50V X 3, 10 uF, 50V X 3, 0.1 uF, 50V X 3. While some of these are rated higher than what’s needed, I had them on hand so they were “free”
R1, R2, R3: 5.6K at 5Watts
Potentiometers: 5K linear (Link)
Digital Voltmeters X2: there are two common varieties available – those that read 1.2V and above, and those that read 0V and above. I picked a low-cost one from Amazon (Link) that would read 0-200VDC. This is a three -terminal device, requiring 4.5V-30V of power and a lead to sense voltage. Note that this part can measure only positive voltages, and to one decimal
Case: I wanted a thin metal case for grounding, and of a size that would accommodate the three transformers, leaving me room for other components. I wanted the case to be thin enough for me to be able to drill and cut at home. Fry’s carries a case that worked for me (Link)
Misc.: binding posts, screws, insulators that came with the voltage regulators, knobs for the two potentiometers, 750mA fuse and holder, IEC-C14 Socket and power cable, hookup wire, epoxy, felt pads for the bottom of the case, tools for drilling and cutting, etc.
Software used: Omnigraffle for the Mac (Link) for the front panel design; Eagle PCB Light for schematic capture (Link)
Step 5: Designing the Front Panel
One of the requirements I had specified was to have some degree of aesthetics in the design. I figured one way to accomplish this would be to have a nice-looking front panel. I did not have the time to get into laser cutting and did not want to spend a lot of money designing and ordering a custom-built front panel, so I decided to design one on paper and simply stick the paper in place.
I placed the key components on a piece of paper and took measurements around how “ergonomic” the front panel would need to be. After some trial and error I settled on optimal distances between components and used Omnigraffle on the Mac to design a quick front panel.
Each power supply would have its own section, which would include an on/off switch, a power LED, and binding posts. The variable power supplies would have their own adjustment potentiometers and voltmeters. The front panel was designed to accommodate the size of the each of these components.
Step 6: Preparing the Case for the Transformers
I first placed the transformers inside the case, depending on where they needed to be. Because the 12V transformer is smaller than the 18V ones, I placed the power socket closer to the 12V transformer. I placed the fuse close to the power socket to minimize the length of the “hot” wire between them.
Once I measured the distances between the transformers, I prepared the case for drilling the holes. To keep the drill bit from slipping on the metal case, I taped a couple layers of painter’s tape on the case, and marked the drilling marks on the painter’s tape.
Step 7: Preparing the Front Panel
Similar to what I did for mounting the transformers, I covered the front panel with a couple layers of painter’s tape, to keep the drill bit from slipping. I stuck a paper printout of the front panel and used it as a guide to drill holes for the switch, LEDs, potentiometers and binding posts, and used a handheld rotary tool to make the rectangular cuts for the two voltmeters. I tried to “fine tune” the rectangular cuts with a drill, which made them uneven, and I figured the paper printout would help me hide the irregularities.
Similarly, I made a rectangular cut for the power socket in the back of the case.
Step 8: Mounting the Transformers and the Front Panel Components
I screwed the three transformers inside the case and applied epoxy on the nuts, to keep them from getting loose.
I stuck a fresh, clean printout of the front panel on the front of the case and mounted various components in place.
I soldered the “hot” power wires from the fuse to the switches and wired the transformers as well.
Test Point: I tested each connection thoroughly, to make sure there were no mistakes. At this point, I applied power and tested to make sure each switch would turn on its associated transformer.
Step 9: Installing the Bridge Rectifiers and Capacitors
First I measured a small perfboard to make sure it would fit between the transformers and the front panel components, and installed the
three bridge rectifiers and capacitors on the perfboard. I installed the 5W resistors for the diodes
on the same perfboard, and marked the underside of the perfboard to make it
clear where I’d find the input for each of the voltage regulators.
Test Point: Before proceeding, I made sure DC power was being output from each rectifier/capacitor set for each of the transformers.
Step 10: Installing the Voltage Regulators
Knowing that the voltage regulators would get warm or hot, depending on the power draw, I needed to find a way to keep them cool. One way would have been to use a clip-on
heatsink for each part, and another way would have been to screw them into a
combined heatsink somewhere. I decided
to use the entire case as a heatsink, and a simple way to do that would be to
mount the three voltage regulators directly into the case. The tab of each of
the voltage regulators connects to one of its terminals, so the tabs would need
to be insulated from each other and the case.
Fortunately, the NTE parts are supplied with an insulator and a washer, so
the three voltage regulators were easily installed into the case.
In order to accommodate the three voltage regulators, I needed to mount a PCB strip board upside down, with the components facing the bottom of the case.
Test Point: to keep myself between getting confused between the three power supplies, I wired and tested each voltage regulator separately.
At this point, I had to make a decision about wiring the potentiometers. Would a clockwise turn increase the voltage being output or would it decrease it? The NTE parts weren’t clear on the details and I referred to the 317/337 datasheets. Some simple math provided the answer and I was able to wire the potentiometers such that a clockwise turn would increase the output voltage.
Step 11: Final Testing
I wired a professional voltmeter to the output of each power supply and compared the voltage displayed on the two devices, and the voltages
were identical to the first decimal place, which was the maximum resolution provided
by my parts.
Test Point: I referred back to the requirements I had listed before starting the project; to make sure I met the design goals, and I was satisfied that I achieved what I had set out to do.
Step 12: Lessons Learned
- Picked voltmeters with greater precision – two decimal places or more, but at higher cost
- Used multi-turn potentiometers instead of single-turn, to allow for more granular control
- Ordered a professional front panel, albeit at higher cost
- Built a custom case with laser cutting, but didn’t know how
- Done a better job with Eagle schematic capture. This was my first experience with Eagle and I got frustrated with defining new parts for the NTE voltage regulators
- Designed a custom PCB for the bridge rectifier/capacitor section and the voltage regulator section
- Used a drill stand to drill precise holes rather than using a handheld rotary tool