Robot position with quadrature encoder
October 15, 2009
I'm building a robot for environment mapping. It's a simple "start here"-class robot: 2 wheels, 2 dc motors and a range sensor mounted on a servo. I plan to hook it up with my PC 1st by USB and later on by wireless somehow.
I want it to drive around and send the range sensor readings to the PC which in turn will be building a map of the environment. The hard part will be knowing the robot's position relative to it's earlier position(s). I know this would be easy with a GPS or an accelerometer, however I wish to find a more lowtech/DIY solution, so here is my idea:
What if I attached a quadrature encoder (aka rotary encoder) to the motor shafts? Knowing the size of the wheels it should be easy to calculate how far it is moving in any direction at a given time?
Has anyone tried something similar? Has anyone ever hooked up a quadrature encoder to a MCU? Do you guys think it'll work? Do you foresee any problems?
EDIT: I forgot to mention that I allready found instructions on how to hook it up to an Arduino. That's not the issue. It's more practical advice, ideas and experiences in the use of it I'm looking for...