Power Sources - Practical Electronics: Components and Techniques (2015)

Practical Electronics: Components and Techniques (2015)

Chapter 5. Power Sources

All electronic or electrical and electronic devices, from the simplest flashlight to the control systems on a modern aircraft, need one thing in common: power. Without a source of electrons, it’s all just a pile of inert metal, plastic, and silicon (among other things).

This chapter presents an overview of power sources for both DC and AC, ranging from batteries to linear and switching power supplies. Special attention will be given to batteries and inexpensive DC power supplies you can use to power your project that plug into a standard AC wall socket (so-called wall warts).

We’ll wrap up the chapter with a look at fuses and circuit breakers, essential but often overlooked devices that can save the day if used correctly. To that end, there is a brief discussion of how to select an appropriate rating for these essential protection devices.


Batteries are the simplest source of DC power, and they are essential when portability is a major consideration. Unfortunately, a battery will last only so long before it must be either replaced or recharged.

There are numerous types of batteries available, ranging from the tiny types used in things like hearing aids, all the way up to huge arrays that are found in solar power installations and in the back-up power systems for large computer installations. Some batteries are rechargeable, such as the types used in cell phones and automobiles, while others are single-use and must be disposed of when they are exhausted.

Battery Packages

Batteries for general-purpose consumer applications are available in a variety of package styles, from the common cylindrical forms of AAA, AA, C, and D types used in portable devices, toys, and flashlights, to the square package used for 9V types. Table 5-1 lists the five most common general-purpose battery sizes.


Dimensions (mm)


10.5 × 44.5 mm


14.5 × 50 mm


25.5 × 50 mm


34 × 61 mm


48.5 × 26.5 × 17 mm

Table 5-1. Common battery sizes

Figure 5-1 shows a side-by-side comparison of the common battery sizes in the order listed in Table 5-1, from left to right.

pect 0501

Figure 5-1. A selection of common batteries

The so-called coin or button batteries found in some toys, watches, hearing aids, and other small devices do indeed look like small coins or buttons, and there are multiple sizes and ratings available for these, as well. Figure 5-2 shows a sample of some of the available sizes.

The batteries shown in Figure 5-2 are, from left to right, LR41, LR44, CR2032, and CR2025. See “Miniature Button/Coin Batteries” for more details on the various types and sizes of coin-style batteries that are available.

pect 0502

Figure 5-2. A selection of small “coin” batteries

Other package styles include the rectangular form used for sealed lead-acid batteries, such as those found in things like emergency lights and the uninterruptible power supply (UPS) devices used to keep computers and other devices running when the lights go out. Rectangular 6V lantern batteries with spring contacts are still used for some types of camp flashlights and portable fluorescent lighting units. The lithium-ion batteries found in cell phones and tablets come in a range of shapes, most of which resemble flat rectangular wafers about 3 to 10 millimeters thick. And, of course, there are the large, heavy lead-acid batteries used to provide starting power for cars, trucks, and boats.

In addition to the common sizes, batteries can be made in custom sizes for a particular product. Generally, however, it is a good idea to stick with something that is readily available at almost any grocery store if at all possible.

Primary Batteries

Batteries with nonreversible electro-chemical reactions are referred to as primary batteries. Primary batteries are usually alkaline types, but other types (such as lithium, silver-oxide, and zinc-air) are also common in the form of coin batteries (see “Miniature Button/Coin Batteries” for details about coin batteries). Large silver-oxide primary batteries have also been used in aircraft, submarines, and spacecraft.

Alkaline Batteries

The alkaline battery is the most common type of battery in use today. An alkaline battery is a chemical device that employs the reaction between zinc and manganese dioxide to create an electric current. Alkaline batteries are size interchangeable with the older zinc-carbon types.

For the common sizes listed in Table 5-1, each type of alkaline battery has its own standard voltage and capacity, as shown in Figure 5-3.

Note that the capacity values shown in Figure 5-3 are conservative and are provided for reference only. The actual capacity of a particular battery will depend on the manufacturer’s formulation and production process.

A typical alkaline battery is a one-shot device. Once it is discharged, it is generally not a good idea to try to recharge it. There are some types of alkaline batteries that are somewhat rechargeable, but unless a battery specifically states that it is a rechargeable type, don’t try it. There is a risk of a burst battery and possibly fire.

While lightly loaded (low current drain), an alkaline battery will produce a relatively constant voltage at a constant current. This is the amp-hour rating mentioned in Chapter 1 and shown as mAh (milliamp-hour) values in Figure 5-3. The battery’s output is a function of the chemical reaction occurring inside the battery, which in turn is affected by the load on the battery. Over time, the battery loses its ability to react chemically, and the battery dies. When the battery starts to fail, its voltage will drop, and it will no longer be able to hold its rated voltage as it discharges. When heavily loaded, alkaline batteries start to fail much sooner than other types.

The usable capacity of an alkaline battery depends on the load on the battery. Figure 5-4 shows typical discharge curves for both an alkaline and a nickel-metal hydride (NiMH) battery under load. Notice how the NiMH battery is able to maintain a voltage above the cut-off level for longer than an alkaline type when both are loaded equally. From this we can conclude (correctly) that the capacity rating for an alkaline battery is more applicable to low-current-drain situations.

As you can see in Figure 5-4, the output of an alkaline battery over time is not a flat line up to some point where it starts to drop. Rather, it is more like a gradual descent into darkness over time because an alkaline battery will develop an internal resistance when the current drain is high. It drops below the usable voltage cut-off limit much sooner than the NiMH battery, even though both have roughly the same rated capacity. The cut-off voltage shown in Figure 5-4 depends on the device the battery is powering. Some can operate down to 1V, whereas others might give up at 1.2V (which means the use of an NiMH might not work out too well).

pect 0503

Figure 5-3. A comparison of voltages and capacities for common battery types

pect 0504

Figure 5-4. Discharge curves for alkaline versus NiMH batteries


Silver-oxide batteries are primary cells typically found in the form of small button or coin-style batteries, due to their high energy-to-weight ratio. A silver-oxide cell also has a flatter discharge curve than an equivalent alkaline battery, and the nominal voltage per cell is only slightly higher (1.5V for alkaline versus 1.55V for silver-oxide).

Larger sizes are possible but limited in application due to the cost of silver. A button-style battery uses little silver, so it is not a major cost factor. Prior to the invention of lithium batteries, the silver-oxide battery had the highest energy-to-weight ratio (the energy density). Originally developed for aircraft, these types of batteries have been used in spacecraft and on submarines.


Not to be confused with the lithium-ion (Li-ion) secondary batteries found in cell phones and other portable electronic devices, a lithium battery is a disposable primary battery type that uses some form of metallic lithium in the anode of the battery. A primary lithium battery has a high charge density, which equates to a long useful lifetime. Found mostly in the form of coin or button batteries, AAA, AA, and 9V sizes are available as well. They are also rather expensive, with a four-pack of AA-size lithium batteries going for around $15.

Output voltages for lithium batteries (individual cells) range from 1.5V to 3.7V. The current capacity can be as high as 3,000 mAh for a single AA cell, and the discharge curve is virtually flat right up until the battery is exhausted.


Zinc-air primary batteries are based on the oxidation of zinc when in contact with the air. For this reason, coin-type zinc-air batteries come with a seal that must be removed before the battery will produce any output.

Zinc-air batteries have a high energy density and are relatively inexpensive to manufacture. They are mostly found in the form of coin cells in hearing aids, medical devices, and pagers, although they have also been used in film cameras and, in large forms, as the primary power for electric vehicles.

Secondary Batteries

Batteries that are rechargeable (meaning that the electro-chemical state of the battery can be reversed), are referred to as secondary batteries. Secondary batteries include nickel-cadmium (NiCad), nickel-metal hydride (NiMH), lithium-ion (Li-ion) types, as well as the common lead-acid types found in vehicles and in large-scale power storage applications.

The oldest example of a rechargeable battery is the lead-acid type often found in automotive applications. A more modern variant, the deep-cycle battery, is sometimes used in solar power installations. Other more recent types include nickel-cadmium (NiCad), nickel metal hydride (NiMH), and lithium-ion (Li-ion).

NiCad: Nickel-Cadmium

Created in the late 1800s in Sweden, the NiCad battery has been used in things like portable two-way radios, emergency lights, cordless power tools, and electric vehicles. Manufactured in a variety of sizes, including AAA, AA, C, D, and 9V, NiCad batteries are readily available and provide decent performance. NiCad batteries do have a tendency to develop a sort of memory with repeated charge-discharge cycles, which prevents them from taking a complete charge until they have been subject to a deep discharge cycle to reset the charge memory.

NiCad batteries have a typical output voltage of 1.2V per cell, instead of 1.5V as found in alkaline batteries. Although many devices will operate fine with the lower voltage, some will not.

NiMH: Nickel-Metal Hydride

Since their introduction in the late 1980s, NiMH batteries have replaced NiCad in many applications. The charge capacity of NiMH is much better than NiCad, and NiMH batteries don’t suffer from the charge memory effect that sometimes afflicts NiCad types. NiMH batteries do have a higher self-discharge rate than NiCad types, however, and like NiCad batteries, a NiMH cell output is typically 1.2V.

Figure 5-5 shows the battery pack from a cordless telephone before and after the pack was opened to reveal its contents. This pack has an output voltage of 3.6V at 500 mAh capacity, and it contains three 1.2V cells wired in series. Notice in Figure 5-5 that there is a fuse link incorporated into the battery pack, as indicated by the arrow.

pect 0505

Figure 5-5. Small NiMH battery pack for a cordless telephone

These types of battery packs are readily available from various online sources and sell for about $5.

Li-ion: Lithium-Ion

Lithium-ion batteries have become common in consumer electronics such as cell phones, tablet computers, netbooks, and some types of electric tools and medical equipment. These batteries have good charge density and low self-discharge rates, and they do not suffer from memory effect.

Li-ion packaging is varied, ranging from conventional tubular packages in the standard sizes to custom-made flat rectangles or even circular shapes. Be aware that the output voltages from Li-ion batteries in standard sizes may not be the 1.5 or 1.2V you would expect. Some can range as high as 3.6V. It would be easy to damage an electronic device expecting, say, 6V (four alkaline batteries) but instead being supplied with almost 14.5V!

The batteries found in things like MP3 players, cameras, and cell phones are often packaged in flat, rectangular shapes like the one shown in Figure 5-6. These typically have three or four terminals at one end that make contact with a matching number of spring-loaded pins or perhaps leaf contacts.

pect 0506

Figure 5-6. A typical Li-ion battery from a portable device

Although most Li-ion batteries are custom-made for a specific application, if the correct fixture can be purchased or fabricated, they can be an excellent compact source of power for a project. An old cell phone can provide such a mount if it is removed carefully.

You should be aware that Li-ion batteries can have a relatively high energy storage capacity for their size and will sometimes overheat if they’re mistreated or happen to be defective. This is particularly true of the types used in mobile devices, and there have been reports of Li-ion batteries bursting into flames or even exploding. While not as big of a problem with more recent batteries as it once was with earlier types, it is still something to take into consideration.


Lead-acid batteries have been around for a long time, at least since the mid-1800s. They have low energy density for their weight, but they are relatively inexpensive and have the ability to deliver large surge currents, which makes them ideal for applications such as turning the starter motor in an automobile.

In the 1970s, the so-called gel cell was created. This is essentially a lead-acid battery with a silica gel mixed into the electrolyte. These types of batteries don’t suffer from significant evaporation issues, and their larger usable temperature range makes them more suitable for extreme conditions. Due to the gel, these types of batteries do not have the same surge capability as a conventional lead-acid battery. So while a gel cell is great for energy storage applications, it is not a good choice as the starting battery for a vehicle.

Miniature Button/Coin Batteries

We wrap up our brief survey of batteries with a look at coin or button types, such as the ones found in hearing aids, watches, laser pointers, miniature digital scales, and other small devices. They come in both primary and secondary forms, although we’ll cover only the primary types in this section.

International standard IEC 60086-3 defines an alphanumeric coding system for coin-style batteries, although some manufacturers have their own naming system. This can make things confusing, but fortunately you can usually identify a replacement battery by cross-referencing the manufacturer-specific ID number to an IEC equivalent.

The full version of the coding scheme incorporates a letter code for the battery type followed by a letter code for the package type (which is always R for round when referring to coin or button batteries). These two characters are followed by two, three, or four digits that encode the physical dimensions (diameter and height) of the battery. The full form contains both the diameter and the height, like this:

§ [type][package][diameter][height]

For example, a CR2032 (one of which is shown in Figure 5-2) is a round lithium cell with a diameter of 20 mm and a height of 3.2 mm. Another example is the LR736, which is another round lithium cell with a 7.9 mm diameter and 3.6 mm thickness. The 7.9 mm diameter is indicated by the value 7; the fractional part of the diameter is not included in the identification code. The standard diameter values are defined in Table 5-3.

An alternative form of the coding system uses a numeric value to specify the case size rather than the diameter and height:

§ [type][package][size code]

LR41 is an example of this type of ID code. This would be a round lithium battery of size type 41, which is equivalent to an LR736. The size codes are listed in Table 5-4, which can be used as a cross-reference between the two types of codes.

Lastly, some batteries have just a numeric identification number. This is not part of the IEC standard but is an example of a manufacturer-assigned ID code, some of which have become de facto standards over time. Fortunately, most manufacturers follow the IEC case size specifications, so many batteries with unique ID codes are largely interchangeable with other types that use the IEC identification system. For example, the ID numbers 186, 301, 386, SR43, and SR1142 all refer to the same battery (a 1.55V silver-oxide type with a diameter of 11.6 mm and a height of 4.2 mm).

The battery type code refers to the chemistry of a battery and can be one of C, L, P, or S. Table 5-2 defines these type codes, along with the nominal output voltage for each individual cell of that type.

Type code


Output (volts)













Table 5-2. Button/coin battery types

The case dimensions or case code for a particular battery type follow the R code (a round case). In the full-form numbering system, the diameter is specified with either a one- or two-digit value indicating the diameter of the case in whole millimeters (rounded down). The height of the case is always a two-digit value that specifies the physical height in millimeters and tenths of a millimeter. Table 5-3 lists the diameter code values specified in the IEC standard.

Diameter code

Nominal diameter (mm)

























Table 5-3. Button/coin battery diameter values

With this coding system, the battery ID is sufficient to physically describe the battery. So, for example, if you encounter an SR926, you’ll know that it’s a silver-oxide button type that is 9.5 mm in diameter and 2.6 mm in height.

The standard size-code system is a more compact scheme used to identify a particular type of button battery not only in terms of physical size, but also in terms of current capacity. Table 5-4 lists the size codes for alkaline and silver-oxide batteries and the typical capacity of each type. The capacity ratings are shown for both alkaline (L cap) and silver-oxide (S cap) batteries. The x in the IEC ID codes can be replaced with either an L or S, as appropriate. For the SR67 and SR68 types, no alkaline (L) equivalent is readily available.



L cap

S cap









































































































Table 5-4. Button/coin battery size codes (capacity in mAh, dimensions in mm)

Lithium coin-style batteries use the full-form IEC ID numbers. Table 5-5 lists some of the more common types you might encounter in the wild. The ANSI designation is also given, where applicable.
























































































Table 5-5. Lithium button/coin battery size codes (capacity in mAh, dimensions in mm)

Battery Storage Considerations

Alkaline primary batteries typically have a longer shelf life than a secondary battery of the same physical form factor and rating. For this reason, they are a good choice when the battery must sit for extended periods of time. The downside is that they cannot be recharged (in most cases, that is), and all primary batteries eventually deteriorate, so you will need a replacement schedule in place to install fresh batteries.

Three to four years is typical, with some types capable of a shelf life in excess of six years. The time interval depends on the chemistry of the particular battery and the thermal environment (a battery in a hot environment will tend to degrade faster than one kept in a cool location). Some people put batteries in the refrigerator, but there is no solid evidence that this will help extend their shelf life. It can, however, help prevent premature deterioration due to overheating. I would not recommended putting batteries of any type in a freezer. Overall, keeping spare batteries in the door of a refrigerator is not a bad idea, particularly if you happen to live in a hot environment. Just don’t expect the batteries to last any longer than normal.

Primary batteries in coin cell form have shelf life durations from 1.5 to 10 years, depending on the chemistry of the battery. A lithium coin cell can have a shelf life of up to 10 years. A silver-oxide coin cell can hold out for about 1.5 to 2 years, and an older style mercury cell (now obsolete) can last for up to 3 years. A zinc-air type can stay viable for up to 6 years, so long as the seal remains in place (they are activated when a seal is removed and air can enter the battery).

A secondary battery has the advantage of being rechargeable, but it has a relatively short shelf life due to internal leakage currents (self-discharge). A secondary battery will significantly outlast a primary type if it can be recharged periodically. They are good choices when a reliable power source is available, such as a floor-sweeping robot that can be recharged from a wall outlet, or a device that uses a solar cell to keep its battery (or batteries) charged.

Storage of secondary batteries can be somewhat more involved than with a primary battery. For example, a lead-acid or Li-ion secondary battery needs to be stored with a minimum charge to prevent internal deterioration and possible damage. In the case of a lead-acid battery, it can accumulate lead sulphate crystals on the plates, which renders the battery useless. This is why the battery in a vehicle in storage should be charged periodically and why the batteries purchased from an auto parts supplier are already charged when you buy one. Lithium-ion batteries can also suffer internal damage if left in a completely discharged (0V) state for extended periods of time. Some sources recommend maintaining a minimum of 2 volts per cell by periodically “topping off” the battery. Ideally, a Li-ion battery should be stored with a partial charge of between 30% to 50%.

NiCd and NiMH batteries are somewhat more forgiving when it comes to storage, but they too have their own unique issues. NiCd batteries can be stored in discharged state, but they might require multiple deep discharge cycles to restore them to full capacity (this is the same technique used to erase the so-called charge memory effect found with NiCd batteries). NiMH batteries don’t suffer from the charge memory of NiCd types, but they will self-discharge more rapidly.

Most manufacturers recommend storing secondary batteries in a 15°C to 20°C (59°F to 68°F) environment. It can be colder than this, with some types rated for storage down to –20°C. A fully charged lead-acid battery can withstand –35°C, but a fully discharged lead-acid battery will freeze at 0°C.

In summary, you can see that a primary battery is a relatively low-maintenance device that can be stored for extended periods of time before use, but it’s a one-shot thing. It will need to be discarded and replaced at some point and, if in continuous use, that time will come sooner rather than later. A secondary battery, on the other hand, will last in continuous use for a considerably longer time than a primary type, provided that it can be recharged routinely. A secondary battery is much more particular about storage conditions and, in general, secondary types involve more storage maintenance considerations than primary batteries.

Using Batteries

Batteries require some form of fixture to hold them, unless they happen to have terminals like those found on automobile batteries and some gel cells. Battery holders are available in a variety of configurations, from a single AAA or button cell to fixtures capable of holding multiple D size cells. Figure 5-7 shows a sample of some of the types of battery holders that are available.

The standard 9V battery package has a pair of contacts at one end that are designed to mate with a set on either a snap-connector or a plastic holder. Figure 5-8 shows a snap-on connector with flexible wire leads.

pect 0507

Figure 5-7. A selection of various types of battery holders

Avoid soldering wires directly to a battery unless the battery was specifically made to be soldered. Some of the small batteries found on computer motherboards have solder tabs. They are intended to be soldered into place once and then left in place to provide memory retention power for things like the real-time clock and configuration memory. Attempting to solder a wire to a conventional battery of any type that is not intended to be soldered can damage the battery, and it often requires the use of an acid-based flux (if the metal used for the battery’s end caps will even bond with the solder in the first place).

pect 0508

Figure 5-8. A snap-on connector for a 9V-style battery

Figure 5-9 shows a plastic holder made specifically for a standard 9V type of battery. This holder is intended to be attached to a flat surface using the four holes in the bottom of the plastic shell.

pect 0509

Figure 5-9. Battery holder for a conventional 9V battery

If you elect to use the snap-on connector, you’ll also need to work out a way to keep the battery secure. Otherwise, it can float around inside an enclosure and do some physical damage to other components. Figure 5-10 shows one way to secure a battery holder. In this case, it’s a holder for two AA cells that has a 9V snap-on connector. It could just as easily have been a bare 9V battery.

pect 0510

Figure 5-10. A battery holder secured with plastic zip ties

The secret to Figure 5-10 is revealed in Figure 5-12. A stick-on zip-tie anchor, like the one shown in Figure 5-11, has been affixed to the bottom of the enclosure. These plastic parts are typically used to secure and route bundles of wires and cables through a chassis, but they also work very well as an anchor point for situations like this.

pect 0511

Figure 5-11. A common plastic zip-tie anchor with adhesive backing

pect 0512

Figure 5-12. A zip-tie anchor used to secure a battery holder

In case you’re curious, the device (i.e., gadget) shown in the preceding images is supposed to be an audio mosquito repeller. Its effectiveness is still in question, but it was fun for the kids to build and test it.

Battery Circuits

Batteries can be connected in series or parallel to achieve voltages or capacities greater than what can be obtained from a single cell. Batteries in series are commonly used to increase the voltage, such as might be found in a large flashlight with multiple C or D size batteries. In other cases, you might want to increase the available current, and connecting batteries in parallel will achieve this, as shown in Figure 5-13.

pect 0513

Figure 5-13. Series and parallel battery circuits

Of course, it is also possible to build a combination of series and parallel circuits to achieve both a desired voltage and current capacity. It just depends on how many batteries you are willing to use and how much space is available for the battery holders.

Selecting Batteries

When selecting a battery for a given application, most people look first at the voltage and the physical size, but there are other factors to take into consideration, as well:

Physical size

How large is the available space for a battery? This includes not only the battery itself, but also the holder (if one is used, a PCB-mounted battery doesn’t need a holder, just sufficient room for the battery package). If there isn’t a lot of room available for something like a AA size battery, a smaller type could be used (an LR41 button type, for example), but the trade-off is battery capacity versus size, and a reduced battery capacity means that the circuit will not be able to operate for the same amount of time as would be the case with a larger battery.


If a circuit uses 5V DC, you can use four alkaline or silver-oxide batteries to get 6V. Five NiCad or NiMH batteries will also provide 6V. If there is sufficient space available, a single lantern-type battery will provide 6V. In each case, the circuit will need a voltage regulator to provide the necessary 5V power.


The capacity rating of a battery will determine how long the battery can supply a circuit with current at a constant discharge rate before the battery is exhausted. For small batteries, capacity is specified in mAh (milliamp-hours).


Many battery types do not handle heat or extreme cold very well, and their performance can suffer if operated outside of their rated temperature range. If a circuit will be used in an environment where the temperature of a particular battery type might exceed its range, then either select a different battery, or make provisions to keep the battery’s immediate environment within its operating range.


Will the batteries need to be replaced at some point? If so, then selecting a battery that can be easily removed is better than one that must be unbolted or desoldered. This depends, of course, on the size of the battery itself and its operating environment. Large batteries, such as some sealed lead-acid types, need to be physically secured with straps or brackets, and the terminals might employ screws or bolts.

Shelf life

It is important to bear in mind that an alkaline battery has a considerably longer shelf life than a rechargeable type. If the battery will sit for an extended period before it is used (such as an emergency flashlight in a wall-mounted bracket), it should be an alkaline type. If it will be used routinely, and it can be recharged routinely, then a NiMH rechargeable type might be a better choice.

The best source of information for a particular battery is, of course, the manufacturer. The reference data will (usually) specify the nominal capacity, output voltage, maximum suggested discharge rate, and environmental constraints. Some manufacturers also provide useful reference materials for download or as web pages. There are also many other sources of information available on the Internet. For example, the MIT electric vehicle team has created “A Guide to Understanding Battery Specifications”.

pect 0514

Figure 5-14. Linear power supply block diagram

Power Supply Technology

The purpose of a power supply is to provide electrical power in a usable form through a conversion of some sort. In most cases, this involves converting AC at a high voltage (110 or 220 volts) to a much lower DC voltage. In other situations, there might be a need to convert from one DC voltage to another—say, from 5V to 3.3V. Conversely, some types of LCD displays use a high-voltage backlight, so a low-level DC input needs to be “stepped up” to a much higher voltage.

There are two basic technologies used in DC power supplies: linear and switching. The linear type is the oldest, dating back to the time of vacuum types (which used high-voltage DC). A linear power supply takes the output of a step-down (or step-up, in some cases) transformer, rectifies it to convert the AC to DC, filters it to remove as much leftover ripple from the original AC source as possible, and sometimes regulates it to provide a constant voltage or current (or both) output. Linear power supplies are simple to understand and build, but they tend to be bulky and inefficient, particularly if they need to supply a substantial amount of current. Figure 5-14 shows a block diagram of a basic linear power supply.

A complete linear voltage regulator is available as an IC in a TO-92, TO-220, SOT-89, SOT-223, or similar type of package. These devices can be used to build a modular or bench type power supply, or they can be included into a circuit on a PCB to set the voltage level for the entire circuit or just a some portion of it. These devices are covered in more detail in Chapter 9.

The block labeled “Regulator” in Figure 5-14 could be single IC voltage regulator, or it might be a high-power transistor circuit. It depends on the application, how much adjustability is desired, and the amount of current the power supply can provide.

A switching power supply is much more efficient than the earlier linear type, and it is also much smaller for an equivalent power output rating. Most of the plug-in supplies used with things like notebook computers, DVD players, and external hard drives use switching power supply technology to keep the cost and size to a minimum. The power supply in a desktop PC is a switching supply.

Internally, a switching power supply works by directly rectifying the AC’s main input, and then chopping it into pulses at a high frequency. The high-frequency pulses are applied to a small transformer and then converted to DC on the other side. Because a high frequency is used, the transformer can be very small, but the trade-off comes in terms of circuit complexity. A switching power supply is typically more complex internally than a linear supply, with isolated control and feedback circuits to regulate the output voltage and current. Figure 5-15 shows a block diagram for a simple switching power supply.

pect 0515

Figure 5-15. Switching power supply block diagram

The high-voltage side of a switching power supply might have voltages as high as 165V if it connects directly to the AC line voltage (and even higher if the mains are 220-230V AC). This is a definite shock hazard.

Although it is inefficient, a linear power supply does have the advantage of an adjustable output, in terms of both voltage and current. A switching power supply is not as easily adjustable. There are switching power supplies available with variable outputs, and as the technology improves, they are becoming more common.

Wall Plug-in DC Power Supplies

A simple wall plug-in power supply (also known as a wall wart) is an easy and convenient way to provide DC power. These units are typically already UL and CSA approved, so that’s a hurdle that doesn’t need to be overcome if your project becomes a commercial product. Figure 5-16shows a typical wall plug-in supply.

pect 0516

Figure 5-16. A typical wall plug-in power supply

These devices some in a variety of voltage and current ratings. Some provide only a few hundred milliamps of current, while others are fairly substantial with up to 3 or more amps of available current. Many of these types of power supplies use a circular coaxial connector like the ones shown in Figure 5-17, which shows four different sizes.

pect 0517

Figure 5-17. Coaxial DC power connectors

Two popular sizes are 2.5 mm diameter by 5.5 mm length, and 2.1 mm diameter by 5.5 mm length. There are other sizes in use in various types of consumer electronics and, unfortunately, there isn’t a whole lot of standardization. A retail electronics outlet like Radio Shack will often have a large display of various shapes and sizes of replacement power connectors.

Be sure to read the output voltage specification on the power supply before you connect it to anything. There’s nothing obvious to differentiate a 5V DC supply from a 24V AC supply with the same size of connector, except what is printed on (or molded into) the case. Also be sure to check the polarity of the connector. Some have the positive on the inner connector and ground on the outer ring. Others do it the opposite way. Checking a power supply with a digital multimeter (DMM; see Chapter 17) before using it is a prudent step.

There’s nothing that says you have to use the connector already attached to a wall power supply. You can cut it off and replace it with your own, or use no connector at all. The one thing you should do, however, is determine which of the wires is positive and then mark it. I like to use either a dab of white paint or a small 1/4-inch section of red heat-shrink tubing. I would not recommend using a 3.5-millimeter phone plug, like the types used for audio input and output. These can momentarily short while being removed or inserted.

It’s also prudent to check the output of the wall supply to see how “clean” the output is. It may claim to be 5V DC, but there might also be a lot of “ripple” on the output if it’s not well filtered. This didn’t matter for some applications, because the device it was originally used with might have incorporated some type of internal filtering.

The frequency of the extraneous signal might be anywhere from 60 Hz up to several thousand (if it’s a switching power supply). You can test for this by measuring the output of the power supply while connected to a load (something like a 100-ohm resistor will do; see Chapter 8 for information about resistors) and using the AC scale of a DMM or an oscilloscope (see Chapter 17). You shouldn’t see any more than about 10 or 20 millivolts of ripple on the DC output. Any more than that and it might need some filtering.

If the output is “dirty,” you’ll need to use an RC (resistor-capacitor) filter to clean it up. Or, if you need 5V you can use a 9V or 12V DC supply and a voltage regulator IC to produce a clean 5V output. See Chapter 9 for more on voltage regulators.

Bench DC Power Supplies

As the name implies, a bench DC power supply is intended for use on a workbench or in a test setup. Most of these types of supplies, such as the one shown in Figure 5-18, feature variable voltage and current control, and some come with fancy digital readouts, as well.

pect 0518

Figure 5-18. Variable-output bench DC power supply

You’d typically use a bench supply while testing a new device or circuit, before committing it to a final packaged form. You can also use it to power sections of an existing device in order to probe its inner workings. Most bench supplies don’t provide a lot of current, and most of them are linear power supplies. A linear supply is easier to control than a switching supply and allows the voltage and/or current to be adjusted from zero to whatever the maximum rating happens to be for the supply.

Modular and Internal DC Power Supplies

The power supply in a typical desktop PC is an example of an integrated modular DC power supply. These types of power supplies are intended for use within another device or system, and they usually don’t have convenient terminals like the bench supply shown in Figure 5-18. In some cases, they don’t have terminals at all but instead have connection points on a PCB to attach wires.

Figure 5-19 shows a modular power supply. Modular power supplies similar to this one come in both closed and open frame styles. This one happens to be a closed-chassis type with an integral fan. It is a switching supply rated for 12V DC at 35 amps. An open-frame type would have just a simple metal frame, no cover, and holes in the frame for mounting hardware. Modular and open-frame power supplies are available as both switching and linear types.

pect 0519

Figure 5-19. Modular 12V DC switching power supply

The power supply shown in Figure 5-20 is also a switching unit, rated for 5V DC at 30 amps. Power supplies like the ones shown in Figures 5-19 and 5-20 are not adjustable, except by a small amount for fine-tuning the output voltage.

pect 0520

Figure 5-20. Modular 5V DC switching power supply

An important thing to note about a power supply of this type is that there are often two terminals labeled +S and –S. These are the sense inputs, and they are used to compensate for voltage drop over an extended wire between the supply and the load. In many cases, the power wires are short and the drop isn’t a major concern, so a simple jumper is placed between +S and the positive output terminal, and between –S and the negative output terminal. But, in any case, unless the supply is designed to operate with the +S and –S inputs disconnected, these terminals must be connected back to the + and – output terminals at some point.

These are rugged, high-current power supplies intended to be integrated into a larger system. They are definitely not something you would want running around loose on a workbench, but they can be safely tucked away inside some type of enclosure. This type of power supply can be found in surplus shops and inside discarded medical, industrial, and scientific equipment. The downside is that, as mentioned earlier, they are not adjustable. Unless you add an adjustable regulator to the output, you get whatever the supply was designed to deliver.

Another thing to consider is the amount of current these types of power supplies can deliver. Unlike a low-current bench power supply with an adjustable current limit, some of these heavy-duty switching power supplies will just keep on pumping out the current, even into a short circuit (they go into a constant-current mode of operation that can tolerate a short circuit). Keep in mind that 30 amps can do a lot of damage, so it is essential to have a fuse or circuit breaker on the output of a high-current power supply.

Photovoltaic Power Sources

A photovoltaic cell (or solar cell), is a semiconductor device that converts the energy of photons to electric current by means of the photovoltaic effect. Primitive forms of photovoltaic cells existed in the early to mid-1800s, but it wasn’t until the middle of the 20th century that these devices started to become efficient enough to make the transition from laboratory curiosity to usable devices.

On a sunny day with clear skies, up to around 1,000 W of solar energy falls on a square meter of the earth’s surface, depending on the distance from the equator. If that energy could be converted directly into electricity with 100% efficiency, we would be able to power many of our homes and cities with it. Sunlight is, after all, essentially free, which is a major source of its appeal. Unfortunately, modern solar cells are not that efficient, and not everyone lives where there is intense sunlight for most of the year.

Today’s commercial-grade solar cells are between 15 and 25% efficient, depending on how much you are willing to pay. New technologies either in research or entering production are boasting efficiencies of better than 40%, and hopefully it won’t be long until these become cost-effective alternatives to conventional power sources. But even in their current form, solar cells are very useful for providing power where there are no outlets and routinely changing batteries is not an option.

Solar cells are rated by voltage output and available current for a given size (area) of a cell. These characteristics are in turn determined in large part by the efficiency of the cell. Basically, the efficiency of a solar cell is the measure of how well it can convert the light energy impinging on it into usable electric current. The higher the efficiency rating, the better the cell is at the conversion.

By itself, a solar cell is useful only when there is light falling on it, so it is useless at night. For this reason, solar cells are often used in conjunction with rechargeable batteries to provide power during darkness. You may have seen the emergency telephones alongside some major freeways, each with a small array of solar cells on the top of the pole to which the phone box is mounted. Inside the phone box is a radio transceiver, a charging controller circuit, and a rechargeable battery pack of some type.

Solar cells, like batteries, can be connected in series and parallel configurations, as shown in Figure 5-13. Solar cells connected in series will produce a higher output voltage, and when connected in parallel, the current output increases. Some solar cells have a built-in diode (called a bypass diode) to prevent reverse current flow when one cell is shaded and others aren’t. The reason for this is that unshaded cells can drive reverse current through a shaded cell and possibly damage it. If the individual cells in an array do not have bypass diodes, they should be added. Figure 5-21shows how bypass diodes are incorporated into a series array of solar cells.

Figure 5-22 shows an example of a low-cost solar-cell module. This is a Parallax 750-00030 rated for a maximum of 6V output at 1 watt, which is about 160 mA of current (0.167 A). This may not seem like much, but if the solar panel can produce 160 mA of current for six hours a day, it can be used to charge a battery during daylight hours.

Charging a battery from a solar-cell module like the one shown in Figure 5-22 might be as simple as placing a resistor in series with the solar cell to limit the current to the battery, or it might involve using a regulator of some sort if an array of solar cells is used that will produce more voltage or current than the battery can accept during charging.

pect 0521

Figure 5-21. Bypass diodes in a series array of solar cells

pect 0522

Figure 5-22. A small solar-cell module

If a large enough array of solar cells is used, it might be possible to power a device and charge a battery for nighttime use at the same time, similar to what occurs when a tablet or notebook PC is connected to its charger but it’s still completely usable. When this isn’t feasible, for whatever reasons, a charging control system might employ two batteries. The batteries alternate between charging and active use to ensure that the solar-cell module doesn’t have to work to charge a battery that is also being used to power the electronics at the same time.

For any battery-assisted solar-powered system to work reliably, the current draw of the device using the battery must be low enough that it won’t discharge the battery faster than the solar cell can charge it. This is a balancing act that requires careful consideration of things like the output current of the solar cell, the current consumed by the device, and the average number of days with enough sunlight to produce sufficient charging current.

For systems that don’t need to operate at night, just a solar-cell array might suffice. Solar-powered calculators are an example of this approach.

Fuses and Circuit Breakers

Connecting anything that could be damaged or cause a fire hazard to a source of electrical power without some kind of protection is never a good idea. Fuses and circuit breakers exist to help prevent problems from occurring.


Fuses are sacrificial devices with a low internal resistance. When the current flowing through the device exceeds a certain level for a specific period of time, the device will open (or blow) by melting the internal connection, called the link. In some cases this is gradual, and the link simply opens up, but other times it can be violent, leaving the inside of the fuse tube coated with vaporized metal.

Fuses come in various sizes and ratings, from tiny surface-mounted devices on a circuit board, to huge tubular objects with solid copper end tabs used in AC power distribution applications. Most glass cylinder fuses encountered in electronics fall into the AGW or AGC size category. In addition to standard fast-acting fuses, there are slow-blow, or time-lag types. A time-lag fuse is designed to withstand an over-current condition for a short period of time before it opens. Figure 5-23 shows the AGA-, AGW-, and AGC-type fuses, along with a GMA metric dimension fuse.

pect 0523

Figure 5-23. Common fuse types

Even though size is an important design consideration, it is also important to understand the differences between fuse types. A fast-blow fuse might not allow current spikes such as those encountered with electrical motors, whereas a slow-blow type will. Circuits that exhibit high current draw during turn-on (high inrush current) for more than a few milliseconds might need a time-lag type of fuse. With these types, the fuse will hold some percentage of current over its rated maximum for a specific period of time (which depends on the amount of current involved) before it opens the circuit.

AGC-type fuses, and similar styles, can be used with a fuse holder that is designed to mount through a hole in a panel, or with a fuse clip holder that has two metal clips to capture and retain the fuse. These tend to be large, bulky parts and are found mainly in large pieces of equipment.Figure 5-24 shows a clip-type fuse holder for an AGC-type fuse.

pect 0524

Figure 5-24. AGC clip-type fuse holder

PCB-mounted fuses are available with axial leads in conventional glass tube bodies similar to the AGC type, and as sealed components that resemble resistors. Figure 5-25 shows an example of a PCB-mounted fuse.

pect 0525

Figure 5-25. Printed circuit board-mounted fuses

Surface-mount types are also available in various sizes and ratings. Note that while it is easy to change out a blown fuse if it is mounted in a fuse clip or in a fuse holder, changing out a PCB-mounted fuse can be a bit of hassle for through-hole parts with leads and a downright pain for surface-mounted parts.

Fuse selection can be a complex process, involving things like inrush current profile curves, temperature derating, and surge duration. However, for most small solid-state DC circuits, a standard fast-blow fuse will suffice. Pick a fast fuse with the appropriate voltage rating; that is, rated to blow at approximately 30% to 50% greater current than the circuit will ever use. So, if you have a circuit that should never draw more than 750 mA at 5V, a low-voltage 1A fast-blow fuse would not be an unreasonable choice.

Note that this is simplistic in the extreme and does not take into account what might cause the circuit to draw more than 750 mA. Perhaps it’s not a good idea to allow anything over the maximum. In that case, you would want to use a fuse with a lower current rating.

Selecting a fuse involves doing some research to determine the best type and rating for your application, and that’s well beyond the scope of this book. There are numerous resources online, and most fuse manufacturers publish selection handbooks for their products.

Circuit Breakers

As with fuses, circuit breakers come in a variety of shapes and sizes. The basic mechanism of a conventional circuit breaker relies on current flow to release a spring-loaded mechanical switch of some sort. This might be the result of electromagnetism, in the form of a solenoid, or it might also have a thermal component in the form of a bimetallic strip. A circuit breaker that relies solely on a solenoid is referred to as a magnetic breaker; one that uses only a bimetallic strip is a thermal breaker; and one that includes both a solenoid and a bimetallic strip is called a thermal-magnetic breaker. Figure 5-26 shows a small circuit breaker that operates on the thermal principle.

pect 0526

Figure 5-26. Small thermal circuit breaker

Inside a typical circuit breaker, the internal contacts are held closed by a spring-operated mechanism. When the solenoid is activated or the bimetallic strip deforms, a release is engaged and the spring pulls the contacts apart, thus opening the circuit. The breaker is reset manually with a button or a toggle-like handle.

Although not unheard of, electromagnetic or thermal-magnetic circuit breakers aren’t often found in low-voltage DC electronic circuits, with the exception of some aerospace applications. They are more often encountered in AC power distribution and control systems, such as the breaker panel in a house. Many utility output strips also have a small thermal breaker built into the housing.


As discussed in Chapter 1, electrical current flow arises as a result of energy expended as a form of work to create an electrical potential. This chapter looked at three common sources for electrical potential: primary batteries (conversion of chemical energy to electromotive force), power supplies (conversion of mechanical energy via a generator somewhere to electromotive force), and photovoltaic cells (conversion of photon energy to electromotive force). The chapter wrapped up with a high-level tour of fuses and circuit breakers. All of these subjects are much deeper than what has been discussed here, but to do them full justice would require each to have its own book. For additional information, check out the books listed in Appendix C.

Batteries were examined from the perspective of type, physical form factor, and capacity, with an emphasis on those types most likely to be used or encountered in small electronic devices. Batteries come in a wide range of sizes, capacities, and voltages. The internal chemistry can utilize elements such as lithium, nickel, silver, and zinc, each with its own unique set of characteristics.

When you are selecting a battery, the primary characteristics to consider are size, voltage, capacity, and environment. There are potential trade-off decisions to be made between size and capacity, or between size and voltage. The environment the battery will operate within can also constrain the available choices, or it might require some clever solutions to keep the battery within its rated temperature range.

Power supplies are available with linear or switching modes of operation, with sizes and styles ranging from the common plug-in types for consumer electronics to modular units capable of delivering considerable amounts of current. For linear power supplies, the inherent inefficiency of the voltage regulation is compensated by the ability to easily incorporate a continuously adjustable output, which is why many workbench supplies are linear types. We also looked at the basic operating principles of a switching power supply, which boasts much better conversion efficiency than a linear type, but can be technically challenging to incorporate a variable output. For this reason, most low-cost switching power supplies have fixed output voltage and current ratings.

Photovoltaic solar cells are based on an old technology that is just now starting to come of age. For some applications, such as remote sensing or control, a solar cell is an ideal way to provide power during daylight hours. When coupled with a rechargeable secondary battery, solar cells can extend the useful life of a device to the service life limit of the battery, and possibly beyond.

If you plan on eventually making your creation widely available to others, or perhaps even commercializing it, it would be a good idea to do some further research on batteries and other power sources. Based on what was covered in this chapter, you should now have a good working idea of what is available in terms of batteries, power supplies, and solar cells and how they are used. Depending on what type of device you need to power, you should now have enough information to make an informed initial decision.