5. Suggested Improvements
- The female headers you soldered into your 3pi make it easy to plug in additional sensors. You can use the procedure here to be creative and plug in various analog and digital sensors.
- The GP2Y0A21YK0F distance sensors have a minimum detection range which sometimes allows the wall follower to get caught on obstacles; once it gets too close to something, the sensor no longer detects that obstacle and the 3pi has no idea it’s stuck. By mounting the distance sensors in the back of the 3pi, pointed forward, you can ensure that most obstacles do not enter the sensor’s minimum range. Another way to avoid the minimum range problem is to replace the forward-looking sensor with one that has a smaller minimum range, such as the Pololu carrier with Sharp GP2Y0D810Z0F digital distance sensor 10cm.
- You might consider putting a large (≥10 uF) capacitor between power and ground next to each sensor as recommended by the sensor’s datasheet . The Sharp distance sensors tend to draw current in bursts, which can introduce noise to the system’s power bus, especially if there are multiple Sharp sensors in the system. You could also consider powering the sensors directly from the battery voltage so long as you can be sure the battery voltage is between 4.5 and 5.5 V; the 3pi’s voltage regulator will generally protect the logic voltage from noise the sensors introduce on the battery side.