Line follower robot timer
This is a small hardware + software system intended for measuring lap time of line follower robots. The hardware is built from common computer mouse and optical light beam sensor in a way where sensor is simulating left mouse button press. When the robot blocks the light beam, the mouse left button is pressed down and if the light beam is freed again the button is released. The software measures the time between mouse button presses. It is important not to use the real computer mouse during the measuring period, but it is possible to test the software with real mouse.
Hardware
Components for electronics:
-
5 x 2 cm PCB prototyping board
Hamamatsu S4282-51 light modulation photo IC
Any bright red LED
10uF 6,3V capacitor
100nF capacitor
15r resistor (you can even skip it)
Two RCA (or BNC) plugs and receptables
~1m of two wire cable
Plastic pipe for forming the arc for cable
Velleman VTMG12 10x magnifier
Two boxes
Hot glue
Assembly instructions:
Disassemble the
USB mouse, remove the left button switch
Solder the photo sensor and capacitors on the prototyping PCB
Connect the sensor PCB to the mouse PCB (by soldering or glueing)
Solder the power and signal wires between sensor and mouse PCB-s (you need to study the mouse schematics)
Make holes into receiver box for RCA receptable and
USB cable
Fit the RCA receptable and solder the wires from it to the sensor PCB
Make a hole for lens into receiver box
Prepare a place in receiver box for sensor board which can be adjusted to the focal point of the lens
Make holes into transmitter box for LED and RCA receptable
Fit and solder the LED, resistor and RCA receptable in transmitter box
Make a wire with RCA plugs and connect it between receiver and transmitter
Double check schematics and plug the mouse cable to the PC
The transmitter LED should light up
Darken the room and see how the light falls onto the photo sensor through receiver lens
Adjust the position of the sensor board so the light spot covers the hole sensor package
Fix the sensor board by glueing
Close the boxes
Test the system with timer software
Software

Screenshot of timer working
The software is written in Visual Studio 2009 C# and released under GPL licence. It's a very simple program with open source code so there's not much to describe. To start measuring lap times, press the start button in the window, press enter key on keyboard or press middle mouse button. To end measuring, press the escape key on keyboard or the right mouse button. Keep the program focused while measuring and don't move or press the left mouse button on real mouse.
The timer software window is always on top so it can overlay the Excel competition table. In the competition table, every robot have three trials among which the best time is chosen.
Author