5.1 Introduction to Motion Feedback
In robotics, simply commanding a robot to move is not enough. For accurate and reliable operation, the robot must be able to measure its own movement. This is known as motion feedback. Without feedback:
- Movement is based on time (less accurate)
- The robot cannot detect errors
- Positioning becomes unreliable
With feedback:
- Movement is measured in real time
- Errors can be corrected
- Precision is significantly improved
Motion feedback is essential for:
- Autonomous navigation
- Distance control
- Speed regulation
5.2 What is an Encoder?
An encoder is a sensor used to measure rotation. It is typically attached to a motor shaft or wheel. As the motor rotates, the encoder generates signals that can be counted and converted into:
- Distance
- Speed
- Position
- Encoders allow the robot to understand how far it has moved and how fast it is
moving.
5.3 Types of Encoders
1. Incremental Encoders
- Measure relative movement
- Count pulses as the shaft rotates
- Most commonly used in robotics
- They do not store position when powered off.
2. Absolute Encoders
- Provide exact position at all times
- Maintain position even after power loss
- Used in more advanced and industrial systems.
5.4 How Encoders Work
- Encoders generate pulses as the motor rotates.
- Each pulse represents a small amount of rotation
- The controller counts these pulses
- The total count is used to calculate movement
Example: If one full wheel rotation produces 100 pulses:
- 100 pulses = 1 rotation
- 50 pulses = half a rotation
This allows precise measurement of movement.
5.5 Measuring Distance Using Encoders
Encoders can be used to calculate how far a robot has travelled. To do this, the system must know:
- The number of pulses per rotation
- The circumference of the wheel
Concept: Distance traveled = number of rotations × wheel circumference This allows the robot to move:
- A specific distance
- With high accuracy
5.6 Measuring Speed
Encoders can also be used to measure speed. This is done by:
- Counting pulses over time
- Calculating how quickly the motor is rotating
This allows:
- Speed monitoring
- Smooth acceleration
- Controlled deceleration
5.7 Why Feedback is Important
Without encoders, robots rely on open-loop control, meaning they assume movement happens as expected. This leads to:
- Inconsistent results
- Drift and inaccuracy
- Poor autonomous performance
With encoders, robots use closed-loop control, meaning they continuously adjust based on actual movement. This results in:
- High accuracy
- Reliable performance
- Better control
5.8 Encoders in Drivetrain Systems
Encoders are commonly used in drivetrain systems to:
- Track distance traveled
- Maintain straight movement
- Improve turning accuracy
Example: If one side of the robot moves faster than the other:
- The robot will drift
- Encoders can detect this and allow corrections.
5.9 Common Encoder Challenges
1. Incorrect Calibration
If the distance per pulse is incorrect:
- Distance calculations will be wrong
2. Noise and Interference
- Electrical noise can cause incorrect readings.
3. Slippage
If wheels slip:
- The encoder may report movement that did not actually occur
4. Misalignment
- Improper mounting can lead to inaccurate readings.
5.10 Improving Accuracy
To improve encoder accuracy:
- Calibrate the system properly
- Use stable mounting
- Ensure proper wiring
- Combine with other sensors when needed
This leads to more reliable motion tracking.
- 1. Explain the difference between open-loop and closed-loop control.
- 2. Describe how an encoder measures rotation.
- 3. Explain how distance is calculated using encoder data.
- 4. List common issues that affect encoder accuracy.
- 5. Explain why encoders are important in drivetrain systems.
- Program a robot to:
- Move forward a specific distance
- Stop accurately using encoder feedback
- Display the distance on SmartDashboard