Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Channels ▼
RSS

Embedded Space: Chemical Attraction


Jul02: Embedded Space

Ed is an EE, PE, and author in Poughkeepsie, New York. You can contact him at [email protected].


You and I probably want the same PDA: A memory and information booster with no external hardware. I'd cheerfully sign over a cubic centimeter or two of skull space for that, although I wouldn't ever want to change the batteries.

I'd settle for a sheet that I could pull from a pocket and spread on any convenient surface. It would remember everything I do, remind me when and where I should be, and not require any of this HotSync nonsense. It would look a lot like a sheet of paper with a similar pixel resolution, and I'd be able to scribble notes on it with a real pen. What we get instead are fragile, pocket-filling bricks with tiny screens that go blank all too quickly. Why is that?

It's all a matter of chemistry. In this case, battery chemistry.

Let's see what happens when always-on collides with portable, a pair of attributes that encompass an increasing number of embedded systems. We'll find out why the quest for thinner, lighter, smaller, and more usable gizmos poses such interesting problems.

And if you software folks think you can ignore all this chemical stuff, listen up — you're in the solution, too.

Size Matters

My Handspring Visor Neo draws its power from a pair of nonrechargeable AAA alkaline cells and runs for about six weeks at a pop, considerably longer than the current crop of hand/pocket/tablet PCs. It's arguably as fast as it should be, somewhat larger than I'd like, and too heavy at 185 grams. Why not make it thinner and lighter?

When you peer through the transparent case, you can see the designers' dilemma: The battery compartment largely determines the thickness. The LCD panel, which is essentially the whole user interface, sets the width and length. A Neo simply can't get any smaller without major changes.

The Handspring Visor line of PDAs is largely distinguished from competing Palm handhelds by its Springboard expansion slot, which protrudes 8 mm inside the case. The thickness of the LCD panel, circuit board, and inner case wall, plus the slot, adds up to a bit more than the diameter of a standard alkaline AAA cell. Mashing the cells flat won't make the Neo much thinner.

Handspring also offers the Visor Edge, an 11-mm-thick PDA with lithium-ion batteries and an external, low-profile connector that requires an adapter shoe for Springboard modules. Evidently, thin is in and slot is not, at least in the eyes of some users.

Unless you read the product comparison tables closely, you might not notice another interesting fact: The skinny Edge runs about half as long on a single lithium-ion charge as the chunky Neo does on a pair of alkalines.

Same CPU, same memory, same LCD, same OS, newer battery tech, half the run time. What's wrong with this picture?

Battery 101

First, some background. A battery is a collection of identical cells, each of which forms a fundamental unit that cannot be further subdivided. Each cell has two electrodes, labeled positive (+) and negative (-), which provide energy to an external circuit. Between the electrodes is an electrolyte that transports ions but isn't a particularly good electrical conductor. In common parlance, a single cell is often miscalled a battery.

A cell stores energy in chemical form, generally as ions on the two terminal electrodes. A reduction-oxidation chemical reaction provides the energy to move ions through the electrolyte, force electrons through the external circuit, and consume the electrodes. The reaction stops when the ions have all recombined and, in the case of those old carbon-zinc cells, filled up the battery compartment with corrosive goo. The nature of the electrodes and the electrolyte separating them determines the cell's voltage and current capabilities, as well as its propensity for making nasty messes.

A primary cell cannot be recharged because its chemical reactions cannot be reversed. A secondary cell can be recharged by forcing a current through the cell in the opposite direction, chemically converting the electrodes back to their original composition.

Alessandro Volta invented the primary cell around 1800. One of his early batteries, which he called a "pile" because it resembled one, consisted of 60 silver-zinc cells with a saline electrolyte. With all the cells connected in series, he had about 90 volts available for experimentation, although he didn't know that at the time.

He reported hearing noises when he inserted the terminal wires in his ears, seeing lights when he applied them to his eyelids, and experiencing a very unpleasant sensation when he stuck them up his nose. That is, however, what you must do to get a fundamental physical unit named in your honor.

Incidentally, prior to inventing the battery, Volta isolated methane gas and experimented with static electricity. Pop quiz: Given that Volta was male, explain why he combined the two phenomena into a rather showy stage demonstration.

Johann Ritter invented the first secondary cell in 1802. Unfortunately, Michael Faraday didn't get around to discovering the principles of electromagnetic induction until 1830, so Ritter had no practical way to recharge his cells. Think about it: Rechargeable batteries predate wall warts and battery chargers!

Alkaline primary cells and sealed nickel-cadmium secondary cells both date from the 1950s and formed the basis of portable battery technology through the 1990s. Concerns about cadmium's cost and toxicity prompted the introduction of nickel-metal hydride cells in the early 1990s and lithium-ion cells a few years later.

While NiMH and lithium-ion cells are often seen as direct replacements for NiCd cells (and all three as alkaline killers), the subject is far more complex than that. Design factors include capacity, density, voltage, peak current, convenience, and cost, just to name a few. And you thought software was difficult!

Capacity measures how long a cell can deliver current to the external circuit. It's measured in ampere-hours or milliampere-hours (Ah or mAh), which tells you that you can draw either more current for a shorter time or less current for a longer time. Various inefficiencies limit both the current and run time, so the relationship isn't precisely reciprocal.

Energy density gives the size of a cell, in either volume or weight, for a given capacity. The energy stored in a cell is measured in watt-hours (Wh), so you'll see energy density specified in either Wh/kg or Wh/L. Computing the energy requires finding the time integral of the cell's output voltage multiplied by its current at each moment, but you can get a rough estimate by multiplying the cell's nominal voltage by its capacity.

Lest all this seem too esoteric, Table 1 summarizes the results for several cell chemistries. I collected these from a variety of sources, not all of which agree, and suspect that you'll find other values for nearly every entry. We can, however, discern useful trends even from slightly bogus numbers.

It's worth noting that lithium cells, unlike common alkaline cells, can be made rectangular. I estimate that the Edge has about 3/4 of the Neo's battery volume and, thus, can have at most half the run time. That's the price for being thin!

Power Play

When you're designing a handheld device, you want to make it as small and lightweight as possible. The user interface sets the size and, unfortunately, the batteries set the weight. Once you know the overall size and roughly how much volume the electronics and other essential stuff will occupy, the battery gets any leftover space.

Given the battery's chemistry and volume, you can figure out its total energy and, thus, its capacity. Knowing that, you divide by the average supply current to get the run time. Regardless of what that number turns out to be, I predict it won't be large enough.

You can verify this experimentally by observing the success of external battery packs for the latest round of handheld PCs. A Compaq H3850 has a 1.4-Ah lithium-ion polymer battery and a rated run time of something like 10 hours. Various Internet FAQs report that when you crank up the LCD backlight and actually run some applications, you can expect three hours.

Oh, you wanted to use a microdrive and the wireless link, too? Figure on 1.5 hours of intense screen tapping before perusing the in-flight magazine.

The aftermarket external battery pack at http://www.araengineering.com/ipaq .htm increases the run time by a factor of four, which means the pack probably has a 4-Ah battery and outweighs the PDA by a factor of three.

That's the price you pay for quasi-PC performance in a small package: It's either small enough to be attractive or heavy enough to be useful.

Naptime

Being that sort of bear, I thought it would be interesting to see how my Visor Neo manages its power. If a pair of alkaline cells last for six weeks, that means the average drain must be about 3 mA — 2900 mAh divided by a kilohour.

The peak value will be much higher than that, if only because a Dragonball VZ CPU draws 30 mA or so. The minimum isn't zero, either, because a trickle of current must sustain data and applications in the RAM.

I conjured up a current shunt from a scrap of double-sided printed circuit board and a hulking 0.1-ohm resistor. Sliding that between one of the AAA cells and its battery contact routed the battery current through the resistor, where it generated a voltage I could measure with an oscilloscope.

Figure 1 is my post-op Neo lying face-down on my workbench. My first few attempts resulted in lockups requiring complete hardware resets. Fortunately, as with my HP-48GX calculator, the Neo has a little hole in the back over its reset switch.

Figure 2 is the voltage produced when the Neo is active. Each vertical division represents 10 mV, which corresponds to 100 mA of current through the 0.1-ohm resistor. The spikes are about a division tall, so the Neo draws a 100-mA peak, about what I expected from the CPU's current specification.

In between those spikes, however, the Neo turns itself off. By reducing the battery current to nearly zero whenever possible, the Neo dramatically increases its total run time.

The average battery current is the product of the current in each pulse and the duty cycle of the pulses. My eyeball estimate for Figure 2 puts the duty cycle at about 15 percent, so the average current is 15 mA. If the Neo were running continuously at that rate, you'd expect to get 190 hours (2900/15) from a set of batteries.

Turning on the backlight adds a 17-KHz pulse train with a 20 percent duty cycle, which means the average current jumps to about 35 mA. That reduces the run time to 80 hours or so.

The Palm OS includes an automatic power-off timeout that shuts the thing down even when you forget. There's a freeware utility to override that function, of course, but the intent is to prevent you from pulling a dead Visor from your pocket. Because a PDA spends most of its life turned off, power conservation must continue even when it's turned off.

Back in the bad old days, power switches had real metallic contacts that disconnected the power source with an emphatic snap. Unfortunately, that meant the circuit couldn't turn itself off or on, which are pretty much required functions nowadays.

The Neo does have a power switch, but will also wake up when you press any application button or to announce an alarm (typically in a quiet location, alas). Obviously, the power button has become something of a suggestion to the OS rather than a command.

To wake itself up, the Neo can never be entirely off. Figure 3 shows that the familiar 100-mA current pulses now occur every 2 ms or so, as the firmware wakes up enough to look around for active buttons and do any other housekeeping chores.

The duty cycle, now under half a percent, drops the average current to about 400 microamperes. If you never turn it on, a pair of AAA alkalines might last 10 months.

So the moral of the story is that the batteries are always too small, the power budget too large, and the firmware must expect to be running only a few percent of the time.

If this doesn't mark the end of idle loops as timing devices, I don't know what will!

Reentry Checklist

Jason Flinn covers the portable power-management field in his masters thesis at http://www.cs.cmu.edu/~jflinn/papers/thesis.pdf.

The Internet provides everything you need to know about batteries except, perhaps, the time to read it all. An excellent battery technology summary comes from, of all places, the U.S. Department of Justice at http://www.ncjrs.org/pdffiles/172868.pdf. Reading http://www.powerpulse.net/powerpulse/archive/aa_040201b1.stm gives you an education in battery life expectancy.

Search for "hydride" at http://www.extremetech.com/ to get the article "Batteries: History, Present, and Future of Battery Technology." You can also glean info from various battery manufacturers' web sites.

You can find pictures of early cells and batteries at http://www.chemheritage.org/OthmerLibrary/PictorialCollection/Batteries.htm and many other places on the Internet. A Google search on a battery chemical name plus words like artifact or collection, will do the trick.

When you get tired of all that, search for "free energy"+battery and see what pops up. Remember, if it seems too good to be true, it probably is. On the other hand, those batteries won't dissolve into fizzing goo, which might be worth the price of admission.

DDJ


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.