Line Following Robot Tutorials – How To Build, Programming Code and Resources

| 2 Comments

Advertisement

A line follower robot is a robot able to detect and track a line even if the path is altered by changing the shape of the line. Usually this robotic application is intended to be a popular choice for beginners, which can use it for fun or to improve the electronics and programming skills.

You can choose to build a simple line follower robot that can track a black or a white line, or a sophisticated robot engineered to make a distinction between different colors and able to follow only one color. Regardless of your choice, all of these robots have something in common. They have to be moved using wheels or tracks, for tracking and detection use sensors, a chassis is the backbone of the robot, a single board computer is the ‘brain’ of the system, two or more electric motors, and any other accessories that can be attached to the robot to improve its performances.

This type of robot has a simple task, it can be built with minimal resources, and don’t require strong skills in programming and electronics.

If you have plans to participate in competitions or to build a system able to be used in real world applications, in this article is what you need to know about line follower robots, how these works, how to build a line follower robot, or you can choose to make things easily by choosing one of the kits designed for this kind of applications.

Line following robot tutorials – how to build and programming code

In the following, I explore several tutorials from where you can learn how to build robots able to follow lines using different sensors and different single board computers.

Lego Mindstorms Line Follower Tutorials

Lego Mindstorms NXT and EV3 are powerful robotic kits used to build a wide range of robots. In this section of the article, I made a list with comprehensive tutorials including steps to build NXT and EV3 robots designed to follow a line.

  • Fuzzy Line Following NXT Robot – tutorial with Boolean Logic algorithm and implemented using NXT-G Code;
    Fuzzy Line Following NXT Robot

    Fuzzy Line Following NXT Robot

  • Line Follower – step by step tutorial from where you can learn how to build from scratch a NXT robot and how to program it to follow a line;
  • Line Following with RobotC – complete tutorial with Mindstorm NXT kit used together with the RobotC integrated development environment to build a simple robot that follows a line;
  • Line-following Robot Design Using the LEGO NXT Mindstorm Kit – the title says almost all about this article. A step-by-step tutorial that explains you how to build a competitive robot to follow a line;
  • Line Following with Camera Sensor – comprehensive tutorial that explains you how to use openRave, XML files and the Lego NXT kit to build a simple robot able to track a line;
  • Basic Line Follow Step By Step Directions – this article includes steps to build a simple tracking line robot using a light sensor and a simple algorithm;
  • PID Linefollower – tutorial how to build a simple NXT robot using a proportional integral derivative controller;
  • Basic programming of the Mindstorm EV3 Robot – this is a guide to enter into the EV3 world where almost everything is possible. Using this article you can learn how to program the EV3 brick for a wide range of applications including a line follower robot;

Line Following Robotic Kits

A shorter way to have a line tracker robot is to jump after the building process and use a robotic kit already prepared with all robotic parts and ready to be programmed.

  • Pololu 3pi Robot – completed platform designed for beginner and ready to be programmed in C language. This is a mobile platform with two wheels capable to move with 3 feet per second;
    3pi Robot

    3pi Robot

  • Boe-Bot Robot Kit – this is one of the best way to learn or teach how to put together the robotic parts and build one of the most advanced line follower robot without advanced electronics and programming skills;
  • Microbot Robot Kit – this is a kit for hobby and educational purposes, a complete programmable robot kit with PICAXE 20X2 microcontroller;
  • Gear Tacon Line Follower Robot Kit – wheeled kit for all students and hobbyists that willing to improve the programming skills using this kit with impressive wheels and better performances;
  • Trekker Line Following Kit with 4 Sensors – this kit helps you to get robotics and programming skills;
  • Line Following Robot Kit – complete hardware and software kit based on PID line following source code;
  • X-Bot Line Following Robot – using basic electronic circuits, the X-Box robot can be classified as an DIY autonomous robot;
  • Line Follower Robot Kit – simple robotic kit programmed for tracking a black line;
  • Line Following Kit – educational kit with Arduino Decimilia as ‘brain’;
  • Line Follower – Atmel builds three lines following robots with manual and automatic control;

Resources

Before starting to build a simple robot for tracking lines, you have to check these links in order to find inspiration and the best resources for your idea.

  • GotABot – everyone is looking for free resources and GotABot is one of these, a program designed to be used in robotics for navigation. The program is used to plan a route on a map that will be followed by the robots;
  • Sandwich – this is a simple DIY robot engineered at home to follow a line;
    Sandwich

    Sandwich

  • A PID Controller For Lego Mindstorms Robots – this is a comprehensive article / tutorial that explains you how the PID (proportional-integral-derivative) controller can be used with the Lego Mindstorms kit in order to control a robot;
  • Line Following PID – code source written in C programming language and useful for the Arduino board and Pololu Qik motor controller;
  • Line Follower – this is a good source of inspiration with code lines to control a robot with color-light sensor. All of these programming lines from this article are written to be used with the Lego NXT kit and are written in Java;
  • Line Follower – Java resource for a simple line following robot with two independent wheels and a color sensor;
  • Line Tracker Kit – this is a complete tutorial from where you can learn how to use the Vex sensors with ROBOTC sample code;
  • Line Tracking Sensor for Arduino – sensor Arduino compatible for line tracking applications;
  • IR Line Sensor Module – article with the Arduino program for infrared sensor able to detect the line;
  • Adding a Light Sensor – clear and complete tutorial with connection between Arduino board and a light sensor;
  • Arduino Light Sensor – from this article you can learn how to program an Arduino board to have feedback from a photoresistor;
  • Measuring Light Levels With the Arduino – this tutorial explains you how to interface a Light Dependent Resistor (LDR) with an Arduino board, and how to program the single board computer to read the signal from the sensor;
  • Line Sensor with Arduino – comprehensive tutorial with source code and schematic images to use QRE1113 line sensor with an Arduino board;
  • Line Following Robot Code Guideline Arduino Using PID Part 1, Part 2 – articles with PID algorithm code lines used together with an Arduino board;
  • My First Arduino Project: Light Sensor and LEDs Bar Graph – this is an article with a simple project with a bar graph made of LEDs and controlled by a light sensor;
  • Arduino UNO: Flex Sensor and LEDs – tutorial with the program for Arduino UNO board that can be a source of inspiration for your project if it’s used LED’s together with an Arduino board;
  • Tutorial Line Tracker to Follow a Line – tutorial with programming lines compatible with the Arduino board and VEX sensors to control the robot in order to follow a line;

This article was last modified on 14 April 2014.

Advertisement
Related Articles
Dragos George Calin
Dragos George Calin is an IT analyst who graduated Faculty of Electrical and Mechanical Engineering, specialization Industrial Automation and Informatics with a Bachelor of Science Degree in Engineering, Automation and Computer Science. He has a great passion for robots and web development.
2 comments
meena
meena

please seand a c program for line folloer

arun
arun

Please send source code for this..