My Line Follower Strays Off Track A Lot

Thread Starter

Utkarsh Verma

Joined Oct 30, 2016
102
I recently finished this Line Follower Robot. It does work but it doesn't work PERFECTLY. On the link I've posted, there is a video of the author's Line Follower Robot. As you can see, his LFR doesn't even stray off the track even a bit. Its almost as if it's attached to the line. Now coming to my case, my LFR doesn't stay on the line. It is able to sense the line all right, but the sensed output is MAYBE high or long which leads to more than enough turning of the robot. How do I correct it? That is why it strays off the line. It's only my hunch. I'd also like to state that it's chances of successfully following a line are also similar to 80%. Due to the overturning, the robot is easily pushed off track.
 

Thread Starter

Utkarsh Verma

Joined Oct 30, 2016
102
I recently finished this Line Follower Robot. It does work but it doesn't work PERFECTLY. On the link I've posted, there is a video of the author's Line Follower Robot. As you can see, his LFR doesn't even stray off the track even a bit. Its almost as if it's attached to the line. Now coming to my case, my LFR doesn't stay on the line. It is able to sense the line all right, but the sensed output is MAYBE high or long which leads to more than enough turning of the robot. How do I correct it? That is why it strays off the line. It's only my hunch. I'd also like to state that it's chances of successfully following a line are also similar to 80%. Due to the overturning, the robot is easily pushed off track.
Though I'd like you all to also look for other reasons which might be causing this. There's also a probability of the motor being of high rpm because the author had used 60RPM@6V motors, while I'm using 150RPM@12V motors.
 

AlbertHall

Joined Jun 4, 2014
12,346
Somewhere in the code there will be some code which controls the motor speeds in response to detecting leaving the line and you may need to reduce the action taken so it turns less or more slowly.
If your robot is travelling faster than the code was intended for then you may need to increase the sampling rate used so leaving the line is detected earlier or just reduce the maximum speed of the robot in code by reducing the maximum PWM from 100% to something lower.
 

Thread Starter

Utkarsh Verma

Joined Oct 30, 2016
102
Somewhere in the code there will be some code which controls the motor speeds in response to detecting leaving the line and you may need to reduce the action taken so it turns less or more slowly.
If your robot is travelling faster than the code was intended for then you may need to increase the sampling rate used so leaving the line is detected earlier or just reduce the maximum speed of the robot in code by reducing the maximum PWM from 100% to something lower.
thanks for this. I already knew that changing the code would solve my issue. However the thing is that I don't have a WORKING PICKIT.
Therefore I would like to know if there is a non code solution.
 

R!f@@

Joined Apr 2, 2009
9,918
Nope
The code is the brain figuring out where the line is, where to turn and how fast or slow to drive the motor.
 

drc_567

Joined Dec 29, 2008
1,156
If you were to fabricate an assembly so that a speed reduction could be applied to the drive gear, would that work?
A drive gear of 1 cm diameter, mating with a driven gear of 2.5 cm diameter would yield an output sped of 60 rpm.
There would also be a corresponding increase in torque.
The question is whether the vehicle has enough free space to accommodate the new gear shaft.
If such an arrangement looks feasible, a 3-D printer could provide the required gears.
 

AlbertHall

Joined Jun 4, 2014
12,346
If you were to fabricate an assembly so that a speed reduction could be applied to the drive gear, would that work?
A drive gear of 1 cm diameter, mating with a driven gear of 2.5 cm diameter would yield an output sped of 60 rpm.
There would also be a corresponding increase in torque.
The question is whether the vehicle has enough free space to accommodate the new gear shaft.
If such an arrangement looks feasible, a 3-D printer could provide the required gears.
A PicKit would be a lot cheaper than a 3-D printer though.
 

Thread Starter

Utkarsh Verma

Joined Oct 30, 2016
102
If you were to fabricate an assembly so that a speed reduction could be applied to the drive gear, would that work?
A drive gear of 1 cm diameter, mating with a driven gear of 2.5 cm diameter would yield an output sped of 60 rpm.
There would also be a corresponding increase in torque.
The question is whether the vehicle has enough free space to accommodate the new gear shaft.
If such an arrangement looks feasible, a 3-D printer could provide the required gears.
I wouldn't go that far due to lack of resources. Anyways stop this thread!
 
Top