Carl's Railway Automation

Carl Meek Apr 16, 2017

  1. Carl Meek

    Carl Meek New Member

    4
    4
    1
    I'm a software developer creating a control system from scratch to power an ambitious huge OO layout in a converted barn. I've been working on it a couple of months and I've achieved 11 locos running at once while I sit back with my arms folded. Each train plans a route, sets points and reports it's location, interacting with the other trains and obeying blocks and locks. It's pretty damn reliable with only a very occasional fault - and its getting better each time i run it. I've still got a long way to go, but results so far are pleasing! Trains are all DCC/Sound and sounds are automatically played (for example doors closing, guards whistle, and horns into tunnels).

    I'm using the wonderful DCC++. I've had no problems with it at all, very impressive running 10+ trains at once. I've had to make a few tweaks to the software - current sensing parameters and the number of train registers. My only wish here would be to support RailCom.

    I've just started writing a blog about this, it makes sense to share what i've learned so far. Please take a look, and i'd love to hear some feedback. I'll be adding more and more content as things progress.

    http://trainautomation.blogspot.co.uk/
     
    UK Steve, RCMan and lnxlnx like this.
  2. crusader27529

    crusader27529 TrainBoard Member

    247
    167
    11
    Nice, but what do you plan to do with the systemn as it would apply to the general model railroad community?

    Do you eventually plan to allow use by the rest of us??
     
  3. Carl Meek

    Carl Meek New Member

    4
    4
    1
    Yes - I would like to open it up to others.

    It's very new, and i first want to gauge interest, listen to critique, and discuss the merits and downsides.

    If not many people show interest in this thread, I'll probably never open it up. If people are keen, then we can start to discuss what it will take to get it onto the layouts of others.

    -C
     
    UK Steve likes this.
  4. crusader27529

    crusader27529 TrainBoard Member

    247
    167
    11
    I really like your technique of not having a fixed path to get from the start point to the end point, but where the route is generated based on what is available.

    That's some sophisticated almost AI stuff, probably built on tables and weighted values used to make routing desicions. That could be used on any layout, not just a point-to-point design like your layout is.

    VERY IMPRESSIVE!
     
  5. Carl Meek

    Carl Meek New Member

    4
    4
    1
  6. crusader27529

    crusader27529 TrainBoard Member

    247
    167
    11
    Lots of modelers don't know much about electronics in general, and programming in particular, so in order for more response and interest, you really need to show/explain some detail in setting up the system, and what the system needs to operate.

    The one major area that is not explained is related to the sesors and actually controlling the turnouts. Once the details of how to do this, the complexity and COST os setting up a system is understood, you'll hopefully get more of a response.

    Right now, you're talking over the head of 99% of the people on this forum.......I understand most of the system, except for the sensors and detailed setups. I'd love to have such a system setup to run scheduled trains while other users ran other trains manually, and have the system automtically route the auto controlled trains around the manually operated trains.
     
  7. Carl Meek

    Carl Meek New Member

    4
    4
    1
  8. crusader27529

    crusader27529 TrainBoard Member

    247
    167
    11
    Enough detail to decide if the system could be adapted/setup to any particular layout, plus some detail about how the arduino modules interact, so adding or modifying the layout can be done. If it's too complicated, most people won't use it.

    I've been using the a3144 sensors (they're not in current production, but replacements are available), and the outputs are open collector, so a pullup resistor is REQUIRED. I've been using 10k parts for the pullups.
     
  9. UK Steve

    UK Steve TrainBoard Member

    453
    683
    12
    @ Carl,

    Excellent project, excellent blog, well done Sir.

    @ Crusader

    In my humble opinion, those Modellers are in the wrong place, and would be much better sticking to commercial products. Open Source is not some automatic right to Open Support!
     
    brendanf likes this.
  10. brendanf

    brendanf TrainBoard Member

    62
    54
    8
    Carl, this is very interesting.. I'll sit down and slowly read your blog over the next few days..

    Nicely done!
     
  11. Keith Ledbetter

    Keith Ledbetter TrainBoard Member

    279
    195
    12
    Agree nicely done and very interesting. I am thinking of adding a point to point element in my next layout and would love to look into this more. I to will spend some more time reading the blog and add some comments.
     
  12. brendanf

    brendanf TrainBoard Member

    62
    54
    8
    Carl I finally had a chance to read through your blog.

    Very nicely done. You should be proud of what you have accomplished. It has given me some insight on how I should handle a few things on my own layout.

    I am concerned though about how you handle blocks though. I wonder how much error is allowed for since your approach seems to be more of knowing a physical speed and distance, and calculating where the train most likely is. I know you do use some sensors but you have to wonder if left running for an extended period would the slight miscalculations (if any) start to add up. Or would errors start to creep in with time and wear, say for example, as the track gets dirty and you start getting a bit of voltage drop to the locos slowing them ever so slightly.

    Anyway I am sure you will have plenty of 'tweaking' to do. But otherwise very nice.
     
  13. SilentGloves

    SilentGloves New Member

    2
    2
    6
    Hey Carl,

    Read through most of your blog. Pretty fascinating. I'm still reading, so forgive me if this is covered. I'm a total newbie to model railroads (came across Tehachapi Pass in N Scale last week and went down the rabbit hole), but I'm a systems architect and software engineer by trade. I do a lot of similar modeling, except my work is specific to credit and risk analysis.

    Reading your post about Routing Decisions led me to a question. Why does the software need to model curves (as appears to be specified in the text file)? It seems to me that all you'd really need to know is distance as measured in the center of the track (which would be the mean distance between the two rails). I thought about speed concerns, but given that you state that the train is always predicting its location, certain locations could be represented purely by the maximum speed in that section of track (or more accurately, a given distance from the most recently encountered sensor). The only other thing I could think of is that the software interprets the train's speed as changing, even if the motor input value isn't, but again, that seems like it could be easily modeled using only location.

    Cheers!
    SG
     

Share This Page