ESP Logo
 Elliott Sound Products Project 192 

Obtaining +/- Supplies From A Single Power Supply

Copyright © August 2019, Rod Elliott


PCBs will be available for the Figure 2 version of this project based on demand.  The same PCB will also be applicable for Project 193.

Introduction

There is regularly a requirement for dual supplies, and many hobbyists are very wary of mains wiring, and prefer to use a 'wall transformer' (aka plug-pack, wall wart, etc.) instead.  AC output types are not always easy to get, but I expect that most people will have a few 12V DC power supplies lying around, after the original product they powered has long since passed on to the recycler.  They are also available on-line, but you must be very careful, because many 'Far East' manufacturers will happily include all the certifications necessary, but won't actually have had the products tested against the relevant standards.

While the last point is important, it's not the topic here.  If you have a 12V DC plug-in supply, many projects (most of those published on the ESP site) require ±15V supplies, although nearly all will work just fine with ±12V instead.  There's a small loss of 'headroom', but for most projects you'll never drive them to the full output voltage anyway, so it's a moot point.

Unfortunately, getting ±12V from a single 12V supply is not possible without adding some electronics.  In some cases, a 'charge pump' circuit will work, but not if you need more than 20mA or so.  While some projects will be happy with ±6V (which you can get easily from a single 12V supply), this is rather limiting, and some circuits will not be at all happy with such a low voltage.  There are several ways that a negative supply can be generated, but it's important to ensure that the parts are readily available, and that the circuit should be fairly cheap to build.  Many of the latest ICs that can be utilised are available in SMD packages only, which makes it harder to put together.  For example, you can't use SMD ICs on Veroboard, and a PCB is essential.

While it's easy to 'split' a 12V DC input to get ±6V supplies, this isn't enough for some projects.  While it will be enough for almost all common opamps, there may not be sufficient voltage swing to accommodate higher levels.  For example, the Project 06 phono preamp relies on a higher than normal voltage swing to provide adequate headroom because of the final passive EQ stage.  This may cause issues, especially with phono cartridges with higher than average output level.  If used with ±6V supplies it may clip with some high-output cartridges, especially with discs that are cut 'hot' (higher than normal level).

Many other designs can also require far more headroom than expected.  If a tone control preamp is used with an average input level of 1V, high levels of bass boost (in particular) can require that the preamp can handle as much as 6V (RMS!) if the volume control is after the tone control section.  Many other circuits have similar limitations, and low supply voltages are not appropriate.  Many professional mixers use supplies of ±18-20V to get that last bit of extra headroom.

Rail splitting can be done using a TLE2426 IC, or it can be achieved using just a pair of resistors and capacitors, optionally buffered with an opamp.  The TLE2426 isn't exactly cheap (and almost certainly not in most people's parts drawers), and it may still not be ideal in all cases.  The problem with any form of rail-splitting is that the total supply voltage is unchanged, so a 12V DC input can only ever achieve a ±6V output.  There is a 'rail splitter' supply described in Project 43, and that can be used at the output of either Figure 1 or Figure 2 circuits.  The idea of this project is to increase the voltage, so you have full ±12V supplies.


Project Description

The first approach I tried is somewhat unconventional, because the IC is designed for a flyback mains power supply, and has a maximum duty cycle of 50%.  This complicates the calculations, because it's not the way boost converters are generally designed.  However, there are very few that are available in DIY (and Veroboard) friendly DIP packages, whereas the IC used is readily available in a DIP version.  It's also low cost, so it's ideal for experimenting.  Of the few DIP boost converters that are readily available, they are not cheap, and many are designed for a maximum input voltage of 5V.

It's also unusual in that the external 12V supply provides the negative voltage direct to the electronics, and the positive supply is provided by a 12-24V boost converter.  The IC is actually designed for use with flyback 'off-line' (i.e. directly from the mains), but it works perfectly in this 'new' role.  The IC is the UC3845A, which is available in both SMD and through-hole versions.  Costing under AU$2.00 apiece, it's cheap, and has all the functions necessary to boost 12V to 24V at currents up to 150mA.  While it's certainly possible to get more current from the circuit, 150mA is sufficient for the vast majority of preamps, crossovers and other circuitry that it's likely to be used with.  D1 must be a high speed diode, such as the UF4004 shown, or other high speed/ ultra-fast diode with a voltage rating at least equal to the output voltage (i.e. 24V as shown), but preferably higher.  A Schottky diode can also be used, but most are relatively low voltage.  The diode also must be able to handle the average DC output current.

Figure 1
Figure 1 - 12V To ±12V Converter Circuit

The output connections look weird, because the 'common' rail is used as the negative output.  Note that the DC input connector must not be connected to chassis, because the negative terminal is usually grounded.  With most of the connectors available, it will have to be isolated from the chassis by using plastic insulators or some other means as appropriate for the connector (and chassis) you are using.  I have to leave that to the constructor.  While it would be possible to wire the connector with the centre pin as negative, the vast majority of power supplies assume it's the positive connection.  Getting that wrong may kill the external power supply.  Some have short-circuit protection, but not all.

There is also optional current limiting, provided by R4, R5 and C6.  If these are omitted, the MOSFET source is connected directly to the 'common' bus, as is Pin 3 (sense) of U1.  If Pin 3 is left open, the circuit will provide no output.  Pin 3 could also be used as an external control, allowing the supply to be shut down if desired (although the usefulness of that is dubious at best).

The voltages shown are all referred to the 'Common' bus, which is -12V.  These will be helpful if troubleshooting is necessary, but if everything is wired exactly as shown the circuit should work without you needing to do anything.  The MOSFET's gate resistor (R3) should be as close to the gate terminal as possible.  While I've shown an IRF540N MOSFET, it's fairly serious overkill, but these devices are very common and are fairly cheap.  Other alternatives include IRF530N (17A), IRFI530NPBF (12A), PSMN034-100PS (32A), RFP12N10L (12A) plus may others that are less than AU$2.00 each.  All are rated for 100V, although a lower voltage is permissible.  Feel free to choose any suitable MOSFET, which needs a current rating of at least 10A and has a voltage rating not less than 50V.  Unless you need the maximum possible output current, the MOSFET won't need a heatsink (dissipation with over 100mA output should be less than 50mW).

The external supply should be rated for around 2A, and these are very common and relatively inexpensive.  The circuit is designed with an optional deliberately high current sense resistor (R5, 1Ω), which limits the peak current to 1A.  While this does increase the time taken for it to reach full voltage, it will do so in under 40ms.  It's not shown, but the external load should not be connected until the output voltage is stable.  While this adds some additional circuitry, it's worthwhile because you'll get a very audible noise from most opamps if their supplies are not presented at the same time.

The same circuit can be used to get ±15V from an external 15V supply.  The change involves nothing more than re-setting the value of VR1.  This trimpot (plus R6) is used along with R7 to provide the regulation voltage, and R6 + VR1 needs to be increased to 11k so the circuit can output 30V.  Note that the maximum current is reduced with the higher voltage, but because 15V external supplies are not quite so readily available it's unlikely that many people will use it this way.

Using a trimpot (VR1) is the simplest way to get the required resistance, which would otherwise be an unobtainable value.  A small error is of no consequence.  The voltage can be set exactly, but that is rarely necessary for most circuits.  This is especially true since most external supplies have a reasonably wide tolerance anyway, so a nominal 12V supply may deliver somewhere between 11.8V and 12.2V, with some being worse.

The 2.2Ω resistors (R8, R9) affect regulation, but they only reduce the voltage by 220mV at 100mA output.  The benefit is that they reduce the high frequency content of the ripple voltage quite dramatically.  This is one area where it is useful to add parallel 100nF ceramic caps (C8 and C9), because like all switching supplies, there will be some high frequency output noise.  The ferrite beads ('FB') are optional, but you may find that they reduce the switching noise a little (especially any very high frequency components).

The inductor I used for the prototype is a Panasonic ELC16B331L, 330µH, 1.5A DC.  This was later 'modified' by removing turns, because the value was too high to get an acceptable output current.  The value shown (200µH) will suit most applications requiring an output current of up to 250mA (at 24V), and with progressively lower current at higher output voltages.  Virtually any inductor with similar specifications can be used if you can't get the same type where you live.  In reality, it's the inductor that's really at the heart of any switchmode circuit, and this is one of the main reasons that I haven't produced any other SMPS designs.


Alternative Boost Regulator

While the circuit shown in Figure 1 certainly works, there's a fair bit of messing around to get a reliable circuit.  A simpler alternative is shown below, and exactly the same layout was used for Project 193.  It's just as usable with a 24V output, and has the advantage that the IC is specifically designed as a boost converter.  After testing both versions, this is certainly the one I'd recommend.  However, the Figure 1 circuit remains interesting, and it does work exactly as described.  It's also easier to change it for output higher voltages, and up to 250V DC is not out of the question.

If you look on a particular on-line auction site, there are countless boost converters that can be used rather than building your own.  This is tempting (and yes, I have a few myself), and they work rather well.  However, they are also noisy - electrically speaking.  I measured over 200mV peak of noise, and although it's at a high frequency and (in theory) won't interfere with the audio, I know for a fact that this is not necessarily true.  It's commonly audible (at a low level) with line level preamps and the like, but it's quite unacceptable with something like a moving coil preamplifier.  Part of the problem is that there is intermodulation of the HF switching signal, which can (and does) cause noise to appear within the audible range.

The other problem is that while these boost converters are cheap, you learn exactly nothing if you just buy something and wire it up.  We all learn the most by building and testing things, and switchmode power supplies are no different.  The benefit with the design shown here is that it's all low voltage, so you can use a scope to look at waveforms and take measurements.  This is very dangerous when the supply runs directly from the mains, even if you have the mandatory isolation transformer.

Because everything uses conventional parts (no SMD), you have a lot more room to take measurements and change things to suit your particular needs.  If you buy a ready-made converter, you are stuck with its design, and being SMD it's hard to make changes.  This is a perfect example of how the DIY approach may cost more than an off-the-shelf part, but you have far greater scope for making changes and understanding how it works.  Because it can be wired easily on Veroboard, you can experiment with different configurations easily.

You can build your own with the LM2577-ADJ (the adjustable version), which is very capable, and has an internal switch.  It's available in a TO-220 package (it's also available in a TO-263 SMD version), and needs minimal external parts.  However, it's not a particularly cheap IC, with a cost of around AU$5.00 to AU$11.00 at the time of writing.  You still need the inductor, high speed diode, input and output capacitors, and a suitable feedback network.  Despite this, the circuit shown below is simpler and cheaper than the Figure 1 circuit, and is the recommended alternative.  I haven't shown the output filtering, but the positive supply is still the common, and the +24V output becomes the +12V output in exactly the same way as shown in Figure 1.

Figure 2
Figure 2 - LM2577 Switching Boost Converter

The cheap and 'cheerful' modules from China (many of which use an XL6009 IC - supposedly an 'equivalent' to the LM2577), mean that you won't learn very much.  If you'd rather build your own, the circuit shown should suit most people, and has been verified to work very well.  I have a module that uses almost the exact circuit shown in Figure 2, and apart from output noise (which can be filtered using the same arrangement shown in Figure 1) it should suit most requirements.  Note that the LM2577 datasheet shows the compensation capacitor (C3) as 330nF, but I found that 220nF works perfectly in practice.

The 'equivalent' XL6009 based converters have a potentially dangerous flaw - if operated with an input voltage below around 3V, the output voltage can rise to well above the preset level.  While the datasheet shows an under-voltage lockout circuit, it doesn't seem to work well.  There is no way that the circuit can regulate properly if the input voltage is too low, and this isn't changed very much by the load.  My tests showed the voltage climbing to 40V at around 3V input, and input current rose to well over 500mA with no load.  While this isn't always a problem, you need to be aware of it.  It's also likely that it will be different with different ICs, and the "Oh! Bugger!" input voltage is very touchy - even a tiny voltage change affects the output voltage dramatically.  The LM2577 has no bad habits at all - it's a good, reliable IC that can easily deliver better performance than the Figure 1 circuit.

Figure 3
Figure 3 - LM2577 Switching Boost Converter Veroboard Layout

The only difference between the version shown above and the one shown for P193 is the feedback network, and a slightly higher inductor value (150µH for P193), although this version also functions perfectly with the same inductor.  R2 is 12k, and the voltage divider lets you set the output voltage from a minimum of 16.25V to a maximum of 28.75V.  If you wanted a 30V supply (which can be split to give ±15V), increase R2 to 15k (20 - 45V output, depending on the setting of VR1).


Under-Voltage Cutoff & Filter Circuit

With any boost converter used in the manner shown, the negative supply arrives virtually instantly, but the boost circuit will take some time to reach full voltage.  It may only take 50-100ms or so (depending on the circuit used and the size of the filter capacitor), but that can be enough to cause problems with circuitry powered by the arrangement described here.  The Figure 4 circuit will be needed for both switchmode supply circuits, because both will have similar noise issues, and the 24V supply will never be present instantly.  Even if you decide not to use the under-voltage cutout, the extra filtering is still required.

Most opamp circuits will be 'annoyed' if they get one supply before the other.  The delayed arrival of the +12V supply pretty much ensures that your circuit will be affected.  This will cause (possibly very) loud noises through your speakers, and it may even trigger the DC protection circuitry (if fitted) in the power amp.  Either way, it's undesirable, so a means of ensuring that the positive voltage has reached a sensible minimum is required.  This will then apply both supplies simultaneously, and that should prevent any 'switch-on' problems.

Figure 4
Figure 4 - Voltage Detector & Switch Circuit

Other than the additional filtering, there's not much to it, just a general purpose transistor, a zener diode, a couple of resistors and a relay with its protective diode.  Using a 22V zener diode, the circuit can't operate unless the +12V supply is greater than around 10.5V, and that's sufficient for all opamps to function normally.  The relay connects power once the total voltage between -12V and +12V is at least 22.5V (+10.5V, -12V), and the final rise of the positive supply won't create any significant disturbances to opamp circuits.  If the powered circuitry is discrete or has more than normal sensitivity to the the supply rails, it would be wise to include a mute circuit to make sure than no noises get through.

The relay needs to have a 12V coil, and only needs to be relatively low current.  There are countless suitable relays available, and because the voltage and current are low, almost any miniature relay can be used.  It does need to be reliable though, so a fully sealed type is preferred.  Most circuitry that follows will have on-board bypass capacitors which will help to absorb any contact bounce when the relay contacts close.  The contact current rating needs to be high enough to ensure that the initial surge current will not cause contact damage.  The same thing can be done with transistors instead of a relay, but that does make the circuit more complex.


Inductor Calculation (Figure 1 Circuit)

All switchmode circuits have one critical part - the inductor.  The value depends on the operating frequency and expected maximum current, and the value needs to be calculated to suit your requirements.  The size is determined by the duty cycle (D) which is set by the boost ratio and output current.  There are many different formulae available, but they often give wrong answers if used with the suggested IC.  This is because it has a maximum duty cycle of 50%, so the inductor usually have to be a bit smaller than the calculated value.  This is especially important for the Figure 1 circuit, but for the Figure 2 version just use a 100µH inductor that can handle the peak current.  No calculation is necessary.

D = Vin / Vout = 0.5 (assuming zero losses)
LMIN = ( D × Vin × ( 1 - D )) / (f × 2 × IOUT )
LMIN = ( 0.5 × 12 × ( 1 - 0.5 ) / ( 30k × 2 × 200m ) = 250µH

I initially used a 330µH inductor which works well enough, but only for fairly low current (under 100mA).  Making the inductor a little larger than the calculated value is usually not a problem, but it will limit the maximum output current available if it's too big.  Lower values increase the inductor's DC ripple current.  At light loading (i.e. well below the maximum current allowed for), the UC3845A chip will operate in 'hiccup' (aka 'skip cycle') mode, with a burst of oscillation followed by a period where nothing happens at all.  This can make the switching frequency appear to be much lower than it really is, so increasing the output ripple.  This is just one of the reasons that the output requires additional filtering.  Adding a 'brutal' filter (having very high capacitance) will delay the output from reaching full voltage, especially if current limiting is implemented.

IPeak ( Vin × D ) / ( f × L )
IPeak ( 12 × 0.5 ) / ( 30k × 330µH ) = 606mA

The figures obtained are probably best described as 'rubbery', as there is considerable scope to make changes.  Bear in mind that the IC used is intended for flyback 'off-line' mains supplies, and it is being run very differently in this circuit.  However, tests have demonstrated that it works surprisingly well.  Feel free to use a smaller inductance than that shown - 150µH works quite well, but at low load the circuit will operate in 'skip-cycle' mode all the time.

Note that the input voltage must be at least 10V or the IC will not function.  That means it can't be used with a 5V input for example.  When used as suggested, this isn't a limitation.


Prototype (Figure 1 Circuit)

With any switchmode circuit, you simply can't rely on simulations.  To make certain that the circuit performs as intended, a prototype was built, and although the 300µH inductor is larger than necessary, the whole circuit board (shown below, wired on Veroboard) measures only 55 × 35mm.  The IC's pinouts are not really suitable for a Veroboard layout, but it wasn't that difficult to get it together.  I also verified that it can easily provide up to 48V while I was at it (although I must confess that was due to a wiring error).  Use at the higher voltage is covered separately.

Figure 5
Figure 5 - Prototype Converter (Figure 1 Circuit)

As you can see, the inductor is by far the largest part on the board.  Although it looks pretty cramped and hard to get to any measurement points, that's not the case at all.  The switching waveform was picked up from the tab of the MOSFET, and the other points of interest are also fairly easy to get to.  As you can see, I used a 10k trimpot to set the voltage, and I didn't include the current limiting circuit.  That means leaving out R4, R5 and C6, and Pin 3 (sense) is shorted to the common rail.  The 10k resistor directly below the IC is R1, and was reduced to 5k after this photo was taken to increase the switching speed.  A 5.1k resistor is suggested, but there's plenty of 'wriggle room' if you don't have that value handy.

Figure 6
Figure 6 - Switching Waveform (Figure 1 Circuit)

The switching waveform is shown, driving a load of about 100mA.  At lower currents, the IC goes into 'hiccup' (skip-cycle) mode, so it turns on for one cycle, then turns off for a period determined by the output current before another switching cycle is produced.  This effect can be reduced by making C7 much smaller (around 10µF).  The requirement for good output filtering can't be over-emphasised though, because there is significant ripple without the secondary filter shown in the schematics above.  Ideally, the secondary filtering will not be co-located with the switching supply, which you may choose to isolate from the electronics with shielding to prevent switching noise.

The lowest point on the waveform is when the MOSFET is turned on.  Current flows in the inductor for about 12µs, then the MOSFET turns off.  The voltage quickly rises to the maximum (a little over 24V referred to the negative supply input) and passes current through the diode and into the load.  Once the inductor's magnetic field has collapsed (also about 12µs) there's a one-cycle 'burst' of oscillation caused by the inductor and any stray capacitance.  The mid-point voltage is 12V, which passes through the inductor unimpeded as long as the MOSFET isn't conducting.  This isn't visible with the 100mA load, but appears with lighter loading during skip-cycle operation.  No damping circuit was used to prevent the oscillation when the diode turns off, as that would simply add more parts and reduce efficiency.  The switching frequency is roughly 38kHz (not 25.6kHz or 75.6575kHz as indicated by the scope).

Even at an output current of close to 1A it still performed well, and nothing gets even slightly warm (other than the load resistors!).  Idle current is quite modest, and my power supply said it was around 18mA with no load.  That's quite acceptable, and it's apparent that there's not enough current to heat up any of the parts.  One thing you need to be careful with is the distinction between pins 1 and 2 - pin 1 is for compensation, and it's easy to get the two mixed up when loading parts onto Veroboard (I know this from experience, as I did just that, and wondered why the output wouldn't regulate).

An LM2577 module has an idle current of 15mA (12V in, 24V out, no load), and the XL6009 has an idle current of 13mA under the same conditions.  It's clear that there isn't much between the three circuits, so the choice is yours as to which one you prefer to use.  Naturally, I prefer the DIY approach, but the economy of the Chinese modules makes them hard to ignore (the entire module costs less than the inductors I used!).  Chinese LM2577 modules are a bit more expensive, but if you can get them it's a better choice because their under-voltage cutout actually works.


Conclusions

This project is designed specifically so that hobbyists can use an external 12V supply rather than using an AC wall transformer or having to mess with mains wiring.  The design goal was to ensure that it has sufficient current for most preamp and crossover applications.  Because nearly all external DC supplies are switchmode, adding more switching circuitry is unlikely to increase the audible noise level, but it would be unwise to use something like this for a moving coil phono preamp, or any other very sensitive circuitry.

The Figure 2 circuit is the one I recommend, as it uses a dedicated boost converter and uses fewer parts overall.  However, it is limited to an absolute maximum of 60V output, and if you need more then the Figure 1 circuit is more easily adapted (there's no reason that the Figure 1 version can't deliver 250V or more with the right MOSFET and inductor).

It's most certainly not the simplest way to achieve the end result, but it's fairly low cost, and is an interesting way for beginners to get used to switchmode circuitry, without having to resort to SMD parts.  Be aware that the UC3845A is also available in SMD, so be careful when ordering.  The inductor used is a fairly common value, and they are available in a fairly wide range of sizes.  The DC component is quite low, so it doesn't have to be huge (although using a larger than optimal inductor won't hurt at all).

Because the Figure 1 power supply uses a commercial flyback IC, you have the opportunity to examine the behaviour of the circuit, but with low voltages and no connection to the mains.  The only real difference between this and a 'traditional' mains powered flyback power supply is the low input voltage, and the use of an inductor rather than a transformer.  For anyone wanting to understand switchmode supplies, this is an invaluable learning tool, because you can attach a scope to any part of the circuit without risking life, limb or the scope itself.  Using a flyback controller rather than a 'true' boost converter was a deliberate choice, because it means that it's readily available in a DIP package. so you don't need to wrestle with SMD parts.  The IC is also readily available and cheap, which made it the obvious choice (albeit an unconventional one).

It should be understood that the Figure 1 version of this project is primarily so that readers can get a 'feel' for switchmode power supplies in general.  It's certainly not the cheapest or easiest way to get ±12V from a single 12V supply, but it's most certainly the best way to learn how these supplies work.  While it may have more parts than a dedicated boost converter solution, they are all fairly low cost, and the experience of building (and troubleshooting) the circuit will be invaluable.  There are no dangerous voltages involved, so it's quite safe to work on it and take voltage (or waveform) readings while it's running.

The Figure 2 version is the better choice for most applications, provided you can get the IC easily.  For reasons that make absolutely no sense, you can buy a complete module (using an LM2577 rather than the 'not as equivalent as it should be' XL6009) for less than the cost of the TO-220 LM2577-ADJ IC itself.  However, these lack the flexibility of the one you build yourself, and you can't say "I built that" for a ready-made module.  As noted already, you also don't learn anything useful in the process (but you do still get a 'proper ±12V supply from a 12V DC wall supply).


References
UC3845A Datasheet
MC13783 Buck and Boost Inductor Sizing (AN3294, Philips/ NXP)
LM2577-ADJ SIMPLE SWITCHER® Datasheet
XL6009 Datasheet

 

IndexMain Index
ProjectsProjects Index

Copyright Notice. This article, including but not limited to all text and diagrams, is the intellectual property of Rod Elliott, and is Copyright © 2019.  Reproduction or re-publication by any means whatsoever, whether electronic, mechanical or electro- mechanical, is strictly prohibited under International Copyright laws.  The author (Rod Elliott) grants the reader the right to use this information for personal use only, and further allows that one (1) copy may be made for reference.  Commercial use is prohibited without express written authorisation from Rod Elliott.
Page created and copyright © Rod Elliott, July 2019.