Hi All,
I'm currently developing a project to track locomotives around a track. It only needs to detect them at specific points, rather than all over - although, all over would be interesting too.
I was going to try an IR sensor, so a locomotive would pass over the IR sensor, cut the beam and therefore you'd know something had passed. This seems to be my best option so far, but I just wondered if there were any other types of sensors out there that I could use that might be a better option, preferably something that I can hide better, that doesn't require me burying under the track maybe?
You could try a retroreflective IR sensor, where the emitter & detector are in the same package and the beam reflects from the underside of the locomotive.
I'd like it to literally detect if something is there. Whether it be a loco, coaches or indeed anything else. So it's more of a 'presence' sensor than anything else.
Then as the train moves around, as it passes the next sensor on the route, it would detect it there etc
In that case, reed contacts or hall sensors will be problematic - as they work based on magnetic fields, they will not react to, for example, your fingers.
Well, people have done that (and more) on model railways before. There are many specific tutorials for it, although I assume most of them don't include interfacing with an Arduino.
IF you get switches with TWO reeds, and orient a bar magnet parallel to the reeds, then almost any old bar magnet will bring the two reeds together and close the switch.
A Nano can attach to multiple port expanders to connect 16 inputs each.
The suggestion on another recent post was (modulated) IR emitters and detectors on each side of the track, placed obliquely in order to avoid the gap between carriages. These can be concealed in scenery such as trees (and the oblique placement makes them less conspicuous).