Encoders 101: How a Joint Knows Its Own Position
A robot can't control what it can't measure, and position is the single most basic thing every joint has to measure.
An encoder converts a joint's mechanical position into an electrical signal the controller can read. Optical encoders use a patterned disc and light sensor; magnetic encoders track a rotating magnet with a Hall-effect or magnetoresistive sensor; both are common in robotics, with magnetic types often preferred for their tolerance of dust and vibration.
Absolute vs. incremental
An incremental encoder only reports changes in position, so it needs a homing routine at startup to establish an absolute reference — you'll see this as a robot's joints doing a small calibration wiggle when powered on. An absolute encoder always knows its exact position, even right after power-up, at the cost of more complex electronics.
Single vs. dual encoders
Placing an encoder on both the motor shaft and the gearbox output lets the controller directly measure and compensate for backlash and gearbox flex, rather than assuming the output moved exactly as much as the motor commanded — a common upgrade in joints where precision matters most.