Some years ago, when I started visiting some amateur “Explorer Robot” competitions, I was very disappointed in the robots frequently going around and around randomly, repeating the same path several times. Looking around on the Internet I found Johann Borenstein’s book, Where Am I? - Sensors And Methods For Mobile Robot Positioning. I was very impressed by odometry and dead reckoning. Most of the robots built by amateurs are based on differential steering system, allowing us to know the position coordinates of the robot at any given moment, simply knowing the space covered by each wheel periodically with enough precision.
This dead reckoning navigation system is affected by cumulative error; the measuring precision must be high to ensure a small error circle after a long path. So, after some good results with homemade encoders, I decided to use something better: a couple of 12V-200 rpm geared motors, connected to a couple of 300 Count Per Revolution (cpr) Hall effect encoders, both available at many Internet robotics shops.
To measure rotation, I’ve tried many kinds of encoders, such as:
hacking mechanical mice,
using different kinds of motors,
using photoreflectors …
To catch all the pulses generated by the 300 cpr encoder on a 3000 rpm motor in 4x decoding method (120 kHz), we need dedicated hardware for each encoder. After some experimenting with PIC18F2431, I determined that the correct upgrade is a dsPIC30F4012 motor controller to control wheel position and speed and to perform odometry. Data provided by two motor controllers are collected by a dsPIC30F3013. This general purpose DSC has enough power to get data, do some trigonometry in order to calculate position coordinates, and store data related to the path covered in order to obtain a map of the field, all at a very high rate. This brings us to the “dsPIC based Navigation Control board” or dsNavCon for short. This board is designed as a part of a more complex system. In a complete explorer robot, other boards will control sound, light, gas sensors, as well as bumpers and ultrasonic range finders to find targets and avoid obstacles. A behavior board will decide how to act in order to reach the goal.
As a standalone board, dsNavCon can also be used for a simple “line follower” robot, something more complex like a robot for an odometry and dead-reckoning contest, or a so called “can can robot” (for can collecting competitions). There still is plenty of free program memory in the Supervisor dsPIC to add code for such tasks. With minor or no changes in software, it can also be used standalone for a remote controlled vehicle, using the bidirectional RF modem with some kind of smart remote control. This remote control can send complex commands like “move FWD 1m,” “turn 15° left,” “run FWD at 50 cm/s,” “go to X,Y coordinates,” or something similar. The board and the robot too, are designed to be made by anyone at home without professional tools and equipment.