Arduino and photogates
October 5, 2010 9 Comments
Photogates are optical sensors that are are routinely used in physics labs to measure speed of objects passing through them. Arduino can sense photogates fairly easily. The following is an example of how to use arduino to sense photogates.
What is a photogate made off?
It has an infrared LED that emits IR light. It also has an IR phototransistor to sense the IR light. There are two ways to make a photogate: one way is to build an interruptive gate. One will have an IR LED emit light and an IR transistor on the opposite side of the gate to receive the light. If no object obstruct the light, the transistor reports low. When an object passes through the gate, it blocks the IR light and the transistor reports high. This way reduces false triggers since the transistor only looks at the IR LED and is not easily disturbed by nearby IR sources, like a lamp. Another way is to construct a reflective photogate. This gate has IR LED and transistor on the same side but a reflective surface needs to be brought near the assembly so enough IR light is reflected by the surface back and hits the transistor to product a signal. This way larger objects can be detected but the sensor is more subject to external noise.
There are pre-manufactured photogates for a few bucks so I will use one made by Sharp.
Here I have connected two photogates to arduino.
Here is a detailed hookup picture:
Here is some video: