Line-Following Robot
This is a line-following, Arduino Nano-powered robot. We thought it was a cool project to make, and could potentially be used to deliver items from one place to another. Because of the IR sensors, the car is able to follow black lines and reach from point A to point B.
Supplies
Chassis (Comes with Motors + Wheels)
L298N Motor Driver
Jumper Wires (All Kinds)
Soldering Iron (+ other materials needed to solder)
Assemble the Chassis
Put the parts together as instructed in the QR code provided in the box. Add the wheels and motors, screw the parts onto the frame.
Test the Driver
Before implementing the L928N Driver into the robot, we need to test it by itself. Use the circuit diagram below to do the wiring. This is a part of debugging, where each individual system is tested before the entire system is assembled. After doing this, connect the batteries to their respective terminals in front. Using a male to male jumper wire, test to see if the motors are spinning. Make sure to map out which pin controls which direction of motor.
Connect All Electronics
Connect the LN Driver and motors (using the diagram in Step 2). Keep the battery Pack, but now connect the 5V Terminal to the Nano. Connect all pins to Nano (including sensors and LN Driver). In order to connect the sensors to the Nano, you will need to solder 2 to 1 jumper wires. You will know which pins are connected by the code below. Feel free to modify it to your preference.
Code
Import the following code into Arduino IDE. There are captions next to most of the lines so that it is easier to understand. (OPTIONAL: USE THE BLINK TEST TO SEE IF ALL THE COMPONENTS ARE WORKING). Copy and paste the code into a new sketch.
Downloads
Debugging
This is the most crucial, and possibly most time-taking step in the project. Make sure your components are not fried and ensure that electrical connections are being made by using a multimeter. Make sure parts are held together by tape, and go step by step.
Testing
Make a black line on the ground, using tape or any other medium. Turn the switch on your robot, and watch it move!