Slotted Optical Switches for Track Sensing


 

v   This is an easy project, however to be successful, you must be comfortable with soldering and some basics electrical skills. If you do not feel up to it, I would recommend that you check out Brent Carlson's web site, he provides plug and play solutions based on the same principle.

 

v   This project should take you between one and two hours, depending how proficient you are at soldering.

 

v   Warning: this will NOT work with the white and transparent plastic guide pins found on Carrera and Artin 1/43 cars (unless you somehow make them opaque or even better, black). Note that I was also unable to test that with the Scalextric blue guide, as I do not have any.

 

v   There are some very cheap and very convenient electronic components that can be used to build sensors for lap timing and counting. They are usually called Òslotted optical switchesÓ or Òoptical interrupter switchÓ and can be integrated in a track relatively easily for lap sensing. They do not require any overhead lighting and their output is directly compatible with the parallel port inputs on any PC.

 

v   These components are U-shaped and the width and depth of the U (slot) come in virtually any dimensions. Here are a couple of catalog pages that will show you what is available:

o              Digikey

o              Newark

 

v   The way they work is very simple. On one side of the U is an infrared light emitting diode. On the other side is a detector photodiode with associated electronics. If you apply DC power to the diode it will emit light constantly, and the detector will provide a ÒhighÓ signal to the PC. When the guide of a car passing through interrupts the beam, the detector circuit will then send a ÒlowÓ signal to the computer and the lap timing/counting software will register it.

 

v   For this example, I selected the Fairchild H22LTB slotted Optologic optical switch:

o     Width of slot: about 1/8Ó

o     Depth of slot: about 1/4Ó

o     Depth of sensor: about 0.1Ò

o     Power requirement: 4.5 to 16V DC

o     Totem Pole, buffer output

 

v   The last two points above is what made this attractive to me. First you can use any DC power supply between 5 and 12V with this component, and the output will be compatible with the parallel port PC inputs. Second, this component includes some electronic circuits on the detector side, which shape and condition the pulses sent to the computer, guaranteeing a good detection.

 

v   I am hoping that soon, we will be able to find such slotted optical switches with an integrated resistor on the emitter side, which would make the wiring even simpler, as you could wire both sides directly to a fixed DC supply. There are some that exist at 5V with much larger slots, but I could not find any with the required slot depth and width for a track sensor.

 

v   Obviously, other slotted switches will work, whether they are the Fairchild Optologic or the Optek Photologic family, or any other manufacturer that provides similar products. ItÕs just a matter of deciding which size you want and which mounting you want. Some even come with wire leads already attached.

 

v   List of required components to make a complete wiring harness:

 

Fairchild Optologic interrupter switch

www.digikey.com

H22LTB-ND

$1.27 each

180 Ohm, 1/4W resistor

Anywhere

 

$0.20 each

CPU-to-Phone D-Sub male to 6-pin connector

Radio Shack

276-1405

~ $4.00

Modular RJ11 or RJ14 line cord (6 conductors) up to 25 feet

Anywhere

 

$3.00 for 12 feet cord

Modular phone wall jack, 6 conductors

Radio Shack or Home Depot

 

~ $4.00

3/32 Heat shrink Tubing (50% shrinkage)

Radio Shack or Home Depot

 

~ $1.00

1/8 heat shrink Tubing (50% shrinkage)

Radio Shack or Home Depot

 

~ $1.00

22 or 24 gauge wire (at least 2 colors)

Anywhere

 

 

 

So for about $20.00 you can have all the materials required for a four-lane set-up.

 

v   Picture of slotted optical switch and resistor:

 

 

v   Tools required:

o     Fine tip soldering iron (20W max)

o     Wire cutter, wire stripper, small pliers

o     Hair dryer

 

v   The first step is to pre-tin all the leads of the resistors and the optical switches as shown in the picture above. Then, solder the resistor to the positive pin (marked +) of the emitter side (the side that has only two pins, marked E on the top).

 

 

v   Then slide some 3/32Ó heat shrink tubing to cover most of the resistor and the pin. To shrink the tubing use a hair dryer set on high but be careful not to overheat the components, as soon as the tube starts shrinking, turn the heat off. You can also try to do that with the open flame of a lighter but be very careful if you choose to do it this way.

 

 

v   Using some red wire cut at the proper length, connect the positive lead of the detector to the resistor lead (the side that has three pins, marked D on the top). This is the lead that is diagonally opposed to the one you just soldered the resistor on. Using some black wires, connect together the two negative pins of the emitter and detector side as shown on the picture. Once all wires are soldered, add a small piece of heat shrink tubing over each lead of the switch.

 

 

v   Cut about a foot of red and black wires and solder them each to the two sets of black and red wires from the optical switch.

 

 

v   Cut about a foot of another color wire (blue in picture) and solder it to the output lead of the detector side of the switch (the middle pin). Once this is done slide 1/8Ó heat shrink tubing over all the exposed connections between wires and also some 3/32Ó tubing over the blue wire connection at the switch.

 

 

v   You should now have something similar to what is shown on the picture below with the long wire leads.

 

 

v   Now repeat this 3 more times for each lane sensor, and you should have 4 sensors with wires, as shown on the picture below.

 

HOST: Mac OS X 10.3.6

 

v   Now is the time to assemble together the 4 sensors + wires into the modular box and connect the parallel port connector.

 

HOST: Mac OS X 10.3.6

 

v   Looking at your phone wire and at the RJ11 connector from the top, you will see the following wires from left to right: white, black, red, green, yellow, blue. Inside the parallel port connector connect:

o     White to pin 2

o     Red to pin 10

o     Green to pin 11

o     Yellow to pin 12

o     Blue to pin 13

o     Black to pin 25

o     Please make sure that this is the wiring recommended by your lap timing software. This will work with Lap Timer 2000 using the "Trakmate compatible" wiring option, but I do not know about others. If you want to know more about wiring track sensors to a computer, check this excellent web page by Gregory Braun.

 

v   The next step is to connect the sensors to the modular box.

o     First take all 4 red wires plus the positive wire from your power supply (or the positive wire that will go to your power supply) and solder them together.

o     Then connect a short wire to the black terminal of the modular box. Take this wire, the 4 black wires, the negative wire from your power supply and solder them together.

o     Using 1/8Õ heat shrink cover the two connections you just made.

o     Then take the four output wires (blue on my pictures) and connect them to the red, green, yellow, and blue terminals of the modular box. Remember that, based on the lap timer 2000 wiring, red will be lane 1, green will be lane 2, yellow will be lane 3, and blue will be lane 4.

 

HOST: Mac OS X 10.3.6

 

v   Close the box (snap the lid on), connect the 6-conductor phone cord from the modular box to the parallel port connector, plug in the power (6-9 V recommended), and you should be up and running.

 

HOST: Mac OS X 10.3.6

 

v   To test, simply slide a piece of black wire or plastic through the opening. This is when you should verify all your wiring (last chance), i.e. which sensor actually connects to which lane in the Software.

 

v   All you have left to do is mount these under your track. Good luck!

 

HOST: Mac OS X 10.3.6

 

v   If you see anything incorrect in this article or if you need help with anything, please let me know.

 


Last Update: 8/19/06                                                                                              Drop me a note