Help with wheel rotation sensing

Hi guys!

Im new to this forum and I am hoping to get a little help with a problem I am trying to solve. I have a small differential drive robot that I want to be able to push through a course and have it record wheel spins to then retrace the exact same path. The goal is to have the robot follow the recorded path and return to the origin point.

Is there a motor option that can record wheel rotation, and direction itself? Or is there a sensor option that would work reliably? I have looked into the option of encoders but I think the margin of error is to high and the wheels will get dirty, which will possibly inhibit encoder sensing.

Please share your thoughts and let me know if you have any suggestions and ideas for me!

 

Cheers! 

Wheel encoders are often

Wheel encoders are often used for this purpose. Should work fine actually. An other fancy option coul be the use of an optical mouse for feedback.

For example see this instructable: http://m.instructables.com/id/Optical-Mouse-Odometer-for-Arduino-Robot/?ALLSTEPS