Hila Research Centre
Light Beam Detector
A focused light beam makes your computerized light detector much more useful. Here is how to create a focused beam of light.
Connect the resistor and LED to the 9V battery, either by soldering or twisting together. Tape the connections with electrical tape.
In a dark room, shine the LED through one of the lenses (lens 1 in diagram). Adjust the distance from lens to LED so that you get a narrow beam of light. Design something to hold the LED and lens steady. (We use wooden blocks.)
Now "catch" the beam of light with the second lense (lens 2 in diagram) and focus the beam onto the photocell. Adjust the distance from lens to photocell to produce a bright spot of light on the photocell. Design something to hold the photocell and lens steady.
Connect the photocell to your computer using pins 1 and 3 of the joystick port.
Test the beam by running this program:
Move your hand in and out of the beam. Does the value change on the screen? If it doesn't, you may be connected to the wrong pin on the joystick port. If your game card has two joystick ports, try the other port.
A Break Beam Burglar Detector
Shine your beam across a door way or some other area you would like to protect. Make sure that you have a nicely focused spot of light on the photocell and that all connections to your computer are secure.
Enter this Qbasic program and run it.
Return to projects menu