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!

Simple Train Detection for Staging Tracks

24294 views
31 replies
1 rating 2 rating 3 rating 4 rating 5 rating
  • Member since
    July 2008
  • 76 posts
Simple Train Detection for Staging Tracks
Posted by seaside on Wednesday, September 30, 2009 9:01 AM

I am having trouble getting the circuit described in Robert Frey's October 2009 issue of Model Railroader to work.  Does anyone know if there is an error in the circuit or have any trouble-shooting thoughts?  I have hooked everything up according to the diagram on a breadboard.

  • Member since
    April 2004
  • From: Ontario Canada
  • 3,521 posts
Posted by Mark R. on Wednesday, September 30, 2009 4:22 PM

I kind of wondered about that !

I looked at the wiring diagram and SOMEthing just didn't look right to me - but I couldn't put my finger on it ! (?) Hoefully MR will print a correction if necessary.

Mark.

¡ uʍop ǝpısdn sı ǝɹnʇɐuƃıs ʎɯ 'dlǝɥ

  • Member since
    July 2003
  • From: Sierra Vista, Arizona
  • 13,757 posts
Posted by cacole on Wednesday, September 30, 2009 5:04 PM

 Several resistor values were not right.  I recalculated all of the values according to Ohms law and the specifications of the reflective opto sensor and transistors and found several errors.

The two resistors marked as 470k are WAY off.

  • Member since
    February 2002
  • From: Reading, PA
  • 30,002 posts
Posted by rrinker on Wednesday, September 30, 2009 7:21 PM

 Might have flopped them around. The IR LEDs in the sensors are 1.7V, two in series powered by 12 volts with 20ma would be a 430 ohm resistor, 470 being close enough. Also looking at the picture of the circuit, the middle resistor, which may or may not be the middle resistor int he schematic, is 470 ohms - yellow, violet, brown. Can't see the colors on the two standing up.

                                        --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
    July 2008
  • 76 posts
Posted by seaside on Wednesday, September 30, 2009 8:58 PM

Randy, you are correct!

I replaced the 470k ohm current limiting resistor for the IR-LED pair with a 470 ohm resistor and the circuit worked.

How do I get a message to MR so they can print a correction before others run into the same problem?

 

John

  • Member since
    February 2002
  • From: Reading, PA
  • 30,002 posts
Posted by rrinker on Wednesday, September 30, 2009 9:06 PM

I suspect someone had already seen this. However there is an option to contact the editors somewhere back up at the top of the site, I used it to submit a correction to a DCC comparison article and was later contacted by Andy Sperandeo because they wanted to print my comment. My only claim to fame ever - I had a letter to the editor printed in MR!

 It's Contact Us under the Our Magazine menu, I think.

                       --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 Friday, October 2, 2009 10:55 AM
In the October 2009 issue of Model Railroader, the article “Simple train detection” in the Fig.2 Wiring diagram on page 65, the 470 and the 470K values got interchanged.  The value between the two 1K resistors should be 470 ohms. (The 470 ohm resistor controls the 20 ma. current that flows through the “E” of the Infrared sensors.)  The value to the left and right for each transistor is 470K.  (By making the size of the 470K resistors across each transistor smaller, then the “S” sensor can resist higher amounts of ambient lighting (such as incandescent overhead lights), but then the sensing distance to the bottom of a HO car becomes less.  
 Model Railroader has been notified.  They said there will be a correction printed in the Railway Post Office section of the December 2009 issue pointing out the reversal of the 470 and the 470K resistors.  I was glad that Randy was able to get the circuit to work.  Sorry for the artwork error on the two IR sensors with a 4 wire cable.  That was a very clever way of solving the artwork problem by looking at the actual picture of the middle resistor as 470 ohms – yellow, violet, brown.  
 In the following picture, I have attached a circuit for a single IR Detection circuit.  The 470 allows about 20 ma. to flow through “E”.   When 0.2 ma. of detection flows through “S” into the 470K resistor, then about 1 volt is produced across the b to e of the NPN transistor.  When the transistor turns on, about 15 ma. then flows through the 680 resistor and also through the LED.  This makes for about a total of 35 ma, through “E”   This increase of the current in “E” makes for a very quick turn-on point.  It can sense the tip of your finger at a distance greater than 1/2 inch in a room with overhead fluorescent lights.   The current rating of “E” is 50 ma. max.
 Robert Frey

 

Website: http://bobfrey.auclair.com

  • Member since
    May 2009
  • 299 posts
Posted by JSperan on Friday, October 2, 2009 2:10 PM

 Robert,

Thanks for taking the time to clear this up and for providing more great information! Thumbs Up

  • Member since
    February 2004
  • From: Sierra Mountains, 70 miles from Sacremento, Ca
  • 53 posts
Posted by john lea on Friday, April 23, 2010 12:55 PM

Hi Robert: The artical was and still is of great value to those of us that prefer to "Do it Ourselfers". I know nothing of Omns law and also nothing of wireing this sort of thing. But, I was looking for a way to detect train movement and you supplied it, thank you!  I had a bit of trouble at first, but solved the problem and the system works great!  Now, there is another problem.  Digi-Key has run out of QRB-1114-NB IR sensors.  They sugested two different ones.  The QRD-1113-ND, QRD-1114-ND, which is a smaller emitter sensor and I think might work better for me.  Also the 365-1014-ND reflective sensor. I havent't had any luck with either one, do you, or have you tryed to replace th QRB-1114-ND?  I am very interseted, not only for myself, but our club has built a dispatcher's booth and this application comes in very handy for tracking the locations of the various trains .

John

John, 4449 West Coast, S.J. Div.
  • Member since
    August 2006
  • From: Greendale, WI
  • 108 posts
Posted by Robert Frey on Friday, April 23, 2010 9:37 PM
John, Try the following: http://www.onlinecomponents.com/buy/FAIRCHILD/QRB1114/ Let me know if you were able to buy some? Bob Frey

Website: http://bobfrey.auclair.com

  • Member since
    February 2004
  • From: Sierra Mountains, 70 miles from Sacremento, Ca
  • 53 posts
Posted by john lea on Sunday, April 25, 2010 1:51 PM

Hi Bob.

Thanks for the quick answer!  I was at our train clubs open house yesterday, it was a good day.

I took your advice and went to Fairchilds web and wal la some QRB 1114's So I ordered some. That was some good news.  I tryed your up dated diagram on the QRD 1114 and the other one, don' have the number in front of me right now, and I couldn't get it to work.  Since the QRB's 1114 are coming out I'll wait and do the double sensors. I notice they are a little bit light sensitive, but work very well in my hidden staging yard and two main lines.  I just love following the trains via the led's on the routing boards. I can't hardly wait to give these sensors a try at the club, but we have a lot of light there.

I went into your web site, WOW now thats a great layout,  there isn't anything within a 100 miles of here that big. 

I worked for the espee for 35 years and then it was bought out by uncle pete. Never got use to all of those yellow horses running around the area.

Any how, thanks again for the info. if you have an idea on how to make those sensors work with so much light, the help would be appreciated!

 

Thanks again, John

 

 

John, 4449 West Coast, S.J. Div.
  • Member since
    February 2004
  • From: Sierra Mountains, 70 miles from Sacremento, Ca
  • 53 posts
Posted by john lea on Tuesday, May 4, 2010 5:33 PM

Hi Bob.

I ordered the QRB 1114, as you saw that were going to be available May 1st. They sent me an e-mail this morning, saying that now they may be availble in about 12 or 13 months.  Did you try out any of the other sensors that I tryed and couldn't get to work?

The sensor numbers are, 751-1032-ND, which very small and you would only have to drill about a 3/8th inch hole and cut a very small bit of cork away. The 365-1014-ND and the QRD-1114-ND I've also tryed with no sucess. The 365-1014-ND are the same size as the QRB-1114-ND, which I have already cut into the table with anticaption of receiving the QRB-1114's. No luck there!

If you have any luck or the time to spend on the above sensors or some othe sensor that works, could you please let me know.  Myself and a couple others in our club would like to install them on their layouts and also install a few at the club.

 

Well, thanks again

John

John, 4449 West Coast, S.J. Div.
  • Member since
    August 2006
  • From: Greendale, WI
  • 108 posts
Posted by Robert Frey on Wednesday, May 5, 2010 12:41 PM
Hi again John, I think your IR Sensor: 365-1014-ND should work. I revised my circuit picture with it. If you don’t have a Transistor: MPSA27, then any two NPN transistors can used if connected as shown in the CIRCLE Picture. Also see http://cs.trains.com/trccs/forums/p/162676/1801342.aspx#1801342 (11-21-2009 4:37 PM Reply from cacole) Robert Frey

Website: http://bobfrey.auclair.com

  • Member since
    February 2004
  • From: Sierra Mountains, 70 miles from Sacremento, Ca
  • 53 posts
Posted by john lea on Thursday, May 6, 2010 8:34 PM

Hi Robert:

Thanks for your quick reply!  I've tried it the way you have drawn it out with the same components. But knowing me there is probably a wire wrong some place. I'm busy the rest of the week, but I'll give it another try next week.

Thanks again for giving this some thought.  It's so nice to have people like you around to give us folks help that don't have the knowledge a helping hand.

 

O.K. Thanks Again

John

John, 4449 West Coast, S.J. Div.
  • Member since
    May 2010
  • 2 posts
Posted by Tomz on Friday, May 7, 2010 11:54 PM
Bob - I wired it per the above diagram for a single detector, but the led is lit and remains lit at all times. Any insight as to what I may have done wrong? Tom
  • Member since
    August 2006
  • From: Greendale, WI
  • 108 posts
Posted by Robert Frey on Saturday, May 8, 2010 8:43 PM
Hi Tom, I don’t actually have an OPB742 Sensor, but you do. The units are the same size, and the electrical data at Digikey is very nearly the same, for both the IR Emitter and the IR Sensor. This looks to me, as to be a very good replacement part. 1. Measure your +12VDC 2. With +10VDC across the 470 ohm resistor, then there is 20 ma flowing through the Emitter (The Emitter is the 2 Volt diode in OPB742 the that produces the IR light.) 3. I assume you also have a MPS27 Transistor? The Base (pin 2) is connected to the output arrow of the IR Sensor. (If you don’t, then any two NPN transistors connected as showed in the circle will do.) 4. A 470,000 Ohm resistor (470 K) is connected between the Transistor Base (Pin 2) and Emitter (Pin 1), and the 680 Ohm resistor, limits the DC current to 11 ma. to operate the LED. If the wiring is correct, holding your finger on the Sensor hole, the led should be OFF. Moving your finger about ½ inch away the led should be ON. Completely removing your finger from view, the led should be OFF. (Because the IR lighting is not bouncing off of your finger.) If the led is ON, then you have Incandescent lighting in your room. The IR sensor is also sensitive to sun light but, is not sensitive to Florescent type of lighting. Buy putting the +12VDC power directly to the IR Sensor, this removes the IR lighting diode. Then using only your Incandescent room lighting, when a car is over the sensor, the led will go OFF. Robert Frey

Website: http://bobfrey.auclair.com

  • Member since
    May 2010
  • 2 posts
Posted by Tomz on Monday, May 10, 2010 8:04 AM
Bob, many thanks for the reply. I discovered that for some reason the florescent lighting in the room is being picked up by the sensor and keeping the LED lit at all times. I discovered it by accident while working in the room with the lights off. Since the sensor is going to be located in a location that is hidden from view and as a result not exposed to direct lighting from the room the sensor is now functioning properly (only turning the LED on when a car is over it). Tom
  • Member since
    August 2006
  • From: Greendale, WI
  • 108 posts
Posted by Robert Frey on Thursday, May 13, 2010 8:42 PM
To the Electronics and DCC Form I have tested my sample of the IR SENSOR OPB742 (Digikey 365-1014-ND), and it is a direct replacement of the QRB1114 IR SENSOR used in my Model Railroader article. The OPB742 has two 0.06” diameter holes. If you completely remove the 0.06” Dia. hole plate over the IR diode, then more IR light will be emitted. You can then reduce the 470K resistor to 220K. Now this IR Sensor REFLECTIVE system becomes less sensitive to any Incandescent lighting in your room, and it still can still detect a black HO Tank car over the IR sensor face. I hope this is the end of the story! Regards to all of you that have built the “Simple Train Detection for Staging Tracks” , you now have a replacement part. You can continue to build more low cost IR train detection well into the future. Robert Frey PE Retired.

Website: http://bobfrey.auclair.com

  • Member since
    February 2004
  • From: Sierra Mountains, 70 miles from Sacremento, Ca
  • 53 posts
Posted by john lea on Friday, May 14, 2010 1:11 PM

Hi Bob

Well I was able to re-try my attempt at wireing the 740 sensor. No LUCK there!  I think that the only difference between the 740 and the 742 is that the 742 has the cover or window over the emitter and sensor.

"PROBLEM SOLVED" I hope.

When I arived home last night there was an e-mail from Fairchild that they had shipped me the QRB 1114's that were not due out for 12 months!

That was very good news for me, and I hope for others too.  I love the two led system the best, I believe the price is less expensive than the one led system, penney's matter when you are doing over 30 of these units plus a bunch more at the club.  As you can probably tell, I am using them for more than hidden staging. I am also using them for train tracking/detection.  The dispacher is hidden away and needs to know where the trains are. Meets are very important, wrecks are not! 

I'll let you know when and if I really get them.

 

Thanks again

John

John, 4449 West Coast, S.J. Div.
  • Member since
    July 2006
  • 290 posts
Posted by steamnut on Friday, May 14, 2010 6:50 PM

I've made this comment before.

MR does a lot of things right, and does them well, but when it comes to electronics, EVERY SINGLE ELECTRONIC CIRCUIT printed in MR during my readership (20 years now) has been wrong. 100%. Some they correct, some they don't; because of their lag times (which I understand) the corrections don't appear for two or three months.

I can understand the occasional mistake but their 100% mistake track record is unforgivable. To use the shopworn phrase this is not rocket science.

  • Member since
    February 2004
  • From: Sierra Mountains, 70 miles from Sacremento, Ca
  • 53 posts
Posted by john lea on Friday, May 21, 2010 11:06 AM

Hi There:  The QRB 1114's are now in my hand! Yes they are back on the market. That's a good thing. So now I can go build my 30 plus double and some single sensor's for the hidden area, not yet hidden. Soon it will be hidden!

You can check with Digi-Key to see if they have them If not then go to Fairchild web site. or let me know I'll give the info on where I got them. Gotta go sensors to build.

Plan, Build play and have fun! John L.

John, 4449 West Coast, S.J. Div.
  • Member since
    August 2006
  • From: Greendale, WI
  • 108 posts
Posted by Robert Frey on Friday, May 21, 2010 6:32 PM
John., Per and an e-mail from Fairchild, the QRB1114 IR Optoswitch is “End of Life”. -------------------> http://search.digikey.com QRB1114-ND Available = 0 ------------------> http://www.onlinecomponents.com/buy/FAIRCHILD/QRB1114/ In Stock, can ship now -----------------> http://www.mouser.com/ QRB1114-ND Available = 0 End of Life ------------------> http://www.newark.com QRB1114-ND In Stock, can ship now -------------------->Robert Frey

Website: http://bobfrey.auclair.com

  • Member since
    February 2004
  • From: Sierra Mountains, 70 miles from Sacremento, Ca
  • 53 posts
Posted by john lea on Friday, May 21, 2010 8:21 PM

Hey Bob. OMG My Wife gave me the third degree. "NO" you did not get them from Fairchild, you got them from "Online Components". Just like you had originally said. I checked back to your message and YEP there it was. So SORRY guys. But that is where I got them.

Plan, Build,  Play! John L.

John, 4449 West Coast, S.J. Div.
  • Member since
    April 2009
  • 1 posts
Posted by VR-1960 on Saturday, February 12, 2011 11:40 PM

Robert

 

I am building a 10 track staging yard and are constructing a train detection system using your "Simple Train Detection" which uses a common positive and negative power supply. I have been constructing one circuit at a time and test it before I begin the next, however, now that I have five circuits constructed I am having errors occur with previously constructed circuits.  Do I need to separate the circuits to overcome this error and is there a simple way to do this.

The lighting in the room is compact florescent lights and I was wondering if these may be a cause of the problem

Thanks

Gavan Bennett, Australia

  • Member since
    August 2006
  • From: Greendale, WI
  • 108 posts
Posted by Robert Frey on Sunday, February 13, 2011 5:42 PM

 

The QRB1114 used in "Simple Train Detection” (See MR October 2009, page 64) is now obsolete. By using just the “E” and “S” parts without the enclosure, you will find it is easier to drill two 0.17” Dia. holes for these IR parts. You can still purchase these basic “E” & “S” parts.  The LED is: QEC113 and the phototransistor: QSC112, but it needs to be covered.

Digi-Key Part No.  Description    http://www.digikey.com

QRB1114-ND    SENSR OPTO TRANS 3.81MM REFL PCB         Obsolete item

QEC113-ND      LED IR EMITTING GAAS 940NM 3MM                $3.85 per 10

QSC112-ND      IC PHOTOTRANS IR 880NM BLACK 3MM           $3.45 per 10

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

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

            (Request to Digi-Key:  “Please cut tubes into 8 pieces about 6" long.)

MPSA27GOS-ND  TRANS NPN DARL BIPO 60V TO-92               $3.39 per 10

220KQBK-ND    RES 220K OHM 1/4W 5% CARBON FILM           $0.14 per 10

680QBK-ND      RES 680 OHM 1/4W 5% CARBON FILM             $0.14 per 10

270H-ND           RES 270 OHM 1/2W 5% CARBON FILM              $0.62 per 10

751-1129-ND     LED 3MM RED 6.3MCD GAASP ON GAP          $1.02 per 10

IR LED = 40 ma.  Test strip is 0.3” by 2”, Black both sides.  If Red LED in the above circuit turns on at less than ½”, cut some shrink tubing from the PHOTOTRANS face.

- - - - - - - - - - - - - - -

To:  Mr. Gavan Bennett, Australia

As you are adding more circuits, it could be it could be the added LED current loads are pulling your supply voltage below 12 VDC.  The phototransistor: QSC112 needs to be covered, if not used inside a QRB1114. Yes, it is sensitive to sun light and any Incandescent lamps.  (If you hold some 8-1/2 x 11 paper over the IR Detector at about 6 inches, and your LED did change, then this is an ambient room light problem.  If you hold the paper over the IR Detector in a 3/4 to 2 inch range, and the LED changes, then the IR reflection off of the paper is working.)   The florescent lights should not be a problem, unless your train room is very bright.  Note in the above single circuit, the IR diode current has been increased from 20 ma. to 40 ma., and the light sensitivity for the NPN transistor (Base to Emitter) has been reduced from 470K to 220K.

I hope this is of some help to you.

Robert Frey  

 

Website: http://bobfrey.auclair.com

  • Member since
    July 2006
  • From: Bradford, Ontario
  • 14,742 posts
Posted by hon30critter on Sunday, February 13, 2011 10:21 PM

Robert:

I have ordered the parts for your detector circuit (without the QRB1114 housing) but I am having trouble figuring out the polarity of the emitter and sensor. Could you take a minute to identify where the flat side of the components would go. I am assuming that it will matter as it does with other LEDs.

Thanks

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 Monday, February 14, 2011 10:19 AM

There “appears” to be thee LED’s in this circuit, but one is a Phototransistor. It has a dark color and needs to have a cover to reduce the ambient light.  You want the IR light  from the IR LED to go up, bounce off of the bottom of a black tank car, and enter through a small hole in the covered face of the Phototransistor. These three components all have two leads. The longer of the two leads can all be considered as (+).

 Robert Frey 

Website: http://bobfrey.auclair.com

  • Member since
    July 2006
  • From: Bradford, Ontario
  • 14,742 posts
Posted by hon30critter on Monday, February 14, 2011 6:57 PM

Robert - Thanks for your response. I should have posed my question in simpler terms. I have a basic understanding of  the nature of the individual components and how the detector works. My question is - am I correct in assuming that the positve leads of the phototransistor and emittor connect to the +12vdc? Now stop laughing if that was a dumb question. As I have stated several times before, my electronic knowledge is limited (and I probably just proved that by asking the question!).

Thanks again for your help.

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 Tuesday, February 15, 2011 5:06 PM

Dave,

The Circuit Picture was revised for you.  How do you like it now?

Robert Frey

Website: http://bobfrey.auclair.com

  • Member since
    July 2006
  • From: Bradford, Ontario
  • 14,742 posts
Posted by hon30critter on Tuesday, February 15, 2011 6:10 PM

Robert

Thanks very much for your patience and for taking the time to make the diagram clear. I am looking forward to assembling and testing them. Also, thanks for your contributions to the hobby.Bow

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!