back to index

Lithium battery replacement with Li-ion for small devices


Why
How
      cells vs chips
      charge tracking
      cells chosen
      method with diode
            temperature dependence
      method with regulator
Sensors teardown
      Xiaomi
            modification for Li-ion, diode version
      Sonoff SNZB-02
            modification for CR2032 battery
            modification for Li-ion, regulator+diode version
            modification for Li-ion, diode version
            final outcome
            possible further modifications
RF consideration
Results
Todo

Why

For distributed sensing, off-the-shelf Zigbee units are a tempting solution. Usually they are fed from a primary cell, most often a 3V lithium button cell, usually a CR2032 or CR2450.

These cells have limited lifespan. Then they require a small expense, some logistics and often considerable annoyance.

With availability of Li-ion rechargeables, a retrofit is possible. The annoyance of not having a cell on hand is swapped for the considerably lower annoyance of bringing a powerbank with charger module to the battery and letting it feed for a hour or three - while the sensor can continue doing its job.


How

cells vs chips

The chips of the sensors are rated for certain absolute maximum voltage; often 3.6 or 3.9 volts.

The button cells have 3.2 volts at full charge, then quickly drop to 2.9 volts and slowly decay to 2.8V, then more quickly down to 2 volts when the battery is considered dead.

The Li-ion cells have 4.2 volts at full charge, then somewhat quickly fall to 3.7 volts and more or less hold there, then quickly go down to 3 volts when the internal protection circuit disconnects the cell.

charge tracking

The sensor units monitor their battery state. At 3 volts they consider their cell to be full. Then interpolate the battery percentage down to minimum viable voltage of the cell (2V?).

A Li-ion cell past the regulator can happily look like a fully charged coin one, up until the moment the protection circuit triggers and the sensor goes dead without any warning.

This have to be taken into account if awareness of need to recharge the battery is needed.

Depending on what fraction of volt is shaved off, the battery full-empty continuum may not map perfectly to the range of the Li-ion cell. At least some awareness can however be provided.

cells chosen

The Tenergy 650mAh RCR123a cells were chosen on the basis of local availability, and very low internal discharge. They can last half-charged for years when not loaded. Ideal choice for such small sensors.

A house-standard charging connector was soldered to the negative side of the cell. Ordinary 0.1"/2.54mm header pin strip was chosen, 3-pin female; outer two are the negative/GND, the center one is positive. This pinout allows the connector to work in both orientation, and the outer pins can double as mechanical attachment to the battery.

method with diode

A diode characteristics shows some plateau at low forward-bias voltages. The nominal voltages are about 0.7V for silicon P-N junction diodes, and 0.3V for Schottky diodes. These are however listed for some nonnegligible current.

(Diode characteristics borrowed from Wikipedia)

A multimeter with diode-drop sensing will load the diode with give or take a milliamp. That's quite a high current in this context, more than the idle consumption of the sensor unit. The critical part of the characteristics is not often mentioned and some measurements were needed.

The diode should take away couple hundred millivolts when the sensor is idle, and not much more when loaded.

For silicon P-N diodes at low currents, the forward drop was ranging from 0.45 to 0.65 volts, give or take. Curiously, both extremes were found on 1N4148 diodes. A higher-drop one is better to be selected here.

5.1V zener diodes shown a slightly higher forward voltage on multimeter but very similar drop at low current. As no advantage is provided at low currents and the higher drop provides disadvantage when transmitting, zeners were chosen against.

For Schottky diodes, the low-current forward drop was negligible. Schottky diodes are unsuitable for this use. (Here goes the idea of stacking a P-N diode and a Schottky one.

The forward drop of LEDs is too high even for infrared ones.

A varactor (or varicap) promises higher forward voltage.

The Xiaomi sensor used here employs a JN5169 chip, with absolute maximum rating of 3.6V. Exceeding it stresses the chip and even getting too close for too long may lower its life expectancy.

For 4.2V at full charge, a minimally 0.6V diode was needed. It was selected from the supply box of diodes new and reclaimed. A higher-drop 1N4148 was chosen.

The diode voltage drop has to be measured in-circuit, across the diode. The current going through the meter then bypasses the diode and does not influence the readout. Here, even the rougly 10 megaohms of the input impedance may introduce annoying error.

More caution has to be exercised for 3.6V-rated chips. For 3.9V ones (eg. CC2530) a lower-drop diode will only shift the moment when the battery depletion will start showing.

Diodes can be connected in series. Usually this results in moving the too-low drop situation into the too-high drop one, utilizing only smaller parts of the cell capacity before the sensor croaks. The drop differences at low vs high current will also add up. A combination with a LDO regulator may be necessary in these cases.

Margins:

temperature dependence

CAUTION: The diode characteristics is strongly temperature-dependent. At lower temp, the drop increases. At higher temp, the drop can decrease. Both fairly significantly, especially in outdoors environments.

The change is about 1.8 mV/°C for silicon diodes. Assuming a possible 50°C swing, diode drop of 600 mV, and a lab temperature +25°C (some like it warm), the voltage drop will move to 500 mV at 75°C and 700 mV at -25°C.

Beware, the battery voltage also changes with temperature, in the opposite direction; increases with temperature (when the diode drop decreases), and vice versa. The effects add up. Especially at high temperatures the chip could be exposed to excessive voltage when the cell is fully charged. Low temps may just lead to falsely exaggerated discharge reports.

Make sure the margins will allow these changes. If the environment is outdoors, or otherwise subjected to more extreme temperatures, prefer the regulator method, with or without the additional diode.

method with regulator

The safest method is a low-dropout regulator. 3.3V output voltage is sufficient, no need to use 3.0V ones. It can be added between the new battery and the socket for the original one.

A type with very low quiescent current has to be chosen. The sensor power consumption is minuscule, tens of milliamps at short pulses with extremely long periods of next to nothing. Any regulator will do. Output side capacitor may be omitted as the capacitor is already on the board. Input capacitor may also be skipped, though instabilities may occur. Then add it.

The advantage is a high safety of the unit's chip, and the unit can be run even from eg. USB power. Also, very stable output voltage.

The disadvantage is too stable output voltage. The unit won't see how much the battery is emptied. Also, the regulator chip has to be sourced, if not already on hand in the parts box.

A possible (and tested) remedy for the  is a suitable silicon diode in series with the battery, on the input side of the regulator. Then the regulator shaves off excess voltage, but loses voltage when the cell is getting empty, which allows the chip to report low battery status.


Sensors teardown

Xiaomi

A fairly small round button, wall-mountable with a circular doublesided foamy tape.


unit, front view

unit, back view, lid removed

unit, sensor side

unit, button side

unit, board

unit, portions

board, battery side

board, chip side

board, chip side

board, chip side

board, chip side

board, chip side

Tasmota Zigbee gateway ZbStatus3:

modification for Li-ion, diode version

A series diode was soldered to the positive battery terminal. A wire was led to the Li-ion battery terminal. The negative battery terminals were connected directly.


battery attachment

battery attachment

Sonoff SNZB-02

Square box, bigger than Xiaomi one; circuitboard allows for both square and round designs

On one of five sensors, the button was poorly soldered and mechanically detached from the board by the mechanical pads. The electrical contacts still held. Simple repair, possible weak spot as-manufactured.


sensor, top

sensor, bottom

sensor, button side

sensor, sensor side

opened sensor

opened sensor

board

board, battery side

board, battery side

board, chip side

board, chip side

board, chip side

Tasmota Zigbee gateway ZbStatus3:

modification for CR2032 battery

When the less-common more-expensive CR2450 is not available, and battery life in application is not critical (testing, improvisation...), a CR2032 can be made to fit using two pieces of folded cardboard (or any other dielectric matter), one on the side to compensate diameter, the other on the top to compensate for thickness.

A 3d-printed adapter can be made, for the ones who appreciate unnecessary luxury.


CR2032-to-CR2450 adapter, side+top

CR2032-to-CR2450 adapter, side

modification for Li-ion, regulator+diode version

The trace from the positive battery terminal was cut near the capacitor. The solder mask was ground away, exposing bare copper on the ends of the severed trace and on nearby ground plane.

A XC6206P332MR (SMD code 662K, datasheet) was used as the LDO. The quiescent current is just one microamp (typ., max 3 µA).

A diode was soldered between the negative battery terminal and the negative side of the Li-ion, on the Li-ion side of the wire, based on ease of attachment, and covered with a heatshrink tube.

The regulator is there for limiting the voltage for the chip. The diode causes further drop to allow the chip to see at least some of the battery discharging. Its drop is about 580 mV.


wiring cut

wiring cut

regulator soldering pads

regulator soldering pads

regulator on board

regulator on board

regulator on board

battery attachment

modification for Li-ion, diode version

For one of the sensors, the regulator was removed to test the diode-only configuration.

final outcome


sensor with battery

sensor with battery

possible further modifications


RF consideration

Take care of the position of the antenna of the unit. Place the battery away as possible, to avoid attenuation of the signal and screwing up the radiation pattern.


Results

The sensors seem to be happy with the new cells. Long-term observation commenced.


Todo


If you have any comments or questions about the topic, please let me know here:
Your name:
Your email:
Spambait
Leave this empty!
Only spambots enter stuff here.
Feedback: