LightGate Mode: for microsecond timing of moving objects

QuickStart: 

 

Set FunKey Super into Lightgate mode:

 

1. Remove any sensors or outputs, unplug USB cable from computer

2. Connect A and I ports with alligator clip

3. Plug USB cable into computer (LEDS: Keystroke is bright, I/O is dim)

4. Remove alligator from A/I

5. Connect alligator from W to Ground (LEDS: Keystroke is bright, I/O is off)

6. Connect the IR reflection sensor to port G

7. As the IR sensor "sees" an object passing by, it will send the elapsed time in microseconds as a text string

Get the velocity of falling objects, balls moving down ramps, pendulums swinging, toy cars, robots, cockroaches, Superman. 

 

You can time fast moving objects with high accuracy using LightGate Mode.  The yellow IR reflection sensor gives excellent results and has a small screw which can be used to change the trigger distance.  As a reference, the LED on the back of the IR sensor lights when it detects an object, and goes dark when it does not. 

 

Typical projects:  get the instantaneous velocity of a falling object, a pendulum bob, a toy car going down a ramp, a wheel slowing down.  Remember that the shape of a ball gives it "varying width" so make sure to aim the beam right at the middle of the ball.  For a falling object, consider using a cylinder on its side.  You can place a "flag" of tape on a rotating wheel or moving toy car to increase the accuracy of the "width" measurement.

 

-set the FunKey Super into Keystream Mode by connecting the A and I ports and plugging in the USB.  Keystream is now the current mode, remove the alligator clip.  Keystroke Mode LED will be bright, and I/O Mode LED will be dim

 

--connect a yellow IR reflection sensor to port G (D0) Other sensors can be used, but this one is ideal for timing moving objects

 

--connect an alligator clip between port W (D5) and any of the ground holes at the bottom of the board.  This acts as an on/off switch, turning the timing internal circuit on when connected.  Leave it connected for your measurements.  The I/O Mode LED goes off in this mode, while the Keystroke Mode LED stays on and bright

 

--the yellow IR reflection sensor is now activated.  It will report a reading every time is "sees" and object in front of it, calculating the time in microseconds between when it is activated and when it is de-activated.  In other words, when an object passes in front of it, it will report how much time went by until the object passed away from its view.

 

--a text string indicating the elapsed time in microseconds will be sent to the USB as keystrokes.  To see this clearly, you can run a text editor and look at the output.  You can also use Scratch's "ask" and "answer" blocks to trap the data reading.  Each reading is preceded by a space keystroke.  A reading of 5392 represents 5,392 microseconds, 5.392 milliseconds or .005392 seconds.  Of course there will be some variation in accuracy due to the response time of the sensor and circuitry, but it should give you very good results.

 

Sample Scratch programs and Javascript programs will be provided here to capture data.

 

--you can calculate instantaneous velocity of an object by knowing its width and the time as calculated by this method.  Distance = rate * time, so divide the width of the object by the time displayed by the sensor.