Inexpensive infrared train detector circuit

Bob:

Thanks very much for your valuable contributions to the thread!

In fact, I have to give you credit for the original circuit that I started the thread with. I couldn’t remember where I got it from but as soon as I saw your diagram I recognized it immediately.

EDIT:

I just realized that the original circuit was published in an article by you in MR in October 2009, with some corrections made to the published diagram in a later issue.

I hope that I have not broken any rules by posting your design.

Dave

Dave:

I removed this information because ALL my IR circuit links use Obsolete IR Parts. I need to update these links someday with “New” IR parts.

For “New” IR parts visit:

http://cs.trains.com/mrr/f/744/t/219552.aspx

Bob Frey

I would be very surprised if all it can detect is within that short of a distance. Have you tried mounting and stagerring along the outside of the track the emitter and receptor so that they would not see the gap between cars? The first car would break the beam and it wouldn’t see a space again until a very short car or the end of the train is detected. Just be sure the they are correctly aligned and you should get more than 1.5" operating area. Ken

emitter

O

HHHHHH HHHHHHHHHHH

O

receptor

Ken:

Thank you for pointing out another possible arrangement for the detector system. In fact, it would make more sense to mount the detector as you suggest in areas like hidden staging where the detectors don’t need to be hidden.

I was more interested in finding something that could be easily hidden and used to control visible turnouts, hence the between the track setup. The circuit as shown won’t do that all by itself. A relay would have to be added to deal with the voltage required for the turnout motor. When I get that far I will post a diagram with the added components. Maybe one of the electronic gurus (which I am definately not) could beat me to it.

I haven’t tried them in the across track configuration that you suggest but I know you are right because I did test the detector with the emitter/receptor facing each other several inches apart. The 1 1/2" distance I gave was with the emitter and receptor mounted side by side with heat shrink tubing used to reduce the angle of detection on the receptor.

Thanks for your input.

Dave

Ken:

I did a rough test of your suggestion about mounting the detection circuit across the track on an angle to the cars.

With 12V supplied the detector worked with up to about nine inches between the emitter and receptor. However, there was a lot of interference from the light in my workshop. The receptor had to be shielded for about two inches from its tip towards the emitter, and the lights on my workbench had to be turned off, leaving only the 60 watt pot lights in the ceiling. That is not nearly enough light for daytime operations.

I then tested the detector at 9.2V. The detection distance was only reduced by about one inch, but the amount of interference was reduced fairly significantly. The receptor still required additional shielding.

I don’t recall having a problem with interference from room light when I tested the detector mounted between the rails using reflected IF instead of direct. I will test that again and let you know what I find.

My conclusion is that the circuit may be too simple for use across the track where it is exposed to normal ambient light. Also, it would likely only be good for single track applications unless the components were mounted very close to the track.

It still looks like a cost effective method for detection in hidden (shaded) staging.

Dave

Ok - Its Dave again (hope you’re not getting bored!)

I tested the detector again with it mounted between the rails so the IF reflects off of the bottom of the cars. The receptor was shielded with heat shrink tubing so that the tip of the receptor was about 5/16" below the bottoms of the ties and the heat shrink extended up to the bottom of the ties. I used a 1/16" drill bit inserted into the open end of the heat shrink touching the receptor tip to control the shrinkage.

Under normal lighting on my work bench the detector worked fine. My ‘normal’ lighting consists of two desk lamps with 23 watt compact florescent bulbs, a third desk lamp with a 50 watt halogen bulb and four 60 watt incandescent pot lights in the ceiling over the workbench.

I then held the detector within five inches of one of the compact florescents and there was no interference. Next I held the detector within five inches of the 50 watt halogen and the detector light did come on indicating interference. There is a lot of light at five inches from a halogen bulb, certainly more than would be on the surface of a layout.

I also experimented with different lengths of shielding in front of the receptor. At 3/4" nothing worked. At 1/8" there was a lot of interference. 5/16" seemed to work the best.

Obviously everyones’ layout lighting will be different so you will have to play with the shielding to get the best performance.

Dave

Hi Dave

I have tried constructing the circuit the way it is in the diagram. I purchased my parts from Digikey, the photo receiver and infared that are listing on the sheet are no longer available. They shipped a cross referenced units. I have the shrink wrap on the photo cell 2" long. My problem is that the led stayed on all the time until I turned out all the light in the room. When I moved the infared diode to the end of the shrink tubing on the photo receiver the led will not come on. Any suggestions. I have a basic knowledge of electronics from years back.

I like the circuit and how it should work is ideal for where I need it.

Phil

Possible problems –

  1. Digikey sent you a photocell that will detect not only infrared but also visible light. That would explain why your room lighting had an effect on it.

  2. This is a very basic, reflective infrared emitter/detector pair. The emitter and detector should be mounted at a slight angle to each other so the reflected light will fall onto the detector instead of being reflected straight back to the emitter.

  3. Circuits of this type usually require that the detected object be very smooth and highly reflective material in order to properly reflect the IR beam onto the detector.

  4. You may have the Darlington pair wired backwards. Double check the polarity of your IR emitter and the Darlington pair.

i believe these symptoms could be explained by the transistor receiver being too sensitive and/or the LED emitter not bright (how would you tell) enough.

the transistor/receiver can be made less sensitive to room lighting by reducing the resistor value in series with the photo transistor. A pot may make things easily adjustable.

the LED intensity can be increased by reducing the resistor value in series with it. There should be a spec for the LED max current. pick the resistor that give that value for the applied voltage.

somewhere, there is a good combination. shadowing the photo-transistor can also help

cacole and gregc:

Thanks for responding. You know way more about this stuff than I do.

I did test the circuit on an actual piece of track with rolling stock and it seemed to work fine.

Phil:

You might want to contact Robert Frey who is the original designer of the circuit. If you scroll up the thread you will see a couple of posts by him. I am disappointed to hear that the specific components are discontinued. That makes things harder.

Dave

Thanks everyone.

I reversed the wires on the emitter LED and the circuit is now working. I will play with the resistor to fine tune the sensitivity.

Thanks again

Phil

Phil!

I am so glad to hear that you solved your problem!

Perhaps you could post the replacement parts numbers so people don’t have to search them out themselves.

Thanks

Dave

Hi everyone

The part numbers that I was sent from Digi-Key were:

emitter was 754-1600-ND and the IC Phototrans IR was QSD123-ND.

The problem was I used the computer created drawing from an earlier thread to wire up the circuit . The drawing is correct but note on the emitter about the positive being the long terminal is placed over the top of the emitter which is the negative side. Oops. When I looked at the hand draw one at the start of this thread I could see my mistake.

Thanks again.

Phil

Thanks Phil!

Dave