# Lap Counters-Timers-Lightbridges: Questions



## pshoe64 (Jun 10, 2008)

I've started adding some new hardware to Woodrum Ridge Raceway in the way of some lap timer and counter systems. The computer software seems to be the easier component to settle on. I have pulled Slot Race Manager (DOS based) and Laptimer 2000 (Windows based). Both work fine with the detection hardware I built. I created a photo-sensor system based on some 1/8" diameter sensors from Radio Shack and some parallel port wiring. 

My question is about the sensors and light bridge placement. Using very bright LED white lights, positioned directly over the photo-sensors, work great with all but my very fastest cars (HO scale BTW). What I have discovered in the tinkering process is if I position the light-bridge about 1 inch behind the sensors and angled to shine on the sensors resolved the fast cars/skipping issue. The slower cars still work fine also. I know by repositioning the lights allowed the shadow of the faster cars to cover the sensor for a split second longer than from them being directly overhead. I have not had this issue with the slower HO cars or the larger scale cars.

Has anyone else run into this or use a similar method to "fix" the detection issue? It seems to be reliable. I have ran 200+ laps on all 4 lanes with no skips or extra counts.

-Paul


----------



## AfxToo (Aug 29, 2003)

I have not tried it but it does make sense trigonometrically because it is a dark detection system and you are casting a longer shadow. However, the difference with a one inch offset with the height of the cars seems like it would be minuscule. 

With light detection systems it's best to use matched emitters and detectors. If you are using bright white LED emitters and IR detectors you could be experiencing photosaturation of the IR detectors from the high IR component in the bright white light. Photosaturation is known to reduce the performance of IR detectors and this would definitely affect time critical detection scenarios. 

Basically, the emitters shine light on the detectors to "charge" them to one state ("car not detected"). You could think of as similar to an electromagnetic relay being in the energized state. When the car breaks the light beam the detectors discharge, like a relay dropping out, and the detector goes into the other state ("car detected"). The discharge time is proportional to the amount of charge in the detector. If the charge is at the highest level possible the detector is "saturated" and the discharge time will be its longest possible. You may be right on the edge and allowing more discharge time by stretching the shadow allows it to work, unless you have an unusually short car to detect.

The charge and discharge performance of the detectors ultimately determines their performance of the system in high speed counting applications. I suspect your detectors have very fast charge times and the discharge times are borderline inadequate for your application. This makes me think the detectors are being saturated. If you can, try reducing the intensity of the emitters, say with an inline potentiometer or rheostat or by using forward biased diodes that give you a 0.5 to 0.7 volt drop per diode. If you have a potentiometer or rheostat you can dial in the voltage that yields the most reliable performance and then use forward biased diodes or a resistor to achieve the drop using inexpensive and compact components that easily fit into your light bridge. I would be interested to see if you get an improvement by turning down the emitters a little.


----------



## Boosted-Z71 (Nov 26, 2007)

I have seen better performance with LED's / Photocells by varying the height of the light bridge, of course you can only go so low until you get something that wont pass under. Another thing I do is to use 2 LED's per lane, trying to make a larger light cloud. I also only use the higher light emitting led's and I do set mine just behind the photocell location but only maybe an 1/8" of the photocell center line, seems thats where I have had the best performance . Never thought about limiting the power, might play around a bit with that on the Glassring setup.

Boosted


----------



## NTxSlotCars (May 27, 2008)

I use a long 15w incandescent bulb in my light building.










These bulbs are used in EXIT signs. 15w lets off low heat, but I still have the building 
double foil insulated. I can leave it on all day with no damage to the building or the track.
I have had better luck with incandescent bulbs than any other light source.


----------



## Boosted-Z71 (Nov 26, 2007)

I like that setup in the AFX lap counter, & the 15w bulb is easier to replace than the LED's

Lots of good ideas on here

Boosted


----------



## NTxSlotCars (May 27, 2008)

Thanks Boost,

I think it was originally a timing gantry, but the mechanics inside were messed up.
These are easy to convert. Simply pop the top and unscrew the sides, pull the mechanics.
You can reverse the conversion later if you want to restore it.
I'm thinking of painting mine. Any real crossover buildings like this around the world?


----------



## SDMedanic (Apr 21, 2011)

If you are using infrared detectors and white LEDs you have a mismatch as the wavelengths of the detectors and emitters are different. However I don't think that is the problem. I know that my detectors are saturated and I don't have a problem with either Trakmate or Slotrak. 

The problem is slow update time associated with the PC software or hardware. This is why lengthening the time the beam is broken solves the issue. LT2000 is a known problem and many folk have reported problems with it. Get some real software. That might solve the problem.


----------



## AfxToo (Aug 29, 2003)

Doing the math and looking at some spec sheets, you're probably right on the photo saturation concern. Although a phototransistor's response time can increase significantly when the device is photo saturated, even with the delta the longer shadow is buying us the device would have to be extraordinarily slow to behave differently in this situation. Even slow phototransistor detectors are around 200-400 microseconds unsaturated. With a 2.5 inch car traveling at 20 fps we're getting around 10 milliseconds of detection time. Even a 10 fold increase in response time due to saturation would still keep things in the detection window. Using a flashlight and LL Chevy I determined that the one inch offset in emitter spacing gets us a little less than a quarter inch additional shadow, or another say 600-800 microseconds at 20 fps.

I know the issues with LT2000, but I think the author of the software in question would contend that LT2000 is indeed "real" software. This is more of a system problem. There are a number of things that could be involved here and it really comes down to a process of elimination from a list of candidates. Here are some of the major candidates:

1) Optical emitter/detector performance
2) Serial port hardware (UART and electrical circuitry) performance
3) Windows interrupt handling 
4) Deferred procedure call (DPC) management
5) The kernel mode side of the serial port device driver 
6) The user mode side of the serial port driver
7) The user mode application's use of the serial port APIs (ReadFile, etc.) 
8) Application threading model and logic 
9) Windows thread scheduler

Somewhat separate but still a concern is: 

10) Verification methodology (i.e., did moving the emitter one inch really "fix" the problem?)

So what on the list could be affected by a change of 600-1000 microseconds? Unfortunately, just about everything on the list. If we assume the optical part of the system is actually working, the optical performance is not a likely candidate at the velocities in question, assuming photo saturation of the detectors does not have an exceeding bad impact.

LT2000 is hindered by its dependencies on the other eight concerns on the above list. PCs running Windows (and other office productivity focused operating systems like Linux, OS X, MS DOS) are not really suitable for real-time control or timing sensitive applications because of these concerns. There are ways to reduce their impact, such as unloading everything you don't need for detecting, counting, and timing laps from the PC, setting hardware to maximum performance settings (e.g. faster UART baud rate), boosting thread priorities, using faster hardware, and making sure the race management software is not artificially limiting the time critical functions by putting timing logic on a GUI thread or using slow timer functions in a timing sensitive callback. 

I suspect LT2000 is trying to do everything it can using the built-in capabilities of the PC hardware and Windows software platform. Sometimes this is not enough to handle all operational demands. Face it, PCs and Windows OS were not designed to detect, count, and time slot cars. They were designed to write documents, send email, create spreadsheets, and most importantly run Windows Update.

One better approach is to use Windows to do what it does well and offload as much of the things that it doesn't do well such as a detection and timing to some other piece of hardware. This is the same approach that high end PC games take, they offload time critical video functions to a separate piece of hardware, the video card. In the case of video games the video card is in many cases orders of magnitude faster than the PC itself for doing certain video tasks. Counting and timing laps is really no different, having a separate piece of hardware doing the things that the PC/Windows does not do fast will improve detection, timing, and counting performance. 

In fact, detection, timing, and counting are fairly trivial, so even a simple external board that performs some of these tasks like detection and detection buffering will help. It is completely feasible that the whole graphical user interface (GUI) race management part could be run in a web browser, java app, or some other non time critical type of application with the car detection, timing, and counting functions in a separate hardware device. This is the approach TrackMate uses as do systems that use an external piece of hardware. 

Another approach is to bypass some of the PC/Windows limitations with specialized software, kind of like DirectX does on Windows. Or you ditch Windows altogether and use a relic or specialized operating system like DOS as the basis of your race management system. You'll still be subject to PC issues but at least Windows is out of the picture. 

That's the reality of all race management systems. LT2000 is real software, but it is a software-only approach that is subject to the inherent vagueness that the PC/Windows platform brings to the party. It's also provided in good faith and free of charge as an open benefit to anyone in the slot car community who chooses to accept its limitations. 

In my mind the ultimate race management system would be a standalone hardware device smaller than a pack of cigarettes that contains dedicated detection circuitry, high speed counters, an embedded database that persists counter and timer data for at least for the life of a race, an embedded web server, and a wired and/or wireless access point to connect back to the race management GUI running in a web browser. This would allow any device with a web browser and HTML 5 to serve as a highly graphical and animated race management computer, including PC, Mac, smart phone, iPad, iPod Touch, etc. How far is modern technology towards delivering on this nirvana type of device? We're already there for the most part with any iOS, Android, or WP7 device on the market today. The only real missing piece is the detection circuitry which could be put in a dongle that connects to the docking port on the device or wireless via bluetooth. Just having a sensor/detection dongle would allow you to run the whole shebang on a mobile device that has a GUI. 

Imagine being able to run your whole race program from your iPod Touch, iPhone, iPad, or smart phone with a wireless Bluetooth connection to a portable and adjustable sensor gantry that can be modularly expanded to accommodate 2 to 8 lanes - - - Hello Racemasters/Tomy - - - this should be your next generation timing system - - - a portable sensor gantry and an App.


----------



## rbrunne1 (Sep 22, 2007)

Awesome suggestions AfxToo :thumbsup:


----------



## NTxSlotCars (May 27, 2008)

As in many threads of a technical nature, AfxToo's post is both informative and
well stated. I especially like the 'made to run Windows update' comment.

It's always been frustrating to me how the computer industry, software, gaming
systems, and for that matter the car industry, never seem to make something
up to its full potential right outta the box. It's like there is a '_wait and see how
this sells, then we'll put out the good one_' mentality. Or, '_now we're gonna
have to put some effort into this because of our competition's new model_'.
Case and point, the Atari 2600, mostly 2 or 3 color graphic games, horrible, 
until Nintendo came along, then they 'tried'. 6-10 color graphics, more
imaginative games, but it was too late, the market already left them.
I guess that's why Apple has had so much success over the past few years.
They have the image of producing things the best they can, with the most
features and new ideas, right outta the box.

This is the picture of forward thinking...


AfxToo said:


> Imagine being able to run your whole race program from your iPod Touch, iPhone, iPad, or smart phone with a wireless Bluetooth connection to a portable and adjustable sensor gantry that can be modularly expanded to accommodate 2 to 8 lanes - - - Hello Racemasters/Tomy - - - this should be your next generation timing system - - - a portable sensor gantry and an App.


Someone give Too a Kudo, or a raise. Too, you outta make it and go on Shark Tank.


----------



## NTxSlotCars (May 27, 2008)

Quick question about LT2k.

My program runs a lap behind. Don't know if i have missed a setting, or if I have a bad version.
I've been through it several times, but it still shows the time for the previous lap when I run it.

I have NO problems with SRM.


----------



## AfxToo (Aug 29, 2003)

I wonder if anyone has tried doing a retroreflective timing gantry? This would involve putting the emitter and detector on the same side and using reflective tape or a small flat reflector on the track surface. This would be the ticket for creating a portable gantry...


----------



## NTxSlotCars (May 27, 2008)

What about motion sensors?(thanks randy) Or small cameras?


----------



## Boosted-Z71 (Nov 26, 2007)

I have been working on the laptimer setup on the new track, Photocells, IR LED's in the timing gantry and using Laptimer 2000, ran through the printer port, with a track relay & call button. Well after wiring it all up I only had 2 lanes of the 4 that counted laps. Today I used a digital camera & checked the 8 IR lights in the gantry, they were all working correctly, I then removed the photocells in the 2 lanes that did not work and checked them with the VOM, one photocell was dead, the other functioned perfectly using an LED flashlight as a light source, so I replaced it into the track at the similar rotation as how I was testing it, the only thing I can figure out with it was it needed to be rotated in the track. I have my photo-cells inserted into rubber stoppers and then the stoppers are pressed into the plywood below the track, this lets you replace them easily and you have some height adjustment with the sensor, much easier than trying to glue them perfectly in place. Anyway after I replaced the one into the track, and soldered in the new one everything works perfectly, I did 200 or so laps on each lane and did not miss or count any false laps. Maybe somebody can answer the question about a correct clocking position of the photocell, I have never seen this before, but that is all I did to get it working, Solder joints were all good from the original install, no bare wires shorting out etc. I am using the radio shack Photo-cells and some high intensity IR LED's from E-bay, anybody ever run into a similar situation with a photocell?

Boosted


----------



## tabcomary (Jun 2, 2010)

My counter/timer system is just for recreational use. It suffers from all of the previously mentioned Windows problems, plus some other delays from the hardware I use, so the best timing I can get is down to tens of milliseconds. Good enough for home use.

I use Phidgets (http://www.phidgets.com) IR reflective sensors (similar to their current model 1103), mounted on a gantry (stick) above the track. I also use their "8-8-8" interface board, and Visual Basic to drive the whole thing. Most cars work reasonably well with this system. Dark-colored cars need to have a reflector (small square of yellow post-it note) added to trip the system repeatably. I have some issues with the car in one lane tripping the sensor in the other. I think this relates to angled surfaces on the more reflective cars. You also have to filter-out multiple trips from the same car due to wind screens and changes in color and decoration. I also have occasional problems with RF interference, usually traceable to cars that make poor contact with the rails.
I don't think this technique would work well in a competitive situation, but for my portable home track, it is great to be able to pick up the sensor tower and move it to another location, or take it and a laptop to my brother's track, without having to worry about moving the track section with the sensors.


----------



## NTxSlotCars (May 27, 2008)

AfxToo said:


> I wonder if anyone has tried doing a retroreflective timing gantry? This would involve putting the emitter and detector on the same side and using reflective tape or a small flat reflector on the track surface. This would be the ticket for creating a portable gantry...


I think I'm gonna build this into my timing building. What a great idea.


----------



## tabcomary (Jun 2, 2010)

You can also use a web cam, ZoneTrigger software (http://zonetrigger.com/), and a compatible lap counter program (i.e. Ultimateracer 3 [http://www.uracerweb.org/]) to do lap timing from overhead. This one might be a bit slower, so once again, it is probably limited to home racing, but it does make a very elegant, non-contact solution.

Here is a reference to an application article: http://www.hoslotcarscommunity.com/content/webcam-lap-timer


----------



## AfxToo (Aug 29, 2003)

I'm thinking a resistive touch strip (the technology used in cheap trackpads) would be an interesting sensor because it could do both presence sensing and velocity measurements. 

Ideally the timing gantry should have a small built-in LCD display (perhaps optional) and be usable standalone for basic lap counting, lap timing, and velocity measurements without the need for a computer, mobile device, or race management system. The computer part should only add more and higher level features and functions like race management, race league management, driver historical statistics, various types of reporting, and lane power management.

We should probably start another Topic about what we'd like to see with next generation counting, timing, and race management systems.


----------



## NTxSlotCars (May 27, 2008)

AfxToo said:


> We should probably start another Topic about what we'd like to see with next generation counting, timing, and race management systems.


I would second that.


----------



## Rolls (Jan 1, 2010)

Agreed.


----------



## pshoe64 (Jun 10, 2008)

Installed SRM 2.53 and replaced the sensors from Radio Shack with the ones from the AW drag strip. That did the trick! I was able to run RO and open cars without missing a lap cranking sub 2 second laps on the 44 foot oval. I still want to come up with an LED light bridge to reduce heat the halogen lights are producing. I picked up a couple of battery-op LED units from Walley-world. They are super bright and work great, I just need to come up with a subtle mounting solution. Thanks for all the feedback, it helped me focus the direction I needed to go in.

-Paul


----------



## SDMedanic (Apr 21, 2011)

I have made or retrofitted many a light bridge. Don't know much about the AW sensors. I know that a halogen light emits a broad spectrum of light and heat. I also know that IR sensors and LEDs operate in a very narrow light spectrum. A mismatch between the LED light output wavelength and the IR sensor wavelength window can result in otherwise perfect LEDs not communicating with otherwise perfect sensors. The result is that the thing doesn't work. 

When I last checked Radio Shack IR LEDs for example emit infrared light at 900NM. This doesn't match up well with Trakmate IR sensors. A set of 850NM LEDs matches perfectly with the Trakmate sensors and you can put the light bar as far as 18" above the track with no problems. With Radio Shack LEDs 6" between sensor and LED was about tops.


----------



## NTxSlotCars (May 27, 2008)

I saw some long LED 12v fog lamps at the auto store today. They were in one single line about 5 inches across, already in a case with a mounting bracket, and you get two for $30. I'm not sure about the IR frequency. They had them in the bluish light and white. That portable gantry Too described may get done after all.


----------



## Khodabear (Dec 10, 2011)

The reflective counter seems like an excellent idea - has anybody made a move to build one?

Peter
in Denver


----------



## Modlerbob (Feb 10, 2011)

I have had great results using the TrackMate IR system on my 1/32 Scalextric Sport track They provided a pre assembled IR light bridge and the height above the track has provided worry free lap counting. The sensors required drilling 1/8" holes in the track right below each IR bulb and then installing the sensors from below to be almost flush with the track surface. Never had a missed lap yet and no double counts.


----------



## NTxSlotCars (May 27, 2008)

Khodabear said:


> The reflective counter seems like an excellent idea - has anybody made a move to build one?
> 
> Peter
> in Denver


I'll be on it after the holidays. :dude:


----------



## NTxSlotCars (May 27, 2008)

But I didn't.
I have since read that Hall Effect Sensors may be the answer...


----------

