Shown at left is the robots latest appearance. The wheel encoders version 1 is shown.
Home brew wheel encoders.
My first attempt at making wheel encoders on each wheel was a success. But I discovered more problems with both the wheels, encoder and method than I bargained for! The plan was to put a rotating rim on the inside of each tire, and count the holes. I made the rim by carefully marking and punching out the holes, every 10 degrees so that the wheel had 36 positions. The optical interupter was mounted on a bracket - seen here as the black rectangular object just above the encoder wheel. It actually works mechanically very well, and I was able to count the holes very accurately to put the robot exactly at the distance I wanted and make accurate turns.
But while that worked ok, the original wheel - a hard rubber one, worked only on perfect smooth surfaces. In a real world home environment, the wooden parquet tile floor - the wheels failed miserably and slipped on ever bump or crack. It even got stuck on a micro piece of sand.
Next, I went back to the original foam wheels you see here. They grip the floor great, and walk right over any imperfections or sand/lint. Testing showed that the robot could still not go straight even with the encoders counting exactly the same for more than five feet or so. The problem is the differential traction on the floors for each wheel still made it up to six inches off the line after six to 10 feet. Also, turns were giving me a whole plethora of problems. While I can accuratetly set up the right wheel counts, the bigger the angle turned, the less accurate it was from wheel slippage while rotating. Even worse, different floor surfaces gave hugely different results! So I would program a 90 degree turn, and on a smooth floor it might come close. But on the wood, I got much less, and on carpet... totally up predictable.
Finally, dust really sticks to the wheels and disk. While turning, the static charge increases wildly, and it picks up sand, dust and whatever and deposits it directly on the photo sensor. Geez. So I can now come to the following conclusions from these extensive experiments:
1. The wheel encoder must be sealed and no fine dust can enter.
2. Only one wheel is needed to measure the distance traveled. Both do not add any accuracy because the robot can count the same number on both wheels and its still wont be on the line.
3. We must live with the fact that the turn angle will be somewhat dependent on the surface.
4. To follow a straight course toward a goal, the encoders on the wheels are not sufficient, and additional navigation methods will have to be employed over 3 to 6 feet or so.