quadrature-encoder-course/lessons/01-reading-encoder-signals/01-meet-the-quadrature-encoder/meet-the-quadrature-encoder.md

32 lines
1 KiB
Markdown

---
title: Meet the Quadrature Encoder
summary: Learn what the A and B channels are and why their phase offset lets you count motion.
chapter: Reading Encoder Signals
order: 1
tags:
- encoders
- motors
- feedback
estimated_minutes: 8
---
# Meet the Quadrature Encoder
A quadrature encoder gives you two square-wave signals, usually called `A` and `B`.
Those signals toggle as the shaft turns. The important detail is that they do not toggle at the same time. One channel leads the other by a quarter of a cycle, which is where the name quadrature comes from.
That phase offset gives you two useful facts:
1. You can count edges to measure motion.
2. You can compare which signal leads to determine direction.
## What you should observe
- Slow rotation produces clean transitions you can inspect with a logic analyzer.
- Reversing the shaft swaps which channel leads.
- More pulses per revolution means finer position measurement.
## Checkpoint
Capture both channels while rotating the shaft by hand and confirm that one channel leads the other.