Greetings all, I posted another thread and got some great advice about a prototype I'm working on for a model railroad project I'm working on with my dad. Essentially we'll be using an Arduino to do certain things when it detects a train in a certain spot on the track. But what I'm looking for is advice on the best "sensor" option I have.
I do a lot of work with pinball machines so my first thought was to use an IR transmitter and receiver and shoot the beam across the track. Pinball Life (the lowest cost pinball parts supplier) sells sets of them for $7 ( http://www.pinballlife.com/index.php?p=product&id=167 ). I even did some reading and made a simple Arduino sketch to test the opto setup and it works LED turns on when the beam is present and goes out when the beam is broken--I'd use this to trigger an event. The problem is that the optos aren't exactly small or nondescript so they would be hard to disguise on either side of the track. So I'm looking for some expert advice on if there's a better way to do this? Perhaps some kind of sensor under the track or something that shoots up through a hole in the track?
My concern is that something like a light sensor (while probably very inexpensive and easy to wire, which are both big pluses) would get tripped if we ran the trains in a "night scene" or if anyone turned out the lights!