Answers to your questions
Wow! Lots of questions. First, sorry for any typos, no matter how many times you read and reread an article, it seems like something is always missed.
Prof: It may be possible to adjust a reflective sensor to detect axles, but I don’t think that it would work reliably. You could paint the axles white to help pick them out from the car undersides, but I don’t think that it’s worth it to mutilate your rolling stock fleet – but if it’s just for a small demo layout, maybe.
A better solution would be to mount the sensor from the side just above the railhead to try and detect the wheel as it goes by. The best solution may be to use an interrupter detector to detect the wheel as it goes by. Mount the detector part of the pair as close to the rail and somewhat above the railhead to make sure that the wheel will shadow the detector as it passes by. This would be what I would do if I were building something like a defect detector where I wanted to count the axles.
California Rich: You can find similar relay modules on e-bay and Amazon. Search for something like “Relay Module for Arduino” (Arduino is a microcontroller). A quick search on Amazon using exactly that search term produced the following: http://www.amazon.com/Channel-Relay-Module-Expansion-Arduino/dp/B009T2M012/ref=sr_1_2?ie=UTF8&qid=1399594223&sr=8-2&keywords=relay+module+for+arduino and http://www.amazon.com/Docooler-Active-Channel-Module-Arduino/dp/B00G9TQH8U/ref=sr_1_41?ie=UTF8&qid=1399594373&sr=8-41&keywords=relay+module+for+arduino
Centerpointrr: Subsequent to writing this article, I bought several different versions of these relay modules from multiple sources to test them. They all have the identical 10 amp relay. The circuitry is nearly identical with sight variations (for instance, the cheaper ones omit the LED). So buy any 5V unit by price and you will very likely be OK. If you plan on using more than one of these, you can buy modules with 2, 6, 10, 12 and even more relays per module and they cost less per relay than buying a single-unit one.
CPLIPRR: You can use a time delay relay like this one on Amazon: http://www.amazon.com/Power-OFF-Delay-Module-Circuit-SSY-2299/dp/B00F40ONNQ/ref=sr_1_2?s=automotive&ie=UTF8&qid=1399595883&sr=1-2&keywords=power+off+delay+relay The only problems with this is the cost of the relay is somewhat high. Search for these relays directly from Chinese vendors, they are considerably cheaper. And all of these that I can find require 12V; so you’d have to supply 12V in addition to the 5V for the detector. Not insurmountable but a PITA. Keep reading the next section for a software fix.
fcsw85a: I’m using a cats-‘n-dogs mix of Lionel & Right-of-Way B&O Color Position Light Signals (O scale), that I am rewiring to work with my signal system. Plus B&O CPLs that I have designed and 3D printed for myself. Subsequent to writing this article (which was 2 years ago) I have designed and coded a microcontroller-based signal system that will take the output of the detector module directly and the logic produces 6 outputs for bi-directional, 3 color signals. The software takes care of the dropout delays. You can find the complete directions of how to build and program the microcontrollers on my LaunchPad for Model Railroading blog here: http://launchpad4mrr.blogspot.com/2013/01/simple-signal-solution.html
The LaunchPad for Model Railroading blog is designed to help model railroaders get into microcontrollers by presenting projects in a step-by-step manner to build and code the LaunchPad microcontroller board.
The question that you didn’t ask. You can also find substitutes for the sensors, especially if you are going to use a lot of these. This sensor from e-bay http://www.ebay.com/itm/Lot-10x-Obstacle-Avoidance-Sensor-Infrared-Reflective-Photoelectric-Module-/370848422832?pt=LH_DefaultDomain_0&hash=item565849dbb0 are 10 for less than $16. They are a completely different arrangement, but the circuit on the board is the same. So if you can use the alternate configuration, you can save some money.
Some addition notes. Sunlight (even reflected sunlight) will blind these sensors (the original and the alternate). So keep them out of sunlight or even intense incandescent light, there’s enough IR content in this light to interfere with the sensors.
Terry