🛣️ Trip Planning
📜 Overview
The car moves on the track by detecting its position. If the car is centered, it moves forward automatically. If it drifts to the right, it turns left, and if it drifts to the left, it turns right. The system focuses on turning left or right, while the motor takes care of moving forward when the car is centered.
Approach & Implementation
🚀 Vehicle Navigation Strategy
1. Initially, the vehicle was designed to make three movements:
- Move Forward: Triggered when the deviation is near zero (centered on the track).
- Turn Left: Triggered when the deviation is positive.
- Turn Right: Triggered when the deviation is negative.
The idea was that:
- Zero Deviation: Move forward.
- Positive Deviation: Turn left.
- Negative Deviation: Turn right.
⚙️ Using the BLDC Motor for Control
2. To implement turning, we used the torque from the BLDC motor to control the vehicle’s movement:
- Left and Right Turns: The motor's torque was adjusted via PWM signals to turn the vehicle left or right.
- Forward Movement: Ideally, when the vehicle was centered on the track (i.e., deviation close to zero), it would move forward automatically with the BLDC motor applying a constant torque.
However, the system faced challenges when trying to implement the “move forward” behavior precisely.
🔧 Trial and Error for Calibration
3. During testing, we found that due to inaccurate ADC values (Analog-to-Digital Converter values from the sensors), the deviation while the car was centered on the track was often around 24 instead of zero. This led to interference between the turn left and move forward functions. Essentially, because the deviation value was positive (but not close enough to zero), the vehicle was incorrectly triggered to turn left even when it should have been moving forward.
- Issue with ADC Accuracy: The deviation values weren't perfectly accurate when the car was centered, which resulted in false triggers for turning left.
- Inconsistent Behavior: When the deviation was near zero, the system sometimes interpreted it as a small positive value, which interfered with the logic for moving forward.
🔄 Simplified Control Logic
4. To address the issue, we simplified the control logic by eliminating the “move forward” condition and focusing solely on turning behaviors. As a result:
- Turn Left: Triggered when the deviation was positive (indicating the car needed to move left).
- Turn Right: Triggered when the deviation was negative (indicating the car needed to move right).
- Move Forward: The BLDC motor was now responsible for moving the vehicle forward automatically when no significant deviation was detected.
This change reduced the complexity and improved the overall reliability of the system.
📊 Results & Observations
5. After making the adjustments, the vehicle's behavior became more consistent:
- Left and Right Turns: The vehicle could reliably turn left or right based on the deviation.
- Move Forward: The BLDC motor automatically moved the vehicle forward as long as the deviation was within an acceptable range (i.e., minimal deviation).
- More Stable Navigation: The vehicle was able to follow the track more reliably, without the interference between turning and moving forward.
🖼️ Visual Representation of the System
6. System Operation Flow:
- Deviation Calculation: The system calculates the deviation from the center of the track.
-
Decision Making:
- If deviation is positive, turn left.
- If deviation is negative, turn right.
- If deviation is near zero, move forward using the BLDC motor.
- Torque Control: The motor applies the necessary torque to turn or move forward.
Example Flow:
- Deviation > 0 → Turn Left ➔ Adjust motor torque.
- Deviation < 0 → Turn Right ➔ Adjust motor torque.
- Deviation ≈ 0 → Move Forward ➔ BLDC motor applies forward torque.
🔮 Future Improvements
7. - Sensor Accuracy: Further improving the accuracy of the ADC values could allow for more reliable detection of zero deviation and reduce false triggers for left turns.
- Path Planning Enhancements: Adding more sophisticated path-planning algorithms could make the system more adaptable to sharper turns or obstacles.
- Machine Learning Integration: Implementing machine learning could help the vehicle learn from its environment and optimize its navigation behavior over time.
Conclusion
This project demonstrated how a vehicle can autonomously follow a track by calculating deviation from the center and using this to control the vehicle's movement. After addressing the challenges posed by inaccurate sensor readings and the interference between turn and move-forward behaviors, we streamlined the system to focus on just left and right turns, with forward movement happening automatically. This simplified approach led to a more reliable and robust navigation system.
Note: This video demonstrates the trial and error process where we identified that the "move forward" behavior was interfering with the "turn left" function. As a result, we simplified the logic to focus only on turning left or right, with forward movement handled automatically by the BLDC motor.
☺️ Bits of our work
Note: This video demonstrates the trial and error process where we identified that the "move forward" behavior was interfering with the "turn left" function. As a result, we simplified the logic to focus only on turning left or right, with forward movement handled automatically by the BLDC motor.