WELCOME TO OUR BLOG

We're sharing knowledgein the areas which fascinate us the most
click

DB9 Pinout and TTL Square Wave Signals on a 3 Axis DRO

By zh-easson October 24th, 2026 20 views

Introduction: A three-axis readout only sees scale movement through the pins on each DB9 port, so knowing which pin carries power, ground, A, B, and R makes wiring faults much easier to trace.

Most shops meet this pinout on a bad day. An axis that used to count smoothly starts jumping, or stops updating until somebody wiggles the connector and seats it again. The instinct is to blame the scale, but the cable and the nine positions inside that D-sub shell carry everything the console knows about the slide: a small supply voltage, a reference return, two pulse trains, and a marker pulse. Understanding how those signals divide up the connector turns a vague "the axis is acting up" into a specific question about one pin or one wire.

The DB9 Connector Groups Power, Ground, and Signal Pins

A 9-pin D-sub shell is compact, mechanically keyed, and cheap to terminate, which is why it appears as the axis input on a lot of readout consoles. The Easson ES-14 uses three female DB9 sockets on the back panel, one per axis, and each socket carries both the supply the scale head needs and the signals coming back from it. The grouping inside that shell is what matters: power, a signal reference, a quadrature pair, and an index pulse share the same nine positions, and each group does a different job once the cable reaches the console.

  • Power and ground (PIN 7, PIN 2, PIN 4): PIN 7 supplies 5V to the scale head, while PIN 2 carries 0V and PIN 4 carries GND. Keeping those two return paths separate gives the pulse signals their own reference instead of sharing a return with the supply current, which is the usual reason a careful installer treats them as different pins rather than "both negative."
  • The A and B pulse pair (PIN 6, PIN 8): these two positions carry the quadrature square waves that describe every increment of scale travel. They are the pins the console actually counts, and the ones most exposed to a crushed cable, a pulled crimp, or coolant working its way into the shell.
  • The R reference pulse (PIN 9): a single marker pulse that repeats at a known position along the scale. It gives the console a fixed landmark to compare against, which is why a damaged R connection behaves so differently from a damaged A or B connection.

On the ES-14 the remaining positions, PIN 1, PIN 3, and PIN 5, stay unassigned, and that layout belongs to this model rather than to every readout on the market. A cable pulled from a different console deserves a check against the pin table for the unit in front of you before it goes anywhere near a machine.

How A and B Square Waves Show Direction and Distance

A TTL square wave is a digital signal that swings between roughly 0V and 5V with fast edges rather than a smooth curve. An optical scale turns light passing through its grating into two of these trains, A and B, running at the same frequency but offset by about a quarter of a cycle. That offset is the whole trick behind quadrature decoding: the console watches which channel changes state first, and from that single observation it knows whether the slide is travelling toward the operator or away from them. No separate direction wire is needed, which is why a two-pin signal pair can carry both distance and direction on the same cable. Distance comes from counting. One complete A/B cycle corresponds to a fixed increment of travel set by the grating pitch and the interpolation electronics inside the scale head, so a thousand clean cycles equal a thousand known increments. Decoders typically count edges rather than full cycles, which multiplies the number of counts available per unit of travel and lets the console resolve finer steps. The display then applies whatever resolution setting the operator has chosen — 0.1 μm, 0.5 μm, 1 μm, or 5 μm on the ES-14 — to convert that count into a readable number. Because the count is a rate, feed speed sets a ceiling on it. The ES-14 accepts up to 2 MHz, which is comfortable for hand-fed work but not infinite: a fine-pitch scale moving quickly produces a higher pulse frequency than a coarse scale moving at the same speed. Push past the input limit and counts get missed, and a missed count never announces itself — the reading simply drifts away from the true position over the length of the cut. What makes those pulses readable at all is the shared reference on PIN 2 and PIN 4. A TTL signal is single-ended, measured against that 0V line rather than against its own twisted partner, so a weak return path distorts the very amplitude and edge shape the decoder depends on.

Why the R Reference Pulse and Cable Shielding Support Repeatable Readings

An incremental scale only reports change. It can say the slide moved 12.5 mm, but nothing in the A/B stream states where the slide started. The R pulse supplies that missing landmark: once per scale interval it produces a single marker, and the console can treat it as a repeatable reference point. That is how a readout returns to a trustworthy number after a power cut or a long idle weekend, and it is also why a failed R channel looks so strange in practice — the axis still counts correctly in both directions, yet the same physical position never produces quite the same reading twice. Shielding matters more as pulse frequency rises. At up to 2 MHz the edges arriving from the scale are short and the current loops are small, which makes them easy targets for electrical noise from spindle motors, coolant pumps, and VFD drives. A screened cable with the shield bonded to the console's ground path gives that interference a preferred route away from the signal conductors, and shielding plus grounding is standard practice in industrial measurement wiring for exactly this reason. The familiar shop pattern is a machine that reads perfectly until the spindle starts, then flickers counts on one axis and settles again when the motor stops. Cable condition and connector seating produce the same class of fault without any electrical noise involved. A shield that has pulled away from its clamp, a bent PIN 9 contact, or a shell that no longer sits square in the socket will all show up as intermittent counting rather than a clean failure, because vibration and thermal cycling make and break the connection many times a second. Pin tables come from the digital readout system manufacturer, and the console's own documentation is the version that counts when a cable is being replaced.

Conclusion

Six working pins carry everything a three-axis console needs from a scale: 5V and a clean return on PIN 7, PIN 2, and PIN 4, the quadrature pair on PIN 6 and PIN 8, and the reference marker on PIN 9, with PIN 1, PIN 3, and PIN 5 sitting unused on the ES-14. The A/B pair turns travel into countable increments and settles direction from phase order, the R pulse gives the count a landmark to return to, and the shield keeps 2 MHz edges clean enough to count. That division of labour is what makes a wiring fault diagnosable at the connector instead of somewhere inside the machine, and the ES-14 product information is the place to confirm the exact pin roles for that model.

FAQ

Q: Which DB9 pins carry the A B and R signals on an ES-14 style DRO?

A: On the ES-14, PIN 6 carries the A phase, PIN 8 carries the B phase, and PIN 9 carries the R reference pulse. Power and reference sit on PIN 7 (5V), PIN 2 (0V), and PIN 4 (GND), while PIN 1, PIN 3, and PIN 5 are unassigned. Those positions follow this model, so a cable built for another console should be checked against its own pin table first.

Q: What does a TTL square wave tell the DRO about scale movement?

A: Each cycle represents one fixed increment of travel set by the scale's grating pitch and internal interpolation, so counting cycles and edges converts motion into a distance. The quarter-cycle offset between A and B reveals direction, because the console sees which channel switches first. Together they let one pair of wires report both how far the slide moved and which way it went.

Q: Why is cable shielding important for a 2 MHz DRO input?

A: At that pulse rate the signal edges are short and low in energy, so nearby spindle motors and drives can add noise that the decoder reads as extra counts. A bonded shield diverts that interference to ground before it reaches the signal conductors. The result is a stable count instead of flickering numbers whenever a heavy load starts on the same supply.

Sources / References

Texas Instruments: Quadrature Encoder Interface Technical Application Note

Electrical Engineering Technology Degree at Purdue University

Easson ES14 White Position 3 Axis Digital Readouts Systems For Lathe

Previous
What Does 0.1 μm Resolution on a Digital Readout Really Mean?
Read More
Next
Linear and Nonlinear Error Compensation on a Machine DRO
Read More
We use Cookie to improve your online experience. By continuing browsing this website, we assume you agree our use of Cookie.