Want to time how fast a ball or toy car is going?  The deceleration of a spinning bike wheel? A pendulum bob? A falling object? G whiz!

1. Set LightGate Mode (A-I) 

2. Ground Port W

3. Attach IR reflection sensor to Port G.

4. Run a text editor, Scratch Data Collector  or Javascript Data Collector (links available soon)

5. Set the IR sensor to view the moving object as it passes, or attach a piece of tape as a target.

6. Every time the sensor "sees" a moving object, it will send the elapsed time in microseconds as it passes to the program via keystrokes on the USB port


  • a ball has varying width so you must be careful to position the sensor at its middle

  • you can use a cylinder as a falling object.  It has a uniform width.

  • you can place a "flag" of tape on top of a toy car.  This has an easily measureable width

  • in the case of a repeating action like a slowing pendulum or bike wheel, the sensor will give you multiple elapsed times which get longer over time, as the object slows down.  You can plot these times directly to see the deceleration curve.

  • the IR reflection sensor has a small screw at the back which lets you adjust its trigger distance.  This can be used to allow the sensor to focus just on the object and not any background movement.  The screw may need to be turned many times to adjust the distance.  You can check its trigger distance by watching the LED on the back of the sensor, which lights when it "sees" an object in front of it.  Response is somewhat affected by the color of the object and ambient light in the room, but generally it's very responsive.

7. Divide the width of the object by the elapsed time, to calculate its speed.

8. Example:  Ball is 5 cm wide at the point where the IR sensor is aimed.  Elapsed time is reported as 57155 microseconds, which is about 57 milliseconds or .057 seconds.  Speed is 5 cm divided by .057seconds, or 87.7 cm/sec