Speed Climbing Laser-based hand sensor

Synopsis: Based on more test results from the USAC Northeast divisional championships, the IR-based sensors were fairly effective (195 out 200 climbs on the qualifier day worked fine, 5 obviously didn’t). There were some issues getting it running during installation. I needed to rethink the hand sensor. There were 2 problems. One, as I’ve demonstrated in other articles, there are weak or dead IR zones a climber could hit if he didn’t hit it with a flat hand - the sensor would not stop the clock in that case. Two, there were glitchy problems when the long (50ft) cable we made was used from the display to the hand sensors. The behavior was similar to EMI problems though as I was not at the New England competition, I had to surmise based on descriptions I heard. This is the redesign of the hand sensors to fix these two problems before the USAC national climbing competition in Sandy, UT July 10-12, 2009.

DSCF2955DSCF2947DSCF2951lightsensor-laser-response2

Larger images later in the article.

To address the IR dead zone issue we decided on a completely different tact and went to a laser-based hand-sensor. The IR sensors works on the principal of a reflective IR beam. When a hand was in the IR zone, the IR sensors could determine distance (a proportional voltage) but if the hand is very small (small child’s) or just a few fingers made the zone, it was very possible the IR beam would not have a sufficient profile off of which to reflect - it would not detect the hand.

It made sense that a more positive indicator would be an interrupter instead of reflector so a laser beams a visible light across the hit zone to a light sensor. Even a fingertip is enough to break the very thin beam and therefore block the light to the light sensor enough to see a very distinct voltage drop. The microcontroller firmware can be changed to detect a trailing edge voltage drop instead of a leading edge voltage rise as was the IR sensor’s case.

The second problem, EMI and glitch over long cables, can be tackled with a differential bus transceiver. First, this wasn’t an attenuation problem because the voltage comparison was done at the hand sensor with an ATMega8 microcontroller and the hit detect level change transmitted by the micro. There was plenty of voltage to make the 50ft run. Also, in the installation in the New England climbing gym (MetroRock), the cable runs went along the back along metal structural beams that held the climbing wall. I think those beams helped contribute EMI - it could have passed noise anywhere along the beam into to the cable. The only way to know for sure would have been to monitor the signal during the glitch, but I wasn’t there and it was impractical - I have to go on the assumption this theory is correct.

To solve this potential issue, I chose the SN75176 - a device used to implement RS-422 and RS485. This technology has significant electrical noise immunity by splitting a signal into two parts - a positive and a mirror image negative version of the signal. It then transmits those two signals over a very long distance to receiver which reconstructs the two into a single signal similar to the original before it was split. Line noise is assumed to appear roughly equally on both lines and because the transceiver has both the positive and negative signals, noise would be the same offset on both lines (vs the negative on one), so the device can easily subtract the noise and produce a clean signal on the other end (thus the “differential” bus transceiver.)

The transceiver still only works in a binary mode - that is, you can’t transmit analog voltage waveforms only high-low signal levels. You can encode serial data over RS-485 if you want (and this is the most common use), but you can also use the device to transmit a simple level change like what’s needed for the hand-sensor hit detect indication to the micro.

This allows RS-485 to transmit over 1000’s of feet of twisted pair cable and get a clean signal on the other end.

To summarize, the second major design change is the addition of a SN75176 differential bus transceiver to both ends - one on the hand sensor end and the other transceiver in the base station display end.

So, how to pull it all together? Pretty much stripped the former hand sensor down to the bones of just the board and brackets, then built it up again as a laser based sensor. Here are some pictures of my first prototype.

The laser is placed about 1/16” off the deck of the baseboard and the light sensor is aligned with it on the end with the RJ45 and bus transceiver circuitry. The height above the baseboard insures no small child’s fingers could possibly slip under the beam. Breaking the beam is not dependent upon hand-size.

The laser is very small, lightweight, less powerful than a penlight (but still should not be viewed directly), and looks like this:

 Add to Cart $9.99

The light sensor component looks like this:

 Add to Cart $4.95

Here’s an end view from the RJ45 end. RJ45 jacks and the breakouts for the RJ45 were also Sparkfun parts.

DSCF2947

Using an ordinary wood router, I carved a rectangular tunnel in a small piece of plywood and created a laser bracket that traps the laser into place and helps keep it aligned. The laser is also glued to the top of the tunnel so it doesn’t shift inside or pull out. The block of wood is attached to the base using silicone caulk which is very secure (I can pick the entire sensor up by pinching this little block of wood.) So, the laser will definitely stay aligned well enough. Both ends of the sensor board will still be covered by the protective square end-caps similar to the IR design.

DSCF2951

The laser is a 0.8mW device which is quite a bit less powerful than the average pen-light laser, but is able to transmit a very focused beam for a long ways - across the room even - so it was plenty good for this application with a short distance.

On the other end is the light sensor. Normally, the sensor has a translucent lense, but in the picture below, the laser dot is focused on the light sensor lens. The sensor is on a small breakout board. The breakout board is glued to a small block of wood and the wood block fixed to the backboard with silicone.

DSCF2953

Aligning the Laser and Light Sensor



In order to align the light sensor with the laser beam, I first spread a thin layer of silicone on the underside of the laser beam bracket and a thin layer under the small block of wood holding the light sensor. Then I powered up the laser and aligned it with a line in the wood which I scored with the tip of a nail so that the line exactly divided the backboard in half horizontally. With everything powered up, I gently aligned the blocks until the lens glowed from the laser beam. As the glue dried, I left the components powered up so if the glue shrunk and pulled the components out of alignment it would be obvious. Silicone has very little shrink and no realignment while the glue was drying was necessary.

Just the tip of a finger is all it takes to break the beam:

DSCF2957

The image above shows the eclipse of the beam with my finger tip and the light sensor is no longer glowing with the beam point. The sensor immediately drops its voltage output enough that even with ambient light, the signal voltage is logic 0. So, the light sensor, while it’s meant to be used with fine graduation, really works in a more binary way which is good for this application.

Here are some oscilloscope images I took when I triggered on a trailing edge of the light sensor signal. I wanted to make sure there wasn’t a lot of hysteresis in the sensor such that it took so long to die that the touch was effectively missed. It’s fairly immediate as indicated by these screenshots taken from a series of “hits” on the laser beam:
lightsensor-laser-response1lightsensor-laser-response2lightsensor-laser-response3lightsensor-laser-response4lightsensor-laser-response5


In these tests, the sensor was powered by a 3.3v source (works fine, though it’s spec’d for 5v). Using these results I cleaned up the signal by running it through a HCF4050B buffer/driver and brought it up to 5V before taking it into the input side of the differential bus transceiver.

Below is the schematic of the laser-based hand sensor. If you click it, you can get an enlargement:

laser-hand-sensor

If you were reading previous articles you might have noticed there are only 2 RJ45 jacks on the sensor now. I decided to eliminate one and add a lane designation jumper that will route the 2 differential signals onto a different pair in the CAT5 depending upon which lane the sensor was for. This makes the sensor slightly easier to wire up and also eliminates one jack and its wiring which can help the reliability of the connections between units.

So, now, there is a CAT5 from the base station to the left lane, top-RJ45 jack, then a patch cable from the 2nd jack, left lane to the right hand sensor bottom jack. The right hand sensor has the jumper changed to the right lane. The jumper is accessible between the two jacks. The jacks are epoxied to the perfboard and perfboard bolted to the sensor baseboard. For nationals there won’t be a faceplate on the jacks.

In order to test the circuitry on the sensor, I built a little test board that supplied the power on the same pins as spec’d from the base station, pulled the light signals back (one for each lane) into a transceiver on the test board which combines the positive and negative signals into a single signal again. Putting a scope on the output (R line of the bus transceiver), it could verify that I was getting out what I was putting in.

This is the test board that simulates the base station. It supplies power, both 5V and 3.3V (for the laser) and also incorporates another SN75176 differential bus transceiver wired for reading (!RE always asserted, DE not asserted). This recombines the two signals, positive and negative mirror image, back into a single signal for the microcontroller. It’s this signal I used to test everything was coming through on a hit and could be used for hit logic with the micro.

DSCF2958

At some point, I’ll do a 2-channel comparison of input and output to see exactly how they compare, but it was clearly a signal that was good enough for a micro controller to detect trailing edge and the signal was stable enough it wasn’t glitching.

To finish the design, we’ll repaint a thin yellow stripe across the middle indicating where the laser beam is (usually, it’s not visible on the board.) The climber must touch that line physically in order to break the beam.

Potential weaknesses of the laser-based approach:
1) If a climber hits the sensor backboard with a cupped or arched hand, it’s possible the inside arch of the hand will go over the laser beam.
2) If the climber launched for the finish and hit low or high, it’s possible he or she would miss hitting the line entirely.

Strengths:
1) even a fingertip on the line is enough to trigger a hit (more positive hit detection)
2) on the line, there is no weak or dead zone. Laterally, the climber may hit anywhere on the line.
3) there is no voltage comparison (for IR output) or potentiometer to adjust in the hand sensor (less complexity, less analog.)
4) because of the elimination of the IR devices and need for voltage comparison, the micro in the hand sensor was eliminated (less complexity.)
3) with the differential bus transceivers, there should be fewer EMI based glitches to deal with. (better signal integrity.)

The parts cost of this approach is similar to the IR sensor based approach. The labor to build it is roughly the same as the IR approach (which is still too much - would like to spend some time on the design to make it easier to build.) If this design works well, it would make sense to design a PCB of the RJ45 board and transceiver circuitry. A PCB would radically decrease the build time for the sensors.

Other articles in the series of designing and building a speed climbing timing system:
Speed Climbing Timing Part 1 - Sensors
Speed Climbing Timing Part 2 - Controller
Speed Climbing Timing Part 3 - Integration
Speed Climbing Timing Part 4 - Touch Pad Construction
Speed Climbing Timing Part 5 - Schematics
Speed Climbing Timing Part 6 - Perf Board
Speed Climbing Timing Part 7 - Display
Speed Climbing Timing Part 8 - Hand and Foot Sensors
Speed Climbing Timing Part 9 - Demonstration
Speed Climbing Timing Beta Test Boulder Rock Club
Speed Climbing Timing - Sensor Improvements
Speed Climbing Timing SHIPPED!
Speed Climbing Timing Schematics (shipped v1)
Speed Climbing Timing Installation
Speed Climbing Timing - Laser-based Hand Sensor Design
Speed Climbing Timing Lessons Learned
asdfasdf