LaserPhotoGate

Problem

 * Schools have lots of Vernier Hardware, old and new in physics, biology and chemistry labs
 * Vernier is not found in industry
 * Specialized connectors and computers trap schools in a priority, expensive environment
 * Photogate is used in lots of projects .. including sensing when a combination lock is opened, measuring performance of wheel encoders and integrating into a school wide test bench repertoire

Conceive
Lots of projects require hooking switches to an arduino. There are lots of tutorials on how. The combolock project needs to detect an AC solenoid successfully stroking it's full path. Most of the time the solenoid is physically prevented from stroking it's full path. A mechanical switch would not be as reliable as a laser.

Develop a pin out of all the wires going into the RJ-11 connector into the vernier photo gate to connect as input to the arduino.

There is a git hub repository ArduinoVerneriPhotoGate-master that has a sketch that parallels vernier's description of the photogate. The photogate is often used for capturing events that happen faster than a mechanical switch can respond. The code seems to focus on the Arduino Atmel CPU interrupts to maximize speed. The goal here is to avoid mechanical contact with the solenoid. We are not interested in speed. We need to use example Arduino sketches to capture slow speed blocking/unblocking of the photogate.

Design
Alternative designs for this switch could be:
 * string pulling different types of switches
 * infrared
 * ultrasound
 * laser beam

The string was abandoned because it would require testing mechanical reliability. Two mechanical systems (solenoid and knob turning) currently require reliability. Reliability is important because between 100 and 1000 combinations need to be checked. Mechanical switch connections are often problems.

Mechanical, infrared and ultrasound are cheaper than laser. Infrared and ultrasound have focus problems. Triangulation is usually required for accuracy and the focus is between 18 inches and around five feet. The combolock design leaves about 3 to 5 inches for the switch.

The vernier photogate was chosen for these reasons:
 * invisible laser like an alarm system
 * available in most schools
 * no moving parts
 * fits combolock apparatus (initial justification of this project)

The current goal is to get something working. Reducing cost by adding a mechanical switch is something obvious, and can easily be implemented later.

Demo

 * run the analog test ... no extension cable is needed, the light on the photogate and the serial monitor can be displayed to the audience
 * presentation

Next Steps

 * Figure out whether green or orange is ground
 * Figure out what the second diode buried inside the photogate does
 * Integrate this into the combolock platform
 * Develop LabView VI to read the photogate, figure out max speed
 * Work on measuring tribot encoder
 * Hack a Vernier analog device .. such as temperature measurement