Trains.com

Subscriber & Member Login

Login, or register today to interact in our online community, comment on articles, receive our newsletter, manage your account online and more!

Inexpensive infrared train detector two circuits

45427 views
32 replies
1 rating 2 rating 3 rating 4 rating 5 rating
  • Member since
    August 2006
  • From: Greendale, WI
  • 108 posts
Inexpensive infrared train detector two circuits
Posted by Robert Frey on Monday, July 29, 2013 9:19 PM

The circuit for inexpensive infrared train detector was first published in MR in the October 2009 issue.  The “K” for a resistor on the Darlington was missing, so that circuit as printed would not work. (It was corrected later.)  Another problem was that about 1 year later, the QRB1114 IR Reflective Sensor became obsolete. About two year latter the IR Diode QEC113-ND and the IC PhotoTrans QSC112-ND also became obsolete.

I have chosen some Dig-Key Part No’s as replacement, and added a new circuit.

==============================================  

       Dig Key:  http://www.digkey.com 

  • Part No.                  Description
  • QRB1114-ND        SENSR OPTO TRANS 3.81MM REFL PCB   Obsolete
  • QEC113-ND          LED IR EMITTING GAAS 940NM 3MM          Obsolete
  • QSC112-ND          IC PHOTOTRANS IR 880NM BLACK 3MM    Obsolete
  •           Replace the Obsolete parts with:
  • 754-1600-ND  EMITTER IR 3MM 940NM CLEAR (50 ma)      $1.87 per10
  • 160-1030-ND  PHOTOTRAN NPN 3MM IR DARK (940NM)    $2.70 per10
  •  
  • A364B-4-ND           HEATSHRINK 3/64 IN X 4FT BLACK   $0.92 per 4 Ft.
  • Q2F332B-ND          HEATSHRNK POLY 3/32" BLK 4'       $0.51 per 4 Ft
  •    (Request To Digi-Key: “Please cut Tubes into 8 pieces, about 6” long.)
  •  
  • MPSA27GOS-ND    TRANS NPN DARL BIPO 60V TO         $2.88 per 10
  • 100KQBK-ND          RES 100K OHM 1/4W 5% AXIAL          $0.59 per 10
  • 680QBK-ND            RES 680 OHM 1/4W 5% AXIAL             $1.18 per 20
  • 270H-ND                 RES 270 OHM 1/2W 5% AXIAL             $0.83 per 10
  • 1080-1122-ND         LED SS HI EFF RED DIFFUSED 3MM   $2.84 per 10
  • 1N4148DICT-ND     DIODE SWITCHING 75V 0.15A DO35      $1.06 per 10

If your train room has incandescent lighting use Circuit 1.  If it has florescent lighting (makes very little IR light) use Circuit 2.

For the IR Photo Transistor, cover it with 3/64” heat shrink tubing, shrink the tubing, and cut the tubing at the face so that there is about a 1/16” dia. hole at the top.  Putting two 100 K resistors in series, increases the sensitivity. In parallel, it reduces the sensitivity to any light.

Note: The ½ Box Car pictures, are Logic Rail Technologies:  http://logicrailtech.com/od-1.htm

Bob Frey   Big Smile

Website: http://bobfrey.auclair.com

  • Member since
    July 2006
  • From: Bradford, Ontario
  • 15,797 posts
Posted by hon30critter on Thursday, August 1, 2013 11:46 PM

Bob

Thanks for the updated circuits.

Dave

I'm just a dude with a bad back having a lot of fun with model trains, and finally building a layout!

  • Member since
    August 2006
  • From: Greendale, WI
  • 108 posts
Posted by Robert Frey on Saturday, August 3, 2013 12:27 PM

Thank you Dave for your interest in working with “Inexpensive infrared train detector circuits”.  The idea is basically any low cost IR circuits that operates only an LED.  Both of these circuits do operate and LED base on the change in the IR light level.  The NPN Phototransistor IR can be built to be very sensitive to any form of IR light.  When the IR light gets between the cars, you can see a change in the LED level.

In my MR Oct. 2009 article there were a Red and a Yellow, LED in a low light staging area.  When the train came in to a single ended staging track, the Yellow came on then the Red.  The LEDs would flicker as the train passed through. Then you stop on Red only!  On backing out, if the Red went out, you are going in the wrong direction.  The two IR sensors, under the track, were about 2 inches apart.  A Diode Emitter makes a strong IR light at 40 ma.  If you use two of these in series, then you need only one 180 ohm 0.5 W resistor for 12 VDC.

Logic Rail Technologies has more electronic in their product to reduce any problems for other IR light sources. They have 2 or 4 second detector release time to eliminate any flickering.  They have screw terminals for inputs and outputs that can control other electronic devices.

To some people time is money, and they can have a complete Model Railroads built for them. 

Dave, I know you have started a thread on this subject, and the number of your viewers has become very large. I hope you keep it going at:  http://cs.trains.com/mrr/f/744/t/213706.aspx

Bob Frey

Website: http://bobfrey.auclair.com

  • Member since
    February 2002
  • From: Reading, PA
  • 30,002 posts
Posted by rrinker on Saturday, August 3, 2013 1:00 PM

 In-between cirsuits can be found on Rob Paisley's site. One key to blocking interference is to actually modulate the IR beam. It still won;t work if ambient sources completely swamp the detector, but if the detector only responds to a singla that pulses at some frequency other than AC line frequency, it can discriminate between the actual emitter and ambient light sources with IR content.

 Yes, more complex, but still well within the realm od DIY, and not as complex nor as expensive as the Logic Rail circuits.

 For the original purpose, in a hidden staging yard, this circuit is plenty adequate. No need to be complex where it is not needed. The simpliest solution, for a given situation, is usually the best.

          --Randy

 


Modeling the Reading Railroad in the 1950's

 

Visit my web site at www.readingeastpenn.com for construction updates, DCC Info, and more.

  • Member since
    August 2006
  • From: Greendale, WI
  • 108 posts
Posted by Robert Frey on Sunday, August 4, 2013 5:58 PM

DiscoverCircuits.com, has 30,000+ electronic circuits, cross-referenced into 500+ categories. Model Trains Circuits: http://www.discovercircuits.com/M/model-trains.htm

I also like Rob Paisley's Model Train web site. “Model Railroad & Misc. Electronics” He has a Main Circuit Index list.  Computers and microcontrollers have largely been avoided.  The circuits are explained as to how they work, and has a list of Dig Key Part No.

Rob Paisley's: http://home.cogeco.ca/~rpaisley4/CircuitIndex.html

Day&Night IR: http://home.cogeco.ca/~rpaisley4/DayNight.html

Track IR: http://home.cogeco.ca/~rpaisley4/ATDetIR.html

IR Detector: http://home.cogeco.ca/~rpaisley4/IrProximity.html

Bob Frey

 

Tags: detection

Website: http://bobfrey.auclair.com

  • Member since
    May 2007
  • 8 posts
Posted by Frolin Marek on Thursday, December 26, 2013 9:37 PM

Bob,

Looking at building some of these detector circuits to test use on my layout. 

I read about having two 100ohm resistors in series to increase the sensativity.  I model (indoors) in 1/22.5 scale and thus the distance is between 1 1/2 to 1 3/4 inches from top of ties (sensors) to the bottom of most cars.  Wondering if you see any concerns with this much distance?

The common answer idea is photocel based, but I want to use the same circuit on the layout in hard to view places, along with in hidden storage.  Do not want to mount a light source over each circuit.  Will not always have a light source, and with possible night time lighting, means the circuit should not by room lighting based.

So any concerns over the distance from sensors to bottom of cars, in G scale compared to HO scale?

Frolin

 

  • Member since
    July 2006
  • From: Bradford, Ontario
  • 15,797 posts
Posted by hon30critter on Friday, December 27, 2013 4:20 AM

Hi Frolin

The detectors that Rob Frey is explaining don't necessarily need an overhead light source, in fact they don't need any incandescent light at all. They can work by reflecting a beam of infrared light off of the bottom of the cars as the cars pass over the sensors which are mounted in the track between the ties. The sensors have two components. One is an infrared emitter and the other is an infrared sensor. They will work just fine in tunnels and if you use them in other locations they will work in both daytime and night time operations.

Don't be afraid to ask more questions! I was (and still am) an electronic dinosaur but I have managed to figure out how these sensors work.

Dave

I'm just a dude with a bad back having a lot of fun with model trains, and finally building a layout!

  • Member since
    May 2007
  • 8 posts
Posted by Frolin Marek on Friday, December 27, 2013 6:08 PM

Dave,

Maybe I was unclear on my question, as I am looking for a detector circuit that is 'not' light source based.  I do not want to use any light source in the setup, that is why I liked the circuit as I read, as both the emitter and detector are mounted in the track.  Do not want an overhead lamp, room lighting or such, to be needed.  And staying away from blocks or gaps and circuit detection if possible as well.

What I was wondering about though is, the increased distance that I have in G scale.  That is, the distance from tie to bottom of an HO car is maybe 1/2 inch, where the distance from ties to bottom of a G scale car is closer to 1 1/2 inches.

One of the circuit comments was to put two 100 ohm resistors in series (why not a 200ohm), to increase the sensativity of the circuit.

Will this circuit still work, and sense the car, when the distance is 3 times the space found in HO scale?  Is there a higher resistance value needed to handle the increase in distance I have in G scale?

 

thanks!

Frolin

  • Member since
    July 2006
  • From: Bradford, Ontario
  • 15,797 posts
Posted by hon30critter on Saturday, December 28, 2013 12:02 AM

Sorry Frolin. I didn't read your post carefully enough.

To answer your question, the sensors should work just fine with your scale. My test units consistently worked at about 5" - 6".

If you want a more detailed answer why not send a PM to Bob Frey. In my experience with him, he is quite willing to help out.

Dave

I'm just a dude with a bad back having a lot of fun with model trains, and finally building a layout!

  • Member since
    August 2006
  • From: Greendale, WI
  • 108 posts
Posted by Robert Frey on Saturday, December 28, 2013 4:40 PM
To Mr. Frolin Marek
 
As you know, the Train detection circuit published in MR Oct. 2009 used a QRB1114-ND.  This device is now obsolete.
 
 
The replacement parts from Dig Key:  http://www.digkey.com are: 754-1600-ND, EMITTER IR 3MM 940NM WATER CLEAR  (50 ma).   160-1030-ND, PHOTOTRAN NPN 3MM IR DARK (940NM), Q2F332B-ND, HEATSHRNK POLY 3/32" BLK 4' (To cove the PHOTOTRAN and eliminate any side ambient light.) and a MPSA27GOS-ND, TRANS NPN DARL BIPO 60V TO.
 
 
Frolin, If you do use this IR Detector for your “G” scale Railroad, could you please report back the ”Sensitivity Resistor” you used, how far away could you get your WHITE Cardboard to reflect the IR light back?   Does it sense the present of ALL of your “G” scale cars?
 
Robert Frey

Website: http://bobfrey.auclair.com

  • Member since
    November 2013
  • 29 posts
Posted by Holshot14 on Saturday, December 28, 2013 7:33 PM

What should you use if your room lighting is the new LED style?

  • Member since
    August 2006
  • From: Greendale, WI
  • 108 posts
Posted by Robert Frey on Sunday, December 29, 2013 12:09 AM

Note that both the IR EMMITTER Diode and the IR Photo Transistor use IR light @ (940NM).  I don't think the new LED style produce IR light in this range?  (I have some of them, and Foresselent Lamps in my work shop. The problem of my circuit LED staying on comes when I push the "Sensitivity Resistor" near 470K.) .  

Bob Frey Big Smile

Website: http://bobfrey.auclair.com

  • Member since
    May 2007
  • 8 posts
Posted by Frolin Marek on Sunday, December 29, 2013 1:21 AM

Dave, Thanks for the reply. Good to hear others have tested the greater distance and had success. I did email Bob directly, he replied giving this thread link and suggesting I post and ask here, so am doing.

Bob,  was wondering about the use of two 100ohm resistors in series, instead of one. Would a 200ohm do the same? Can't find the posting that mentioned using two, so thought would ask here.


Guys... care to see examples of indoor G/Gn3, that I am referring to?  Not casual "G gauge" but true 1/22.5 scale, using both Gauge 1/G for Gn3 NG and Gauge 3 for Std Ga trackage. My layout is not as far along, but my site has photos and videos of my friend Barry's layout. 
Try the 'Sampler' video...
 http://www.frolin.net/cwrr/data/videos.html

thanks again!
Frolin Marek
Mountain RR

  • Member since
    August 2006
  • From: Greendale, WI
  • 108 posts
Posted by Robert Frey on Sunday, December 29, 2013 3:51 PM
To Frolin Marek,
In my material list for the replacement parts, I said: “Putting two 100 K resistors in series, increases the sensitivity. In parallel, it reduces the sensitivity to any light.”  Since you did not purchase a 200 K (200,000 Ohms) resistor, you can test this by temporarily putting a 100,000 and a 100,000 ohm resistor in series which is close to a 220K bias on the transistor pins 1 and 2.
 
Frolin, we don’t need a greater distance in HO scale.  I have tried to suggest two way of increasing the distance. One is to produce more IR light, and the other is increase the sensitivity to any light, and then work in a dark area.  You could be the first to work with reflective IR light in G scale. I also think it will work for you, but you need to do some testing.
 
Frolin, If you have just florescent lighting in your train room, then take the IR EMITTER, hold it above your G scale box car, and point it a the IR Photo Transistor, and use circuit #1   The result is the same. The LED comes on when there is something that covers the IR Photo Transistor.  (IR EMITTER on a Telephone Pole near the track, or even in a tree near the track. You don’t see IR light.)
 
Bob Frey 

Website: http://bobfrey.auclair.com

  • Member since
    August 2006
  • From: Greendale, WI
  • 108 posts
Posted by Robert Frey on Tuesday, December 31, 2013 4:22 PM

Website: http://bobfrey.auclair.com

  • Member since
    October 2008
  • From: high desert so cal
  • 997 posts
Posted by BIG JERR on Wednesday, January 1, 2014 11:35 AM

hi guys , got a shopping list going to make some of these detection units as decribed BUT would like to get some kind a circuit board material to build it on so I can attache & or move inside a covered helix ..

so I'M looking at boards at digikey site and there a ton , is there a spacific type thats CHEAP and easily cut apart ,for making little circuits as these ..???  or  somthing other /

I know a board is NOT required for these units but having made things in the past Ive come to beleive it would make it easyer for me. ....... Jerry

  • Member since
    February 2002
  • From: Reading, PA
  • 30,002 posts
Posted by rrinker on Wednesday, January 1, 2014 12:17 PM

 You want plain perfboard with 0.1x0.1 hole spacing. This is available in anything from sizes to hold just one circuit on up to big sheets you can cut apart. You cna also get it at your local Radio Shack. Squares cut from a big sheet were what I used for my Tortoise mounts back when I used Tortoises. To cut it I used wire cutters to snip through a few holes on each side of where I wanted to seperate it, then carefully snapped it along that line.

                  --Randy

 


Modeling the Reading Railroad in the 1950's

 

Visit my web site at www.readingeastpenn.com for construction updates, DCC Info, and more.

  • Member since
    March 2015
  • 7 posts
Posted by AIT hobby on Tuesday, March 17, 2015 2:49 PM
Hello Tryng to see if this thread is still open I'm am very interested in the circuit and trying to build but have failed to make it work Look for help Thank you Ted
  • Member since
    July 2006
  • From: Bradford, Ontario
  • 15,797 posts
Posted by hon30critter on Wednesday, March 18, 2015 12:39 PM

Hi Ted

Welcome to the forums!   Welcome

Without being able to see exactly what you have done its kind of hard to figure out why your circuit isn't working. The only thing I can suggest is to take a look at each of the components and make sure they are all wired the right way round. You could also check out the thread I started prior to this thread on the simpler version of the circuit with both the emitter and receiver mounted in the track. Robert referenced my thread but in case you missed it here is the link:

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

(To get the link to work, highlight it, then right click on it, then select "Open Link" or words to that effect from the drop down menu).

I'll take the liberty of suggesting that you contact Robert Frey directly too. He has been very willing to help in the past.

Dave

I'm just a dude with a bad back having a lot of fun with model trains, and finally building a layout!

  • Member since
    August 2006
  • From: Greendale, WI
  • 108 posts
Posted by Robert Frey on Wednesday, March 18, 2015 1:43 PM

 Hi Ted              http://www.digikey.com        Part list updated:     22 March 2015

Part No.                    Description

754-1600-ND           EMITTER IR 3MM 940NM CLEAR (50 ma)        $1.87 per 10

160-1030-ND           PHOTOTRAN NPN 3MM IR DARK (940NM)      $2.70 per 10

A364B-4-ND              HEATSHRINK 3/64 IN X 4FT BLACK               $1.13 per 4 Ft.

Q2F332B-ND             HEATSHRNK POLY 3/32" BLK 4'                    $0.51 per 4 Ft.

     (Request To Digi-Key: “Please cut Tubes into 8 pieces, about 6” long

KSP13BU-ND            TRANS NPN DARL 30V 0.5A TO-92                   $2.74 per 10

100KQBK-ND             RES 100K OHM 1/4W 5% AXIAL                       $0.61 per 10

680QBK-ND                RES 680 OHM 1/4W 5% AXIAL                        $1.22 per 20

270H-ND                     RES 270 OHM 1/2W 5% AXIAL                        $0.85 per 10

1080-1122-ND            LED SS HI EFF RED DIFFUSED 3MM              $2.84 per 10

1N4148DICT-ND          DIODE SWITCHING 75V 0.15A DO35             $1.06 per 10

 

The parts list is for Circuits 1 or 2 is shown in the beginning of this thread.

If you reverse the pins 1 & 3 of the NPN Transistor, neither circuit will work.

Electronic parts in both the circuits are polarity sensitive. One wrong, circuits will not work.

 

Bob Frey

Website: http://bobfrey.auclair.com

  • Member since
    March 2015
  • 7 posts
Posted by AIT hobby on Wednesday, March 18, 2015 1:49 PM
Thank you for replying I understand about not seeing what i have done i was seeing is this thread was still good first off and them what information would be needed Thank you again Ted
  • Member since
    March 2015
  • 7 posts
Posted by AIT hobby on Wednesday, March 18, 2015 1:54 PM
Thank you Bob I ordered all those parts from them off a list you have put up found some the had the 100k resistor replaced with a 220k and thought that may be the problem At first my try's did not work until i remembered i had one of those new light bulbs over the work bench Stupid me haha them i had one that the led glowed and would get brighter is i held the emitter up to it real close but am going back over everything tonight Thank you again Ted
  • Member since
    July 2006
  • From: Bradford, Ontario
  • 15,797 posts
Posted by hon30critter on Thursday, March 19, 2015 12:20 AM

Ted:

Glad you are sorting out the problem.

Dave

I'm just a dude with a bad back having a lot of fun with model trains, and finally building a layout!

  • Member since
    December 2004
  • From: Bedford, MA, USA
  • 21,484 posts
Posted by MisterBeasley on Thursday, March 19, 2015 12:09 PM

One of my current projects is installing grade crossing flashers.  I find the between-the-rails phototransistors work pretty well even in very reduced ambient light, but if I dim the room enough they will stop working.  So, I'm playing with IR LEDs.  I have a few hooked up and they seemed to be completely useless, but I put a meter on the phototransistor and found that the IR LEDs are extremely directional, and if I don't point them pretty much directly at the phototransistor it won't get enough IR light.  So, now I need to take some more careful measurements and determine the "cone" sizes for both the LED and the phototransitor, and make sure I mount both of them accordingly.

It takes an iron man to play with a toy iron horse. 

  • Member since
    August 2006
  • From: Greendale, WI
  • 108 posts
Posted by Robert Frey on Thursday, March 19, 2015 4:37 PM

Very interesting comments Ted.  Since you ordered parts from my new list, try building both Circuit 1 and 2. Could you give us a report on how you did in about 1 week?

Circuit 2 is 940NM IR light bouncing off the bottom of the car. Notice that the IR Photo transistor has a heat shrink cover?  About a 1/16” dia. hole is in the front.   This is like you are in a well looking for the moon. When it is over head, you see it. Say +/- 15 degrees off center you don’t.  Now 10u Amp of reflected IR light will produce 1 Volt DC at the 100K, then the Darlington will give 10 m Amp of current to the Red LED. (Your Lamp, incandescent bulbs and day light all have 940NM IR light, then the Red LED may never turn off.)

Circuit 1 is the lost of light.  The IR Photo transistor does not need a heat shrink cover!  The shadow of the car over the light sensor turns off ANY light source, and the Darlington stops shorting out the LED. 

Bob Frey 

Website: http://bobfrey.auclair.com

  • Member since
    March 2015
  • 7 posts
Posted by AIT hobby on Monday, March 23, 2015 12:28 PM
Robert Thank you Yes i will be trying again on both circuits 1 and 2 I will report back later this week Had to take a break from this project Still very interested in making this work
  • Member since
    March 2015
  • 7 posts
Posted by AIT hobby on Friday, March 27, 2015 8:10 AM
up date on my attempts : Built circuit 2. works and lights the led when in room and off when shadowed Built circuit 1. led on all the time and gets brighter when in room light or with IR emitter Going to try this one again tonight Tried to post pictures but do not understand how Happy so far got circuit 2 to work. Will just have to change indicator led to green to show clear track. For now Ted
  • Member since
    July 2006
  • From: Bradford, Ontario
  • 15,797 posts
Posted by hon30critter on Saturday, March 28, 2015 2:45 AM

Ted

I think the trick to circuit 1 is to try to prevent any direct room light from getting to the receiver. That's where the heat shrink tubing is crucial. If the receiver can 'see' any of the room lighting fixtures then it will trigger the sensor. I use a 1/16" drill shank to control the size of the opening in the heat shrink tubing. Put the tubing over the LED, then put the drill shank into the top of the tube so that it rests on the top of the LED, then apply the heat. You want to form a 'tube' with a 1/16" inside diameter about 1/8" long above the receiver. That gives a very narrow 'viewing angle' so the receiver can only 'see' what is directly above it. When a car passes over there is plenty of IR light to bounce off the bottom of the car and into the receiver, but the narrow angle will hopefully cut out direct light from the ceiling fixtures. Placement of the ceiling fixtures is obviously an issue. If they can shine directly down the tube then they will trigger the sensor. Please remember that I described the sensor as being "basic", as in "very".

Dave

I'm just a dude with a bad back having a lot of fun with model trains, and finally building a layout!

  • Member since
    March 2015
  • 7 posts
Posted by AIT hobby on Tuesday, March 31, 2015 1:01 PM
Hello Thank you David for the reply I do not have the shrinkwrap install but did buy it as per parts list Good tip on the drill bit use ! My circuit 2 is not working with room lights (i changed the bulb in my workbench light) it needs a bulb almost touching it All my room lights are fluorescent (was my first problem) I have bought all the parts to change over to a track light system and hope to use dimmable leds. Is there a way to adjust the sensitivity ? Are the IR collectors used black in color? Making sure I was sent the right ones Ted
  • Member since
    July 2006
  • From: Bradford, Ontario
  • 15,797 posts
Posted by hon30critter on Wednesday, April 1, 2015 10:48 PM

Ted:

Sorry I didn't get back to you sooner. IR receivers are often black so the ones they sent you should be ok.

If you don't have the shrink tube installed then the circuit will suffer from too much extranious light and will not work properly.

Without adding in more components to allow you to adjust the sensitivity, the only variable is the shrink tubing. You could do a series of tests by starting with a longer piece of tubing over the receiver and then gradually shortening it a bit at a time to see what changes occur.

Something that I did to test the detectors was to set up a short piece of track on some 2" pink foam insulation, including cork roadbed. That allowed me to mount the detectors in a controlled environment to see how they worked. I did have trouble initially with light coming from my workbench but when I turned off the center light that was shining directly into the receiver tube things worked ok. There are two other lights over the workbench, and all three are within three feet of each other. The center one is halogen and the other two are CFLs.

Dave

I'm just a dude with a bad back having a lot of fun with model trains, and finally building a layout!

Subscriber & Member Login

Login, or register today to interact in our online community, comment on articles, receive our newsletter, manage your account online and more!

Users Online

There are no community member online

Search the Community

ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT
Model Railroader Newsletter See all
Sign up for our FREE e-newsletter and get model railroad news in your inbox!