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!

Train Detection Circuit - stand alone

5843 views
6 replies
1 rating 2 rating 3 rating 4 rating 5 rating
  • Member since
    December 2004
  • From: Bedford, MA, USA
  • 21,481 posts
Posted by MisterBeasley on Tuesday, January 3, 2017 12:00 PM

I've got a couple of crossing gate detector circuits by Rob Paisley (http://home.cogeco.ca/~rpaisley4/AGC11.html) on my layout.  These are normally-on circuits that detect when a train passes over the photo-diode and blocks the incoming light.  I tried using IR so that I could run them with the room lights out, but found that the IR detectors still worked in visible room light, and the visible-light detectors worked well even with the room light dimmed quite low.  So, I ended up just using the system as designed, with visible-light photo-diodes for detection and room light for the source.

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

  • Member since
    January 2009
  • From: Bakersfield, CA 93308
  • 6,526 posts
Posted by RR_Mel on Tuesday, January 3, 2017 9:30 AM

Randy
 
I bought some TSOP1738 IR receivers off eBay and they work pretty good.  They operate on 5 VDC and have a 5 ma sinked active low output, they draw .130ma from an Arduino input when active.  I made a simple 1N914 diode matrix to drive the inputs on a Arduino UNO from multiple receivers, works great.
 
The sensitivity of the TSOP1738 is very good, it will switch from a 24’ reflected beam off a flat painted wall with a 50ma emitter, no lenses.  They work with a constant 38k carrier, it doesn't have to have data to activate the receiver.
 
 
 
Mel
 
Modeling the early to mid 1950s SP in HO scale since 1951
 
My Model Railroad   
 
Bakersfield, California
 
I'm beginning to realize that aging is not for wimps.
 
  • Member since
    December 2016
  • 9 posts
Posted by KK4HFJ on Tuesday, January 3, 2017 9:14 AM

I'm using TCRT5000 IR LED / Phototransistor pairs, and they work wonderfully. I've used them with our scale speedometer project, and our crossing gate detectors. They fir between the ties for any scale HO and larger (maybe for N as well, but might be too large), and have plenty of power to counce off a dark or light car up to 8 inches away, depending on value of resistor for the LED, and pullup resistor on phototransistor. see http://arduinotronics.blogspot.com/2012/06/reflective-optical-sensor-with.html and http://arduinotronics.blogspot.com/2016/11/arduino-model-railroad-scale.html

 

Steve Spence

KK4HFJ (Ham Radio)

http://arduinotronics.blogspot.com

  • Member since
    February 2002
  • From: Reading, PA
  • 30,002 posts
Posted by rrinker on Tuesday, January 3, 2017 6:53 AM

 I'm experimenting with these IR emitter/detector pairs with Arduino

https://www.amazon.com/gp/product/B008A3VP6M/ref=oh_aui_detailpage_o03_s00?ie=UTF8&psc=1

I don't know ywt what sort of range you can get from them, but given that a $5 Arduino Nano can handle at least 10 of them - cost should be no problem.

                      --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
    January 2009
  • From: Bakersfield, CA 93308
  • 6,526 posts
Posted by RR_Mel on Monday, January 2, 2017 10:15 PM

IR detection is my thing.  I use a Vishay TSOP 1738 IR receivers  (49¢) with a 100ma emitter ($5 per 100).  The TSOP1738 requires a 38k modulator and has great long range operation.  I use a IR Emitter Transmitter to drive a IRF510 N channel MOSFET to obtain a 5 volt 5 amp 38k modulated power supply to drive 25 IR emitters and receivers (about $15 for a 5 volt 8 amp switching power supply and transmitter module).

 

http://www.ebay.com/itm/142076975616?_trksid=p2060353.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

 
 
 
 
 
If you’re interested send me an IM with your email address.
 
 
 
Mel
 
Modeling the early to mid 1950s SP in HO scale since 1951
 
My Model Railroad   
 
Bakersfield, California
 
I'm beginning to realize that aging is not for wimps.
 
  • Member since
    December 2016
  • 168 posts
Posted by speedybee on Monday, January 2, 2017 10:08 PM

What I've done does not perfectly fit your description, as it relies on overhead lighting, but I'm posting anyways because it may be of interest to you. I've made my own system with an Arduino and a few shift registers. It is not terribly complicated but knowledge of basic programming and soldering is recommended, I could write up a step by step process if you're interested.

Basically, for detection I slide a LTR-301 between railway ties. There are two of them in the attached photo, on each exit of the turnout. It fits easily in HO, so in G it should be almost invisible, especially once the track is ballasted.

http://imgur.com/a/1iyfU

The LTR-301 is a phototransistor. Depending on whether it is in light or shade, it either lets electricity through it or does not. The Arduino detects what it is doing; if it is in shade, the Arduino knows there is a train. It claims to be a 940nm IR transistor but awesomely it works equally well with visible light. So you don't need any special overhead IR lighting or anything. As long as the room that the layout is in is reasonably well lit, the sensors will work. Daylight through windows is sufficient for my layout, or in the nighttime, whatever lights are in the room are adequate. And for in-tunnel situations (which I have), mounting an IR LED in the roof above the sensor works fine.

I mentioned shift registers. I use these because a standard Arduino has around eighteen ish input/output pins. Shift registers can take many parallel inputs and convert it into serial data so that the Arduino can handle all the sensors you need with only three pins, leaving the rest open for other purposes. A single Arduino could monitor thousands of LTR-301s using shift registers.

The system is quite cheap. An Arduino costs around $10 online. A single LTR-301 is on the order of 50 cents. A shift register is around 75 cents, and you only need one per eight sensors. Resistors are a few cents.

Plus, having an Arduino in your layout is amazing... it can control turnouts, lights, signals, etc.

Anyways, I typed a lot more than I'd intended to. I know you wanted the bottom reflection type of sensor, but unless you operate your layout in the dark, this should work fine and I found it easy to wire up and operates reliably. I initially experimented with making a bottom relfection sensing system but I found it unreliable and needlessly complex.

  • Member since
    May 2007
  • 8 posts
Train Detection Circuit - stand alone
Posted by Frolin Marek on Monday, January 2, 2017 9:15 PM

Looking for current options for a Train / Car detection circuit.

Requirements are...
- pin-point detection, via IR beam or such
- reflective type, transmitter and receiver are side-by-side between ties
- stand alone, no track, DCC or DC interfaced
- no effected by room light, can work in day or night setting
- ability to 'send' the beam 2-3 inches and bounce back, for G scale 
- maybe slight delay to off-set gaps between moving cars / coupler area
- affordable and easy to build, as will need 40-50 detectors

Have seen a couple circuits in recent years that should work.  But wanting to see if any new circuits people have found or revised, I should look at.  I do not want to interface with the track wiring, do not want to monitor track voltage.  I want to detect if there is an engine or car, at a pin-point location.  With no modifications to equipment.
I plan to use at least 3 per siding, one on each end at the clearance point and one (or two) in the middle.

I want to use the same circuit in the other room to be tell when trains are passing places, in a train room with normal lighting, and the same circuit in the hidden (dark) staging area, plus in tunnels and such.  I do not want to have to have a over-head light or other source, so thus the IR bounce approach with both the transmitter and receiver between the ties. 

And since this going to be used on a Gn3 (1/22.5 scale) indoor model railroad, the beam needs to be able to travel 2-3 inches up, bounce and then back down.

About 5 years ago, Bob Frey had an article on a circuit he designed and/or used.  It looked like what I could use.  Seems some components are no longer available.  Some replacement options suggested.  So I am looking to see if anyone has a modern/current circuit, with directly available (by mail order) parts, they are currently building and using...

thanks
Frolin
Marek Mountain RR

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!