You're reading ...
Traincontroller

Traincontroller 05: Add Train Detection Sensors

In order for TC to know where our trains are, we need sensors on our track to detect them.

There is quite some information available on the internet on the different types of sensors that can be used. Most popular is the so called current sensing, whereby with some electronics it is detected if a current is drawn from a piece of track, which for this purpuse needs to be isolated from the rest. This is a permanent sensor, it is ‘on’ as long as the train is on the measurement track. Another type of detection is via momentary sensors, like e.g. a reed switch triggered by a magnet under your rolling stock. These are ‘on’ only a very short moment of time when a train passes by. Traincontroller can work with both types of sensors. I plan to use reed switches.

The  sensor signals need to be transfered to the command station and/or the PC. Often used is the so called S88 bus. On my layout I plan to use Arduino’s to take care of this S88 data transfer (see the Software page for more info on this).

How many sensors to use per block? Traincontroller can work with just one current detection sensor, or 2 momentary sensors, one at each side of the block (with a very long block, one in the middle may suffice, or with a one direction block one at the entrance). When the speed profile of the engines has been measured (which means that for every DCC speed step TC exactly knows the actual engine speed), TC can calculate how to decelerate to have an exact ramp down of the speed over a given length and to stop at an exact location, measured in cm.

Of course, if you like, it is possible to use two or three or even more sensors per block. In that case it is for instance possible to start ramping down the speed at the first sensor, then run at crawl speed to the second, where it will stop. That is of course a very exact stop loacation.

The video shows how to add the sensors to each block and how to add the ‘brake markers’ and the ‘stop markers’.

About RudyB

Hobbyist

Discussion

11 thoughts on “Traincontroller 05: Add Train Detection Sensors

  1. Hi Rudy
    I have a CS3+ and use S88.
    When I try to make blocks, can I see you S88 devices come automatick, but I can only see the CS3. How do I get the S88 on to or do I not need it?
    Erik

    Like

    Posted by Erik Jakobsen | January 30, 2022, 17:25
    • I don’t know the CS3 that well but isn’t the S88 bus connected to it? Then, if the CS3 is connected to the PC via USB (or via ethernet?) the S88 sensor signals should be transferred to the PC automatically, all with their address and their status.

      Like

      Posted by RudyB | January 30, 2022, 17:43
      • It is connected directly with the CS3+ and it come with tjiese questien, Adress and code. It is S88 3 with adresse 2. But whem I write this, it can find it. Can it be adresse 0 code 18 instead?

        Like

        Posted by Erik Jakobsen | January 30, 2022, 17:50
      • The CS3 can have its quirks when connecting to TC. Have you followed the TC instructions (help file) specific for connecting a CS3? You may have a chance of finding someone being able to help via the TC forum: https://www.freiwald.com/forum/

        Like

        Posted by RudyB | January 30, 2022, 20:22
    • Erik, If you come by me tomorrow, i will try to show you

      Like

      Posted by Ulrik Thomsen | March 4, 2022, 21:29
  2. Hello-
    This probably not the optimal place to ask this question but perhaps I can get a lead?

    I am trying to use block protection for a loopback section of my layout and I cant devise a way to keep from blocking myself. I am currently using digitrack detection and reverse loop control. But I think the question is independent of hardware?

    This must be a fairly common element of a layout? Block A (entrance/exit) block B the loop.

    Any help appreciated!

    -steve

    Like

    Posted by Steve Nelson | April 4, 2019, 16:43
    • Hi Steve. I’m willing to help, if I understand better what goes wrong when / where. I’ll send you an email, if you then can send me your Traincontroller file, I’ll have a look into it. Reversing loops do work, I have a couple of them in use.

      Like

      Posted by RudyB | April 5, 2019, 12:59
  3. Hi rudy,

    Your video only show one sensor for the block, what if you have two sensors per block. The ramp down would be in the first sensor section, I assume that the stop sensor would be in the second sensor section set to a distance of 0 if you want the train to stop imeadiatly as it activates the second sensor

    Regards

    Andy

    Like

    Posted by Andy | November 6, 2016, 01:10
    • Yes Andy that is correct. That way you can get high accuracy / repeatability on the exact stop position, although my experience so far working with one sensor and neatly calibrated engines is that the stop positions are more than accurate enough for my purposes.

      Like

      Posted by RudyB | November 6, 2016, 08:07
  4. Hi Rudy,
    Really enjoying the videos. One question when using one current sensing detector, does the software calculate the braking point of the loco from the information you put in or does it need a second sensor at the braking point on the layout?
    hope this makes sense. Keep up the excellent work.
    Delticmalc

    Like

    Posted by Malcolm Bowen | August 21, 2015, 22:02
    • Hi Malcolm. Per block, the brake distance, ramp length, and stop position are entered in cm. After the sensor is triggered, TC calculates exactly where the train is, and how to ramp down the speed such that it covers the specified ramp length and stops at the stop position. No second sensor needed for that, unless you need mm stop position accuracy. For the calculations to work, your engine’s speed profile must be measured. TC has a function to do that, see video 16.

      Like

      Posted by RudyB | August 21, 2015, 22:48

Leave a comment

Archive of all posts