I'm using optical detection with an arduino to track trains in my staging yard.
The Location: Forests of the Pacific Northwest, OregonThe Year: 1948The Scale: On30The Blog: http://bvlcorr.tumblr.com
I am currently setting up an Arduino to realistically handle two grade crossings within two signal blocks on a double track mainline. One crossing is a pair of flashers and the other a pair of crossing gates powered with a stall motor. Since I have many of the original Bruce Chubb Optimized Detectors laying around and some already in use I will be using them to provide the occupancy detection for the Arduino. 6 separate blocks each with an OD providing a logic LOW when a train is detected and a logic HIGH (via internal pullups) when there is no train. The Arduino drives several relays via simple transistor boosters to power the various devices.
gates_down_1 flashers_on_1 |---- X -----------------| |-----------------------------------| |------------------ signal_block_1 entire length west_block_1 mid_block_1 east_block_1 -----------------| |-----------------------------------| |------------------ signal_block_2 entire length west_block_2 ----| mid_block_2 X east_block_2 gates_down_2 flashers_on_2 All 6 inputs are from Chubb Optimized detectors where HIGH = unoccupied and LOW = occupied All 4 outputs will turn on HIGH when the proper inputs are LOW, driving relays via transistors connected to the 12v supply. These relays will then activate crossing gates, flashers and block signals.
I am very happy using the Free-mo MSS signaling concept which delivers an ABS signal system. It uses current detection plus optical at each signal. There is no computer involved, not even Arduino.
It also works easily with single track passing sidings.
When it goes beyond that, one starts getting involved with relays or Arduino. Or a "real" computer, I s'pose. Thus my interest in Arduino for my interlocking. My first approach was with relays, but I ran into an Arduino guy (who KNOWS stuff!) and was impressed with how simple the hardware side was. And inexpensive. He's going to write the code, so I can duck that one for awhile, anyway.
And there's still no central computer. I AM thinking about CTC. And then things change.
Ed
After reading a lot, I decided to use the Digitrax system of current detection (BDL168) and signal driver (SE8C). Logic is on JMRI running on a MacBook air.
Even with the above "off the shelf" approach, incredible amount time is needed to wire the signals, blocks and to set up interlocking conditions.
So, while the sticklers here would like to point out the voltage drop in the current detection and the excitement of custom code on Arduino, I think you can actually achieve something pretty amazing without the hassle by going with an approach that integrates all logic in a computer running JMRI.
That is my $0.02.
You might search the MRH forums for Arduino detection. I have seen some discussions there using the Arduino for different MRR operations.
Rich
If you ever fall over in public, pick yourself up and say “sorry it’s been a while since I inhabited a body.” And just walk away.
Well, not using. Yet. But:
It's usually easier and cheaper to mess with code rather than hardware.
Well, once you know how to do it, anyway.
A friend and I are working up an interlocking using both current and optical detection. It will be a paired double track crossover. There will be 4 two head signals. The logic will be through Arduino. An especially neat thing is that we expect to add a simple toggle switch so that there is a choice between two kinds of logic for the interlocking: the realistic and the simple. Ya just have to throw a toggle.