From this and other tests, it has become crystal clear that the compass is useless as it is currently being used.
My current plan is to measure the actual magnetic field at lots of points in a grid-pattern throughout the apartment. These robot can then use these measurements to figure out the correct heading based on the compass-reading and the robot's location.
To do this manually would take a loong time (since I need hundreds of measurements just to cover the most important areas). I therefore plan to have the robot do most of the work: I'll try to get the robot to drive along a laser beam while it records the compass-readings every few centimeters. This will result in very precise and fine-grained data, since the robot can measure the straight-line distance it has traveled to within the nearest centimeter.
Ideally, the whole apartment should be crisscrossed with a fine-grained grid of measurements, but that would take a lot of time to do. As first step, however, I only need to do the measurements along the path that the robot is expected to follow. To make a path between the living-room and the kitchen, for instance, I only need measurements along a handful of lines.
The required hardware:
The laser itself is easy to set up. A cheap keyring laser-pointer mounted on a piece of steel wire, or on some Lego will do nicely. I think I have a laser-pointer laying around somewhere.
The laser-detector on the robot might be more tricky. I'll first try to mount two light-sensitive resistors side by side at the front of the robot, separated by a few millimeters. The resistors will be connected to two of the microcontroller's analog/digital converter inputs. When the robot is on course, the laser-beam will hit between the two resistors, and both resistors will measure the same amount of light. When the robot starts to deviate from its course, the laser-beam will start to hit one of the resistors more than the other. The microcontroller will notice that the measurements of the two resistors are starting to differ, and can steer the front wheels accordingly.
0 comments:
Post a Comment