A linear encoder tells you exactly where something is along a straight line. On a mill or lathe, that “something” is usually the table, the saddle or the quill. Bolt one to each axis, connect it to a digital readout (DRO), and you stop counting handwheel turns and guessing at backlash. The display shows you the real position of the machine.
There are a few kinds of linear encoders, but the optical type is the one you’ll find on most DRO kits. Here’s how it works and what to look for when you buy one.
The two main parts: scale and read head
Every linear encoder has two parts:
- The scale. On an optical encoder this is a strip of glass with very fine lines printed on it, called a grating. A typical DRO scale has a line every 20 µm. That’s about a quarter of the width of a human hair.
- The read head. This slides along the scale. It holds a small light source (usually an LED), a second small grating, and a set of photo sensors.
The scale is mounted to one part of the machine and the read head to the part that moves. As the axis travels, the read head moves along the glass.
What happens inside the read head
The LED shines light through the glass scale. As the read head moves, the lines on the scale and the lines on the read head’s own grating keep lining up and moving out of line. This makes the light reaching the sensors get brighter and dimmer in a regular pattern.
The sensors turn that pattern into two electrical signals, called A and B. They are identical but shifted a quarter of a cycle apart. This is the clever part:
- Counting the cycles tells the DRO how far the axis has moved.
- Checking which signal leads (A before B, or B before A) tells it which direction the axis is moving.
- Counting every rising and falling edge of both signals gives four counts per line. That’s how a 20 µm grating gets you 5 µm resolution on the display.
Most scales also have a third signal, the reference mark (Z or R). It is a single fixed point on the scale. If the DRO loses power or you bump the machine, you can find this mark again and get your zero back without re-indicating the part.
Output signals: TTL, RS422 and 1 Vpp
The signal coming out of the read head has to match what your DRO accepts. This matters more than most people think.
TTL (5 V)
A simple square-wave signal on one wire per channel. It’s cheap and works fine on small machines with short cable runs. It picks up electrical noise more easily, so it’s not the best choice near spindle motors, VFDs or welders.
RS422 (differential)
Each channel is sent on two wires, the signal and its mirror image. The DRO looks at the difference between them, so any noise picked up along the cable cancels out. For most workshop machines this is the safer choice, especially with long cables or a noisy electrical environment.
1 Vpp (sine wave)
Instead of square pulses, the scale sends smooth sine waves and the DRO or controller cuts each cycle into many finer steps. It’s mostly found on high-end systems and CNC controls. Older scales may use 11 µApp, a current-based version of the same idea. If you’re reusing old scales of this kind on a new DRO, you’ll need an adapter like our AKA11S 11 µApp to RS422 converter.
Optical vs magnetic linear encoders
Magnetic encoders work the same way in principle, but the scale is a tape with tiny alternating north and south poles instead of glass lines. The read head senses the magnetic field rather than light.
- Optical (glass) scales are usually more accurate and are the standard choice for most mill and lathe DRO kits.
- Magnetic scales handle coolant, chips, oil mist and dust better, because there’s no glass to get dirty. You can also cut the tape to almost any length, which helps on long machines.
If your machine runs wet or you need a very long axis, magnetic is worth a look. For a typical knee mill or bench lathe, a sealed glass scale is the usual pick.
How to choose an optical encoder for a DRO retrofit
Before you order, check these points:
- Measuring length. Measure the real travel of each axis and pick a scale that covers it, with some margin. The scale’s total body is longer than its measuring length, so make sure it physically fits.
- Resolution. 5 µm is plenty for most manual milling and turning. 1 µm makes sense for grinders, fine toolroom work or inspection.
- Output signal. Match it to your DRO: TTL or RS422. If in doubt, choose RS422.
- Size and mounting space. On a lathe cross slide or a small mill there often isn’t much room. A slim-profile scale can save you a lot of bracket work.
- Sealing. Look for a scale with rubber lip seals that keep chips and coolant out. A scale with chips inside won’t read correctly for long.
- Cable length and protection. Make sure the cable reaches the DRO without strain, and that it has a metal or armoured sheath where chips can hit it.
You can see our full range of optical linear encoders here. If you’re not sure which length or type suits your machine, send us the machine model and travel and we’ll recommend one.