Bill
"Never try to teach a pig to sing. It wastes your time and annoys the pig"
Being totaly sarcastic because the electronics are taking over everything why not an IBM mainframe computer? That way big brother can monitor what trains you run and either collect more data on you or shut you down completely. A microswitch that the bridge activates when in place can shut the power off to a big enough section that everything comes to a halt way before the big chasm.
Mine was a swing up section across a doorway in the middle of a 10 foot block. I simply used a door bell button to remove one rail of the track power to the block with the bridge up. With the bridge down and in place a bracket on the bridge pushed in the door bell button to restore power to the block.
That worked great from 1951 to 1958, I never had a problem and it was totally automatic operation. Mel My Model Railroad http://melvineperry.blogspot.com/ Bakersfield, California I'm beginning to realize that aging is not for wimps.
if the goal is to prevent accidents, you could drill a hole and drop a nail into it to block cars.
greg - Philadelphia & Reading / Reading
Arduinos are great! But in the application you describe, it sounds like the train would just crash into piano wires and keep on driving until the engine derails... better than a tumble to the floor, probably, but still going to do damage.
IMO if you're using an Arduino for this job you should have sensors under the track about a foot away from the gap. If a train approaches the gap when the bridge is removed, the Arduino cuts power to the track. And maybe lowers a barrier too, for good measure.
If you have keep-alives though, your Arduino would need to send a DCC emergency stop command before cutting power; also doable, just a little bit more work.
If you're interested in jobs like this I encourage you to get into the Arduino! But you'd have to start with something a lot simpler, like LED signals or whatever, to get your feet wet. This project is beyond the scope of a complete beginner.
It doesn't seem like an Arduino is necessary. A simple contact that actuates a Tortoise switch machine to raise and lower the pins would work. If you want to keep the contact as simple as possible it could control a DPDT relay to reverse the switch machines.
Mark Vinski