Map Objects On A Grid

Introduction

This project is a combination of an Arduino sketch and a Perl program. Existing Arduino sketches were combined and modified for the project and a Perl program created to send commands and receive data from the Arduino.

This all came about after I purchased an Arduino and started playing with and modifying some of the existing sketches. I got to thinking what if... (The rest is history.)

The project uses an Arduino to control a servo and ultrasound sensor to collect data that can be used to locate objects in a grid of cells. Essentially it is a radar (sonar) sweep of the grid cells to locate objects. The Arduino receives commands from a Perl program and returns raw data for processing.

Note: This turned out to more of a programming project than a hardware project.

What conclusions did I come to about the project (so far)?

Documentation

Why Perl and not some other language?
Calculate an Object's Location
Servo
Sensor
My Servo/Sensor Mounting Hardware
LCD
Project Hardware
Project Arduino Sketch
Project Control Program
Project Notes

Perl Communication Object

communications.pm
Note: Used by the control program to communicate with the Arduino.

Test Programs and Sketches

Perl Test Programs
Arduino Test Sketches

Downloads

map-a-grid.zip
map-a-grid.pdf

What Next (If I feel like it)

  1. Improve this documentation (polish the cannonball)
  2. Make the GUI better looking (it's kind of clunky)
  3. Modify the control program to run the ping sweep in a thread so it does not lock up the GUI.
  4. Modify the ultrasound sensor with (paper?) cylinders around the receiver (and/or transmitter) to narrow its detection angle.
  5. Test/calibrate the sensor to refine its distance calculations. I suspect that it may be slightly off.
  6. Add a second servo to move the sensor vertically and determine how tall an object is.
  7. Use a more accurate sensor. Microwave? Laser?
  8. Scan the grid cells. Save the occupied counts for each cell. Move the sensor to a different location and scan again. Add the second counts to the first counts. This, in theory, should increase the accuracy. Move the sensor to a third location Etc.
  9. Use Wi-Fi rather than connecting directly to the computer's USB port.
  10. Mount the Arduino, servo, and sensor on a remotely controlled vehicle (car or helicopter). I need to some way determine the servo's location (coordinates) and the servo's orientation (zero direction).

Arduino Documentation

www.arduino.cc
Arduino Reference Manual
arduiniana.org