Wednesday, July 14, 2010

3pi pololu robot 3rd experiment

This time we decided to check the precision we can obtain measuring distances with the Pololu 3pi.
There is a function called encoders_get_counts_m1 in the AVR Library available on 3pi stuff. The function returns the counts of motor 1, and declares that the value of the distance from the start point is near 3 mm/count. So, we coded 3pi to follow a (straight) line, stopping after what should be 10 cm forward and wait for button B pressure, and so on, until the end of the line.
We measured each stop with a rule, and got the values (in centimeters):
7.8 - 8.5 - 8.5 - 7.9 - 7.9 - 9.2 - 7.6 - 7.5.
The bigger difference is 9.2 - 7.5 = 1.7 cm. This points to a possible error of aprox. 18.4% on the measurement. But it is not conclusive yet. We must check if there are no external influences, as the pressure of the button, that can be changing the results.





2 comments:

ryan said...

Hello,

The 3pi does not have encoders on it, so I wouldn't expect encoders_get_counts_m1 to return anything useful unless you have somehow modified your 3pi to have encoders.

- Ryan

Duo said...

Thanks,

Ryan, I will check out this information. I only applied the avr library funcion as mentioned, tryinf to get some meaningfull result, what seems I did not, and now, thx to you, may understand why not :)