|
|
|
| Electronics |
Pic 16877F Microcontroller with interface card)
This little unit does all the timing, and sends signals to the tri-state LEDs. It then sends the results to the PC via the serial port.)
PC Interface:
This is my third revision of intefacing a PC to a timing system.
2002 I used the parralell port to connect to three sensors on the track.
2003 I used a 24 bit Digital I/O PCI card that I found on ebay. This card allowed me to hook up sensors to 8 lanes.
2004 I used the seperate micro-controller.
The basic problem with using a PC to capture/calculate the lane timming is that if the PC is busy when the start gate is released, or if it is busy when the car passes the finish line, your times "could" be off. This can happen in any Windows base Operating Systems.
The only solution is to either use a DOS based race program, or use a seperate micro-controllor to time the races. The PIC 16877F is a great choice and costs under $10.00. The other advantage with using the PIC device is that can communicate with your PC via the serial port, making it easy to adapt the system to any PC.
(Phototransistor, 9 pin connector, tri-color LED)
Finish Line Sensors:
Phototransistor/IR LED is the typical way to do it. The problem with IR LEDs is that you can't tell if they are working or not. I went with Bright Amber LED's for the light source, and "Standard" Radio Shack 276-145 NPN Silicon Infrared Phototransistors. Unfortunately the Radio Shack Phototransistors are not all identical. I ended up testing 11 different ones before I could come up with 8 that had similar sensitivity characteristics.
The Amber LED is very visible and works well with the phototransistor. In fact the Amber LED produced more light than the IR LED.
(Schematic for the the Sensor & LED)
Connecting the Phototransistor to the PC:
There are many techniques to create TTL high/low voltages to use and input for the PC. OP Amps, Quad Comparator IC's, and simple Pull-Up circuits.
I went with he Pull-Up:
+5V
15K Resistor (output to PC)
Photo Transistor
Ground (-)
This is the simplest technique. When the phototransistor is exposed to light, resistance goes down, +5V goes straight to ground and OUTPUT goes LOW.
When light is blocked, +5V goes through the 15K resistor and OUTPUT goes HIGH.
Many systems suggest the standard 10K pullup resistor, I used 15K because it increased the sensitivity of the circuit and allowed greater separation of the LED and phototransistor.
(Circuit board containing 100 ohm resistors and 74193N ICs, used to control finish line indicators)
Finish Indicators:
I will be using and external projector hooked up to the PC to display the results of each heat. I also wanted to have immediate feedback to show who took places 1-3. On the finish line, there are tri-colored LED's above each lane. If a car takes 1st Place, green will light up, 2nd place: Yellow, 3rd place: Red.
To control the 6,561 possible combinations (3^8th power) I used four 74193N Synch 4-Bit U/D Decade Counter IC's. Only three lines of High/Low data where required to set the lane information.
Output Line #1: Reset all 4 counters
Output Line #2: Increment counters 1-2 (for lanes 1-4)
Output Line #3: Increment counters 3-4 (for lanes 5-8)
To use the Counter IC's the PC will send a series of High/Low pulses (1-255) to the counters. The counters will then in turn turn on/off their 4 output lines.
To set a tri-color LED:
S0 = High (Green Illuminated)
S1 = High (Red Illuminated)
S0 & S1 = High (Both Green & Red Illuminated ==> Yellow)
(Tri-color LED)
Website Technology by Bangsberg Software Engineering
|
|