Lap Timer


10/27/02:
We wanted a timing mechanism for line follower robots that was more accurate than a wristwatch. I built this lap timer to do the job. It uses a Sharp GP2D12 distance sensor to detect a passing robot and displays the cumulative elapsed time for each lap. I am using a Kronos Robotics LCD4 unit that I modified to use less space as the display, and a PIC 16F876 MPU as the brain.

The timer's program is written in "C" using the Wiz-C 8.04c compiler. Click here for a program listing. The timer has 4 functions:

  1. Set deadband time - sets the minimum time that the IR beam must be blocked/unblocked before the timer recognises it as such. This prevents the timer from counting a robot more than once as it passes. The deadband time is stored in EEPROM.
  2. Set maximum distance - sets a distance past which the timer ignores sightings. This prevents the timer from "seeing" a robot on the far side of a closed track. The maximum distance is stored in EEPROM.
  3. Arm - Starts the timer watching for the IR sensor to be blocked. Timing starts on the first blockage, and the cumulative "lap" time is shown on subsequent blockages.
  4. Reset - stops the timer.

back

Last Modified 04/12/03.