15-12-2012, 11:30 AM
LINE FOLLOWING ROBOT
LINE FOLLOWING.docx (Size: 1.29 MB / Downloads: 73)
Introduction
The line follower is a self operating robot that detects and follows a line that is drawn on the floor. The path consists of a black line on a white surface (or it may be reverse of that). The control system used must sense a line and maneuver the robot to stay on course, while constantly correcting the wrong moves using feedback mechanism, thus forming a simple yet effective closed loop System. The robot is designed to follow very tight curves.
Sample Paths
The path is a black line on a white background with width of 3 cm (except at bends where a little variation may be present). It may contain paths laterally displaced by a around 3 cm and also gap of at most 5 cm. (All these specifications may vary one competition to other).
What is a line follower?
Line follower is a machine that can follow a path. The path can be visible like a black line on a white surface (or vice-versa) or it can be invisible like a magnetic field.
Why build a line follower?
Sensing a line and maneuvering the robot to stay on course, while constantly correcting wrong moves using feedback mechanism forms a simple yet effective closed loop system. As a programmer you get an opportunity to ‘teach’ the robot how to follow the line thus giving it a human-like property of responding to stimuli.
Practical applications of a line follower :
Automated cars running on roads with
embedded magnets; guidance system for industrial robots moving on shop floor etc.
Prerequisites:
Knowledge of basic digital and analog electronics.
(A course on Digital Design and Electronic Devices & Circuits would be helpful) C Programming
Sheer interest, an innovative brain and perseverance!
Background:
I started with building a parallel port based robot which could be controlled manually by a keyboard. On the robot side was an arrangement of relays connected to parallel port pins via opto-couplers.
The next version was a true computer controlled line follower. It had sensors connected to the status pins of the parallel port. A program running on the computer polled the status register of the parallel port hundreds of times every second and sent control signals accordingly through the data pins.
The drawbacks of using a personal computer were soon clear -
It’s difficult to control speed of motors
As cable length increases signal strength decreases and latency increases. A long multi core cable for parallel data transfer is expensive.
The robot is not portable if you use a desktop PC.
The obvious next step was to build an onboard control circuit; the options - a hardwired logic circuit or a uC. Since I had no knowledge of uC at that time, I implemented a hardwired logic circuit using multiplexers. It basically mapped input from four sensors to four outputs for the motor driver according to a truth table. Though it worked fine, it could show no intelligence - like coming back on line after losing it, or doing something special when say the line ended. To get around this problem and add some cool features, using a microcontroller was the best option.
Basic design and requirements
The robot is built with ATmega8L, L293D,IR sensors or ldr,LM358 , platform
consisting of a toy car chassis (or hand made Al sheet chassis). The robot is designed using two motors controlling wheels. It has infrared sensors on the bottom for detect black tracking tape .It captures the line position with the help of these optical sensors called opto-couplers mounted at front end of the robot. (Each opto-coupler consists of an IR LED and an IR Sensor) when the sensors detect black surface, output of comparator, LM358is low logic and for white surface the output is high. It reports to the microcontroller for accurate control and steering of motors. Microcontroller ATmega8L and Motor driver L293D were used to drive the motors.
Basic operation
The basic operations of the line follower are as follows:
1. Capture line position with optical sensors mounted at front end of the robot.
For this a combination of IR LED’s and Photo Transistor called an opto- coupler is used. The line sensing process requires high resolution and high
robustness.
2. Steer robot to track the line with any steering mechanism. To achieve this we
use two motors governing wheels motion.
Use of comparator in IR sensor
As above we see that two inputs are required for comparator. One input is from photo-receiver (like photo-diode), other is generated by us using potentiometer. The second voltage is also called as reference voltage for that sensor.
Setting of reference voltage (Vref)
We can vary reference voltage by using potentiometer, such that it can vary from 0V to Vcc. We set reference voltage as mean value of the sensor inputs measured with and without light.
Arrangement of Sensors
An array of sensors arranged in a straight row pattern is bolted under
the front of the robot. It is used to locate the position of line below the robot. We can use any number of sensors. If we have lesser number then our robot movement is not smooth and it may face problems at sharp turns. If we used higher number of sensors robot movement will become smooth and reliable for sharp turns, only drawbacks it requires complex programming for micro-controller and requires more hardware. Thus we must choose optimum number of sensors.
Voltage Regulator 78xx
Voltage regulators convert fixed DC output voltage from variable DC. The most commonly used ones are 7805 and 7812. 7805 gives fixed 5V DC voltage if input voltage is in between 7.5V to 20V.
They help to maintain a steady voltage level despite varying current demands and input voltage variations.
If input voltage is <7.5 V then regulation won't be proper i.e. if input is 6V then output may be 5V or 4.8V, but there are some parameters for the voltage regulators like maximum output current capability, line regulation etc.. , that won't be proper.
To identify the leads of the 7805, you have to keep the lead downward (Fig a) and the writing to your side, (see the figure below). You can see the heat sink above the voltage regulator.(1-input,2-gnd,3-output).
LINE FOLLOWING.docx (Size: 1.29 MB / Downloads: 73)
Introduction
The line follower is a self operating robot that detects and follows a line that is drawn on the floor. The path consists of a black line on a white surface (or it may be reverse of that). The control system used must sense a line and maneuver the robot to stay on course, while constantly correcting the wrong moves using feedback mechanism, thus forming a simple yet effective closed loop System. The robot is designed to follow very tight curves.
Sample Paths
The path is a black line on a white background with width of 3 cm (except at bends where a little variation may be present). It may contain paths laterally displaced by a around 3 cm and also gap of at most 5 cm. (All these specifications may vary one competition to other).
What is a line follower?
Line follower is a machine that can follow a path. The path can be visible like a black line on a white surface (or vice-versa) or it can be invisible like a magnetic field.
Why build a line follower?
Sensing a line and maneuvering the robot to stay on course, while constantly correcting wrong moves using feedback mechanism forms a simple yet effective closed loop system. As a programmer you get an opportunity to ‘teach’ the robot how to follow the line thus giving it a human-like property of responding to stimuli.
Practical applications of a line follower :
Automated cars running on roads with
embedded magnets; guidance system for industrial robots moving on shop floor etc.
Prerequisites:
Knowledge of basic digital and analog electronics.
(A course on Digital Design and Electronic Devices & Circuits would be helpful) C Programming
Sheer interest, an innovative brain and perseverance!
Background:
I started with building a parallel port based robot which could be controlled manually by a keyboard. On the robot side was an arrangement of relays connected to parallel port pins via opto-couplers.
The next version was a true computer controlled line follower. It had sensors connected to the status pins of the parallel port. A program running on the computer polled the status register of the parallel port hundreds of times every second and sent control signals accordingly through the data pins.
The drawbacks of using a personal computer were soon clear -
It’s difficult to control speed of motors
As cable length increases signal strength decreases and latency increases. A long multi core cable for parallel data transfer is expensive.
The robot is not portable if you use a desktop PC.
The obvious next step was to build an onboard control circuit; the options - a hardwired logic circuit or a uC. Since I had no knowledge of uC at that time, I implemented a hardwired logic circuit using multiplexers. It basically mapped input from four sensors to four outputs for the motor driver according to a truth table. Though it worked fine, it could show no intelligence - like coming back on line after losing it, or doing something special when say the line ended. To get around this problem and add some cool features, using a microcontroller was the best option.
Basic design and requirements
The robot is built with ATmega8L, L293D,IR sensors or ldr,LM358 , platform
consisting of a toy car chassis (or hand made Al sheet chassis). The robot is designed using two motors controlling wheels. It has infrared sensors on the bottom for detect black tracking tape .It captures the line position with the help of these optical sensors called opto-couplers mounted at front end of the robot. (Each opto-coupler consists of an IR LED and an IR Sensor) when the sensors detect black surface, output of comparator, LM358is low logic and for white surface the output is high. It reports to the microcontroller for accurate control and steering of motors. Microcontroller ATmega8L and Motor driver L293D were used to drive the motors.
Basic operation
The basic operations of the line follower are as follows:
1. Capture line position with optical sensors mounted at front end of the robot.
For this a combination of IR LED’s and Photo Transistor called an opto- coupler is used. The line sensing process requires high resolution and high
robustness.
2. Steer robot to track the line with any steering mechanism. To achieve this we
use two motors governing wheels motion.
Use of comparator in IR sensor
As above we see that two inputs are required for comparator. One input is from photo-receiver (like photo-diode), other is generated by us using potentiometer. The second voltage is also called as reference voltage for that sensor.
Setting of reference voltage (Vref)
We can vary reference voltage by using potentiometer, such that it can vary from 0V to Vcc. We set reference voltage as mean value of the sensor inputs measured with and without light.
Arrangement of Sensors
An array of sensors arranged in a straight row pattern is bolted under
the front of the robot. It is used to locate the position of line below the robot. We can use any number of sensors. If we have lesser number then our robot movement is not smooth and it may face problems at sharp turns. If we used higher number of sensors robot movement will become smooth and reliable for sharp turns, only drawbacks it requires complex programming for micro-controller and requires more hardware. Thus we must choose optimum number of sensors.
Voltage Regulator 78xx
Voltage regulators convert fixed DC output voltage from variable DC. The most commonly used ones are 7805 and 7812. 7805 gives fixed 5V DC voltage if input voltage is in between 7.5V to 20V.
They help to maintain a steady voltage level despite varying current demands and input voltage variations.
If input voltage is <7.5 V then regulation won't be proper i.e. if input is 6V then output may be 5V or 4.8V, but there are some parameters for the voltage regulators like maximum output current capability, line regulation etc.. , that won't be proper.
To identify the leads of the 7805, you have to keep the lead downward (Fig a) and the writing to your side, (see the figure below). You can see the heat sink above the voltage regulator.(1-input,2-gnd,3-output).