Problem

edit
  • 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

edit

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

edit

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.

Implement

edit
Normal PhotoGate Behavior
  • The goal is to hack the Vernier PhotoGate. The first step is to understand normal operation.
Cable from PhotoGate to Arduino

Goal was to build our own cable from PhotoGate to Arduino. Going to need to custom build cable that fits the combolock anyway. After cable is built, then can begin figuring out what the wires in it do.

Preparing to Hack the Vernier Cable

Goal is to expose an existing, working photogate's cable so that the voltages on the individual wires can be seen. This was done with a splitter:

Measuring Voltages in Vernier Cable
DMM Checkout
  • A Digital Multi Meter or DMM is going to be used to figure out what is going on in the cable.
Results
blocked orange orange/white green green/white blue blue/white
no ground 3.75 -0.02=0 4.91 5.04 0.02=0
yes ground 3.75 0 0 5.04 0
no 0 3.75 0 4.91 5.04 ground
yes 0 3.75 0 0 5.04 ground
no 0 3.75 ground 4.91 5.04 0
yes 0 3.75 ground 0 5.04 0

Conclusions

  • ground wires: orange, green and blue/white
  • power from arduino to photogate: blue
  • hook to arduino digital pin (or analog pin): green/white .. expect 0 when the lock is opened

Comparison to Vernier British Telecom Digital (BTD) – Left Hand documentation indicates that only one of orange, green and blue/white is ground. Experiments narrowed this down to orange or green. Further experiments are needed if this system is going to be used for the Vernier motion detector which uses all the digital pins.

Taking Photogate apart, making wires longer

Operate

edit

Demo

edit
  • 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

edit
  • 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