A danger early warning system for my model railway based on block detection and live turnout states

Поділитися
Вставка
  • Опубліковано 16 кві 2024
  • I was getting fed up of absentmindedly crashing my trains into each other so decided I needed an early warning system that would alert me to imminent danger,
    #modelrailway #modeltrains #modelrail #modelrailways

КОМЕНТАРІ • 27

  • @yenraccarnivor
    @yenraccarnivor 3 місяці тому

    You have inspired me with this one, but i've taken a different path to similar gains, as everything is going through mqtt, i figured i'd setup the track occupancy sensors and lighting as entities in Home Assistant. So now not only can i control the layout lights in a similar fashion to the lights in the house, i.e. on/off with motion sensors, those motion sensors also turn the layouts lighting on/off. The tracks occupancy sensors can also be used as warnings. Although the wife did get annoyed when she got a message sent to her everytime a train pulled in to Loftroom West Platform 1 :D

    • @WirenwoodModelRailway
      @WirenwoodModelRailway  3 місяці тому

      That made me laugh, I think you're channeling some Wallace and Gromit here. She won't be complaining when a train turns up first thing with a fresh coffee for her which, I think, has to now be your ultimate goal! Regards, Chris

  • @ClinchfieldModelRailroad
    @ClinchfieldModelRailroad 2 місяці тому

    Yes, for sure. You have me intrigued. I’m going to try and setup Dispatcher today as per your previous video 😅

    • @WirenwoodModelRailway
      @WirenwoodModelRailway  2 місяці тому

      OK - but you don't need Dispatcher, this monitors manual trains.

    • @ClinchfieldModelRailroad
      @ClinchfieldModelRailroad 2 місяці тому

      Ok, I testing out my layout design by creating Sections and Transits to see if all the Blocks connect up to each other to create a complete Transit. After a few steps I can no longer add Sections to my Transit as it no longer gives me choices. Is this because I have the wrong direction set to a Section ? How can I Private Message you ?

    • @WirenwoodModelRailway
      @WirenwoodModelRailway  2 місяці тому

      @@ClinchfieldModelRailroad there should be a contract email address on the about tab on the channel, sometimes you have to go there on a PC to see it.

  • @jjcrom4280
    @jjcrom4280 3 місяці тому

    Very clever method of determining the route ahead. FWIW I'm impressed.

  • @deeprunrailroad_Mike
    @deeprunrailroad_Mike 3 місяці тому

    I do not think I have seen anyone else using an early warning system on their layout. Very ingenious. Mike

    • @WirenwoodModelRailway
      @WirenwoodModelRailway  3 місяці тому +1

      Thank you Mike - they're very kind words! It's been thoroughly enjoyable, if a little intense. I'm hoping at some point it'll be in a fit state to share with anyone who's interested. Regards, Chris

    • @ClinchfieldModelRailroad
      @ClinchfieldModelRailroad 2 місяці тому

      I’m interested in getting your software. 😊

    • @WirenwoodModelRailway
      @WirenwoodModelRailway  2 місяці тому +1

      @@ClinchfieldModelRailroad Hi - I'd like to be able to share it! My concern at the moment is it's only written against my layout and might not work on others. So might need some kind of 'alpha' testing where we work together on it, different versions, bug reporting and fixing etc - would you be up for that?

  • @sid21177
    @sid21177 3 місяці тому

    Suggestions
    1. Use different tones for warning and collision to better pay attention
    2. Auto stop after fixed no of collision beeps in case you miss hitting the stop button

    • @WirenwoodModelRailway
      @WirenwoodModelRailway  3 місяці тому

      Hi - thanks for the suggestions! It does actually have different sounds for warning and danger, maybe the audio didn't quite pick that up. Auto stop is a difficult one from a number of perspectives as without RFID or another solution, the app can't actually know which train to stop!
      Thanks,
      Chris

  • @aleopardstail
    @aleopardstail 3 місяці тому

    have you thought of something a bit like AWS/TPWS warnings? you have the software detecting potential issues which is frankly jaw dropping, thinking like on that wonderful controller stick a couple of LEDs (like a flashing red one, or an RGB to show the next signal state) - leaves doing something to the driver (you) but in effect could show next to the throttle twiddle an indication of the next signal

    • @WirenwoodModelRailway
      @WirenwoodModelRailway  3 місяці тому

      Hi Dale - that's a really good idea! I don't know enough about real world trains really but will look up AWS/TPWS for more info. I replied to Jeffroid's post, that you'd replied to too, on linking up the knob box and this app via MQTT in order to help the app identify which train is moving - I like the idea about the LEDs! Regards, Chris

    • @aleopardstail
      @aleopardstail 3 місяці тому

      @@WirenwoodModelRailway have worked with those signalling systems so approach it from that perspective here.
      basically a "ping" when you go past a green signal (don't do that, it would become highly annoying in seconds) and a "horn" when a train approaches a yellow or red one. think with the blocks you have would have to be a horn when passing as you enter the next block, but the yellow signal should be the warning you need.
      pondering swapping to OO here, specifically to allow for RFID stuff and similar which is a pig in N gauge to go with this sort of automation.
      and you so have me looking at MQTT

    • @WirenwoodModelRailway
      @WirenwoodModelRailway  3 місяці тому

      @@aleopardstail Thanks that's really useful - I'll see if I can get some sound samples and replace the current beeps - ha, I did try a little beep on green and it was exactly as you predicted!
      MQTT is a gift that keeps on giving. What I'm looking at now with the app is using it to manage fully manual and fully automated trains running at the same time. I love the idea of the level of unpredictability that would introduce, and how much of my attention it would require, but the app should help. The key thing though is manual trains have to be able to allocate / reserve a couple of blocks ahead so their path doesn't get gazumped by an automated train at the last minute. With a bit of guidance from JMRI devs I'm now able not only to predict danger in the next two blocks, but also allocate them, in JMRI, to the manual train, to protect it. I used a combination of MQTT and LogixNG for it and it worked a treat! More of that in another video! Regards, Chris

  • @ClinchfieldModelRailroad
    @ClinchfieldModelRailroad 3 місяці тому

    very interesting. So is this software you wrote a script that runs with JMRI ?

    • @WirenwoodModelRailway
      @WirenwoodModelRailway  3 місяці тому

      Hi - it's a Windows application. It communicates with JMRI through the web (json) server that JMRI offers up, and also gets additional information from the saved layout XML file. Regards, Chris

  • @ianjeffery4773
    @ianjeffery4773 3 місяці тому

    Isn't it possible to force trains to stop if there is a red signal even if they are being driven manually?

    • @aleopardstail
      @aleopardstail 3 місяці тому

      not sure JMRI has that by default, this is quite clever coding, would need to "know" what trains are in the blocks and inject the "stop" command
      JMRI obeys signals when its driving, but in manual mode you are on your own

    • @WirenwoodModelRailway
      @WirenwoodModelRailway  3 місяці тому

      hey Jeffroid! Yeah it did cross my mind to implement something like this but then the whole idea of it was to make driving trains manually more fun, so knowing the systen would stop the train might defeat the object a little.
      Didn't stop me thinking about it though! Like Dale says, the issue here would be the app knows that 'a train is moving' but it has no idea what train, so it wouldn't know what to stop. Adding RFID into the layout would solve this.
      But also, that knob box - it crossed my mind to put an MQTT connection on it, and for it to publish to MQTT when a new train has been assigned - what train, and publish again when the train starts moving. Then the app - when it detects a new block in an area that's seen no activity before - so can identify that 'a new train is moving' - look to MQTT for any publish from the knob box about a new train just starting to move - and match them up. Wouldn't be bullet proof but would work.
      Then it could just publish back to the knob box if an emergency stop was required and the knob box would know which train to stop.
      I'll probably end up doing it! Regards, Chris

  • @Madonsteamrailways
    @Madonsteamrailways 3 місяці тому

    How about setting up a proper signalling system to your layout? This could automate the process of controlling the trains.

    • @WirenwoodModelRailway
      @WirenwoodModelRailway  3 місяці тому

      Hi! Depends what you mean by proper I guess! I do already have signal mast logic, and physical signals, on the lower deck at least, it was just difficult to monitor them all the time. And boring! So I wanted something that would kind of monitor them for me then catch my attention if something was about to go belly up! Regards, Chris

  • @davidsheriff8989
    @davidsheriff8989 3 місяці тому

    Methinks over - complicated?