Fads to Obsessions and Beyond...




Free domain for life, exceptional technical support, website transfer

Power Supply - Using Wall-Warts

The advantages of using "wall wart" power supplies for DIY hobby electronics, rather than constructing dedicated DC power supply requiring the conversion of AC from an AC wall socket, is discussed and demonstrated. Surplus chargers/power adaptors/wall warts (e.g. from laptops) are readily available which provide not only a safer option (compared to construction from a suitable transformer, rectifier, connection to AC etc) but also a much more economical option (generally zero cost for a surplus wall wart, compared to ten's of dollars for a suitable transformer, let alone cost of ancillary circuitry, PCB etc).

The vast majority of electrical/electronic projects will require an external source of electrical power (except those solely powered by battery, solar energy or similar). Further, generally in the home setting (and or office or similar location) the wide availability of AC electricity (120 or 240 VAC depending upon location) predisposes electrical/electronic projects to be powered by DC produced from such domestic/commerical AC mains supply.

Producing DC from such AC mains supply requires suitable transformers, rectifiers and regulation circuitry and in the case of switched-mode power supplies even more complicated circuitry. All of which can be rather costly and or difficult to produce in the DIY setting.

Above all, such AC to DC conversion obviously involves dealing directly with AC from the mains supply with the inherent dangers this entails. For the typical DIY'er or hobbyist, avoiding directly dealing with mains AC should be a primary objective to safely practice hobby electronics. This is the major advantage of using "wall warts" as a power supply option for hobby electronics projects. Also conveniently, "wall warts" are generally readily available for "free" due to surplus/disused and or damaged electrical applicances which are often powered by "wall warts" of one variety or other (and or can be cheaply purchased online).

For a detailed summary of "wall warts" (also known as AC/DC adapter, AC/DC converter, plug pack, plug-in adapter, adapter block, domestic mains adapter, line power adapter, wall wart, power brick, and power adapter) the interested reader should refer to the Wikipedia link amongst other online references (1), (2).

Wall warts come in two major varieties, linear power supply and switched-mode power supply (SMPS). The linear power supply variety (which tends to have been superceded in current consumer electronic equipment) contains a transformer, rectifier and filtering circuitry, and can generally be identified by the "weight" (as the transformer inside tends to be heavy, particularly for the higher voltage/amperage models). SMPS are now probably the most wide spread which rely upon high frequency switching of the AC through inductors and capacitors to transform the AC to DC. SMPS, due to lack of the need for large/heavy transformer, tend to be very light.

Consequently, linear power supply wall warts tend to be less efficient, and often due to being designed and manufactured to a "price point" (i.e., as cheaply as possible) have considerable residual ripple in the output DC, output voltage varies with load (i.e. poor regulation) and produce significant dissipated heat even when not driving a load.

SMPS wall warts tend to be more efficient, smaller, and lighter device. In both cases a transformer is required, and thus both provide safety as the mains AC is isolated. Further, in terms of the DIY hobbyist, any commerically available wall wart (either linear or SMPS) is the safer option being produced by professional electrical engineers and commercial manufacturing process, rather than wiring up a DIY circuit to handle mains electricity.

Although, the cavaet here being to be wary of very "cheap" imported equipment that may not have undergone appropriate design and manufacturing QC/QA etc.

Selecting and Using a Wall Wart

Selection of an appropriate wall wart for a particular project obviously involves matching the wall wart output voltage, current capacity and voltage regulation ability to the circuit/project in question.

The usual microcontroller project involves 5V (or increasingly 3.3V) and since linear voltage regulator IC's (e.g. 78xx or LM3xx series) are easily available for very low cost, I tend to always use a wall wart to supply the DC voltage from the AC mains, that in turn is input to a LM317 or 7805 linear voltage regulator (with suitable filter capacitors). This means the nasty problems of cheap wall warts producing voltage sag under load and or having significant output voltage ripple is negated to a large degree. Although, you still need to ensure that the selected wall wart can supply adequate current for the expected load condition and that the wall wart output voltage needs to be ~3V higher than the desired output of the 78xx or LM3xx series linear voltage regulator.

Therefore, if using a 78xx or LM3xx series linear voltage regulator with a wall wart to supply the input DC from mains AC, wall wart selection is rather straight forward, particularly for microcontroller projects which tend to be 3.3V to 5V DC with a maximum load of <1A. If the objective is to provide a target circuit with 9V, 12V etc and to use the DC output from the wall wart directly, then the selection process is a little more complex. In such cases, additional filtering capacitors may be required "downstream" of the wall wart and or the DC output voltage of the wall wart being higher then the nominal requirement to allow for voltage sag under load.

The Schematic Diagrams and Circuit Details section provide information about practical circuits for using wall warts as DC power supply for DIY projects (largely based upon 78xx or LM3xx series linear voltage regulator datasheets).

The final recommendation is to ensure you salvage and hoard away all disused wall warts from equipment that is to be throw away. Having a wide selection of wall warts in the "junk box" is invaluable come DIY project power supply design time.

Discussion of the internal operation of wall-warts (both the linear power supply and switched-mode power supply versions) is left to the many external sources e.g. (5),(6). Below is some discussion about the LM317 voltage regulator (very commonly used), as often a wall-wart (due to "cheap" construction) will not produce an adequately regulated output voltage, and some ancillary circuitry incorporating a LM317 or similar (see the Schematics Section) will be necessary.

The usual schematic for the LM317 as per the datasheet is as follows.

basic circuit

"Basically" the output voltage (Vout) is determined by the ratio of the feedback resistors R1 and R2, using the following formula:

Vout = 1.25 x (
R2 / R1
)

The actual internal operation of the LM317 (and linear voltage regulators in general) is given in detail by an Analog Devices publication (7). Such detail/knowledge is likely of importance to assess the exact interaction of the LM317 with external circuitry. However, for the typical DIY scenario, the LM317 can be largely considered a "black box" that converts an input voltage to a regulated output voltage.

Refer to LM317 Component Testing for further details about utilising this IC in power supply circuits and some test results with a DIY electronic dummy load to check LM317 output voltage regulation etc.


Note: Image loading can be slow depending on server load.

  • Wall Wart SchematicWall Wart Schematic

    Silver Membership registration gives access to full resolution schematic diagrams.

    Wall Wart Schematic

This project did not require a PCB.

The construction was done using prototyping board. See the photographs and schematic diagram sections.

Qty Schematic Part-Reference Value Notes
Resistors
1R2, R33301/4W, 10% 
1R142701/4W, 10% 
1RV35KPotentiometer
Capacitors
1C40.33 uFelectrolytic
1C50.1 uFelectrolytic
2C11,C1210 uFelectrolytic
Diodes
1D3,D4Red and Green LED 
Integrated Circuits
1U2LM317TLinear voltage regulator datasheet
1U3LM10863.3v Linear voltage regulator datasheet
Miscellaeous
2SW2,SW3Switchsingle pole, single throw, 1A

Since the scrapped/surplus wall-warts I have available likely will not be available to the exuberant, fervent peruser of this information, I will refrain from reproducing graphs of output voltage versus load.

However, doing some quick measurements of output voltage versus load (particular at loads expected to be produced by the DIY project to be powered) is recommended to check that the wall-wart selected is indeed correct for your application.

The need to perform such testing inspired the DIY electronic dummy load project (or you could just use appropriate load resistors etc).

Review reference (4) which gives examples of the type of information that can be gleaned from a load test on a presumptive wall-wart to be used in a particular project.


There are a number of practical considerations to using a wall-wart as a mains AC to DC supply. The first being determining if the wall-wart in question is a linear power supply or a switched-mode power supply (SMPS).

The linear power supply versions (which tend to be "heavy" and have fixed "small" range of input voltage e.g. 240 VAC) are generally the least desirable as often there is limited and or no output regulation. Consequently, with linear power supply versions of wall-warts there is considerable voltage 'sag' under load. Fortunately, linear power supply versions of wall-warts are becoming less and less common.

The SMPS type of wall-wart (tend to be very "light" and have a range of input voltage e.g. 100-240 VAC), particularly those that can be sourced from disused/scrapped laptop computers, are more valuable as often this variety have very good output voltage regulation for loads even up to several amps.

Another nagging problem (although not much of a problem considering a wall-wart can often be got for free, compared to paying for components and constructing your own AC to DC power supply!) is that the connectors (the coaxial "plugs") are often non-standard. This is relatively easily overcome if the wall-wart is to be directly wired to the circuit and or via screw terminals or similar, that is, just cut of the connector!

Otherwise, it is also not difficult to simply cut-off and splice back on the appropriate connector to a particular wall-wart that may have the most suitable output-voltage etc for the project in question, so that the connector fits the PCB receptacle.

WARNING: if cutting off and splicing back on connectors, recommended to check the polarity of the plug with a multimeter first. It cannot be assumed that the "inside hole" or the outside sleeve of the plug is of a particular polarity. Also, when splicing wires, recommended not just to "twist" the wires together, but after physical binding apply solder to ensure cannot accidently unbind and cover with heat shrink.

In terms of electrical difficulties, the major problem is generally that the wall-wart in question has poor output voltage regulation, and under load within the circuit of interest (i.e, the DIY project) cannot supply adequate voltage and or current. This comes down to appropriate selection of wall-wart to match the load/voltage characteristics of the circuit of interest to be powered (and as previously mentioned, try to use the SMPS variety of wall-wart if possible).

Refer to some of my other completed projects, such as the DIY electronic dummy load and the DIY PIC Development Board to see how wall-warts were incorporated as the mains AC to DC supply for these circuits.


ref001: https://en.wikipedia.org/wiki/AC_adapter

ref002: http://www.dxing.info/equipment/wall_warts_bryant.dx

ref003: http://www.electroschematics.com/6938/of-wall-warts-wall-transformers/

ref004: http://www.clever4hire.com/special-articles/home/ac-dc-power-supplies---using-wall-warts

ref005: https://en.wikipedia.org/wiki/Switched-mode_power_supply

ref006: https://en.wikipedia.org/wiki/Power_supply#Linear_regulator

ref007: http://www.analog.com/library/analogDialogue/archives/43-09/EDCh%209%20power.pdf


Comments/Questions

No comments yet.

Add Comment/Question

Only Logged-In Members can add comments

"If we could sell our experiences for what they cost us, we'd all be millionaires".

Please donate any amount to help with hosting this web site.

If you subscribe (only $2/annum) you can view the site without advertisements and get emails abouts updates etc.

X

Sorry!

Only logged-in users with Silver Membership and above can download.


Silver Membership is only $2, so join now!