Subscribe via RSS

Tracking trains with an Arduino and RFID : Implemented

Right, after telling you all about how the RFID setup works (and how to do it yourself), I thought I'd actually test it on my work-in-progress layout. Just for a recap, this setup uses the Arduino Mega, an ID-12 RFID Reader (plus RFID Button) from Toys Downunder and the code provided in the article listed here.

I knew the ID-12 reader had a 60mm optimal read distance, so I wanted it pretty close to the track for extra reliability. I decided on mounting it inside the platform, as it would be close to the track and I could perform actions/events once a train reached the platform.

First I had to rewire the reader, as previously I'd used component wires (surplus resistor legs, etc...) so that I could easily test it on the Arduino. Now that it was to go through the baseboard I needed lengthy wires:

And then I mounted it into the station platform:


And then, it just worked!

What you can't see is the readout on the computer screen of the unique id on the button. This is what will allow me to perform actions (maybe sounds, path settings or signal settings) per each train I have with a button installed.

What's next? I might try some proximity detection; as you can see, I have a 2-road yard just to the right of the station which will be an engine shed and it'll require that trains don't smash through the rear wall :)

avatar

About stevenh

Trains… trains… trains… + Electronics + Japan.

Comments (3) Trackbacks (0)
  1. this is great I have been looking for this I have a 30′ foot by 4′ layout I have started on and this would be what I need thanks for testing it out

  2. I just have one question – is the reader able to read the tag while the train is moving, or does the train have to be stopped? I’m planning to use something like this to track trains as they enter a staging yard.

    • tbdanny,

      The detector definitely found moving trains, there was no issue there… in the video I was controlling the train myself and letting it run past the detector, then reversing back over it.

      You’ll have no issues having this at the entry of a yard. Just get the detector as close to the vehicles as possible.

      Steven


Leave a comment


*

No trackbacks yet.