Smart Robot car series

This series of projects aims to expand my knowledge in programming and mechatronic control systems using the Smart Robot Car V4.0 Kit (with camera). The robot is equipped with sensors and a camera, enabling autonomous navigation and basic tasks. I’ll also explore computer vision to enhance its capabilities, such as object detection and line tracking. These projects will help me gain practical experience in robotics, control systems, and computer vision.

Smart Robot Car Project 1: Basic Navigation

  • The goal is to make the robot move 1 meter, perform a 180-degree turn, and return to the starting position.

    1. Motor Control Setup:

      • The robot uses two pins for controlling the left and right wheels, and two additional pins for controlling PWM on each side.

      • Set the PWM for forward movement to 50 and for turning to 100.

    2. Speed Calibration (Forward Movement):

      • Calculate the time needed to travel 1 meter at a specific PWM using the formula: Time=DistanceSpeed\Speed where Distance = 1 meter, and Speed is determined based on the PWM value (calibrated experimentally).

    3. Turn Calibration:

      • Calibrate the 180-degree turn by adjusting the angular speed and turn time.

      • Use the formula for angular velocity: ω=θ\t where ω is the angular velocity, θ is the turn angle (180 degrees), and t is the time required for the turn.

    4. Code Implementation:

      • Insert the calculated time for both forward movement and turning (based on PWM values) into the code to make the robot navigate the path and return to the initial position.

Smart Robot Car Project 2 : Avoid colision

  • This project demonstrates basic obstacle avoidance using an ultrasonic sensor. The robot measures distances in three directions—front, left, and right—and decides the best path to avoid obstacles.

    • Logic and Process

      1. Distance Measurement:
        The ultrasonic sensor calculates distances by emitting sound waves and measuring the echo time.

      2. Decision-Making:

        • If the front is clear (>20 cm), the robot moves forward.

        • If not, it checks left and right:

          • Turns toward the side with more space.

          • If both are blocked, it reverses and turns slightly.

      3. Limitations:

        • Single sensor introduces delays as it rotates to measure.

        • Ultrasonic sensors can be inaccurate due to surface types or noise.

        • The logic assumes static obstacles, so it struggles with moving ones.

    • Improvements

      • Use multiple sensors or replace with LiDAR for faster, more accurate readings.

      • Average multiple measurements for better reliability.

      • Add mapping to avoid backtracking.

    • Conclusion

      While simple, this project showcases key concepts in robotics and offers a solid foundation for enhancements like better sensors or smarter algorithms. It's a great example of how robots can navigate the world!