Arduino Line Follower Robot Assembly Guide

Arduino Line Follower Robot Assembly Guide

Line follower robots (line tracing robots) are a type of robot we recommend for introduction to robotics. It is easy to assemble but difficult to develop. In this article, we will discuss the assembly and explain how to assemble the robot kit. We will also cover how to test the line follower robot.

Line Follower Robot Part List:

  • Arduino Uno Controller
  • ArduMoto Motor Driver Module
  • QTR8RC Line Sensor
  • Profast 1500 Rpm Line Follower Motors x 2
  • SLT20 Silicone Wheels x 2
  • Line Follower Body x 1
  • Motor Brackets x 2
  • Female-Male Wires x 10
  • Motor Power Wires
  • Lipo Battery (3S 450 Mah)
  • JST Connector Cable
  • Switch

What you will need:

  • Soldering Tool & Solder Wire
  • Silicone Gun
  • Diagonal Cutter Plier
  • Flat Miniature Screwdriver
  • Philips Miature Screwdriver
  • A lot of desire, perseverance. Regardless of your technical background and experience in robot projects, I think the most important thing is the desire to learn and develop. If this is not there, you cannot progress, you cannot cope with small problems (many problems will arise, this is normal).

We are first starting with soldering motor wires. Strip the cable ends a little with a side cutter and solder both the cable end and the motor terminal, then melt the solder of the two ends with the help of a soldering iron.

After that we place DC motors to motor brackets and plase small M2 nuts to side holes. The motor bracket will be attached from the vertical 12mm side of the motor.

For attaching motors to main plexiglass body we will use long M2 machine screws (please don’t try to use short M2 screws coming with motor brackets).

We place 4 x brass standoffs, these standoffs will be screwed later to Arduino Uno by M3 Nuts.

Next we are soldering QTR8RC Sensors. For this we will use male pins. Break with cutter and place to 2nd line of sensor board. Here we will solder every pin (Total 11 pins, 1 is unused). While soldering please be careful to make clean soldering and use little solder not too much.

Now we will place line sensor to robot’s front. We are using again long M2 screws and M2 nuts between sensor board and robot body.

We will use philips head screwdriver at this stage. Miniature head screwdrivers will be very useful for it.

Place the small white freewheels in the right and left front holes of the robot body. You an add one small drop of hot silicone or cyanoacrylate adhesive to secure connection.

We connect the Arduino Uno to standoffs with M3 screws.

Ardumoto Motor driver shield will be placed to top of Arduino Uno board. Please be careful to place in same form with Arduino Uno board.

When fitted correctly, it should fit exactly as in this picture.

Now we will connect QTR sensor and Ardumoto board (Actually Ardumoto is only bridge, in real we are making connection with Arduino Uno board and QTR Line Sensor).

For connection we are using female-male cable. We will use 10 cable (2 power, 8 line signal).

Be careful as D3 is not connected to line sensor. (It is used by ArduMoto pwm, speed channel)

Connection between Line Sensor and Ardumoto shield:
First column is line sensor, second coloumn is Ardumoto shield’s female inputs:

1 – D2
2 – D4
3 – D5
4 – D6
5 – D7
6 – D8
7 – D9
8 – D10

Line sensor’s – goes to GND input of Ardumoto and Line sensor’s + line foes to 5.V output of Ardumoto.

After connecting the sensor cables as well, you can solder the battery JST cable and the switch. For this, we cut the positive line of the JST cable and solder any two ends of the switch (middle and left or middle and right) to the cable ends.

We also shorten the motor cables by cutting them to the appropriate length according to the Arduino shield.

DC gear motor cables are connected to Ardumoto shield’s green A and B channel terminals. The JST power cable we soldered is connected to the Vin power input on the right. We use a flat tip miniature screwdriver for the connection. Again, make your connections without overtightening.

Now we will assemble motor shaft and wheels. For this we will use allen wrench.

Gently remove the silicone on the wheel and find the set screw hole.

Place the tiny M4 set screw on the Allen key and advance it by turning it in the M4 threaded hole.

Place motor shaft to wheel’s hole. Shaft’s D side and wheels setscrew hole should be aligned at same axis. After that tighten little.

Do not overtighten. Little torque needed.

Download Arduino Library & Line Follower Code

We are using Pololu’s QTR 3.0 Library (Please be careful as code will not be working with 4.0 library). Download below:

After downloading this library to your computer, select the zip file you downloaded from the Sketch / Include Library / Add Zip library options in the Arduino program.

Now, please download the code that came to your order email. If not arrived, please contact us via the company (

Uploading Code to Arduino Board

Attach USB cable to computer and Arduino board.

Choose Arduino Uno board from Tools / Board menu and also select the relevant port from Tools / Port menu.

It is very important that the correct serial port is selected. If your computer does not recognize the Arduino Uno and does not show any ports, you may need to install additional drivers. (You can understand the port number from the port number displayed in this menu by plugging and removing the Arduino board from the computer)

Testing the Line Follower Robot

You have completed the assembly of the robot and succeeded in the code loading part.


Now, we go to the most important part, how do we test it?

First, there are 2 test methods.

  • Hand Test
  • On the Track

Let’s consider two methods now.

1. Hand Test Method

It is a quick method we use to view problems.

To test it in hand, pick up the robot from the back and turn on the switch.

The actions that the robot will perform will be:

Calibration for the first few seconds (Wheels will turn to forward, backward)

At this stage, rub your finger to sensors one by one fastly. It will perceive fingers as white lines and gaps as black.

Then robot will stop the motors and wait 2 second.

We pull our fingers, keep holding it in the air from behind.

Then it will follow the line according to the sensors.

When you bring your finger to the center, the two motors will move forward, when you move your finger to the right (maximum 4-5 mm away from the sensors or closer) the motors will move according to your finger.

In short, while testing, we will read our finger like a line, and gaps will be detected as black. (Because the lights from the QTR8RC sensor do not reflect in the space).

2. Test on and on the Track

There may be errors on your first attempts on the track. Please take them as normal and try to progress gradually.

Likewise, we turn on the robot.

The robot will calibrate for the first 4-5 seconds by shaking its head left and right. At this stage, you may not be able to calibrate correctly, by helping your hand from behind, make sure that 8 sensors see the black background and white line several times without raising the sensors.

Then the motors will stop, place the robot in the center of the line and wait by pulling your hand.

If the motor directions are correct, the robot will go forward. If not, there may be left or right turns. If you encounter a problem like this, make a hand test to make sure that both motors rotate forward with the line in the middle. (we will reverse the motor cables if reversing)

Maintenance of Silicone Wheels

Silicone wheels will hold all ground’s dirt very quickly. You should clean the wheels after each robot test. For this, alcohol, cologne or wet cloths will be sufficient. Clean it and let it dry.

Notes on Assembly

  1. The height of the line sensor from the ground should be between 5-8mm. If it is higher or closer to the ground, it will not read correctly.
  2. In the calibration part when you start the robot, each sensor must see black and white. If a sensor does not see both colors completely, it will affect the calibration of min max values. And your robot will not work correctly.
  3. Your motors should stand firmly and vertically with the robot body (You can also use glue to fix the motor bottom to the body.
  4. Our motto is checking repeatedly, checking power cables, sensor connections. The kit has no reverse electrical protection, so check your battery and JST cable connections thoroughly.
  5. Make sure that the signal cables between the sensor and Ardumoto are connected in the right places, in the right order. It is a common mistake in robots that move incorrectly.

1 Comment

  1. Reply

    Hello Dear,

    I ordered this robot and installed it, but I am having problems with battery installation and code writing during the installation.
    Can you help me?

    Thank you.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>