Sensor Types

From the very beginning, I was convinced that current sensors is the right solution. I have simply wired all blocks to feed them through individual current sensors.

It means that each and every piece of track – even the switches – are covered by a sensor, so that the program on the PC can track all locomotives on the entire layout. But it also means that wagons that do not draw current from the track cannot be tracked. And also the the PC program cannot see where in a block the locomotive is.

As an alternative to current sensors, there is also voltage sensors. But for that, a coil is needed. And that makes things difficult. Maybe this type is usable ?

RocRail suggests a very different strategy: Two or rather three sensors per block. And the definition of a block is “the path between two switches”.

As I am using a LocoNet encoder, RocRail will see my current sensors as an event when current start to be drawn in a block – i.e. when the first collector shoe in a train enters the block – and as another event when the current draw ceases, i.e. when the last collector shoe leaves the block.

RockRail describes the usual point-sensors, i.e. Reed switches, hall sensors, infrared sensors as well as current sensors and the cheapest option for 3-rail systems: Disconnect one of the outer rails on a small piece of track (which is how Märklins “contact” track is made).

RocRail also mentions the usual commercially available systems, such as Lissy. In this category, there are also a couple of DIY systems that could be worth considering:

Per’s Model Train Recognition System

Barjut Barcode Reader

MERG RFID scanner

Per’s demands some electronics in terms of a PIC and a couple of IR-diodes in every locomotive or wagon. This again means that only wagons with power will be detected. The stationary decoders delivers data to the PC via a serial connection – i.e. not through neither LocoNet nor DCC. I assume a USB connection could be implemented. According to the homepage, Per started the project in 2004 and the latest posting is from 2012, where only a simple test program for the PC existed. But the protocol is quite simple, so it should be possible to implement a RocRail interface. Besides, it is already on the list of supported command stations in RocRail, so the interface might be there already.

Barjut is based on a bar-code on a sticker underneath each wagon or locomotive. I.e. it will work for non-powered wagons as well. All the electronics is stationary. The sensor consists mainly of a laser diode (from a pointing device) and a photo transistor and an Atmel ATMega. Barjut delivers data to the PC via USB, but according to the homepage, the RocRail driver is not finished (latest update is from 2009). And this protocol looks far from simple. But again – it is on RocRails list of supported systems.

The MERG solution is as far as I know integrated into RocRail. An RFID tag must be glued underneath each locomotive or wagon. So again no electronics in the rolling stock. It is part of the MERG CBUS solution, so it might be a challenge to make a LocoNet interface or otherwise route the information to a PC.

Another thing that might be worth exploring is counting wheels. It can ensure against lost wagons. Here is an 8-port LocoNet wheel counter that is born into the RocRail family and that is meant to be an entry-sensor in a block: It is oddly enough ATMega based.

The best solution might be a wheel-counter at the entry point of each block an “ordinary” point-like sensor at the exit? But then what about multi-directional blocks? And does this wheel-counting stuff work if a wagon is lost in the middle of a switch?

Alternatively, one could experiment with more ordinary point sensors.

From the RocRail manual: Whether occupancy sensors which can supervise a whole rail segment, or impulse sensors which deliver only one short impulse while crossing are to be used, depends on the respective intended purpose, the rail system and the costs: The occupied-sensor according to its function is only useful if designed as an occupancy sensor, however, an exit-sensor can be an impulse sensor without any difficulties. Recommendable for the dual rail DC-System, e.g., could be the following combination: An occupancy sensor to generate the enter-event, for all other events (shortin, pre2in, in) the cheaper impulse sensors will fulfill the requirements.

Reichelt has 5 different IR components, that all contains an IR-LED and a corresponding photo transistor. They are all between ½ and 1 Euro a piece.

Two of them has diade and transistor beside one another and is thus meant to detect the IR-light being reflected by something so that it is detectable by the transistor. Maybe such a device could be placed underneath the track and thus detect when something passes above the hole?

The others are in a kind of horse-shoe shape so that the light from the LED shines on the photo transistor unless an object such as the wheel of a locomotive or wagon is put between. Maybe this kind of device could be placed around a rail?

I am going to buy one of each kind and a couple of discrete IR-LEDs and photo transistors (in matching frequencies). Then I can try out different options. And I can test in darkness as well as in direct sunlight.

Price-wise, it must be noted that there is not a huge difference between a current sensor and the IR sensors.

Postscript: With JMRI and SCWarrants all these considerations have become irrelevant. I am now able to make trains stop very precise even though I am still using one current sensor for each block and nothing else.

I did however buy the IR components and have been making a detector, which was in fact very easy. But I have no idea if it works in bigger scale with many sensor close to one another or if such sensors will disturb each other.

The only thing that I still need to be afraid of is lost wagons.