1. Intro
Usage
- Active, can be used as motor controller, like a physical button to tell the system how much speed/volume you want
- Passive, can be used as a motor sensor, reading the rotation of a motor, can be further calculated as angular speed
2. Usage
Typically, the encoder on a motor would have 4 channel,
- VCC: in general, 5V
- GND: ground
- ChA and ChB, two channel of the encoder that output PWM
- two channel can be used at same time to determine the direction of motor
- In reality, only ONE channel is enough since the direction is controlled by the controller (us)
3. Resolution
Resolution need to be known to calculate the speed
3.1. PPR
Pulses Per Revolution
Describe the number of high pulse an encoder will have over a single revolution
3.2. CPR
Counts Per Revolution
4. Datasheet
Gearbox output shaft shows 751.8, but when I rotate the wheel for a revolution, the encoder increased by around 180, what’s wrong?
There are two channel A/B
Each square wave would have two pulse (although only one is rising)
So 751.8/4=187.95, that’s right :white_check_mark: