My experiences with RFID

Tagging some or all rolling stock is very tempting for many reasons.

As a train passes over a tag reader the controller can:

  1. See the makeup of the train

  2. Know which loco is/are pulling the train.

  3. Know calibration data for how the loco behaves

  4. Deduce the class of the train and how it should be handled.

  5. Know how fast the train should travel.

  6. Calculate the length of the train if all rolling stock is tagged.

  7. Detect carriages coming detached if last carriage is tagged.

The tagging could use RFID, barcodes or probably other mechanisms. My first experiments with tagging are with RFID.

The most valuable place to put tags is in locos because all moving trains have at least one loco (excepting hump shunting and cable railways of course).

Equipment used.

Readers: ID-12 from http://www.rfidshop.com priced at UK £10 each

Tags: Passive LF glass EM4102 in 12, 13 and 34mm lengths

RFID multiplexor from MERG (http://www.merg.info), kit not yet generally available.

Software: Tcc with RFID support added running on PC with two serial ports (one for layout control, one for RFID).

Range of detection

The larger the tag and the larger the reader the bigger the range. Larger tags and readers have larger antennae so will work further apart. However there are a lot of other factors which seem to affect range:

  1. Orientation of tag relative to reader. Even if the tag is flat WRT the reader the orientation matters. If the tag is perpendicular to the reader the range seems a lot less, and I have had no success at all if the tag is mounted across a (metal) loco and the reader is mounted vertically to the side of the track even though the distance from reader to tag is only a few mm.

  2. Metal surfaces. The tag and reader are radio devices and metal reflects and blocks radio waves. Unfortunately many locos have metal chassis. If you are happy to only tag other rolling stock then this should be less of a problem.

  3. Distance between tags. These readers can only detect one tag at a time and so if two tags are close at the same time then neither is detected.

  4. Distance between readers. Readers interfere with one another. Adjacent mounting for twin tracks does not work at all. I have no data yet to indicate a minimum spacing but 12" seems OK.

There are many other factors which might possibly have an effect and if you have any info please email me. Some things to consider include:

  1. Rail type. Could steel rail be worse than NS?

  2. Interference from track supply. Could noisy track feed such as DCC affect RFID more than pure DC?

  3. Interference from motors. Could un-suppressed motors interfere with RFID - they certainly interfere with radio reception.

Tag installation

Though all rolling stock could possibly be tagged, I have thus far tagged a selection of locos and a couple of wagons for initial experiments. I model in N scale which means that space in locos is extremely short - there is rarely any space at all inside. Tag installation therefore is down to what is available. The following is a list is order of preference in locos, most preferred first:

  1. Under a coupling at one end or the other is best if such a space is available.

Picture of tag under coupling

  1. Mounted on, or in some plastic moulding between the wheel-sets. Oriented either across the loco or centrally along the loco.

Picture of tag on wagon

  1. Mounted along the length of the loco, but to one side.

 

  1. On some metal block between the wheel-sets close to, but not touching the tracks.

Picture of tag under loco

I have found that if the chassis is metal that mounting a tag in a recessed space between a wheel-set and whatever metal block there might be between the wheel-sets does not work at all, no matter how close I poke the reader.

Picture of tag in non-functional position


Note that many positions for the tags are below the existing chassis. If your track is not level the tag might come in contact with the track and cause problems, so this is yet another reason to sort out that dodgy bit of track!

I have used PVA adhesive to mount the tags on the basis that if a tag position does not work reliably then a drop of water will allow that tag to be removed for reuse.

Reader installation

With tags under metal locos, track mounted directly to sundeala and the reader pressed to the underside of that sundeala I got no detection at all even though waving a tag by hand worked every time. I put this down to the dampening effect of the metal chassis. Cutting a hole in the baseboard and mounting the reader PCB from under the sundeala positioned the reader about 2mm below sleeper bottom and this works quite well. In a ballasted layout you'd probably put a sheet of card or plasticard under the track so this simulates such an installation quite well.

As tag orientation affects range (by as much as 2 to 1) and space restrictions mean I have to have some along the loco and others mounted across the locos I have mounted the readers at 45 degrees to the track. Note the picture is of a reader under track mounted on a trackbed - the visible track is the adjacent road!

To minimise detection from trains on an adjacent track I slightly offset the readers away from the adjacent track. As the read area is quite large (compared to N scale track) I don't think this will reduce my detection range at all.

Picture of tag reader mounted at 45 degrees.

Results

The results thus far are definitely encouraging.

Once the tags have been mounted in a position that works, they seem to work fairly reliably. I am trying to collect statistics for long running sessions, but first I have to get all by tags into working locations!

Some work too well! On one of the wagons I used a 34mm tag because space was available and they are a quarter of the price of the others. The tag is 14mm above the top of the track. That wagon is reliably detected by a reader on the adjacent track. Either I'll have to tolerate such extra reads, or only mount the readers on single tracks (where there are no nearly tracks) or avoid using the cheap tags at all.

Picture of 34mm tag on an N-scale wagon

A train of loco and two wagons, all 3 items being tagged, for the train running at a normal speed (no exact figures available yet) all three tags were correctly read 20 times out of 20 on track mounted direct to the baseboard, 19 out of 20 if a roadbed is used. I doubt if it would work with short English 2-axle wagons, but I have not tried that yet.

I think RFID is more reliable than infra-red - I have had lots of problems with that, so for most railway applications they are certainly another weapon in your arsenal for train detection. For displaying which train is where they are more than adequate (once suitable installation sites have been identified).

If you want full layout automation then regard RFID as imperfect, just like ALL sensors. Some tags will be missed occasionally, some data loss will happen occasionally. But the overall reliability is as good as any other form of detection I have tried other than track circuiting (current detection).

Last Updated 07 Jan 2009

© Howard Amos 2008-2009