Controlling a model train with Arduino

Hi!

I want to build a model railroad layout with sensors so the Arduino will control the train, for example, stopping it when it passes near a sensor. I think I can use an IR LED and receiver and read that HIGH/LOW level with the Arduino.

Do you think that the signal from the receiver will be read even through some meters of wire?

Is there any example?

Thanks

Twisted pair works fine.

Take a look at "miniature reed switch". Thees are well suited to place along the track.
A small magnet will activate them