Magic Raceway's Lapcounter Time Delay Circuit 

 

Rev B[2474]-RED

 

Magic Raceway is my three lane track located in Norwalk, Iowa.  The track uses a Phidget 0/16/16 card to control the tracks individual lane power relays, actuate future LED outputs, receive future inputs (such as from a Track Call pushbutton) and provide lap counter information to the track's Race Management System (RMS).  Magic Raceway uses a unique type of infrared sensor to provide Lap Counter information to the Slottrak RMS.  The sensors are commercially available optical fire/smoke detector receiver circuits.  Each circuit monitors an external infrared LED.  If the signal from the LED is received then the circuit provides a low (~0 VDC) output.  If the signal from the LED is blocked or obscured then the circuit provides a positive voltage output that is approximately equal to the power supply (VCC) voltage.  On my track the sensors are connected to a 12 VDC filtered power supply.  The following documents an update problem that I had with my 0/16/16 Phidget card and how the addition of a time delay circuit installed between the infrared sensor and the Phidget card input resolved the problem.  

Originally I thought that this problem was unique to my sensor/Phidget card combination.  It appears that other tracks using a Phidget card for their lap counter interface can experience similar problems.  While my time delay circuit was designed to work with the infrared sensor circuit it can be adapted to work with conventional phototransistors and reed switch interfaces.  It may also be possible to adapt the circuit to work on tracks that use a dead strip interface.

 

 Infrared Flame Detector With Analog and Digital Outputs

 

The module shown in the above photo is typical of the three installed at Magic Raceway.  The modules infrared operating range encompasses the 850 nanometer wavelength normally used for infrared light bridge LEDs.  I found the detectors by searching Amazon and E-Bay using the phrase “Infrared Flame Detector”.  This module provides two different voltage outputs.  Other modules provide a relay contact output.  The Amazon search identified at least four different types of Digital Output modules.  I went with the lowest cost option that provided a Digital as well an an Analog output.  The question is how will the module interface with the Phidget card.  

 When tested using a five volt power (5.0 VDC) supply the Digital Output voltage provided by the card was 4.7 VDC when the light input to the sensor is blocked and less than 0.1VDC when the sensor is exposed to Infrared light.  These voltages are perfect as I wanted the Digital Output voltage to go high when a car interrupts the infrared beam.  Each Phidget card's digital input is capable of receiving up to 30 VDC.  A voltage between 4 VDC and 30 VDC is read as True or logical 1.  A voltage below 1 VDC is read as a False or logical 0.  The 4.7VDC at the Phidget card is 0.7 V above the Digital Input's minimum True (or 1) input voltage while the 0.1 V is below the card's False (or 0) input voltage threshold.  With these Digital Output modules an inverter circuit is not required.  The fourth pin (AO) was a non-inverted analog output.  The analog output may be nice for troubleshooting but it's not required.  

After the track was assembled and wired the lap counter system was tested using a HOPRA Superstock car.  The car was in the center lane.   A 0.625 inch deep "wing" was taped to the body to trigger the two gutter lanes.  The goal is to have all three lane counting together while the car is being driven as fast as possible.  In the first tests the three lanes counted in lock step.  The blue lane quit counting after the pace was ramped up.  The problem appears to be that the light bridge is too bright as some bodies do not trigger the lap counter.  Too much light is a problem most would like to have.  I adjusted the blue lanes sensor sensitivity until all three lanes were counting in lock step.  For day one I am very pleased.  As the sensitivity setpoint was set to minimum I planned to add a dropping resistor to the light bridge to allow more sensor adjustability.   With a 0.625" inch long wing I have a safety factor of four which is acceptable.  The following day I could not repeat the results and started troubleshooting.  

Up to this point in the build things have been going smoothly and a visit from my friend and acquaintance Edsel Murphy was not unexpected.  Unfortunately there is nobody to call for help when you have the only lap counter of its type.  As the light bridge was overpowering the sensors the first thing was to add resistance to the bridge input to reduce its light output.  Various resistor values were tried.  The final resolution was to add a 5 K Ohm resistor to the circuit.  I then started swapping sensors, capacitors and card input points with little success.  

After a nights sleep the problem and its solution seemed to fall into place.  The problem only occurs when all three lanes are triggered simultaneously.  This points to a problem with the Phidget card input channel scanning and update times.  When all three lanes are triggered simultaneously it appears that there is not enough time for the card to process the data before the car on blue lane uncovers its sensor.  On its own or if the blue and another lane is triggered simultaneously the program records the laps.  The solution was to add a time delay circuit to extend the signal from the sensor to the Phidget card.  

The 0/16/16 card specification states that the car can accept an input every 1/125th of a second (0.0080 Seconds).  I assumed that the card could accept multiple inputs at the same time as long as they each input was longer than 0.0080 seconds.  It appears that the card is not able to accept a second input during the 0.0080 second interval that it is processing another input.  To allow the card to simultaneously count three slot cars the cars need to spend a minimum of 3/125th second (0.0240 Seconds) over the lap counter.  This theory was proven by crossing the lap counter at slow speed.  When this was done all three lanes would count simultaneously.  As I am not sure if the card can process simultaneous inputs and outputs the minimum time delay would have to be (16 inputs + 16 outputs) x 0.0080 seconds = 0.2560 seconds

If a safety factor of five is required then a time delay circuit is required to hold the input signal in place long enough to allow the card sufficient time to process the inputs.   A circuit using a 555 monostable timer will be added to extend the input signals. For conservatism I am assuming that the card cannot provide simultaneous inputs and outputs.  Therefore, the minimum time delay is calculated as (16 inputs + 16 outputs) x 0.0080 seconds = 0.2560 seconds.  The timer will initially configured to provide a time delay of four-tenths of a second.  This time delay is more than should be necessary.  However, since Slottrak does its business when the beam is first interrupted the time delay operates in the background and is undetectable as it is shorter than the programs minimum half-second lap time.   The following timelines shows the interface circuit's output when triggered.

 

Timelines Showing Circuit Response for Various Length Inputs

 

The first timeline shows a normal momentary input.  As the car crosses the lap counter section at speed the light beam is blocked for a time that is shorter than the time delay.  The time delay circuit starts to time-out as soon as the input signal is received and the time delay circuit extends the Phidget card input to 0.4 seconds.  The second timeline represents a car that stalls on the lap counter and blocks the light beam for a period of time longer than 0.4 seconds.  As with the first timeline the time delay circuit start to time-out as soon as the input is received.  When the chip's time delay is reached the circuit output will follow the input with no additional time delay.    

   

Optical Sensors, Interface Board and the Phidget Card

 

The above photo shows the final installation.  The sensors plug into the brown time delay interface board.  The following figure shows one of the three circuits on the interface board.  The circuit first uses a Field Effect Transistor (FET) to first invert the signal from the sensor.  The FET then sends the inverted signal to the 555 timer's input.  The 555 Monostable timer will ensure that for any input greater than a few microseconds (1/1,000,000 second) the output will have a minimum duration of four-tenths of a second.  The buffered output is provided to the Phidget card.  The large capacitator shown in the above photo is not part of the time delay circuit.  The capacitator is connected to the tracks 12 VDC auxiliary power supply and provides additional surge current when required such as when all three lane power relays are energized.

 

Typical Interface Board Circuit

 

The completed lap system was tested using the car in the following photo.  The wings cover the gutter lane infrared sensors.  The car covers the center lane sensor.  The car's tail feathers and clear front splitter do not interfere with the center lane sensor.  The windows on the test car are clear.  The lap counter system was tested by driving the car as fast as possible for a minimum of 20 laps. The lap counter is considered acceptable if all three lanes count the same number of laps.  To prove the system I turned twenty three laps with this car at speed.  All three lanes counted 23 laps.  The length of the wings was approximately 1/5th the length of the car.  This gives the system a safety factor of five.  One could argue that the safety factor is actually four.  I won't debate that.  The point of the test is to prove that the system works with significant margin. Having passed the test the lap counter was declared fully operational.

 

Lap Counter Test Car

The time delay circuit shown will work with any sensor that provides a positive voltage signal when the car crosses the lap counter.  For tracks that use reed switches the circuit can be used as is.  Tracks that use a Phototransistor input should be able to adapt the circuit by deleting the FET and providing the Phototransistor's output signal directly to the 555 input.  The 555 input needs to have a pulldown resistor connected between the chip's input and ground (0 VDC) to ensure that the input goes low when the sensor is blocked.  For tracks that use a dead strip I would add an interposing filter stage that includes a capacitator as interference from the car's motor can cause the dead strip output signal to be extremely noisy.  The filter stage capacitator may hold the input signal high long enough that the time delay circuit may not be required.

 

Created October 24, 2020

 

Siberia Racing Home Page

Tech Pages