Comparison
Absolute joint encoders for a stepper robot arm without homing
Short answer
Fit a single-turn magnetic absolute encoder to the output side of each joint, after the gearbox: it reads the joint angle the moment the arm powers up, so no homing move or switch is needed. A 14-bit part resolves about 0.022 degrees per count, roughly 0.12 millimetres at the tip of a 300 millimetre link.
On this page
- How do you get absolute joint position on a stepper arm without homing switches?
- Which sensor should each joint use, magnetic absolute, quadrature, or a geared potentiometer?
- How much encoder resolution does a robot joint need?
- Should the joint encoder sit before or after the gearbox?
- How close must the magnet sit to the sensor?
- How do you wire six joint encoders to one controller?
- How do you zero the joints and set the step counter at boot?
- How do you verify the arm knows its pose after power cycling?
- Questions asked
A stepper joint starts life with no idea where it is pointing, and every lost step is a permanent angle error until the axis re-homes. The way to remove homing switches from the design entirely is to mount a single-turn magnetic absolute encoder on the output side of each joint's gearing: the sensor reads the angle of a diametrically magnetized disc magnet on the shaft and reports the joint position the moment it boots. This article compares the three sensor families that come up for the job — magnetic angle sensors such as the AS5048A/AS5048B, AS5047D and AS5600, incremental quadrature encoders, and geared potentiometers — and settles placement, resolution, wiring, zeroing and bench verification.
How do you get absolute joint position on a stepper arm without homing switches? #
Mount a single-turn magnetic angle sensor, an AS5048-class or AS5600-class part, on each joint output after the gearbox, with a diametrically magnetized disc magnet on the shaft; the sensor reports the absolute angle the moment it powers on, so the controller knows every joint's pose with no homing move.
Absolute here means single-turn: the output wraps every 360 degrees of the sensed shaft, which covers any joint whose travel stays inside one turn. That is the property a quadrature encoder lacks — it reports only changes in angle and starts every boot at a count of zero, wherever the joint physically sits.
Reading the angle does not by itself correct position error, though: a step-pulse-driven stepper keeps missing steps exactly as before, and whether encoder feedback makes the axis a servo is a separate question, covered in Does an Encoder Make a Stepper Motor Closed Loop.
Which sensor should each joint use, magnetic absolute, quadrature, or a geared potentiometer? #
Use a magnetic absolute angle sensor on every joint that needs a power-up pose: the AS5048A/AS5048B and AS5047D parts resolve 14 bits and the AS5600 resolves 12, all single-turn, while quadrature encoders bring homing back and a geared potentiometer adds wiper wear and analog noise.
| Family | Output at boot | Absolute at power-up | Main constraint |
|---|---|---|---|
| AS5048A / AS5048B | 14-bit angle register (SPI on the A, I2C on the B) | Yes, single-turn | Diametric magnet on the shaft axis; field strength must sit inside the datasheet window |
| AS5047D | 14-bit angle register, with incremental output modes per its datasheet | Yes, single-turn | Same magnet geometry; datasheet maximum speed 14,500 rpm |
| AS5600 | 12-bit angle over I2C, with analog and PWM output options | Yes, single-turn | Lower resolution; fixed I2C address complicates a multi-joint bus |
| Capacitive quadrature modules (CUI AMT2xx / AMT3xx) | Quadrature A/B, index on some models | No — the count starts at zero | Brings the homing move back; match the module to the shaft bore |
| Geared potentiometer | Analog voltage | Yes, across the geared range | Wiper wear and analog noise; the ADC sets the usable accuracy |
A quadrature encoder counts A/B edges, so its count says nothing about where the joint sits at power-up; anchoring that count is exactly the homing problem this design set out to remove, described for incremental axes in Homing an Incremental Encoder Axis Without a Proximity Switch. Where a joint can still home against a hard stop, the A/B-and-index behavior of such modules is laid out in a panel-mount rotary encoder primer on A/B quadrature output.
A potentiometer geared down from the joint does give an absolute voltage across a multi-turn travel, but the wiper wears, the track adds noise, and the ADC's resolution and reference set the accuracy — it degrades precisely while you are not watching it. Treat it as the choice for non-critical joints only.
The decision per case: magnetic absolute post-gear for every joint that must know its pose at boot; quadrature only where a homing stop already exists; potentiometer only where a wrong angle costs nothing.
How much encoder resolution does a robot joint need? #
A 14-bit part resolves 0.022 degrees per count, about 0.12 millimetres of tip motion on a 300 millimetre link; a 12-bit part resolves 0.088 degrees, about 0.46 millimetres on the same link, and both sit below the backlash and belt compliance of a typical stepper arm.
Resolution follows from the bit depth N that the datasheet states, as step = 360 degrees / 2^N:
- 14-bit (AS5048A/AS5048B, AS5047D): 360 / 16384 = 0.02197, about 0.022 degrees per count. At the tip of a 300 mm link, 0.022 x pi / 180 = 0.000384 rad, so the tip moves 300 mm x 0.000384 = 0.115 mm, call it 0.12 mm.
- 12-bit (AS5600): 360 / 4096 = 0.0879, about 0.088 degrees per count. 0.088 x pi / 180 = 0.00154 rad, so the same tip moves 300 mm x 0.00154 = 0.46 mm.
These are calculated examples for those inputs, not measured results, and a post-gear sensor delivers them directly at the joint because it measures joint angle rather than motor angle. They are step sizes, not accuracy: size any tolerance claim on the datasheet accuracy figure of the exact part, never on the count width.
Should the joint encoder sit before or after the gearbox? #
Put it after the gearbox, on the joint output: a 50:1 reduction turns a 3,000 rpm motor shaft into 60 rpm at the sensor, far inside the AS5047D's 14,500 rpm datasheet ceiling, and the post-gear sensor sees the true joint angle including backlash and any lost steps.
| Criterion | Post-gear, on the joint output | Pre-gear, on the motor shaft |
|---|---|---|
| Absolute joint angle at power-up | Yes, inside one turn of joint travel | No — ambiguous by the gear ratio |
| Sensor shaft speed at 3,000 rpm motor, 50:1 | 60 rpm | 3,000 rpm |
| Sees backlash, compliance and lost steps | Yes | No |
| Step size at the joint | The sensor's own 0.022 degrees (14-bit) | Sensor step divided by the ratio, but the pose stays ambiguous |
Speed is not the limiting factor — even a full 3,000 rpm on the motor shaft sits well below 14,500 rpm — but magnetic sensors have a finite conversion latency, so the reading lags the true angle by shaft speed times latency, and the AS5047D datasheet notes that latency is internally compensated only at constant rotation speed. Post-gear mounting keeps the sensor shaft slow and that margin wide.
The deeper reason is what the sensor measures. Post-gear it reads joint angle directly, so backlash, compliance and skipped steps all appear in the number. Pre-gear it reads motor angle, sees none of the backlash, and one sensor turn maps to several joint positions after the ratio, which is why the pose cannot survive a power cycle.
How close must the magnet sit to the sensor? #
Set the air gap so the field at the sensor lands inside the AS5048's datasheet window of 30-70 mT: mount a diametrically magnetized disc magnet in the shaft end, hold the sensor on a fixed bracket facing it, and verify the gap against the datasheet's field-strength limits.
Three geometry errors decide the accuracy you actually get:
- Concentricity: offset between the magnet center and the sensor center distorts the field angle and appears as a once-per-turn sinusoidal error.
- Air gap: outside the 30-70 mT window the AS5048 flags a weak or strong field or loses accuracy, so set the gap by measurement rather than by eye.
- Stray fields: a stepper motor leaks flux, and a sensor mounted near the motor body or a ferrous bracket shifts its reading with coil current — keep the sensor clear of the motor and the surrounding iron.
Design the magnet pocket into the CAD from the start: disc magnet pressed into the end of the output shaft, sensor board on a fixed bracket facing it. For arms that route cabling through the joint axis, check whether the sensor family offers an off-axis sensing mode before committing to the geometry. If a joint cannot take a magnet on the shaft end at all, a belt-and-pulley transfer to the sensor is one alternative, and the tradeoffs are compared in Timing Belt vs Direct Mount for a Rotary Encoder.
How do you wire six joint encoders to one controller? #
Give SPI parts one chip-select line per sensor, and never put fixed-address I2C parts like the AS5600 on a shared bus without a multiplexer, because six identical addresses collide; confirm the addressing options in the datasheet of the exact part before routing the bus.
The AS5048A speaks SPI and the AS5048B speaks I2C, while the AS5600 is I2C with a fixed address, so six of them on one bus answer to the same number. Plan an I2C multiplexer, pick a variant with address pins, or split the joints across interfaces so each sensor has a unique path — whatever the datasheet of the chosen part permits. Route encoder runs away from stepper coil leads: twisted, shielded cable with the shield grounded at the controller end is the usual practice for low-level angle signals near switched motor current.
How do you zero the joints and set the step counter at boot? #
Calibrate each joint at build time: park it at a known mechanical reference, store the raw reading as its offset, and at every boot compute the angle as raw minus offset wrapped to the travel range and load it into the step counter — no homing move.
- Assemble the joint with the magnet seated and the gap set to the values above.
- Move the joint to its mechanical zero — a fixture or hard stop used only during the build.
- Read the raw angle and store it as the joint's offset in nonvolatile memory, or write it to the sensor's zero register if the exact part supports one.
- In firmware compute joint angle = raw - offset, wrapped so the wrap point sits outside the travel window; the angle then never jumps across 0/360 during motion.
- At every power-up, read the angle first, then set the step counter to match it, so the commanded position starts correct without a homing pass.
How do you verify the arm knows its pose after power cycling? #
Command a move of a known step count, read the joint angle back, and power-cycle the arm after jogging a joint by hand: if the reported pose matches the physical pose at boot with no homing pass, the absolute feedback is doing its job.
Run the checks at several speeds and loads, in both directions, and read the error signature:
- Error that grows with load: stepper torque shortfall and missed steps; reduce acceleration or speed, or raise current within the motor's rating.
- Error that tracks coil current: stray field coupling into the sensor; move the sensor away from the motor body or change the bracket material.
- Once-per-turn sinusoidal error: magnet eccentricity; re-center the magnet in its pocket.
- A difference between the two approach directions: backlash in the gearing; measure it and compensate in software.
The power-cycle test is the one this whole arrangement exists for: pose reported, no homing. Keep everything the arm can reach clear while jogging joints, and treat these bench checks as build verification, not as a safety validation of the cell — that belongs to the machine's risk assessment.
Questions asked
What if a joint has to rotate more than 360 degrees?
A single-turn sensor repeats its reading every revolution, so past one turn the angle is ambiguous. Keep the joint travel inside one turn, choose a multi-turn absolute part, or add a small turn-counting sensor that also keeps its count across power cycles. Confirm the joint's full travel range before you fix the sensor choice.
Can I mount the encoder on the motor shaft and divide the angle by the gear ratio?
You can track motion that way, but the pose is not absolute: one sensor revolution maps to several joint positions, so after a power cycle the controller cannot tell which of them the joint sits at. A motor-shaft sensor also never sees the backlash, compliance or lost steps that a joint-output sensor measures.
How much jitter in the angle reading is normal at standstill?
One or two counts of flicker is normal on these magnetic parts. A value that wanders rather than flickers usually points to a marginal air gap, a loose magnet, or a noisy supply rail. A moving average in firmware steadies the reading for a control loop, but remember the filter adds delay to any correction that uses the angle.
Does a 14-bit sensor measure the joint angle to 0.022 degrees?
No. 0.022 degrees is the step between adjacent counts, not the accuracy. The datasheet accuracy figure for these sensors is an integral nonlinearity value, which is wider than the step, so size any positional tolerance claim on the accuracy line of the exact part's datasheet, not on its bit depth.