Views: 0 Author: Site Editor Publish Time: 2026-08-28 Origin: Site
In industrial automation equipment, CNC machine tools, robot joints, servo motors, and similar applications, optical encoders are common angle and position feedback components. However, they have a "delicate" weakness: they are sensitive to dust, oil, vibration, and high temperatures. Once the internal grating is contaminated or the light source ages, the equipment may report errors, lose steps, or even go out of control.
In recent years, more and more maintenance personnel have begun to consider an alternative approach: replacing the original optical disc with a magnetic encoder disc while keeping the original mounting position and signal interface, thereby giving old equipment a "new lease on life."
A typical optical encoder consists of an LED, a grating disc, a photodetector, and signal processing circuitry. Light from the LED passes through the rotating disc's slits, creating alternating bright and dark patterns, which the receiver converts into pulse signals.
The main failure causes include:
Ingress of dust, oil, and moisture: blocks the optical path, causing pulse loss or false triggering;
Vibration and shock: glass discs are prone to cracking, and metal discs may also deform;
High temperature and aging: LED light attenuation reduces signal amplitude, eventually leading to unreliable triggering;
Contamination of the grating: cutting fluids, lubricant vapours, and other substances form films on the disc that are very difficult to clean.
These problems are particularly prominent in harsh environments such as textile, woodworking, metal machining, and construction machinery. In many cases, the electrical parts of the equipment are still in good condition, but the encoder triggers alarms frequently.
The basic idea of the magnetic encoder solution is to replace optical on/off switching with magnetic field variation.
It typically consists of two parts:
Magnetic encoder disc / magnetic ring
A disc or ring mounted on the rotating shaft, with a pattern of multiple magnetic poles (N/S alternating) distributed according to a defined rule on its surface. The number of pole pairs can range from a few to several tens.
Magnetic sensor
Positioned close to the side or face of the magnetic ring. Common types include Hall sensors, AMR (Anisotropic Magnetoresistance), and TMR (Tunneling Magnetoresistance). The sensor detects changes in magnetic field direction or strength and outputs sinusoidal or square wave pulses.
Based on the mounting configuration, magnetic encoders can be further divided into:
Shaft-end type: magnet attached to the shaft end face, sensor facing the end;
Off-axis / ring type: magnetic ring fitted over the shaft, sensor reading radially or axially;
Integrated magnetic encoder chip: sensor and signal processing integrated into a single IC, such as popular series like AS5047, TLE5012, MA730, etc.
Aspect | Optical Encoder | Magnetic Encoder Solution |
Dust/oil resistance | Poor – optical path easily blocked | Good – magnetic field penetrates non-magnetic contaminants |
Vibration/shock resistance | Glass disc fragile, metal disc slightly better | Good – no delicate grating structure |
Temperature range | Limited by LED and photodetector | Usually wider; magnet must be checked for demagnetisation temperature |
Resolution & accuracy | Very high in premium models | Adequate for medium/low-end; high-end can also reach good levels via interpolation |
Cost | High-precision types are expensive | Cost-effective for medium/low resolution |
External interference | Sensitive to ambient light, oil mist | Sensitive to strong magnetic fields and accumulation of ferromagnetic particles |
Mounting difficulty | Demands high concentricity and tight gap tolerance | Less sensitive to gap but concentricity deviation affects accuracy |
Lifetime | LED ageing affects long-term stability | No light source ageing, longer lifetime |
Overall, the reliability advantage of magnetic encoders in harsh environments is clear, while optical encoders still hold a place in ultra-high precision and ultra-high resolution applications.
Not all optical encoders are worth retrofitting. The following situations are more suitable:
Equipment operates long-term in environments with dust, oil mist, or moisture;
Optical encoders fail frequently, leading to high maintenance costs;
The original encoder is discontinued or has long lead times, requiring a substitute;
Resolution requirements are not extreme – standard incremental A/B/Z output is sufficient;
Installation space allows the addition or replacement of the magnetic ring and sensor board.
If the original system uses a high-end absolute optical encoder with angular-second accuracy, or if the encoder is deeply integrated with the control system, the retrofit becomes much more challenging and requires careful evaluation.
Below, we describe the basic procedure using a common incremental optical encoder converted to an off-axis magnetic encoder as an example.
Common output types include:
Incremental: A, B quadrature square waves, Z index pulse;
Absolute: SSI, SPI, PWM, analogue, etc.;
With UVW commutation signals – used for brushless motor startup.
Ensure that the magnetic solution can output signals of the same format. Many magnetic encoder chips support programmable output, configurable to A/B/Z modes and even to emulate UVW.
Determine whether the magnetic ring can be mounted on the shaft and whether the sensor PCB can be fixed. Key dimensions include:
Shaft diameter, distance from shaft end to cover;
Presence of ferromagnetic materials nearby that might cause interference;
Cable exit direction and required ingress protection rating.
Magnetic ring parameters typically include:
Number of pole pairs: common values are 16, 32, 64, etc.;
Outer diameter, inner diameter, thickness;
Magnetisation direction: radial or axial;
Operating temperature and magnet material grade, e.g., NdFeB or ferrite.
Resolution estimation formula:
For example, a 32-pole-pair ring with 128× internal interpolation gives 4096 pulses per revolution. If the original encoder was 1000 lines, this parameter is generally sufficient.
Mounting methods for the magnetic ring include:
Adhesive bonding – suitable for low torque and light loads;
Shrink fit / press fit – for metal shafts and ring bores;
Screw clamping – via a flange or clamping ring.
Ensure that the ring is concentric with the shaft. Eccentricity directly increases angular errors; a concentricity within 0.1 mm is typically recommended, with tighter tolerances for high-precision applications.
Maintain the specified gap between the sensor and the ring surface – typically 0.5 to 2 mm, depending on the chip datasheet. The sensor centre should be aligned as closely as possible with the centre of the magnetic pole track.
Use nylon standoffs or aluminium brackets for fixation; avoid ferromagnetic materials that could distort the magnetic field.
Connect power, ground, A, B, Z, etc. according to the original encoder pinout. If the output voltage of the new sensor does not match the original system, level shifting or pull-up resistors may be required.
After power-up, rotate at low speed and use an oscilloscope to check the quadrature quality of the A/B waveforms, the position of the Z pulse, and signal amplitude. Once verified, connect to the control system and perform homing and position accuracy validation.
Concentricity error degrades accuracy
Magnetic encoders are more sensitive to radial eccentricity than optical encoders. Use a dial gauge during installation to correct the runout of the magnetic ring outer diameter as much as possible.
Avoid external strong magnetic fields
Magnetic fields from high motor currents, brake coils, contactors, etc. can interfere with the sensor. Place the sensor away from these components and consider magnetic shielding if necessary.
Temperature and magnet demagnetisation
Injection-moulded ferrite or rubber magnets may demagnetise above 120 °C. For high-temperature environments, choose NdFeB or SmCo magnets and verify the operating temperature range of the sensor chip.
Ferromagnetic particle accumulation
The magnetic ring attracts iron filings and dust, which can alter the magnetic field over time. In metal-working environments, add a protective cover or clean regularly. Some designs use a non-magnetic protective layer.
Resolution matching
The original system may have a specific pulse-count requirement. If the native resolution of the magnetic encoder is insufficient, interpolation can be used; if it is too high, some control systems may not handle the high-frequency pulses – check the maximum pulse frequency at the top speed.
Z-phase index
Some magnetic encoder chips generate the Z pulse at a fixed position per revolution, but this position may differ from that of the original optical encoder. After the retrofit, re-calibrate the machine zero or adjust via software.
The replacement of an optical encoder with a magnetic encoder solution essentially replaces fragile optical components with modern magnetic sensing technology, improving reliability and service life in harsh environments while retaining the original control system interface.
This solution is not a panacea – for ultra-high precision, ultra-high resolution, or specialised absolute protocol applications, careful evaluation is still required. However, for a large number of industrial equipment operating in medium-to-low precision, harsh, and high-maintenance environments, magnetic encoders offer a cost-effective and practically feasible upgrade path.
In practice, selecting the correct magnetic ring parameters, ensuring mounting concentricity, achieving electrical compatibility, and providing proper shielding are the keys to a successful retrofit.