How to build a Line Following Robot 2 – Motor controlling unit

Well, the motor controlling circuit with L293D is simple as follows. The line follower can turn left or right by changing wheel speeds. There for a simple control mechanism will be enough.

Pin 4 and 5 controls left motor while pin 6 and 7 controls the right motor.

H-Bridge IC


High Left

High Right

Low Left

Low Right

Description

On

Off

Off

On

Motor runs clockwise

Off

On

On

Off

Motor runs anti -clockwise

On

On

Off

Off

Motor stops or decelerates

Off

Off

On

On

Motor stops or decelerates

If you need to give pwm(pulse wave modulation) signal separately to each motor , you can disconnect pin 1 and 9 from +2V and give pwm1 to pin 1 and pwm2 to pin 9.

In next post we will discuss how to program the pic to follow the line.

How to build a Line Following Robot 1 – Identifying the line

To follow the line robot need to identify the line first. Well there are few things you can do to identify a black line on white background or vice versa. One way is use LDR array and tracks the light reflection level. Black line will not reflect the light as white color. Or you can use IR beam. In this post I am going to discuss how we can use IR beams to identify the line. Black color will reflect the IR beam but white will not. Setting up your sensors will depend on your design. To keep the things simple you can arrange them linear. To gain speed you can arrange them to an arrow shape. In this example we will use 3 IR sensors and locate them as an arrow. There are several IR types to make the following circuit work you will need 3mm IR receivers. For IR emitters we can use both 3mm and 5mm.

If the width of the line to be followed is 2cm, you can go for the following set up.

Circuit diagram for the IR unit as follows.

The IC LM324 can handle 4 IR sensors. We need only 3 to track the line we will use the 4th sensor to identify obstacles.

We will see how to make the circuit to control the motors in next post.

In to the Robotics

As moving to the final year of my BSc reading I had the opportunity to take robotics as an elective subject. Even though I was an IT student I have choose this subject because I love electronic gadgets and robots very much. Actually the subject is fine than I thought it in the first hand. Later on I was assigned to assignment .The objective is to build a line following robot using a pic. It was a group assignment and i was assigned to a group with some enthusiastic guys. As we work on the assignment we had few problems with pic programming. As usual we did google but strangely there was nothing on google .I said “nothing” because even there were content we could not understand it. More or less what I have felt is that the people who knew this subject are not willing to help much. So here I am going to explain how to build a simple line following robot. My next posts will be a step by step guide to build a solution to a line following robot. I will keep the content as simple as possible in both software and hardware. But if you don’t know how to identify the pins of a led and to program a simple hello world program in c this guide will not help you at all. First of all we need to identify, why we build this robot? What are the requirements? What are the technologies that going to use? By analyzing all those things, a design should be made.

Following videos shows few simple robots which we can get an idea how to build your own one.

A simple moving robot

A line following robot

A balancing robot

Follow

Get every new post delivered to your Inbox.