IR Light Gate false triggering

Discussion in 'The Projects Forum' started by Blue Wolf, Jun 20, 2019.

  1. Blue Wolf

    Thread Starter New Member

    Jun 20, 2019
    Hi all

    I have built a lap counter for slot cars. 556 monostable providing counts to 4029 BCD --> 4511 BCD to 7 segment --> LED displays. Originally I placed reed switches beneath the track for triggers. All worked well on bench top but charging the track and running cars send the displays wild. I guessed EMF from the charged track and dc motors so I replaced the reed switches with IR Light gate (IR LEDs above the track and photo diodes beneath). Once again, benchtop was great but when I run the cars there is false triggering. It is now only once or twice a lap, and with some cars only once, at a location where the track is momentarily broken.
    I was sure that IR would work and don't know what I could be doing wrong?? Could EMF from the cars be triggering the photodiode? Just to clarify I even took the step of powering the entire counter circuit from a battery completely isolated from the track/cars and still got the false triggering.
    Please let me know if anyone has an idea what is going wrong as I am out of ideas.
    Blue Wolf
  2. ericgibbs


    Jan 29, 2010
    hi BW,
    Welcome to AAC.
    Your idea it could be the cars electrical noise is a possible cause of the triggering problem.
    Do you have sufficient capacitive decoupling on the project power rails.?
    Also have you tried a capacitor across the supply pins of one car as a test.? As close as possible to the cars motor.
  3. AlbertHall

    AAC Fanatic!

    Jun 4, 2014
    The most sensitive part of the system to interference will be the photodiodes so it would probably be better to put the LEDs in the track and the photo diodes above.

    What are you using for the photo diodes? There are some which have circuitry within and output a logic '1' or '0' which would be less susceptible to interference than a bare photo diode.
  4. CharlesWMcDonald


    May 16, 2019
    You need to modulate the light from the LED and detect the modulated signal from the photodiode. This will provide some immunity to ambient light. IR remote controls use this technique and modulate the signal somewhere around 40 to 50KHz, give or take. I've seen several that are in the 38KHz range.
    EMI may still be an issue but the modulated signal can also help in this area.
  5. Kjeldgaard


    Apr 7, 2016
    I agree with a few others that the IR receivers are easiest to minimize false light if they are located above the cars, and modulation of the IR LEDs can also greatly help the false light problem.

    Then, modulation will also allow higher peak current for the same mean current and thus again the ability to lower the sensitivity of the IR receivers accordingly.

    A limitation of the directional sensitivity must also be considered, something simple as some matte black tubes for the IR receivers or more advanced with optical lenses.
  6. Sensacell


    Jun 19, 2012
    Buy cheap red lasers.

    They blast so much light, a simple phototransistor can easily detect it.
    Ambient light is far less trouble when you use such a bright light source.
  7. KeithWalker


    Jul 10, 2017
    From what you describe, I would think that the problem is being caused by electrical interference from the power pick-ups on the cars. The clue is that it occurs when the cars cross over a break in the track.
    Are you using the same power source for the track and the lap counter? If so, you need to de-couple the lap counter supply. Try feeding the positive power to the counter through a forward biased diode (1N4001, etc.) followed by a 100 uF electrolytic capacitor in parallel with a 0.1uF capacitor connected to circuit common. Run the power leads of the counter right back to the output of the power source.
  8. Blue Wolf

    Thread Starter New Member

    Jun 20, 2019
    Hi all and thanks for many replies. So a couple of points. I originally planned to have the photodiodes above and IR LEDs beneath the track but wasn't sure that a single car blocking one transmitter would stop the IR reaching both receivers...whereas with the current configuration the receiver is completely blocked for the duration of the car passing over.
    I thought of using a 38kHz modulated signal but
    a)wanted to cut back on extra circuitry (I'd need two more 555 astables at least) and
    b)was trying to keep the undertrack componentry to a minimum size. The rectangular photodiodes are much smaller and low profile than a modulated IR receiver package.
    I do have a whole bunch of red lasers...I may try would look cool too!

    As far as power supply I originally powered it from two separate 240->12V transformers out of the same socket. I thought that maybe power fluctuation was an issue so even went so far as powering the counter from a totally isolated battery power no avail. I may increase the size of my decoupling caps on the board and try decoupling the cars pickups as well and see how I go!