This programmable bench power supply project design is an attempt to create a reliable, modular, well documented, and programmable bench power supply. It will also be replicable at home and can be used for various tasks: powering breadboard experimental circuits, charge (or to some extent discharge) batteries of various types and sizes( with additions to the firmware, it might even fit the complex charging algorithms needed for Li polymer batteries), or use in school/educational and science experiments (it has extensive safety features as standard). It can be even used as a building block in the Automatic Test Equipment (ATE) environment. Here, and in the accompanying articles and documents, we use PSU (i.e. Power Supply Unit) instead of the full name of the project.
Building a power supply is a popular project choice for electronic hobbyists and DIYers who wish to gain experience. Such a project is often chosen or recommended as a first project for those starting out. It is a logical recommendation, since PSUs are (in general) simple and also are needed for most benchtop experimentation. In general such designs are very simple, openly shared and discussed on various sites on the Internet; they also lack high quality safety and monitoring/control features in most cases. There are also many commercial devices from many suppliers with widely different capabilities and features. They all promise long term reliability, high precision, excellent support, etc. Their designs can be very complex and difficult to replicate, not least because this or that feature may involve patented cirsuits and so on. In addition, not all of the commercial power supplies are adequate on many grounds; some are unreliable, some are unsafe, some fail in ordinary use. A look through various Internet electronics sites will show up some quite unsatisfactoy designs.
As in many other cases, there is a large gap between typical hobbyist designs and the quality commercial versions. This project is intended to bridge that gap by including features from high quality commercial designs with the cost and difficulty more associated with DIY PSU designs.
The remainder of this article briefly describes some of the key features this PSU was intended to have.
A benchtop PSU is a general purpose device which can and almost certainly will be used to power various loads or devices. Some will be tolerant of voltage and current variations, perhaps even for extended periods (e.g. power resistors/heaters, batteries generally with the exception of Li-Ion, etc.). But many loads which include active components (e.g. semiconductors) are typically quite sensitive to the voltages or currents they encounter. Therefore, a satisfactory PSU must be designed so that no dangerous changes in voltage or current are ever present, ideally over the entire lifetime of the PSU. This requirement includes the border case of turning the PSU on or off, applying or disconnecting loads, etc. It is not unusual that the device being powered by a PSU is considerably more valuable (or harder to reproduce) than the PSU to which it is connected. Long term stability of the PSU output must be ensured with some form of protection mechanism if the connected load is fails in any of a variety of ways (e.g. whilst testing a batch of newly manufactured devices when one or more components has been wrongly assembled, damaged, or incorrectly designed). Common protections are over-voltage (OVP) and over-current (OCP) protections are often included in PSU designs.
Another aspect of reliability applies to the PSU itself. It can do its best to reliably power connected load, if in so doing it jeopardizes its own “health” (e.g. by compromising the SOA of one or more components). In the first place, this means that overheating which could result in unrecoverable damage to PSU components, (e.g. a power MOSFET). An over-temperature protection (OTP) that can be combined with over-power protection (OPP) will be helpful, but both are rarely included in DIY designs. It is also sensible to include detection and appropriate action for input problems (i.e. with AC) or output problems (i.e. anything different from that the PSU has been instructed to produce). These are likewise rarely included in DIY PSU designs.
Modular design in the case of a PSU means that internal building blocks and assemblies are designed from the beginning to allow removal and replacement in case of failure or upgrades. One of more of them could be, over time, completely replaced with a better or more capable module without necessarily retire the rest (i.e. power transformer, local control panel, enclosure, etc.). We believe that real benefit of modular approach is also simpler assembly of the whole PSU; this is likely to attractive to DIY builders who follow this project. In practice, that means that one can assemble and test only the pre-regulator board, then continue with post-regulator board, multiply that by two if dual channel is needed when assembling the Power boards, and have a functional solution that can be “manually” controlled (i.e. by using potentiometers and switches). When the analog stage is completed, constructors can continue with a digital control board and an auxiliary power supply board to supply properly isolated power to the digital control circuitry. Or one might only the digital portion of this project to control some other analog power supply circuit.
A possible disadvantage of a modular approach is evident if mass production is needed. Assembling a PSU with, say, six PCB assemblies could be more expensive than with only one or two. However, with an open source design it shouldn’t be an impossible problem to combine proven circuits into a single bigger one more suited to mass manufacture.
The term programmable power supply has many possible meanings. In the DIY and non-commercial world this will usually mean use of a popular MCU (i.e., from the PIC or AVR families) equipped with an LCD display (perhaps a 2 x 16 character display, or a 128 x 64 graphic display, etc.), and a keypad (e.g. 4 to 16 keys) and/or incremental encoder. A built-in MCU ADC with PWM (i.e. DAC) capability can then be used for programming and monitoring a PSU’s voltage and current control loops. Usually, software / firmware in such PSUs are rather simple, and in many cases not more the equivalent of “Hello World!” for PSU application. Important features such as calibration and various type of protections, or less important ones like simple arbitrary waveform generation, remote control using 3rd party controller software, etc is almost never implemented in DIY designs. The limits of the usual approach are reached quickly in the everyday situation that the existing hardware and/or software needs to upgraded. When that is not possible, a complete redesign of hardware and rewriting of control software will follow, or in the case of commercial PSUs, an expensive replacement must be purchased.
Our aim for this project is to produce and distribute software that is feature rich, but flexible enough to be modifiable and upgradeable to not only improve the power management part (pre-regulation, post-regulation, protection circuits, etc.) of this PSU, but to be usable with other solutions regardless of their complexity.
Having a digitally controllable power supply opens some new possibilities beyond the primary purpose of providing a constant voltage output to some circuits. It can be used for example as a test platform for experimenting with battery charging algorithms for quick charge, MPPT, etc. Many valuable electrical measurements that correlated with the software parameters could be collected in that way and then used for building a more specialized device.
Openness of both hardware and software of its feature rich design is a considerable virtue of this project. Commercial devices might well be equipped with hardware and software functionality, but universally leave the user no opportunity to change anything about its operation; this is especially true for the software/firmware part of the product, regardless of the need for a change. An obvious bug that a manufacturer does not want to accept responsibility for or fix (sometimes the claim that “It's not a bug, it's a feature” drives users / customers mad), or it’s not scheduled to be fixed until the next production run in 18 months, or it may be a new feature for the operation of the instrument, and the reason it was purchased. Having an open hardware design (which includes schematics and PCB layouts) could perhaps help one to understand the source of some bug or undesired behavior, and lead to a fix. Easier repair, simpler calibration (this is expensive, though required, for quality instruments) might all be possible.
Do-it-yourself – DIY!
There are many possible ways to build an electronic device on your own, at your own workbench. Semiconductor and related industries have produced for years an avalanche of new and more capable, and often cheaper, devices / chips / components from which to build things offers each and every day more attractive items and approaches. Due to their increasing complexity, and level of miniaturization, this has not been an unmitigated blessing for those with uncertain eyesight (SMD parts can be so as to be barely visible); assembly techniques for them require both uncommon equipment and good hand-eye coordination. The degree of difficulty has increased. A good balance between performance, form-factor, and accessibility of selected components and technologies is required the end product is sufficiently attractive (e.g. a good feature selection) but also accessible for constructors without a PCB production plant in their garage. This can be done; it simply requires some attention. For example as a basic requirement a SMD over THT can be selected but that still does not mean that selected parts should require reflow soldering instead of soldering iron (will small assistance of magnified glass :).