Anelok: battery results, and problems

Werner Almesberger werner at
Fri Feb 6 21:19:42 UTC 2015

I made a first attempt to run Anelok from a CR2032 cell. The good
news it that this time it did at least power on :)

Further good news is that the capacitive sensor worked somewhat.
It was a bit "nervous", probably reflecting oscillations in the
supply voltage, but I'm quite happy that it responded at all,
because this means that running on battery affects
self-calibration and the thresholds only lightly.

The not so good news is that things degraded quickly afterwards,
with battery voltage rapidly declining and the resulting voltage
difference between MCU and OLED breaking communication between
the two after a minute or so.

I first suspected that the battery was just too old. It's been
sitting in a drawer for maybe five years. The expiration date is
2018, but who knows if that considers the Buenos Aires climate ?

So I set up an experiment to verify the discharge profile of the
battery (a new one, from the same batch), based on the profile
published by Energizer:

Load resistance is 15 kOhm (+/- 5%, I will measure the exact value
when the experiment is done), ambient temperature about 25-35 C.

This is what the result look like after the first ~115 hours:

The green lines are
- an approximation of the nominal profile for an Energizer cell
  fresh from the factory,
- corrected for 5 years of age (capacity loss 1% p.a.),
- corrected for my battery being a Sony with a nominal capacity
  of only 220 mAh instead of Energizer's 240 mAh

  The batteries I have don't say "CR2032B1A" anywhere and the nominal
  capacity isn't indicated anywhere on the package. So I'm just
  assuming that Sony CR2032 cells don't differ too much from each

The blue line is the battery voltage under load, i.e., with the 15
kOhm resistor connected. The up and down swings follow the ambient
temperature, with a higher temperature raising the voltage.

After witnessing the initial steep drop from 3.3 V down to about
2.9 V I thought I had my smoking gun, but then the voltage
stabilized and until now the battery has delivered about 10% of its
nominal capacity and it doesn't look as if it was about to quit. 

The red lines indicate what Anelok will find comfortable:
- the lower line is at 2.64 V, which is the minimum Vih of the OLED,
  i.e., the minimum voltage the MCU must deliver for a signal to
  be recognized as "high" by the OLED,
- the upper line adds the expected voltage drop of the CR2032 for a
  20 mA load, assuming that the inner resistance of the battery is
  a constant 20 Ohm.

As one can see, that threshold is above the nominal voltage of the
battery and maybe the only thing that makes this work at all is that
a new battery overshoots its nominal voltage a bit.

The mistake I made is that I underestimated the voltage the OLED
would need on its signal lines, and somehow missed this when
going through the data sheet.

A Vih 80% of the supply voltage is quite high, and most chips are
happy with 70% or even less. Alas, not this one.

I hope this can be solved by just rewiring the output of the
boost converter such that it feeds the MCU(s) as well and not only
OLED and memory card.

When the boost converter is disabled, it outputs the input voltage,
i.e., the battery voltage, which should be quite sufficient for the
few things Anelok does while the display is off (mainly sleep). 

If this works, it will result in a slight overall increase of power
consumption, and a possibly significant increase of momentary peak
current. I'm a little worried about the latter, but we'll have to
see what this means for real-life device performance.

For now, I'll keep watching the battery discharge. That will also
tell me whether I can still trust my stash of CR2032 cells, and if
not, it may mean that I should also test any supposedly fresher

- Werner

More information about the discussion mailing list