An encoder is a sensor that tells a machine where something is and how fast it is moving. A magnetic encoder does this with a magnetized wheel or strip and a sensor that reads its magnetic pattern — no light, no lenses, nothing to block.

Here is the idea in one line: a magnetized disc or strip moves past a sensor chip, and the changing magnetic field tells the electronics exactly how far the part has traveled.

How it reads position

The moving part carries a pattern of north and south poles. As it passes the sensor, the field flips between poles. The chip — usually a Hall sensor or a magnetoresistive sensor — counts those flips, and the electronics turn them into position, direction and speed.

Incremental encoders count changes from a starting point: simple and cheap, but they forget where they were if power is lost. Absolute encoders read a unique pattern for every position, so they always know where the machine is, even after a power cut. If a robot arm must never lose its place, choose an absolute encoder.

Why magnetic beats optical in dirty places

Optical encoders read marks on a glass disc with light. They are very precise, but dust, oil, grease and condensation can block the light and cause errors. Magnetic encoders sense fields, so dirt barely matters — which is why they dominate motors, robots, CNC machines and factory automation, where oil and metal chips are everywhere.

Practical tip

Magnetic encoders need a stable gap between the sensor and the magnetized part — too far and the signal weakens, too close and parts can rub. Follow the sensor supplier's recommended gap, and re-check it after assembly.

Read on: how Hall sensors work → · multipole rings →