By Tolerance Labs engineering team · Updated
A joint with a reducer turns its motor many times per output turn. If the joint loses count of those turns while it is switched off, it starts at the wrong angle or must home before it can move.
Why the turn count matters
A single-turn absolute encoder on the motor knows the motor angle but not which turn it is on. Encoders for robot joints explains encoder types and placement. This guide covers how a multi-turn count survives power loss, how long a battery lasts, and what to do when the count is lost. Re-teaching the zero follows the procedure in calibrating a robot joint.
A dead battery is only one way to lose the count. Transport with the battery disconnected, fast manual motion while off, and an unplugged cable can all do it.
Battery-backed turn counters
The most common method keeps a small part of the encoder alive from a battery while main power is off. A low-power circuit samples a magnetic sensor at intervals, counts each full turn and stores the count. When main power returns, the encoder combines the stored count with the single-turn angle.
- Speed while off. The counter samples only so often to save current, so it can track only up to a maximum speed while off. Turning the joint faster, by hand or in transport, loses the count. Ask for this speed.
- Alarms. Most encoders report a low-battery warning before the count is at risk, and a multi-turn error once it is lost. Check that your drive reads and reports both.
Worked example: battery life
Battery life is capacity divided by average current. The current that matters is standby current with main power off, typically a few microamps for a counter of this kind. Use the maker’s figure.
- One encoder with a standby current of 5 µA (assumed), on a coin cell of about 220 mAh: 220 ÷ 0.005 = 44,000 h, and 44,000 ÷ 8,760 ≈ 5.0 years if the robot is always off.
- If the robot is powered 40% of the time and the battery supplies almost nothing then: 0.6 × 5 = 3 µA on average, and 220 ÷ 0.003 ≈ 73,000 h, about 8.4 years.
- Six encoders sharing a 2,400 mAh pack (assumed), always off: 6 × 5 = 30 µA, and 2,400 ÷ 0.030 = 80,000 h, about 9.1 years.
- Derated to 70% of capacity for self-discharge, cold and aging: 0.7 × 9.1 ≈ 6.4 years.
Plan for the always-off case of storage and transport. An encoder that draws 50 µA cuts each figure tenfold. Replace batteries on a schedule well inside the estimate, not when the alarm appears, and mark the date on the robot.
Battery-free multi-turn
Wiegand-wire energy harvesting. A Wiegand wire is a specially treated ferromagnetic wire whose magnetization flips suddenly when an external field passes a threshold. Each flip induces a short voltage pulse in a pickup coil, and the energy in that pulse does not depend on how fast the field changes. A magnet on the shaft flips the wire as it turns, and the pulse powers a circuit long enough to register the turn in nonvolatile memory, often FRAM. The encoder counts turns with no battery, even at very low speed.
Geared multi-turn. A small gear train drives one or more extra code disks at reduced speed, so the turn count is read mechanically at power-up. For example, three stages of 16:1 give 16 × 16 × 16 = 4,096 distinct turns. The costs are size, mass, gear wear and a lower maximum speed.
| Method | Battery | Count kept if turned while off | Main cost |
|---|---|---|---|
| Battery-backed counter | Yes | Up to the counter’s speed limit | Battery checks and replacement |
| Wiegand energy harvesting | No | Yes | Encoder cost and fewer suppliers |
| Geared multi-turn | No | Yes, within the gear range | Size, mass and gear wear |
| Motor and output encoders | No | Yes, within the range the ratio allows | A second encoder and its wiring |
Dual encoders and the vernier
A joint with a single-turn absolute encoder on the motor and another on the output needs no counter. At power-up, the output angle θo tells the controller which motor turn it is on. With ratio N and angles in degrees, the turn index is k = round((N × θo − θm) ÷ 360°).
Example: N = 50, the motor encoder reads θm = 145.0°, and the output encoder reads 38.92°. (50 × 38.92 − 145.0) ÷ 360 = (1,946 − 145) ÷ 360 = 1,801 ÷ 360 ≈ 5.003, so k = 5. The motor is at 5 × 360 + 145 = 1,945°, and the output at 1,945 ÷ 50 = 38.90°. That works while the output encoder error, times the ratio, stays well under half a motor turn: here 180° ÷ 50 = 3.6° at the output, which most encoders meet easily.
With an integer ratio the pattern repeats every output revolution, so the pair of readings is unique over one output turn only. That is enough for most joints. For an output that turns several times, such as a continuous wrist roll, a non-integer ratio extends the range like a vernier scale. If the ratio is p/q in lowest terms, the readings repeat only after q output turns. A ratio of 19/3, about 6.33:1, gives a unique position over 3 output turns. The price is margin: the q possible answers sit only 360° ÷ q apart at the motor, so the output error times the ratio must stay well under 180° ÷ q, here 60°, which is about 60 ÷ 6.33 ≈ 9.5° at the output.
Count range for a high-ratio joint
- A joint with a 160:1 reducer and a range of ±270°, 540° in total, turns its motor 160 × 540 ÷ 360 = 240 times across the range.
- A count of 240 needs 8 bits, since 2⁸ = 256. Common counters of 12 or 16 bits, 4,096 or 65,536 turns, leave ample margin.
- A 17-bit single-turn reading plus a 16-bit turn count makes a 33-bit position. That does not fit a 32-bit integer, so check that the drive and your software use 64-bit values or handle the wrap.
Continuous rotation needs one more check. A 16-bit counter wraps after 65,536 motor turns, which is 65,536 ÷ 160 = 409.6 output turns. Because that is not a whole number, the computed output angle jumps at the wrap unless the drive or software tracks it. Choose a counter range that is a multiple of the ratio, or let an output encoder supply the angle.
When the battery dies, and replacing it
A lost count shows as a multi-turn error or an invalid-position flag. The single-turn angle is still correct, but the joint angle may be off by a whole number of motor turns, which on a 160:1 joint is a multiple of 360 ÷ 160 = 2.25° at the output. An error that small looks plausible, so do not clear the alarm and run: joint limits and the robot model depend on that angle.
- Move the joint at low speed and low torque to a reference: a fixture, a dowel hole or a datum mark.
- Reset the multi-turn count with the drive’s tool, and re-teach the zero.
- Check every limit at low speed before running a task.
Replace the battery with main power on, so the encoder runs from the drive while the battery is out. Follow the maker’s procedure and keep the encoder cable connected. Some designs hold the count for a short time on a capacitor; rely on that only if the maker states the time. Lithium cells are subject to transport rules, so some makers ship robots with the battery disconnected. Plan a reset on arrival.
Checklist
- List the cases where the count can be lost: dead battery, transport, manual motion while off, service.
- Choose battery-backed, Wiegand, geared or dual-encoder sensing to match those cases.
- Compute battery life from standby current and capacity for the always-off case, and set a replacement interval inside it.
- Confirm the speed limit while off, and that the drive reports low-battery and multi-turn errors.
- For dual encoders, check output encoder error against the ratio, and use a non-integer ratio only with its smaller margin.
- Size the counter for the joint range, and handle the wrap for continuous rotation and 32-bit values.
- Write a re-homing and battery replacement procedure before the robot ships.
Browse encoders, harmonic joint modules and high-ratio joints, and compare encoder options in Robot Parts.
More guides
Not sure what fits? Tell us what you're building.
We procure every part of the robot. Send a sentence or a BOM and we come back with options and a landed quote.
Send a request