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!

Block occupancy detection

8785 views
10 replies
1 rating 2 rating 3 rating 4 rating 5 rating
  • Member since
    April 2007
  • 229 posts
Block occupancy detection
Posted by RicZ on Tuesday, January 1, 2019 2:54 PM

I need to protect a long tunnel.  I want to use two or three light signals to tell operators that there is already a train occupying the tunnel “block.”  The interesting thing is that the tunnel area is made up from two separate power blocks.

 

My understanding is that current sensing detectors must have the entire detection block within the same power block, and therefore I will need an alternative detection, possibly an optical system to do this.

To add to my needs, I want to use as few optical or IR sensors as possible.  Is there such a system?

RicZ

  • Member since
    January 2009
  • From: Bakersfield, CA 93308
  • 6,526 posts
Posted by RR_Mel on Tuesday, January 1, 2019 3:13 PM

I ran across some Arduino IR detedtors that work pretty slick and they’re cheap too.
 
 
They work by reflecting off the rail traffic.  There specs say 2~30cm but the best I’ve gotten is 10cm or 4”.  I think that they’re great at 2”.  I found them on eBay for 10 for $4.50, my next order will be 50 for $20.
 
 
 
 
Mel
 
 
My Model Railroad   
 
Bakersfield, California
 
I'm beginning to realize that aging is not for wimps.
 
  • Member since
    February 2002
  • From: Reading, PA
  • 30,002 posts
Posted by rrinker on Tuesday, January 1, 2019 3:36 PM

 Not sure why someone would say current sense detectors all need to be in the sme power block. You cna have 3 sensors, each in a different power block. Or two detection zones in one power block, and one detection zone in another power block. Even the type that actually insert electrically into the path (diode drop types - hate those, they cause a voltage drop) can be split, just not int he dame actual detector - many of those have 4 detection sections per power block, so you'd waste some splitting them up across multipe power blocks, but they still would work. Consider a large layout that is fully detected and signaled, and has dozens of power blocks. It works fine. The transformer type detectors have no electrical connection to the track wiring and it makes no difference what power block a given detector is in.

                               --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
    May 2004
  • 7,500 posts
Posted by 7j43k on Tuesday, January 1, 2019 3:38 PM

RicZ

I need to protect a long tunnel.  I want to use two or three light signals to tell operators that there is already a train occupying the tunnel “block.”  The interesting thing is that the tunnel area is made up from two separate power blocks.

 

My understanding is that current sensing detectors must have the entire detection block within the same power block, and therefore I will need an alternative detection, possibly an optical system to do this.

No, that's not true.  You would put a current detector in each block.  When either (or both) detector detects, it would cause the signal to change.  A problem MIGHT be that the detectors detect ALL of a block, including the part that's not in the tunnel.  Perhaps that's an irritation.

Also, they only detect current draw.  So any part of your train that doesn't draw current won't be "seen".

To add to my needs, I want to use as few optical or IR sensors as possible.  Is there such a system?

 

Since the signals you want are such a very simple kind, I'd use optical detectors only.  If you put the emitter-optical detector path at a very shallow angle across the track (everything is above the track, at train level), you will pick up anything in that path.  If you wanna go nuts, you can put in some mirrors to bounce the path back and forth across the track.  That might extend it for several feet.

Since the system is inside a tunnel, it can be as ugly as you want.  Very convenient.

You might also set it up so that when a train is close to a tunnel end, the signal indication is different than when it's in the middle.  Maybe you have three optical detecors, two for the ends and one for the middle.  And mirrors.

 

 

Ed

  • Member since
    April 2007
  • 229 posts
Posted by RicZ on Tuesday, January 1, 2019 3:54 PM

Has anyone fad experience with Cicuitron’s BD-1, opticle sensor?

RicZ

  • Member since
    March 2018
  • 72 posts
Posted by Cymrych79 on Tuesday, January 1, 2019 3:55 PM

RR_Mel

I ran across some Arduino IR detedtors that work pretty slick and they’re cheap too.

I'm with Mel on these detectors, really cheap and really easy to work with. I'm in a similar spot as the OP, hidden tunnel track (mine is where my staging yard leads enter the main at each end of the tunnel, forming an unfortunate overlap in my case). I rigged a sensor at each end, and programmed an arduino to control signals at each end. When a train triggers one sensor, signals placed on the visible portion of my layout just before each end of the tunnel both go red, halting traffic on the visible main before entering the tunnel. When the triggering train hits the second sensor, the signals stay red, but 5 seconds after the train fully clears the sensor, the signal goes to yellow, then 5 seconds later to green. That 10 seconds provides more than enough time for my trains to clear the tunnel and passing track turnout on my small around-the-room. Of course, all the variables are incredibly easy to adjust in the Arduino programming, which was their huge appeal for me.

  • Member since
    January 2009
  • From: Bakersfield, CA 93308
  • 6,526 posts
Posted by RR_Mel on Tuesday, January 1, 2019 4:34 PM

Because of the low cost I’m replacing my IR beam detectors with the reflective type.  The beam type work but I like the easy install of the cheapos.  I can do triple duty with the reflective type, control my signals, trigger turnouts and give me precise control panel location of my trains.  Spaced at 12” in my tunnels I will know within a foot where the locomotives and last cars are.  My longest tunnel is 17’, 17 detectors at 40¢ is $6.80 for 12” resolution.  Can’t do that with any other detectors for anywhere near $6.80.
 
I plan on using three pin Arduino connector so that they just plug in and a diode matrix (1N914 $5 per 100) to drive all my goodies.
 
Super slick!
 
 
Mel
 
 
My Model Railroad   
 
Bakersfield, California
 
I'm beginning to realize that aging is not for wimps.
 
  • Member since
    June 2010
  • From: New Bern North Carolina
  • 124 posts
Posted by nickyb on Tuesday, January 1, 2019 6:06 PM

Great Info... Where is the best place to purchase , also, what are some model No's of cheapo's...

NickyB

  • Member since
    January 2009
  • From: Bakersfield, CA 93308
  • 6,526 posts
Posted by RR_Mel on Tuesday, January 1, 2019 6:30 PM

I bought mine off eBay and received them in less than three weeks from China.
 
This is a link to the ones I bought but if you look around several sellers have better prices.
 
 
By search:
 
 
 
 
Mel
 
 
My Model Railroad   
 
Bakersfield, California
 
I'm beginning to realize that aging is not for wimps.
 
  • Member since
    April 2007
  • 229 posts
Posted by RicZ on Wednesday, January 2, 2019 11:20 AM

Not being a programmer, how did you program your Arduinos?  I don’t have the needed access in the tunnel to add a lot of optical sensors, so being able to turn the signals red at each entrance with one and off (green) at the exit(s) is paramount.

I need RTR circuits, already programmed.

RicZ

  • Member since
    March 2018
  • 72 posts
Posted by Cymrych79 on Wednesday, January 2, 2019 11:32 AM

I straight copied the codes from the YouTube page of DIY and Digital Railroad's page as a starting point, then tweaked variables as needed.

 

This was the main video I used, I think: https://youtu.be/Yg6mkOfl6I8

 

There are a bunch of other videos, too, and most folks have stored their codes online somewhere so you don't have to write the code itself if you don't want to.

I'd recommend trying to write the code yourself, however. None of what I've done so far is hard, and it's good practice to show you what works and what doesn't with Arduino. Tom's Trains and Things on YouTube has a great Arduino series that starts super basic and walks you through some simple programming, and the breadboard work too.

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!