I found two main 'open source' projects that offered me the things I needed (I am quite the open source adept, and use only Linux and Macs at home):
- JMRI, a kind of software toolkit that offered all the building blocks to control a digital railroad system
- Rocrail, a more conventional software package that sported a graphical interface like a switchbox
Now for the interface to the computer, I went looking for something to connect to my Roco system. Since it is based on the Xpressnet bus, which is an open standard designed by Lenz, there were a couple of options:
- Lenz interfaces Li100, Li100F, Li101F or Li-USB (serial/USB), each successive one faster, more expensive, and more difficult to program...
- Rocomotion controller (serial)
- Hornby Elite controller (USB)
- XnTcp interface (UTP) (www.terdina.net/rails)
- S88XpressNetLi interface (serial)
The latter is a non-commercial kit project stemming from a dutch forum, and seemed the best option: cheap (about € 30/£ 26), simple, and with good local support from the forum. It is quite similar to the 'NanoX-S88', an open source project from Paco CaƱada (http://usuaris.tinet.cat/fmco/lokmaus_en.html#genlis88), which is more generally known.
The device has 1 connector for the S88 feedback bus, 2 XpressNet connectors, and a serial connector (9600 bps). It has a couple of LEDs for the status, and a software tool to program the number of S88 modules that are connected.
I bought and assembled the kit, and started with JMRI to control my layout. I had some problems with the serial connection, and the software drivers for Linux: since USB is basically a 'plug and play' protocol, the serial ports get remapped each time the connector is recognized (or the computer is reset). The quality of USB-to-serial adaptors is also quite variable, and professional ones are quite costly (>£ 100). I finally found a good compromise: a DeLock 4-port USB-to-serial adaptor for € 51 (£ 45) on eBay, from germany:
I have used this to utter satisfaction, it even worked with a quirky X-10 interface I bought some time ago; the X-10 protocol allows you to control electrical devices through signals superposed on the main electrical grid. I use this to switch my whole layout on or off, and control the house lights.
I bought some feedback modules from the same source as the computer interface: they are very basic S88 modules, using a diode rectifier circuit for current detection, using this basic principle:
The modules are also kit-based, and come with professionally etched pcbs:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1KJzhokF2qBe73uhvwk8zwP4IxSY_O6aTRha0jGye_JXZXwczN44E45wiZoQX4_V9hmo65KzGx-p2ei24B0c4TD1LFWSp3rDTzdA2u0F3mha-ukne9cXNcBIhzdB4I_r03S6uohzjUrs/s320/9.+S88DS16.png)
I also used a reverse loop circuit board, which uses current detection to reverse the polarity in the loop in advance of the train, so without waiting for a short-circuit to develop (as most commercial products seem to do):
This module works as follows: the train enters section A, which is detected and causes sections B, C and D to be switched to section A's polarity. Next it enters section B, which causes the relays to be switched to the same polarity (so in effect, nothing happens). The train enters section C without any problems.
When it enters section D, the polarity of sections D, C and B is reversed, and is therefore equal to that of section E, so no short-circuit is in effect. Since the circuit is symmetrical, it can be driven both ways.
There is a newer version of this kit, which uses only one relay, but unfortunately I haven't got the circuit yet.