Handy-Dandy Adjustable DIY Power Supply

Can this design inspire you to build your own board?

Clive 'Max' Maxfield

January 24, 2023

8 Min Read
DIY power supply max-0038-featured-image-adj-psu.jpg
Image courtesy of Joe Farr

It seems like only a couple of weeks ago that I wrote my column "Build Amazing Mechanical Circuits That Run Just Like Electronic Ones. But How?" Known as Spintronics, this cunning creation was conceived by Paul and Alyssa Boswell, whose previous claim to fame was a marble-powered computer called the Turing Tumble.

The idea behind Spintronics is to create spinning mechanical analogs of electrical and electronic devices, where these mechanical implementations are connected using chains as wires. In addition to a power supply and switch, there are mechanical implementations of junctions, resistors, capacitors, inductors, transistor, and an ammeter.

Although Spintronics is primarily intended as an educational tool for younger folks, I personally believe it’s going to be of interest to people of all ages. The awesome news is that I recently heard from Paul that Spintronics kits are now shipping around the world.

I’d be embarrassed to tell you how many hours I’ve spent with the Turing Tumble in my office, and I dare not even think about the amount of time I’m going to devote to my Spintronics kit when it arrives.

Perhaps not surprisingly, one thing Spintronics doesn’t provide an analog for is switch bounce. Most non-engineers assume that when they activate or deactivate a toggle switch or a pushbutton switch, it closes and opens cleanly. In reality, that switch will bounce, which means it may open and close anywhere up to 100+ times over a period ranging from microseconds to milliseconds.

Just for giggles and grins, I used my trusty RIGOL DS1054 oscilloscope to capture some representative switch bounce waveforms as illustrated in the image below. From top to bottom we have the traces from a toggle switch, a pushbutton switch, and a limit switch (aka, microswitch).

DIY power supply max-0038-01-three waveforms.png

 

Even practicing engineers can be caught out by switch bounce if they’ve not run into it before. We introduced various software and hardware techniques we can use to mitigate switch bounce in my column "How to Keep a Flipped Switch From Bouncing Like a Golf Ball Dropped From the Roof."

One of my favorite hardware solutions is to use an LS18 integrated circuit (IC) from LogiSwitch. I should mention the fact that one of my many “hats” is that of Chief Technical Officer (CTO) at LogiSwitch, so I may be a tad biased, but I think our NoBounce ICs are the “bee’s knees” with respect to debouncing switches.

DIY power supply max-0038-02-switch-bounce-logiswitch-ls18.png

 

In addition to the 3-channel LS18, we also have 6- and 9-channel versions. Also of interest, especially to me when I’m creating my hobby projects, is that all these chips are available in lead through-hole (LTH) and surface-mount technology (SMT) packages (we offer even smaller packages for special applications).

The reason I’m waffling on about all this here is that we recently decided to create a small circuit board to demonstrate the capabilities of the LS18 in conjunction with a specific device from an industry-leading switch manufacturer. My friend Joe Farr in the UK designed this demo board for me one wet Saturday morning.

 

DIY power supply max-0038-03-switch-test-board.jpg

 

I’ve hidden the names of the company and the switch involved to protect the innocent (me, for one). One interesting point worth noting is that—as seen in the area marked “LogiSwitch LS18”—although we decided to use an SOIC SN packaged version of our chip for this demo, Joe also included the pads for PDIP, MSOP MS, and SOT23-6 packages to provide a quick visual size comparison (the SOT23-6 device is so small that you can barely see it).

But we digress … The reason for this column is the board’s power supply design. As usual for this type of application, Joe created this in such a way as to allow users to plug in an AC or DC source from 7 V to 12 V (in the case of a DC source, you can use either polarity; that is, center positive or center negative).

Joe also included a jumper with two associated loop headers (see the bottom left-hand-corner of the board) to allow the user to monitor the current being drawn by the LS18 (the board’s power LED is wired upstream of this jumper so its current won’t be included).

I’ve seen Joe’s power supply designs before, but there are two aspects to this one that particularly caught my attention. The first is the fact that Joe included header pins and a jumper that allow the user to select between 1.8 V, 2.3 V, 3.3 V, 5.0 V, and ADJ (“adjustable”) values, where the latter can be set using the “V.ADJ” multiturn potentiometer (there are surface-mount pots used to fine-tune the other values located on the underside of the board). The second point of interest is Joe’s use of a Zener diode to ensure the user can’t set the voltage higher than 5.5 V.

On the basis that it’s always handy to have a little power supply for one’s hobby projects, I asked Joe if he could spin out a standalone version of this adjustable unit. He very kindly did so, and the images below show the schematic, layout, and finished board.

DIY power supply max-0038-04-schematic.jpg

 

 

DIY power supply max-0038-05-layout.jpg

 

 

DIY power supply max-0038-06-assembled-board.jpg

 

I should perhaps point out that, for reasons known only to himself, Joe always lays out his power supplies from right-to-left, and I’m certainly not going to cast aspersions (my throwing arm is not what it used to be).

As we see, this design features the use of an LM317 adjustable 3-terminal positive-voltage regulator that requires only two external resistors to set the output voltage. In our case, one of these resistors is a fixed 220-Ω device, while the other is a 2-KΩ multiturn trim pot. In fact, we have two such pots on this board, VR1 and VR2, thereby allowing us to select between two voltages using jumper at J1 or J2. We could modify the design to add more pots to provide a larger selection of voltages if we wish…

…speaking of which, Joe also kindly shared the design files so you can build your own boards if you so desire. This compressed ZIP file contains the *.dch (schematic) and *.dip (layout) files in DipTrace format (you can download a free copy of the DipTrace schematic and PCB design software from www.diptrace.com).

 

DIY power supply max-0038-07-parts-list.png

In addition to the component list shown above, Joe also provided the following notes:

  • This is designed to use a single-sided PCB.

  • It will accept either an LM317 voltage regulator in TO-220 or TO-220FP packages (these are 1.5A versions), or an LM317LZ TO-92 (a 100 mA version).

  • You can use wire links instead of jumpers J1 to J3 if needed.

  • Any ¼ W resistors will do. R2 needs to be selected according to the LED used and the output voltage selected. I suggest around 1 KΩ upwards.

  • Zener diode ZD1 is optional. It’s there to ensure the output of the regulator is limited to a desired maximum voltage. Due to the difference in tolerances of Zener diodes, it’s difficult to give precise values, but the output of the PSU will be limited to the approximately the voltage of the Zener plus 1 V.

  • The two electrolytic capacitor values aren’t critical, but they must have a high enough sufficient working voltage.

  • The two 100 nF capacitors can be pretty much anything that fits and can be in the range 100 nF to 220 nF.

If the truth be told, Joe is a bit of a pack rat in that he snaffles up things like components and connectors whenever he sees them on sale. For example, he has boxes of full wave rectifiers that he picked up for a song deep in the mists of time. This is great for Joe, but not so great for the rest of us who are trying to track down identical parts. This explains why Joe implemented the full wave rectifier on this board using four 1N4007 diodes.

I must admit that I haven’t paid as much attention to the design of power supplies as perhaps I should. All I know is that whenever I ask Joe to design a board for me, it comes equipped with a power supply that is perfectly crafted for the task at hand.

If you do decide to take this design and build your own board—or perhaps use this design as a starting point to evolve your own version—I’d love to hear about it (including pictures). And, as always, I welcome your comments, questions, and suggestions.

About the Author(s)

Clive 'Max' Maxfield

Clive "Max" Maxfield is a freelance technical consultant and writer. Max received his BSc in Control Engineering in 1980 from Sheffield Hallam University, England and began his career as a designer of central processing units (CPUs) for mainframe computers. Over the years, Max has designed everything from silicon chips to circuit boards and from brainwave amplifiers to Steampunk Prognostication Engines (don't ask). He has also been at the forefront of Electronic Design Automation (EDA) for more than 35 years.

Well-known throughout the embedded, electronics, semiconductor, and EDA industries, Max has presented papers at numerous technical conferences around the world, including North and South America, Europe, India, China, Korea, and Taiwan. He has given keynote presentations at the PCB West conference in the USA and the FPGA Forum in Norway. He's also been invited to give guest lectures at several universities in the US and at Oslo University in Norway. In 2001, Max "shared the stage" at a conference in Hawaii with former Speaker of the House, "Newt" Gingrich.

Max is the author and/or co-author of a number of books, including Designus Maximus Unleashed (banned in Alabama), Bebop to the Boolean Boogie (An Unconventional Guide to Electronics), EDA: Where Electronics Begins, FPGAs: Instant Access, and How Computers Do Math.

Sign up for the Design News Daily newsletter.

You May Also Like