# Bi directional detection best method...



## SF Gal (11 mo ago)

This is a query on what you do /want to do/ your thoughts, on detection for RXR crossings on YOUR layout?????
I am asking as I want to detect my locomotive to turn on and off a flasher circuit board for my railroad crossing lights and* I want it to work just like real crossing do. *
I looked at magnets and reed switches, detecting amp draw on isolated track sections, and phototransistor circuits.
I believe I am leaning toward a phototransistor circuit do to the fact I only have to drill holes for the phototransistors. 
I already have the crossing signals and a circuit board for the alternating LED's.









So I just need the on and off trigger to make it all work.
I am open to suggestions as long as you remember I am on a shoestring budget. 
This has to be done on the cheap or as cost effective as possible.
I do solder and have made my own timer circuits, car alarms, etc., in the past.
I would actually make my own prototype circuit board but I really don't have specific components. I do have a relay and some resistors but most of what I have is just some junk parts from here and there. 








I don't have any bread board either. So, the investment in time and money to make a board might be as much as buying something RFI (Ready For Installation).
Looking on E bay, I did find this detection circuit ....BI-DIRECTIONAL HO SCALE MODEL TRAIN DETECTOR KIT WITH RELAY









The circuit uses the ambient light on the layout to detect the presence of a train when it moves over the detection points....









So what do you think on the price of $16 for each circuit board???
Is there a way, I am not thinking of that is much cheaper to make this all work?
Thanks for all your thoughtful replys in advance.


----------



## JeffHurl (Apr 22, 2021)

Can you..... Have a photo sensor on both sides of the crossing. Let either photo sensor tell the circuit to start flashing, and then keep flashing until both sensors are clear again?


----------



## AmFlyer (Mar 16, 2012)

Here is how mine work. The track block extends past the crossing in both directions. I have single and two track grade crossings, just add another Dallee board in parallel if the tracks are in separate power districts. Simple to install and no adjustments needed.


----------



## shortwrench (Nov 21, 2019)

Take a look at my post "Crossing Signals" on the "My Layout" forum. It's simple and 
inexpensive.


----------



## rrman987 (Aug 29, 2021)

Hello SF gal
Being a retired electronics engineer you would think I would just design something, but after 35 years of designing and program, no thank you. But then I wanted features like advanced approach, bi-directiona detection, ease of install, AND no hassles, fiddling or programming..
So I found Azatrax IR model railroad train detectors, infrared proximity sensors met my requirements. Yes somewhat pricey but it worked right out the box. I created a drill jig so photocell and IR LED would optimally shine on bottom of cars. Room LED lamps do not bother sensors and system works from full light to darkness. System pro-typically starts when train is several feet from crossing, remains on until last car clears crossing and after a second or two delay, extinguishes flashers and raises gates. Been on line for 5 years with no hiccups.
Here is the gates and flashers for my train approaching crossing..




Here is a view of circuit board showing from right to left, the advance approach, island crossing, and then receeding approach. I kludged a sound set from and MTH flasher set that I am using elsewhere to give this crossing the ding din ding....




Have questions ask away.


----------



## SF Gal (11 mo ago)

JeffHurl said:


> Can you..... Have a photo sensor on both sides of the crossing. Let either photo sensor tell the circuit to start flashing, and then keep flashing until both sensors are clear again?


That is the plan...


AmFlyer said:


> Here is how mine work. The track block extends past the crossing in both directions. I have single and two track grade crossings, just add another Dallee board in parallel if the tracks are in separate power districts. Simple to install and no adjustments needed.


Gosh, that Dallee Trak-DT - Basic Current Detector is a expensive option! I would also have to isolate a feed track to sense current on that block...it is a option and I thank you for sharing.


shortwrench said:


> Take a look at my post "Crossing Signals" on the "My Layout" forum. It's simple and inexpensive.


I was also looking at your suggestion, on you thread "Crossing Signals" and I can get "10" OSOYOO Obstacle Avoidance Sensor module
on Amazon for $10!!!!! WOW...I originally thought one cost $10!!! I am a prime member so shipping is free! That is $1 each or $2 to sense one crossing!!!!
The only problem I see is camoflaging the sensors. I like the way you camoflaged your sensors.
I just got 6 silver metal wayside signal control cabinets I could hide some of the sensors in.....








I remember seeing your post on the signals so thanks for refreshing my memory!
Looks like this board is a very cost effective option and has just become my first choice.



rrman987 said:


> .....I found Azatrax IR model railroad train detectors, infrared proximity sensors met my requirements. Yes somewhat pricey but it worked right out the box. I created a drill jig so photocell and IR LED would optimally shine on bottom of cars. Room LED lamps do not bother sensors and system works from full light to darkness.....Been on line for 5 years with no hiccups.
> Here is the gates and flashers for my train approaching crossing.....
> ......Here is a view of circuit board....Have questions ask away.


I also looked at this unit and it was my original first choice before I found other options. It is good to know room lighting isn't a issue as that IS a consideration, for me. I run a 24 day night clock and at times my layout is dark and several buildings have LED lighting....









Good to know your controller is going now for 5 years...that is a plus. Your board is a option I am considering since I do not have to hide the board as the sensor are separate.
Many thanks for sharing your videos!
I am also thinking about making crossing gate and using inexpensive servos to raise and lower the gates...what are you using to control the position of your road gates?


----------



## OilValleyRy (Oct 3, 2021)

I would (also) suggest either an IR beam sensor or *maybe* motion sensor.
The + with good old fashioned IR beamers is they work even in night ops. The only trick is to put the projector and receiver at an angle, not straight across, so they don’t catch the gaps between cars. Easily hidden in ROW electrical cabinets, bushes, made to look like a relay box for signals, etc. 
The motion sensor (as found in hand dryers, security lights, etc) might be too big. But that would probably work in night ops too because they don’t require ample lighting.


----------



## SF Gal (11 mo ago)

OilValleyRy said:


> I would (also) suggest either an IR beam sensor or *maybe* motion sensor.
> The + with good old fashioned IR beamers is they work even in night ops....


I saw a circuit board using these sensors, angled as you suggested however the circuit boards were quite pricy.
If you have any links to a cost effective option, I would be interested to see.


----------



## OilValleyRy (Oct 3, 2021)

SF Gal said:


> I saw a circuit board using these sensors, angled as you suggested however the circuit boards were quite pricy.
> If you have any links to a cost effective option, I would be interested to see.


I would look at Circuitron and similar companies. I don’t have a Walthers catalog anymore so I can’t say who else makes them. But you really just need a flashing circuit with a timer that has solder points for inputs of your choosing. The timer should (should!) start counting when the beam is no longer broken. So… unbroken beam has no crossing lights, break the beam & lights flash, beam restored and lights keep flashing until timer finishes. 
The circuit in that Bachmann(?) kit shown in your photos probably has the flashing circuit with no timer, which you probably… should be able to add on as a secondary board. Uhhm, think that would be on the output side (crossing lights lead side)?? Dam, my dad is so much better at this stuff than I am. You could just make it easy on yourself and wire everything into a Fanuc. Wire it once then play around with inputs and outputs for 10 years. Lol But I’m preaching to the choir. If you need Fanuc components I know a guy (relation) who can likely get whatever you need.


----------



## Severn (May 13, 2016)

These folks also have what may be part of a solution.






Iowa Scaled Engineering


Iowa Scaled Engineering




www.iascaled.com


----------



## SF Gal (11 mo ago)

Severn said:


> These folks also have what may be part of a solution.
> 
> 
> 
> ...


I see they have a $25 block detector...thanks for sharing...kind of in the mid price range.


----------



## Conductorkev (Nov 5, 2021)

2 x HO scale Railway Crossing Signals + 1 set Auto control circuit boards | eBay


2 x HO crossing signals + 1 delay circuit board + 1 flasher circuit boards + 2 IR sensors with 1 split wire. HO Scale 1:87. for HO Scale: 1:87. Clcik Here To View The Instructions for the Auto delay circuit board.



www.ebay.com






I'm going to be getting something similar to that but mine Is a lil more complicated which I'll probably start a thread soon about.


----------



## gregc (Apr 25, 2015)

it seems the more reliable conventional approach is the reflective IR pair embedded between ties. the problem with reflective sensors is room lighting. sunlight and incandescent lights radiate IR and can interfere. florescent and LEDs do not.

at least onr product i've seen has 2 pairs on either side of the crossing, the outer pair used to trigger sound and lights and the inner pair used to disable the sensor.

Azatrax actually toggles the emitters on/off to minimize false detections by trying to recognize that the receiver is active due to the emitter.


----------



## rrman987 (Aug 29, 2021)

SF Gal said:


> I am also thinking about making crossing gate and using inexpensive servos to raise and lower the gates...what are you using to control the position of your road gates?


I am using a Tortise motor through a linkage system Video here not best view. Got gates and motor plus the linkage set from Aztrax also





Have to have patience to get it running right but then its forget about it.


----------



## SF Gal (11 mo ago)

I am seeing some really costly options for automated RXR crossings...it really shouldn't be that expensive to get something that contributes so little to the running of trains on a layout. Talking with my local train store guys, I get the inside scoop of the industry that comprises our hobby and it isn't pretty. So many buyout, discontinues, monopolies, supply chain issues, parts issues and well, here we are...$40+ to have ONE piece mealed, road crossing automated signal on a layout...unbelieveable. 
This thread has me comparitive shopping and seeing *"the least piecemeal route"* to accomplish this inexpensively.

I did believe shortwrench has come up with the best option for a cost effective solution, now, not so sure as it is more piecemeal than Conductor Kev's suggestion.
The issue of ambient light hasn't been addressed using either members solution however....
So with the LED signal poles (I already bought) $16 each X2. 2 OSOYOO module sensor boards $2, resistor and caps $4 =$38.
Very close to the price Conductor Kev is willing to pay ($36+$3s&h) for crossing signals complete set, ready to install.

Adding a $2 servo motor to control scratchbuilt crossing gates is an option.

I am loving all the ideas, so keep the comments and suggestions coming.


----------



## gregc (Apr 25, 2015)

another, non optical approach maybe to use a block detector to activate the signal. in addition to the detector, something that flashes lights, closes gates and/or generates bells is needed


----------



## AmFlyer (Mar 16, 2012)

Gregc, that is what I posted above. I think the issue is the Dallee #365 is $45. Add to that the crossbuck or gate arm set, plus in HO the sound is separate so it adds up to $130. I have gate arms on each side of the road approaching the crossing so that adds another $76. Not cheap but it works flawlessly with just the connection of a few wires.


----------



## shortwrench (Nov 21, 2019)

My crossing signals operate normally with layout lighting and bench lighting on, also with 
layout lighting off and bench lighting on. The only glitch is when layout and 
bench lighting are on and the bright bench magnifying lamp is on---the sensor
nearest the bench false triggers causing the crossing signal to operate. Not a big deal
since I'm working at the bench when the magnifying lamp is on. Since
the layout is in the cellar, night operation occurs with the bench light on
to prevent me from falling over everything in the dark.


----------



## gregc (Apr 25, 2015)

might be helpful to know what type of lighting: incandescent, florescent, LED


----------



## OilValleyRy (Oct 3, 2021)

I never had any problem from lighting on a tv remote. I guess it’s possible. Just never had the sun turn on a television. A constant beam that triggers the bells & whistles when interrupted is the time tested method. Plenty of articles on ways of doing it. That’s how I’ll do mine, old reliable, like #5s.


----------



## gregc (Apr 25, 2015)

tv remotes use a signal modulated at a specific frequency which receivers are tuned for and use automatic gain control to distinguish the modulated signal from background


----------



## Conductorkev (Nov 5, 2021)

SF Gal said:


> I am seeing some really costly options for automated RXR crossings...it really shouldn't be that expensive to get something that contributes so little to the running of trains on a layout. Talking with my local train store guys, I get the inside scoop of the industry that comprises our hobby and it isn't pretty. So many buyout, discontinues, monopolies, supply chain issues, parts issues and well, here we are...$40+ to have ONE piece mealed, road crossing automated signal on a layout...unbelieveable.
> This thread has me comparitive shopping and seeing *"the least piecemeal route"* to accomplish this inexpensively.
> 
> I did believe shortwrench has come up with the best option for a cost effective solution, now, not so sure as it is more piecemeal than Conductor Kev's suggestion.
> ...



Mine is actually going to be much more. Still gotta figure out exactly what I need to accomplish what I want since it's not just 1 crossing for this section of my layout.


----------



## SF Gal (11 mo ago)

gregc said:


> might be helpful to know what type of lighting: incandescent, florescent, LED


I have all LED lighting in my layout and in ALL ceiling lighting in the layout lounge.
I suppose I understand ambient lighting will not be much of an issue so it isn't a huge concern, but cost is!
Like Conductorkev, I will have at least 5 train crossings on roadways so I am looking at loosing the cost of at least one new DCC with sound locomotive to have these crossings automated!
I now have manual signed crossing with no lights...it's a comprimise for my purse's pocketbook.
The more I spend on automated crossings, the less I have for other tangibles, and the more time spent doing odd jobs to pay for my train layout addiction. 
Well, that is how I think of it....


----------



## OilValleyRy (Oct 3, 2021)

gregc said:


> tv remotes use a signal modulated at a specific frequency which receivers are tuned for and use automatic gain control to distinguish the modulated signal from background


Half of that was Greek lol but I know it means less unwanted interference. And I like that.


----------



## shortwrench (Nov 21, 2019)

My layout lighting is two four foot LED fixtures. Don't remember the color temperature
but I I think they're "daylight". The bench lighting is a two lamp cool white flourescent
fixture. The magnifying lamp is a single bulb, might be halogen because it gets pretty
hot.


----------

