PDA

View Full Version : micromouse steering problem



sjerry4u
12-26-2007, 11:29 PM
hi,
I'm using IR sidewall sensors with adc. and sensor are working nice.
i'm using proportional control to keep micromouse to the centre but
at corners of wall mouse tends to move towards the walls. and deflects too much than it would have without correction.
is anyone facing same problem????
what to do???

a7400
12-27-2007, 05:19 PM
dear sjerry

what u can do is whenever there is no wall (ie. the adc readings are below a specific value) just add a virtual wall there.
for correction i guess u might be taking the difference of right and left value sensors...
instead of that ...take the difference between the sensor reading and a constant value (this constant can be kept approximately equal to the value of the sensor when in between the walls)

eg:
let generally the values when in the center of the cell is say arnd 100
if theres no wall on the right... this value might drop to 20 ... so for correction the error might be L_sensor-R_sensor= 100-20 ...this becomes too large and it corrects heavily...using this u can chk if theres no wall or not...but for correction purposes whenever u come to this point...just substitute the vale of R_sensor with 100...

sjerry4u
12-28-2007, 10:31 PM
i'm doing the same thing but sensor values dont fall that sharply but fall gradually.and that is causing problem.

a7400
12-28-2007, 11:12 PM
wat kinda sensors are u using ?? if u r using a capacitor as the peak detector mebbe the capacity is a bit too high...so the value changes gradually

sjerry4u
12-31-2007, 04:16 PM
problem solved it was because result of pid calculation were negetive but couldnt find why it gave negetive result