Encoder
An Encoder is a sensor used to measure the precise position, speed, and direction of a rotating shaft.
In the VESC ecosystem, encoders are commonly used to provide accurate rotor position feedback to the motor controller. This allows the controller to know the exact position of the motor at all times, improving low-speed performance, startup behaviour, and position control accuracy.
VESC Labs currently offers two magnetic encoder formats:
- ABI Encoders
- Sin/Cos Encoders
ABI encoders provide digital position signals and are commonly used for speed, position, and sensored FOC applications. Sin/Cos encoders output analogue sine and cosine signals which only need 4 wires (5V, GND, SIN, COS) and are robust against noise when used with compatible hardware.
When connected to a VESC controller, encoder feedback can be used for:
- Sensored FOC operation
- Improved startup performance
- Position control
- Speed control
- Servo applications
⚠️ An Encoder is not required for motor operation. Most motors can operate successfully using sensorless FOC, where the controller estimates rotor position without requiring a dedicated position sensor. While encoders generally provide the highest position accuracy, they also require additional wiring, connectors, and hardware inside the motor, which can introduce additional points of failure.
In some applications, such as electric skateboards, the motor cables are repeatedly flexed during operation. Eliminating encoder or hall sensor wiring can improve long-term reliability. Similarly, some motors are fitted with low-quality sensors that may cause more problems than they solve. In these cases, a properly tuned sensorless, VSS, or HFI setup may provide more reliable operation than using the built-in sensors.
Example
A magnetic encoder mounted on a motor shaft can continuously report the rotor position to a VESC controller, allowing precise control of motor position, speed, and torque.
In simple terms: an encoder is a position sensor that tells the controller exactly where a motor shaft is rotating.
