AC-DC Power Supplies - Using Wall Warts - Practicle Aspects of Using Wall Wart Power Supplies

Practical Aspects of Using Wall Wart Power Supplies

Now that we know a little about what's needed in a power supply and the output characteristics of some representative units, let's consider the practical aspects of putting them to use.

The first question, why a wall wart over alternatives?  If you're testing a circuit on the bench, a lab power supply is a nice option.  You can adjust the voltage to what you need and even examine the affects of changing the voltage.  Some supplies include metering to keep an eye on current draw.  A PICkit 2 or PICkit 3 is great for powering microcontroller circuits too. 

At some point you'll want to deploy your device in the real world or you may want to keep your circuit running while you use for lab supply for something else.  Options include powering by batteries which works great for 3.3 volt chips like the PIC18F25K20 but this isn't a practical solution for a device that's going to run full time.  If a line-powered supply is desired, you could build one as shown near the start of this article, but transformers aren't cheap and you'll need a bunch of other parts and an enclosure.  Often, using a wall wart is the cost-effective, expeditious answer.  You may have some leftover from long-ago replaced cell phones and other electronics, but if not, most thrift shops and computer recyclers have dozens to choose from in many different voltages and current ranges.

For a couple bucks, you can get a high quality, UL or CSA rated supply and have no worries about hazardous voltages.  This is cheaper than the postage to buy the parts to build your own.

Identifying Supply Type

Based on the discussion above, determine the best type of supply for your needs, the voltage needed and the minimum current needed.  Keep in mind that a larger current rating won't have any impact on powering your circuit. 

So how do we know if a wall wart is a linear or switcher supply?  Here are some typical characteristics:
Linear Supply
  • Input voltage will be a single value or a small range (e.g., 120 VAC or 110 - 120 VAC)
  • Supply will be roughly an equal-sided cube shape
  • Supply will be heavy for the size

A liner supply has a transformer similar to the photo at left.  The transformer has an iron core (the gray laminations in the photo) with copper wire wound around it (the paper-covered part with the leads sticking out) so it's fairly heavy.  The housing will be roughly cube shaped to allow room for the transformer with a little extra room for the rectifiers and filter capacitors.  The picture at right shows the transformer, 4 rectifier diodes in a bridge arrangement and a filter capacitor. 

Notice that the filter capacitor shown is relatively small.  Some linear supplies skimp on filtering, which will result in larger ripple levels.  With some supplies, additional filter capacitors prior to the voltage regulator will be needed.


linear_transformer_and_internals

(photos courtesy Wikipedia)

 

Switching Supply
  • Input voltage usually covers a wide range, typically 100 - 240 VAC
  • Enclosure will be sleekly shaped
  • Supply will be light

A switching power supply uses a much smaller transformer, possible because it's operating at a high frequency (several kHz or higher), so this type of supply will be smaller, lighter and not constrained to a cube shape.  The photo below (from hackedgadgets.com) shows a typical switching power supply.  Note the small transformer, surrounded by additional components.  Switching power supplies are also able to handle a wide range of input voltage and are often designed to be compatible with power systems around the world.
smps_internals

(photo from HackedGadgets.com)

If you refer back to the power supply details above, you'll see these characteristics.  Particularly note the "energy density" which is rated output power (watts) per gram.  The switching supplies output about ten times more power per gram.  If you click the rates link next to each supply, you can see the ratings for each supply.

Relative_weight_vs_output_current

 

Checking Out a Candidate Power Supply

Wall warts are designed for many purposes and it's often not possible to tell from the nameplate if there are any unique features that could interfere with our re-purposing.  Therefore, I would suggest a quick check with a voltmeter before connecting an unknown supply to a circuit.  Some switching supplies of older designs don't work properly at no load which our simple testing will also check.

A variety of connectors are used on wall warts.  "Standard" coaxial connectors (which are anything but standard), proprietary cell phone connectors and USB connectors of several types are some of the possibilities you may find.  A successful "shopping trip" to the local thrift stores may turn up exactly the supply you want (right output and connector) but don't worry too much if you can't find a supply with the desired ratings and the correct connector.  Connections to dev boards are often made using screw terminals, so the connector isn't a concern.  If your target boardpolarity_mark has a connector but you can't find a supply with the correct ratings and a mating connector, you might buy two wall warts - one with the correct output ratings and a second with the correct connector.  If you do find a supply with the correct size of connector, be sure to check the polarity  as well.  There is no standard arrangement.  Polarity is often marked on the enclosure.


Two parameters are important to coaxial power connectors in addition to polarity.  The OD (outer diameter) and ID (inner diameter) of the plug must match the socket.  If the OD is too large or the ID is too small, the connector simply won't fit.  A worse situation is when the OD is correct but the ID is too large.  The connector will appear to fit, but the clearance between the inner sleeve of the plug and the pin of the socket can be so large that they don't touch at all and no connection will be made.

coaxial_power_connector_-_640
coaxial_jack_sizes

Something to watch out for is reversed coaxial connectors.  Rather than a hole (sleeve) in the middle, there's a pin.  These are used on some computer power supplies; there's actually a third contact on the inside of the connector for data communication to validate the supply.

reverse_jack

 

If the connector is wrong or not needed, cut it off; you may wish to leave some length of cable on the connector just in case it turns out to be the right size for something else.  Strip the jacket to expose the conductors.  You'll probably find one of three situations:  1) the cable is zip cord and the 2 conductors can easily be separated, 2) the supply has a round cable with 2 conductors inside or 3) the supply has a round cable with a insulated center conductor and outer shield.  If your supply has more than 2 conductors, it may be a multi-voltage supply or it may contain additional circuitry to charge batteries or for some other function.

cable_types

 

The photos above show two types of cables that may be found.  The color of the conductors may or may not indicate polarity.  It's always safest to check since mistakes may damage your dev board or circuit.

Measure the DC voltage from the supply, paying attention to polarity.  If the color code is not something like red (positive) and black (negative) as is the case in the left picture, it's a good idea to label the cable to avoid problems later.  Also note the voltage.  If you have a regulated switching supply, it should measure approximately the value shown on the nameplate.  If this is the case, the supply should be ready to use with no minimum load required.  If the supply is a linear unit, it may measure up to √2 x the nameplate voltage.  For a 12-volt rated supply:

V_p_e_a_k = (\sqrt{2}) V_R_M_S = 1.414 * 12 = 16.97