กลับไปหน้ารวมไฟล์
race-photogate-9837a1-en.md

After making a small photogate for timing Hot Wheels cars, I was asked to help our middle school with their Solar Car Challenge and make a two-lane photogate for the preliminary races that all students participate in. (Their cars are roughly 4 inches wide, 10 inches long and 4-5 inches high.)

Two lane race w/ photogates at beginning and end.

The project uses lasers and a phototransistor to trigger when to start and stop the timing and a 16x2 LCD screen to display the status and results. (The race locations had too much ambient natural and artificial light, and the distances across the photogate were too great to expect infrared detectors to work with great accuracy.)

The center base of each photogate arch has 2 lasers (left photo) pointing to the phototransistor (right).

The phototransistor sends a different voltage to the Arduino if the laser is pointing on it, and a white LED turns on when the laser is properly aligned.

During alignment, the LCD screen shows the status of each of the phototransistors and they show "OK" if the lasers are aligned.

Display on the LCD showing which gates have their lasers aligned

One of the biggest issues during the transport and reassembling of the photogate was having the light sensors damaged or misaligned so much that fine adjustments wouldn't be enough to align the lasers. To mitigate that, the sensors were placed on sheet metal and neodymium magnets were put on the PVC pipe with epoxy to allow large adjustments of the sensor. They were also attached with an easy-to-remove clip so they could be replaced or repaired if needed without disassembling the entire structure, cut wire or remove solder from connections. Also, the dirt cheap lasers were less focused, which aided alignment.

Small neodymium magnets hold the sheet metal backing of the sensor, allowing it to be easily moved

An optional Bluetooth module was added to the project so the results could be read via an Android phone app used by the time recorder a distance away from the track. The app was also used to remotely reset the race and let the individual physically at the track know the times were successfully recorded.

The (optional) phone connection shows that all lasers are aligned except the one at photogate C.

The A B C D red squares turn from red to green as the lasers are aligned and as the corresponding photogate LED turns on.

At the end of the race, the Reset Race button is enabled so a person sitting away from the track to finish recording times and control when the next race starts.

Final times shown on the (optional) Android phone

There is also a physical reset button on the outside of the project box to manually reset the Arduino if something goes wrong.

The building of the photogate structure out of PVC pipe is hopefully self-explanatory. The connections were not glued to allow easier maintenance, and a wire clip between right and left halves of each gate was added to allow partial disassembly for easier moving and storage.

Connectors inside the middle of the structure allowed much easier transport and storage

Below shows CAT 5 female connectors were put in the back end of the front pair of photogates and the front of the back pair so different lengths of regular CAT 5 cable could be used during testing and during the race. It also allows the wires to be completely disconnected during the moving and storage of the photogates.

Ethernet connectors allow easy disassembly and varying distances between the front and back photogates.

EXPANDED TECHNICAL DETAILS

Precision Timing Mechanism

The Race Photogate is an essential tool for high-accuracy timing of moving objects, commonly used in physics experiments or hobbyist racing.

  • Optical Interruption Detection: Uses an Infrared (IR) Beam transmitter and receiver. When a car or object passes through the gate, it breaks the light path, causing a clear voltage transition on the Arduino's digital input.
  • Hardware Interrupts: To capture events with microsecond accuracy, the sensor is connected to a hardware interrupt pin (D2 or D3). This ensures the precise micros() value is recorded the exact moment the beam is broken.

UI & Mobile Integration

  • MIT App Inventor Dashboard: The time results are transmitted via a Bluetooth module (HC-05) to a smartphone. The custom Android app displays current lap times, split times, and the "Best of Session."
  • Feedback System: Includes a high-brightness LED and a buzzer that provides an immediate "Beep" when the photogate is successfully triggered, verifying that the sensor is aligned and operational.

ข้อมูล Frontmatter ดั้งเดิม

title: "Race Photogate"
description: "Two sets of timing gates for racing cars in a school solar car challenge that track and report the speed of each car in each of two lanes."
author: "nfarrier"
category: "Gadgets, Games & Toys"
tags:
  - "race track"
  - "laser"
  - "photogate"
views: 8612
likes: 4
price: 1499
difficulty: "Intermediate"
components:
  - "1x Through Hole Resistor, 2k ohm"
  - "4x Photo transistor light sensor"
  - "1x Soldering iron (generic)"
  - "1x HC-05 Bluetooth Module"
  - "1x Quick setting epoxy resin"
  - "1x Tiny Breadboard"
  - "1x Android device"
  - "1x 3D Printer (generic)"
  - "1x 1/2\" PVC pipe and connectors"
  - "1x Alphanumeric LCD, 16 x 2"
  - "5x Through Hole Resistor, 200 kohm"
  - "4x Jumper wires (generic)"
  - "16x Neodymium Disc Magnets"
  - "4x Male/Female Jumper Wires"
  - "1x Solder Wire, Lead Free"
  - "4x High Brightness LED, White"
  - "1x Arduino UNO"
  - "1x Hot glue gun (generic)"
  - "1x Gorilla Glue"
  - "4x 5V 650nm 5mW Red Dot Diode Laser Head Red Laser Diode 6mm Red Laser Diode Laser Head"
tools: []
apps:
  - "1x MIT App Inventor 2"
downloadableFiles:
  - "https://projects.arduinocontent.cc/84d290cc-7e3e-44e7-8e8e-32d80727bb0d.aia"
  - "https://projects.arduinocontent.cc/84d290cc-7e3e-44e7-8e8e-32d80727bb0d.aia"
documentationLinks: []
passwordHash: "563049f6586365fca7f0d66ec782d931836c68c68321c753f6824b7568c2e486"
encryptedPayload: "U2FsdGVkX1/N19gYbhYu4VCaaC+LW+R1E16f8E83MukmDiHfh6oo5Sy/7NZ/idzXvw1nSZmtTsIT90f42MHgtVx21FkIVLYuts7zZTCUpj0="
seoDescription: "Race Photogate system for school solar car challenges. Track and report speed for racing cars in dual lanes accurately."
videoLinks: []
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/race-photogate-9837a1_cover.jpg"
lang: "en"