DCC, locate and identify trains, a concept!

MrJohn Sep 28, 2021

  1. MrJohn

    MrJohn TrainBoard Member

    14
    9
    2
    I have a simple DCC layout and will soon be changing to something more interesting and may include a concept I have to locate and identify DCC trains.

    The idea is to have trackside sensors that will detect and identify passing DCC equipped trains. The loco (or any rolling stock) will carry an infrared beacon underneath which will be detected by an IR sensor between the tracks which will identify the train and report it's location to Central Train Control.

    The beacon LED will be flashing in a pattern unique to the train. Now this would be easy enough with a little bit of logic and source of power but maybe we could do it without any special electronics.

    Bearing in mind that we are talking about a DCC layout we can use a DCC component to do the clever bit. For example a simple type of decoder could be added using the same track contacts as the main decoder. The 'motor' connections of the second decoder would be used to power the beacon.

    This second decoder would have a unique DCC identity and would be addressable by the DCC command station.

    The beacon LED would flash in accordance with the PWM signal to the 'motor' and a trackside Arduino would read the pattern from the IR sensor. The train identity would be derived from the pattern of the PWM signal which would reflect the 'speed' setting on the 'beacon decoder'.


    So,

    . the train has a DCC decoder which is not altered in any way.

    . a second decoder is added which we will call the 'Beacon Decoder'.

    . the Beacon Decoder is connected to the rails and can be programmed in the normal way.

    . the motor output of the Beacon Decoder is used to power an under-train infrared LED.

    . the PWM signal output by the Beacon Decoder changes according to the speed setting of the Beacon Decoder.

    . the under-train infrared LED flashes in accordance with the PWM signal.

    . the trackside IR sensor reads the pattern of the under-train LED and passes it to an Arduino

    . the Arduino decodes the PWM to determine the Beacon Decoder's speed setting.

    . the speed setting is reported to the Central Train Control.

    . Central Train Control must lookup a table to identify the train.



    Note, this 'speed' setting has nothing to do with the speed of the train, it is only something we can set in the Beacon Decoder and be used to identify the train.

    There will be a practical limit on the number of trains that can configured for the layout and will be more or less according to the accuracy of converting PWM to a speed value.


    This could be a daft idea but I hope to report in the not to distant future. Meanwhile I am waiting for the IR components to arrive.

    John
     
  2. CSX Robert

    CSX Robert TrainBoard Member

    1,502
    638
    41
    Interesting concept, but I'm curious, have you considered RFID? I think it would be much easier to implement.
     
  3. MrJohn

    MrJohn TrainBoard Member

    14
    9
    2
    Thanks for your response.
    I started from a position of wanting as little as possible under or beside the tracks. I do know RFID chips can be very small but that would have required the reader mounted on the train and some data channel established between the moving train and the Central Train Control.

    So I went looking for ways for a small device between the tracks to 'read' the train. Bar codes, reed switches and colour sensors were considered.
     
  4. acptulsa

    acptulsa TrainBoard Member

    3,344
    5,868
    75
    But you already have that.

    I have zero experience with DCC, but it seems to me it would be far easier, and maybe a bit cheaper, to isolate the track into old school blocks and give each its own power supply. Then presumably those could tell a computer which train(s) they're in communication with.
     
  5. MrJohn

    MrJohn TrainBoard Member

    14
    9
    2
    I am sorry but I do not understand that.
     
  6. acptulsa

    acptulsa TrainBoard Member

    3,344
    5,868
    75
    The train is in communication with the DCC system. It identifies itself, and gets instructions. It can't tell the DCC system where it is, but the system knows if it's on the track somewhere.

    If the track is divided into old school blocks, each with an individual power supply, those power supplies know if they're in communication with the train in question or not. And if you know which piece of track each one serves, and can train them to tell the computer what train it's talking to, you know where the train is.
     
  7. MrJohn

    MrJohn TrainBoard Member

    14
    9
    2
    Thank you, I was under the impression that the DCC system was a broadcast protocol and that the train did not respond (except during the configuration process).
     
  8. Dave1905

    Dave1905 TrainBoard Member

    266
    285
    22
    Nope. You put the RFID chip on the cars/engines and a stationary decoder on the tracks. No power required on the train. All the powered stuff is stationary.
    It has been done successfully by several people and parts are available off the shelf. The prototype uses this system nationwide.
     
    Mark Ricci likes this.
  9. acptulsa

    acptulsa TrainBoard Member

    3,344
    5,868
    75
    Hold on, like I said I have no experience with DCC. You may be right. I know communication goes both ways, but no, I can't swear it goes both ways all the time.

    Maybe someone will see this and educate us both.
     
  10. MrJohn

    MrJohn TrainBoard Member

    14
    9
    2
    OK Dave1905, I will investigate further re RFID.
     
  11. CSX Robert

    CSX Robert TrainBoard Member

    1,502
    638
    41
    MrJohn is correct, DCC is generally a broadcast protocol, i.e., the command station doesn't even know if the decoders it is controlling are on the layout, it just sends out the commands and the decoders respond accordingly.

    Digitrax does have a transponding feature, and some other manufacturers support Railcom, which are both ways that a decoder can report back its address, but neither method has much commercial support or wide-spread use.
     
    acptulsa likes this.
  12. MrJohn

    MrJohn TrainBoard Member

    14
    9
    2
    This might be a bigger project than I at first thought.

    I have looked at a thread about RFID and that does not seem to be easy so I will not rush towards that just yet.
     
  13. EsK

    EsK TrainBoard Member

    78
    27
    5
    Railcom is pretty standard in Europe, just that it's not widely used here in the US. Decoders from TCS in the US offers Railcom and that will identify in which block the locomotive is. I am sure there are more decoders that offer Railcom but I am not aware of all. Railcom does work over LocoNet.

    So what John needs is Railcom and an automation software. That makes it a pretty powerful combination and loads of fun. Opens up a whole new vista.
    Krish
     
  14. CSX Robert

    CSX Robert TrainBoard Member

    1,502
    638
    41
    Interesting, I would certainly consider RFID easier than the infrared concept you originally proposed. I'd be interested in looking at the thread you mentioned to see what they have to say. I have worked with RFID before (not in model railroading, but in other applications) and found it pretty straight forward, of course how "easy" it is will depend a lot on your existing skill set. If you do decide to pursue it I can take a look at what's out there now and give some recommendations.
     
  15. MrJohn

    MrJohn TrainBoard Member

    14
    9
    2
    The thread I looked at is on this forum and is called Fact finding mission on RFID.

    There are a few more aspects I have to explore:-

    . Active train or active trackside detector?

    .How to get information back to Central Train Control?

    .RFID, barcode, infrared, reed switch, Hall effect or whatever?




     
    Last edited: Sep 29, 2021
  16. tjdreams

    tjdreams TrainBoard Member

    473
    607
    24
    Take a look at https://www.freiwald.com/pages/traincontroller.htm This software and the transponding capabilities of digitrax decoders. will give you the abilities to identify and locate your trains on your layout. With the gold package you can have complete computer controlled trains start stop speed up slow down reverse computer routing sending train A one way and train B another. Along with functional signaling if you want .
     
    Mark Ricci and Kez like this.
  17. MrJohn

    MrJohn TrainBoard Member

    14
    9
    2
    Thanks, that looks very interesting.
     
  18. EsK

    EsK TrainBoard Member

    78
    27
    5
    For automation, besides TrainController there is Rocrail, iTrain and of course, JMRI.
     
  19. MrJohn

    MrJohn TrainBoard Member

    14
    9
    2
    Thanks Esk. I am sure they are all very good software systems.

    I am concentrating on the hardware right now.

    I have to devise a system to detect the train as it passes points on the track. As I am using DCC the network is not divided into blocks.

    I also need a system to send the detection signal to Central Train Control.


    There are a few ways to do these tasks and as I am using Lego trains there is plenty of room onboard for electronic bits.

    So far I have colour sensors, infrared senders and receivers and just to hand a few Seeed XIAO micros, these are Arduino compatible but far superior in processor speed, memory, ADC etc but best of all they are about the size of a postage stamp!

    Infrared has been considered for getting the signal back to Central Train Control (bounce signal off ceiling) which might actually work but it would involve development time. Hard wiring is an option but I do not fancy crawling around under the layout. There are a few radio options too.

    A few cheap decoders are on hand and today might be a good day to test my idea of an infrared beacon trackside.

    John
     
    Last edited: Sep 30, 2021
  20. EsK

    EsK TrainBoard Member

    78
    27
    5
    "As I am using DCC the network is not divided into blocks."
    If it's DCC it doesn't mean that blocks should not be used. On the contrary plenty of blocks should be used. The concept of blocks in DCC is a bit different than the concept in DC. And blocks are all hardware.

    Your wish to devise a system to detect the train as it passes points on the track. Dividing the DCC layout into blocks is one of the easiest ways to do this. Then each block detects the train & sends the signal to the Central Control.

    If you want to have more fun, then the next step is automation software to coordinate all the trains, signals and all the other fancy stuff, all while sitting on a high stool sipping your favorite poison and using the computer mouse to have multiple train schedules run at your beck & call, without any of them running into one another!
    Best,
    Krish
     
    Sumner likes this.

Share This Page