Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

i am having linetracking problem

Status
Not open for further replies.

viccram

Junior Member level 1
Junior Member level 1
Joined
Oct 15, 2007
Messages
15
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,433
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:
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;

}

}
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top