DCC, locate and identify trains, a concept!

MrJohn Sep 28, 2021

  1. Massey

    Massey TrainBoard Member

    2,018
    6,526
    58
    Ok so you are using Lego and DCC, and RFID is too complex?

    So when it comes to complexity I do not know how RFID is too complex. You have an RFID chip inside a loco or car (just like the microchip in your dog or cat to help you get it back if it’s ever sent to the pound). Then you have RFID readers either under the rails (which isn’t hard to do with Lego), or next to the rails. These readers are located at the beginning of your “block” and will read the IDs of all trains equipped with the chip. The readers then send back to central command the ID of the chips, and the software decodes the IDs into information you can easily read, like the locomotive assigned to that ID. To me that is much simpler than the system you suggest above.

    Think of this. The said decoder that is supposed to power the IR led would need to be activated by a DCC device such as a throttle or JMRI. Then it would need to be set to an exact speed to give the correct pps for the sensor to read. You would also have to develop the software to decode said pps and translate it back to you as trains and cars. Now we all know that IR can do this, that’s how out TV remotes work, but you also have to think resolution in this case. The pps and timing would have to be in sync as the train crosses a sensor or else the sensor will not get the correct pps and that could cause an error. With the train moving the likelihood of this happening is high. So how to fix that? Well you could make the software read the PWM a given number of times and choose the pps that has the most equal readings. Figuring the first and last readings may not be complete due to the loco going out of range in the middle of a broadcast. This means you would need 4 to 5 samples minimum and you would most likely be discarding the first and last. And this is assuming the decoder is giving the correct pps in the first place. So why not a device with a dedicated PWM (programmable of course) that gets its power from the rails but always outputs the same pps to the IR transmitter. That way you don’t have to worry about the decoder not being always set to the exact setting. This circuit could be created easily enough with a Crystal oscillator or even a 555 timer IC using a variable resistor to change the PWM or PPS.

    Not trying to say it won’t work, I’m just trying to give an idea of the work involved that I can see from my own experience. Hope this brings some insight to you, and I look forward to seeing what you come up with. In the mean time have fun!
     
  2. MrJohn

    MrJohn TrainBoard Member

    14
    9
    2
    The 'system' as it stands at this time...

    The loco is DCC equipped and operates in the normal way.

    One car picks up power from the rails which is rectified and powers an XIAO micro, a NRF24L01 radio and an IR receiver. The IR receiver is mounted under the car.

    Between the rails is a DCC decoder, a resistor and an IR LED. The LED is connected (via the resistor) to the decoder motor drive circuit.

    The XIAO reads the LED PWM signals and reports the identity by radio to Central Train Control.

    I have not started testing yet.
     

Share This Page