stan2004 posted:Or as you identified there are off-the-shelf relay modules with delay capability; though I must point out you need to read between the lines to be sure you are getting what you need. You run into terminology like delay-on, delay-off, cycle-timer, multi-function timing, etc. and then some listings are nothing less than cagey in detailing if you need an active-hi or active-lo trigger to activate the delay!
I have tried several of these delay units and the issue I ran into with the delay-off units was that even if it has a continuous low (or high as the case may be) signal, it doesn't stay on past the delay time - it shuts off. It turns back on right away, but that is of no help.
Another detecting device is the one Geoff Bunza over at MRH came up with http://model-railroad-hobbyist.com/node/26133 I built a few and they work good in different lighting conditions. I was looking at using smd photo transistors, one mounted to the roadbed and the other between the ties.
It willbe interesting to see your results with other IR units.
Brendan