Our project was to build a car that could follow a black line on a white surface using an Arduino Uno, IR sensors, and a motor driver. It was our final project for the semester, and while it worked in the end, we faced many challenges along the way.
At first, the car didn’t work as planned. It followed the white surface instead of the black line because the wiring and code didn’t match. After fixing that, the car could only turn once before losing the line completely. We later discovered the problem was due to switching to a different Arduino board. Using the original board fixed the issue.
Through this process, we learned a lot about troubleshooting, fixing wiring, adjusting sensors, and controlling motors. It wasn’t easy, but we gained valuable skills like problem-solving, teamwork, and persistence. In the end, we were proud to see the car follow the line and complete the project successfully.
Process:Step 1: Assemble the Car Chassis- Start by assembling the 4-wheel car kit. Follow the instructions included in the kit to assemble the car chassis, attach the motors, and secure the wheels.
- Mount the motor driver onto the chassis, ensuring it is accessible for wiring.
Identify the motor terminals on the motor driver. Connect the left and right motors to the appropriate terminals on the motor driver.
- For example, connect the left motor to the OUT1 and OUT2 terminals, and the right motor to OUT3 and OUT4 (depending on the motor driver model).
- Identify the motor terminals on the motor driver. Connect the left and right motors to the appropriate terminals on the motor driver.
For example, connect the left motor to the OUT1 and OUT2 terminals, and the right motor to OUT3 and OUT4 (depending on the motor driver model).
The motor driver will receive the power and control signals from the Arduino to drive the motors.
- The motor driver will receive the power and control signals from the Arduino to drive the motors.
- The line sensor array detects the black line on the white surface. It has multiple sensors that send input signals to the Arduino.
- Connect the VCC pin of the sensor array to the 5V pin on the Arduino.
- Connect the GND pin to the GND pin on the Arduino.
- Connect the output pins (usually marked as OUT1, OUT2, etc.) from the sensor array to the digital input pins on the Arduino (e.g., D2, D3, D4).
- Connect a suitable power supply (e.g., battery pack) to the motor driver. This will power the motors and the Arduino.
- Make sure the Arduino is also connected to a power source (usually via the USB cable or a separate battery).
- Open the Arduino IDE on your computer.
Write the code to control the movement of the car based on the sensor data.
- Use a simple algorithm where the car moves forward when both sensors detect the black line.
- If only one sensor detects the line, the car turns in that direction.
- Write the code to control the movement of the car based on the sensor data.
Use a simple algorithm where the car moves forward when both sensors detect the black line.
If only one sensor detects the line, the car turns in that direction.
Comments
Please log in or sign up to comment.