Mid-Senior Engineers: Reinvent your career with Robotics, earning $100k-$200k+ in the next 90 days. Learn More

How to Build a Robot Line Follower without a Controller

Liz Miller Learn Robotics

About the Author, Liz Miller, Founder/CEO @ Learn Robotics

Liz graduated with a degree in Robotics Engineering from Worcester Polytechnic Institute and researched drones at UPenn's GRASP Lab. Liz is a former Raytheon Engineer, where she managed major $MM automation projects worldwide. Today, she's the driving force behind Learn Robotics, offering the Robotics Career Blueprint for Engineering Professionals and beginner courses through the Online Robotics Class. Liz is a third-generation entrepreneur who is all about the application of innovation in robotics, automation, and AI. Follow Liz on LinkedIn and Facebook.

Disclosure: Some of the links below are affiliate links. This means that, at zero cost to you, Learn Robotics will earn an affiliate commission if you click through the link and finalize a purchase. Learn Robotics is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a way for websites to earn advertising revenues by advertising and linking to Amazon.com.

Join our Private Discord Server, MakeRobots! Sign Up

In this tutorial I will show you how to make a simple line follower robot. Normally these type of robots use microcontrollers and complex logic to track and follow line. But today I will be showing you how you can make a simple line follower without a microcontroller. Before we start making the robot, let’s understand what a line follower is and how it works.

What is a Line Follower?

Line Followers are Automated Guided Vehicles (AGVs). These robots follow a line (black or white) using some logic. They’re mostly used to carry material around inside a factory.

AGV robot line follower

A microcontroller is like a brain of the robot that can be programmed to add unique features. But we don’t really need any coding knowledge or fancy microcontrollers to make this particular robot.

How does it work?

A line follower is an array of Infrared (IR) sensors. These sensors have a set of IR LEDs and Photodiodes. The LEDs emit infrared light on a surface (floor) and the Photodiode receives reflected light. The amount of reflected light depends on the color of the surface.

how an IR sensor works

More light is reflected from the white surface which generate higher values. Surface that is dark absorbs most of the light and hence very less or no light is received by the sensor. Using this information, the robot can distinguish between a black line on white surface and vice versa.

line following diagram

Case a:  Both sensors are high, both motors run.
Case b: Right sensor is high, only right motor will run.
Case c: Left sensor is high, only left motor will run.

In this manner, the robot will follow the line. We can use a microcontroller, like Arduino to build a line following robot, or we can create a circuit that performs these calculations automatically. In this tutorial, we’ll show you how to build a line following robot without a controller.

Requirements

For this project, you’ll need a few parts:

Once you have the materials, place all the components onto your base. You can use cardboard, foam board, or acrylic sheet for your base. Now that we have the parts, you can also grab copies of the CAD and Wiring Diagrams for this project.

[pretty-locker id=”339508″]

Download the SketchUp File (.skp)

Download the Wiring Diagram – Fritzing (.fzz)

Building the Robot Line Follower

Refer to the picture below to get a basic idea of how to make the robot. I used SketchUp for the design.

robot line follower CAD model

Here are the steps to help build your robot line follower:

  • First, make a base using any material of your choice (cardboard, foamboard or acrylic).
  • Next attach two geared motors to the base which will drive the robot. Then attach a caster wheel to balance the bot. You can use screws or hot glue to attach these components.
  • Fasten the motor driver board on top of the base.
  • Next attach the IR proximity sensor modules in the front, facing down. Make sure there is about 1.5-2 inch distance between each of the sensors.
  • Lastly, Mount the battery to your base.

Once everything is placed and secured properly. It’s time to build the line following circuit.

Making the Robot Line Follower Circuit

robot line following circuit

As shown in the picture above, the connection is simple. As we are not using a microcontroller.

  • The GND pins of both the sensors are connected to GND terminal of Motor driver.
  • VCC pins of both sensors are connected to +5v terminal. This will power both the sensors.
  • The out pin of first IR sensor is connected to IN1 and out pin of second  sensor is connected to IN3.
  • Connect the motors to terminals labeled ‘OUT’  on either side.
  • At last connect a 9v-12v battery on the +12v terminal of Motor driver

If you want, you can add a switch on the +ve terminal of battery as shown in the picture. The switch will allow you to turn the robot on or off.

Testing the Line Follower

To test the robot, first create a track. You can use black electrical tape to create a line on any white surface. Create a circle with the tape and place the robot in a way that both the IR sensors are on either side of the tape. Toggle on the switch and watch the robot follow the line.

If the robot does not follow the line properly try these troubleshooting tips:

  • Double check the connections.
  • Make sure you use a fully charged battery.
  • Try swapping motor leads.
  • Try adjusting the sensitivity of IR sensors. (You can tune the sensitivity using the trimmer pot on the module.)

Lastly, if you’ve tried these tips and your robot doesn’t work properly, feel free to leave a comment, below.

What can I build next?

Line Following robots are a lot of fun to build. I challenge you to check out our robotics tutorial and use Arduino to program your line follower. You can also take it a step further and try this project using photoresistors to build a light-following robot.

And, if you’d like a more complex robotics project to work on, check out my eBook, Mini WiFi Robot, available now in the Learn Robotics shop.

NodeMCU Wifi Robot

Build your very own WiFi-controlled robot and drive your robot from anywhere! We’ll be starting a global competition soon, so be sure to grab your copy today!

Experienced Engineer (Mechanical, Electrical, Computer, Software): If I offered to help you upgrade your engineering career to robotics, earning $100k-$200k+ in the next 90 days, would you take me up on that offer? Click here for details.
Liz Miller Learn Robotics

🚀 Pre-Launch: Become a "MakeR" with MakeRobots!

Hey Reader, 👋

Liz Miller, Founder/CEO, here with some Exciting News!

Learn Robotics just acquired MakeRobots™, an Online Robotics Community, and are prepping its Official Learn Robotics Debut in Late 2023.

MakeRobots™ is your one-stop-shop for learning, gaining coding, electronics, and robotics skills, connecting, and building robots for one low monthly membership!

Join MakeRobots™ at our Special Pre-launch Rate!
🤖 Access our Private Community & Robotics Courses
💬 Network, Collaborate, Connect with Other Makers
🔓 Only $5.99/month – locked in for life
⏱️ Pre-launch deal is Limited to the first 1,000 subscribers

This is a perfect opportunity for you to get into the fastest growing robotics community on the internet, at our ground-level, pre-launch membership rates.

👇 Click the button below to Claim your Pre-launch Membership and become a MakeR in the MakeRobots Community, today!

Learn Robotics Botly Favicon

MORE LEARN ROBOTICS ARTICLES