(Nov 2014) This article in Model Railroad Hobbyist Magazine shows some very nice pictures of rolling stock on curves of different radius.
More info on radius and track distances can be found here, in norm NEM112 on the website on Model Railway standardization.
(Sep 2014) There are several ways to detect trains on the track. Most used is ‘current sensing’, whereby a current larger than a few mA drawn from the rails is detected. A special kind of S88, that has the current sensing circuitry on board, is available for this purpose.
The other type of S88 board, often called ‘ground input’, has simple digital inputs that we need to switch to GND. For this we can use a (reed) switch or a transistor whos collector is connected to Vcc via a pull up resistor and that pulls the input to GND when it draws a current.
If we use the Arduino to simulate an S88 board it will have these ‘simple’ inputs, unless we add current measurement circuitry ourselves, which I do not plan to do. So … I plan to use ether reed switches that are switched by a magnet glued under the train, or IR optical sensors.
I did some tests with the TCRT5000. Price is not an issue with those … they set you back some €0,16 a piece. The schematics are shown in the image below. All that is needed is a resistor to feed the IR emitter LED. I use 390 ohm, which results in a 10mA current through the LED. The collector of the optical transistor can be directly connected to an Arduino input. No need for an external pull up resistor, we make use the internal Arduino pull up resistors, keeping the circuit as simple as possible.
There is a drawback using these sensors … they are easily influenced by daylight. If your model train layout is going to be near a window and will catch quite some direct light, chances are your sensors will be constantly ‘on’. There is a way to avoid that, which is to use a 38kHz square wave for your LED power (using an NE555 timer circuit) and use a 38kHz IR receiver (like e.g. the TSOP4038). Drawbacks are that this requires extra circuitry and that the sensors are more expensive.
A video is avaliable on this blog post.
(Sep 2014) See this blog post for a video on the use of reed switch and magnets for train detection. In that video the reed switch was a large one of 25mm. The magnets were quite large too. In the mean time that has been changed. I plan to use a smaller reed of 14x2mm, and also smaller magnets with a size of 8×1.5 mm. It has been tested and all works fine, be it that on some ‘high on their wheels’ wagons two magnets, on top of each other, need to be used to get a bit closer to the reed and to increase the magnetic strength.
(Aug 2014) I plan to use Peco HO 75 for my track. With this brand there is the choice to use junctions with or without electrofrog. There is a whole lot to be read on the subject on the internet. It seems that in many cases insulated frog does well … but still there may be some loco’s that might stutter or even halt on those when driving at low speeds.
At the club we use electrofrogs, with frog polarity switching. But that involves aditional switch hardware which not only complicates matters but also makes things more expensive. I read that using electrofrog junctions without the additional switching electronics might work fine … the only risk being a possible shortcut of (too) thick loco wheels at the points. Peco seems to have quite a large gap there … I am going to give it a try. Can always go to switched frog if I run into trouble.
So … for now the choice is electrofrog, used ‘out of the box’ without polarity switching.
The best info I came across on the subject is from this website. The image comes from that wedsite.
(Aug 2014) I’m on the lookout for an alternative for glue. Glue is such a definitive method, while chances are that I want to change my layout a few times. Here’s a little personal brainstorm on possible alternatives, in order of how nice I think the solution:
In the mean time I decided for the ‘thin iron wire’ method. See this post for more details and images.