Line Tracking Robot: Solving Corrections Logic w/ 3 Sensors

In summary, you will need two sensors in the front and two sensors in the back, and one in the middle.
  • #1
Altairs
127
0
I am working on a robot which moves by tracking white lines. I am stuck at making a logic for making correction to robot incase it goes a little astray. How many sensors atleast will I need and where they should be placed assuming that the base of the robot is square or rectangular.

My idea was that there will be two sensors at the back and one in front in the middle of the sensors at the back. As long as the font one is on the line the two motors will remain running. Now, for example the robot moves towards left. The right sensor will be on the line and the right motor should stop.This will make the robot rotate clockwise. Now I am stuck here and don't know how to use this three sensor design to make the robot come back to its original position where only the front sensor is over the line.
 
Engineering news on Phys.org
  • #2
Perhaps you could add a couple of "if-then" statements so that, if the sensor on the right and the sensor in the middle both see the white line, the left motor continues at full speed and the right motor moves forward at half speed. It's not a complete solution, but it egts you closer to what you want.
 
  • #3
I think you are on the right track (pun intended I guess). What you are looking for is a way to reduce the 'hunting' that will occur once it gets off the line (i.e. constant zigzagging over the line). Think of it this way: online = go straight (both moters on). deviate left, as in you example, slows the right motor to point back to the line, but now the motion vector is angled to the right of the track.

So, you need to add a condition that turns LEFT a bit once the line is regained. Say, when the right sensor comes back off the black line and hits white again. How much and how long a left motor stall to apply will be a judgement call. Probably best to have a variable that allows you to adjust it by trial and error. Some 'hunting' will still be inevitable, but you should be able to dampen it with this approach.
 
  • #4
I think you need only "Two" sensers in Left and right side in the front of your robot.
pf_robot.jpg

I have designed a robot like this and using MCS-51. For example if the Right sensor touch the line, you should slow down the right motor a little. So that the robot will run along the line by "Z" style trace.
 
  • #5
Thanks a lot guys...
 
  • #6
hey altairs...
i am dev ...a 2nd yr students of electronics field..
i am working on d same project (LFR)
could u help me ...?
which microcontroller should i USE...?
 
  • #7
I don't like the idea of zigzagging along a line. I find that incredible inefficient. This reminds me minimzing algorithms, and how simple algorithms while they seem robust, can be horrible inefficient.

My idea involves 4 sensors, two in front, two in back. The idea is that you not only want to know if you've gone over the line, but you want to know how fast your crossing the line.

With only two sensors, you sense that your approaching the line and you make a correction, but the correction is seemingly arbitrary. You may find yourself going quickly to the line on the otherside.

So, let's assume a kink in the line is up ahead. The line bends past the front sensor, which starts a counter. Then, when the line crosses the rear wheels, you now have a distance that the car has how much the line has strayed. From this, you can linearly interpolate (or higher order) from these two (or more) points to get an idea of what the line is doing. This will let you make a 'more' correct...correction.

If your sensors can see which way the line is moving, then you could just have two sensors, one behind each other.

Hope that made any sense at all.
 

1. What is a line tracking robot?

A line tracking robot is a type of robot that is designed to follow a line or path using sensors and programmed logic. It is commonly used in industrial and educational settings for tasks such as automated assembly or maze navigation.

2. How does a line tracking robot work?

A line tracking robot works by using sensors, such as infrared or light sensors, to detect the contrast between a line and its surroundings. These sensors send signals to the robot's microcontroller, which then uses programmed logic to make corrections in the robot's movement to stay on the line.

3. What are the benefits of using a line tracking robot?

Line tracking robots offer several benefits, including increased efficiency and accuracy in tasks that require following a specific path. They also eliminate the need for manual guidance, reducing the risk of human error and freeing up time for other tasks.

4. What is the role of 3 sensors in line tracking robots?

The 3 sensors in a line tracking robot are used to detect the line and make corrections in the robot's movement. By using multiple sensors, the robot can determine the direction and distance of the line and adjust accordingly, making it more accurate and efficient.

5. Can a line tracking robot be programmed for different line colors?

Yes, a line tracking robot can be programmed to follow lines of different colors by adjusting the sensitivity of its sensors and programming the logic accordingly. This allows for versatility and adaptability in various environments and tasks.

Similar threads

Replies
5
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • DIY Projects
Replies
13
Views
1K
  • Mechanical Engineering
Replies
10
Views
3K
  • Programming and Computer Science
Replies
2
Views
2K
Replies
1
Views
2K
  • Special and General Relativity
Replies
4
Views
740
  • Precalculus Mathematics Homework Help
Replies
6
Views
1K
  • General Engineering
Replies
19
Views
10K
  • Engineering and Comp Sci Homework Help
Replies
3
Views
2K
Back
Top