viccram
Junior Member level 1
hie...
i used the proportional algorithm in linetracking.
i used six lineracking sensors (phototransistors) and modified the algorithm as required.
the problem i faced was when the distance between the sensors and wheel was 30cm the algorithm works fine
but when i had to use the same algorithm in the robot that has 19cm distance between sensor and the wheels the algorithm is not effective the there is oscillation in the motion of the robot
could u possibly suggest how can i solve this problem?
what is the minimum distance between the wheels and the sensors?
and also...i have been doing linetracking using sensors in front of the wheel
but can linetracking be possible when the sensors are behind the wheels??
here is the lintracking subroutine of the code i used:
i used the proportional algorithm in linetracking.
i used six lineracking sensors (phototransistors) and modified the algorithm as required.
the problem i faced was when the distance between the sensors and wheel was 30cm the algorithm works fine
but when i had to use the same algorithm in the robot that has 19cm distance between sensor and the wheels the algorithm is not effective the there is oscillation in the motion of the robot
could u possibly suggest how can i solve this problem?
what is the minimum distance between the wheels and the sensors?
and also...i have been doing linetracking using sensors in front of the wheel
but can linetracking be possible when the sensors are behind the wheels??
here is the lintracking subroutine of the code i used:
Code:
//Some Variables Used
//as_per_point -> dutycycle required (required speed)
//el,lt,cl, extreme left, left,central left sensors
//and similar for er,rt,cr
void linetrack()
{
temp=output& 0x0F;
if(temp==0x00)
return;
else if(temp==0x0F)
return;
else{
if(!(el|lt|cl|cr|rt|er)){}
else{
elx=el;ltx=lt;clx=cl;crx=cr;rtx=rt;erx=er;
}
output=RIGHT_F_LEFT_F;
value=(10*elx+20*ltx+30*clx+40*crx+50*rtx+60*erx);
deviation=(value/(elx+ltx+clx+crx+rtx+erx)-35)/5;
correction_l=as_per_point+deviation*as_per_point/5;
correction_r=as_per_point-deviation*as_per_point/5;
if(correction_l>=255) lval=255;
else if(correction_l<=0)lval=0;
else lval=correction_l;
if(correction_r>=255) rval=255;
else if(correction_r<=0) rval=0;
else rval=correction_r;
}
}