Thursday, July 7, 2016

Line Following Robot With Manual Control

Line Following Robot With Manual Control:

Line Following Robot

Components Required:

  • Arduino UNO
  • A Chasis for your BOT ( You can build it yourself )
  • Two DC Motors along with Tires
  • L293D Motor Driver
  • Caster Wheel
  • Infrared Sensors ( Transmitter and Receiver - 5 each )
  • 5K Potentiometers for PCB
  • 9V Battery for Power Supply
  • Bluetooth Module for Wireless Remote Control
  • Analog Joystick or Push Buttons for Wired Remote Control
  • Male and Female Connectors ( 10 each )


Designing the Body:

Before configuring any Hardware or Programming, you should take care of the chasis (body of the robot) that you are going to use. Once you get ready with your chasis, connect the two motors adjacently on two sides of the chasis and wind them with the help of zip ties or whatever you are comfortable with (make sure that the motor is tied tightly enough with the chasis). After that, connect a caster wheel at the front end of the chasis to make a free wheel, so that your bot can move sideways freely with the help of just two motors.

After you get the design of your bot ready, here comes the critical and the most important part. To build a line following robot with manual control, you have to deal with two parts basically: The Automated Part and The Manual Part.

The Automated Part:

To begin the automated part, you must first design the sensor of your robot. You can build the sensor yourself by buying the infrared sensors and the potentiometers or you can easily get a "digital sensor" from the market which will work even better with your project. If you want to learn to build a sensor board yourself with the help of infrared sensors, click here.

Once you get done with your sensor board, you need to check whether it does work with the design of your arena or not. For this, you need to have some knowledge about serial monitoring.

Serial Monitoring helps you to check whether your sensor is working correctly or not. So, after you get done with your sensor board, you move on to the next part, i.e. the manual part.

The Manual Part:

You can control a robot manually with the help of a remote control, which can be wired or wireless. Making the manual part of the robot is not as complicated as the automated part. So, you can handle this with more comfort.


If you want to make a wired remote control for your robot which can be a cheaper option, then you can deal with analog joysticks or the push buttons. Another thing that you can try is a movable potentiometer which can work like a joystick. Once you build your remote with any of the above components, you can connect the wires to the arduino digital pins directly. You need to make sure that you send either a high voltage signal or a low voltage signal to command your bot accordingly.
For example: If you are using 4 push buttons, then each button should send a '1' (HIGH) signal to an arduino digital pin so that you can process the particular signal to perform the operation on your robot.


Making a wireless remote  control for your bot is comparatively easier, but a little expensive. All you need is a bluetooth module and a smartphone. You connect the bluetooth module to an analog pin of the arduino and serial monitor the input from your smartphone to the arduino, whenever you press any button on the app of your smartphone. Then, by analyzing the different values received by the module from your smartphone by pressing different buttons on your phone, you write a program to perform the respective task using the if...else conditions.

How to switch between the Automatic and the Manual part?

Most people get confused when it comes to switching between the automatic and the manual part in their program. Well, it's quite simple with a technique that I generally use. You can also use the Interrupt technique to switch your robot, but I prefer using a separate digital pin to do that.

Assign a separate digital pin and connect a button to the pin if you are using a wired remote. As soon as you give a high signal to the pin, make your program runs the automatic part. You can also use a separate pin for the manual part which is activated when you give a high voltage to that pin. This might get confusing to you, but you will eventually get to the point that I'm trying to explain, once you get done with the programming part that we discussed earlier.

For the wireless remote, it is quite simple. You don't even need to use a different pin for this purpose. Assume a button in your phone application that you want to use to change the robot from being autonomous to a manually controlled one. Check its value using the serial monitor and assign it in your program for doing the exact operation that you want when the button is pressed. Do the exact same with another similar button when you want to switch from manual to the automatic part.

That is it. Well, I must say, it's easier to read a blog about building an automatic robot, but it is a challenging task to build it on your own. You will eventually get tangled with a lot of problems, once you get going with your project. But remember one thing, "Every problem has different solutions to it".

I wish you luck to make your project a success.

Keep sharing. Keep building.

Thank You.


  1. Also write on P, I and D control and combination of them.

  2. Where can i get the equipments required?


Featured Post

Line Following Robot With Manual Control

Line Following Robot With Manual Control: Line Following Robot Components Required: Arduino UNO A Chasis for your BOT ( Yo...