Laser Timing Gate

This project describes how to build a device the measures when an object passes. Using two of these gates you can measure the time it takes for an object to pass between two points. It uses a beam of light to detect the passing object.

We assume the sensor will be connected to an Arduino with a Grove shield. The light sensor produces an analog value so it should be connected to an analog input. See below for how to use the sensor.


  • Laser-cut 3mm acrylic parts
  • Laser module pre-soldered to Grove cable
  • Grove light sensor
  • 8" long 1/2" by 1/2" aluminum square rod
  • Nine 1" 1/4-20 bolts with nuts
  • Six M2 20mm machine screws with nuts
  • Four 1/8" long spaces
  • Two 1/2" long spacers
  • 1/2" long plastic spacer for light sensor

Note: we assume that the laser module has been pre-soldered. If you need to make this yourself, connect a 150-ohm resistor between the laser's red lead and a 5V wire on a Grove cable.

Note about Grove Physics Kit

If you purchased the Grove Physics Kit from Seeed Studio, refer to the assembly diagram provided with the kit. You'll need a bit of glue to attach the black cylinder to the light sensor. You'll need a screw terminal and 50cm cable for powering the laser. (Use the 1m cable from the pulley kit for the light sensor.) If you need a screw terminal and cable, contact us at


  1. Place the black plastic spacer on the light sensor.
  2. Add 2 long small screws and 1/2" spacers to the pictured plastic part.
  3. Secure the light sensor with two small nuts.
  4. Attach the cable to the light sensor.
  5. Attach the base parts with the large nuts and bolts. Don't tighten them yet.
  6. Place 4 small screws through the large acrylic part. Place the laser module in between the screws.
  7. Add the small rectangular piece of acrylic and attach it using small nuts.
  8. Attach the base parts with the large nuts and bolts. Don't tighten them yet.
  9. Attach the the sensor and laser units to the aluminum block. Adjust the laser to hit the light sensor.


A sample sketch is available that shows how to use the WireGarden library to read values from the sensor. You can use the Arduino Programmer to send the sketch to your Arduino, or you can download the sketch. This sketch depends on the WireGarden library.

If you would like to read the values directly using your own Arduino code, use the OpticalGateDevice from the WireGarden library.