This is the ending line gate for a line following race track. The gate receives a signal to start two timers once both cars have left the starting gate and the timers are halted by breaking two corresponding tripwires at the end gate.

Dependencies:   mbed

About

This is a program that is used in determining the race times of two separate line following cars on a track. The program uses a wireless signal that is sent from the starting gate to determine when to start the timers and the timers are stopped by breaking the tripwire at the finish line. The first race car to break a tripwire will have that corresponding gate's LED lights also light up to indicate which car finished first. This is achieved almost entirely through interrupts in which a falling condition is detected for the tripwires and a rising condition is detected for the timer start. The times can also be printed out to a terminal screen by pressing a connected button. Alternatively, the ending gate can work entirely without timing by disregarding the receiving component.

Hardware

The hardware to implement this is fairly straightforward and is shown below. The G and B indicate different colored LEDs (Green and Blue respectively) which are used to determine a winner at the ending gate. /media/uploads/mdu7078/endinggate-1.png

Circuit diagram constructed using CircuitLab.

Usage

The mbed should be reset each time in order to clear the previous timing data. The tripwires should also be reset prior to this reset or else they will register again. The print button can be pressed at any time to print the timing results through a serial connection. If neither car has finished, the display will indicate this, or alternatively once each car has finished, its time will be shown.

Tags

2013-05-13 tip Revision History Files