Abstract: Arail (Yet to be decided name but "Another Railway", "Automated Railway" are some possible full names) is a development project underway by myself (and possibly others in the future) to create a new method of controlling a railway that combines different features than what have been traditionally offered in the hobby. The end goal is a railway that can fully run itself by the press of a single toggle button (to start and stop including bringing trains out of sheds and parking them inside as well) with other possible options of adding custom control of a railway by taking control of a one or more consist(s) to using predefined time tables and using real-time sensor data to know what is going on around the railway and for the software to react intelligently (eventually sophisticated AI) to events.
Mentality: The more prototypical a railroad is the more interesting it would be to some modelers. Prototypical railroads often operate quite differently (in terms of hardware) than what a sophisticated model railway does but with recent advances in micro computers it is now possible to have railway that can know down to an eighth of an inch where every train is at every moment and for it to think for itself and make choices on its own which can allow someone to do anything from run the entire railway by a push of a button to allowing people to become an engineer and be given all their orders by Central Control for what their train should do for the next hour, day, week or month and for modelers having to possibly contend with other computer controlled locomotives on the rails that could be higher or lower priority on the lines.
Goals: KISS (keep it simply stupid) is primarily the first goal. A well built API will allow countless different methods to control a railway. Open Standards and Software will allow anyone to get involved to help make this better for everyone.
Why not use XXXX: There are a lot of different software and hardware options in the hobby but they are primarily non-prototypical tools to simulate some prototypical behavior and have many limitations. If we take DCC and JMRI as an example, DCC was a great idea but it's 30 years old and is often slow to accept change which can sometimes be more in favor of what people making money want rather than what an individual modeler wants. Using DCC over wireless connections is limited and provides no method of sending location data back in a wireless controlled railway. DCC also lacks any method of locating a train to millimeters without very expensive equipment that needs regular calibration which takes fun out of being able to 'just run a train'. JMRI was built around dcc to help make some functions of modeling easier but as Arail is to take a whole new approach to a railway, a new foundation that's not surrounded with 30+ years fixes and patches it is a more optimal choice to start fresh (however Arail-Loco would support operation from a JMRI system).
Software in Arail: Software will consist of a software "client" (Arail-Loco) that runs on a mini computer of each locomotive (or a trailing car) and other Arail-Server applications that send commants to a locomotive.
Arail-Client:
Arail-Loco: This client software waits for a connection from a controlling piece of software and controls the physical hardware in the locomotive. XML can be sent containing more basic commands like: or 1 to other TBD instructions of how to reduce speed based on more realistic details such as slope at the current section of track and the number or types of cars (loaded vs unloaded coal cars) and so on. This will allow someone to use either a phone, tablet or JMRI to control a single train and also for more sophisticated server software (Arail-AIControl) to manage an entire railway if desired.
Arail-Servers:
Arail-ControlTest: This will be Arail-Test which will be a simple server that sends commands to a locomotiveHardware to run a short test of all available features of the locomotive or consist.
Arail-ControlBasic: This will be a non AI server controller that will run all desired trains on a railway and keep them from colliding but will not support any AI or more advanced layout functions (This will be used to create a server that exposes design flaws while allowing for me to enjoy the railway until I can develop a very complex server to do amazing things). This Arail server will work for the majority of modelers who 'just want to see their trains run' and want multiple trains running themselves at once including sharing mainlines, going different directions, and so on but aren't as interested in very realistic operation, time schedules, or don't want to spend any time "configuring" software other than measuring the distance from a sensor (ie: rfid sensor) to the front of the train and to the back of the train. In this server you can also take control of a locomotive and watch all the other trains either avoid your train or require you to avoid others depending on what operation mode you're in (obviously Arail-ControlBasic will make it hopefully impossible for any track to collide unless you _try_ to rundown another slower (ax in max speed) train that's fleeing to a siding or another line)
Arail-ControlAI: This likely be a full re-write of Arail-AutoBasic that you can configure things like "coal loading plant at X position in the track", configure what cars are in your consist so it simulates loading all coal cars, where passenger terminals are and how often you want trains to stop at them, and so on and press "go" and watch the railway learn how to possibly operate your particular railway to whatever goal is. Imagine deciding what trains you want to run that day, what time schedules you know are tough to make, and then adding a massive through consist of a coal load at the busiest "time of the day". I should note that 100% realism isn't the goal or even a realistic possibility but working towards it is a new area modelers haven't been able to do with multiple moving trains and one person before.
Software:
Licensing: First, the code will be OSS (Open Source Software) and released under the GPL license (GPL licensing basically makes it so everyone has a right to get it,, look at, modify and be able to talk about it, redistribute any changes they make and no company or person can take something that others wrote, in whole or part, and withhold anything they might do from everyone else either).
Language: At this point the server will be written in Perl as it can be easily changed and run on different platforms. There's a slight chance Arail-ControlAI could be C or C++ but unless performance becomes an issue I think perl/apache/mysql would provide for the fastest development and for others who can handle learning a little programming to maybe learn a new skill and do some specific things they like.
Data communication: XML/soap'ish
Hardware: Currently the first goal is to use a micro computer (simulating someone listening for commands and operating the controls on a locomotive), a wireless connection (as this is what prototypical railways use for communication), and a RFID reader (simulating the eyes of the engineer reading mile posts and knowing where he's at). IR, block detection, reed switches, and other sensors will likely not be supported because if a cheap, reliable, and simple method can be found to do everything we need, then by following the KISS mantra, adding support for other complex sensors that offer less data wouldn't make supporting and maintaining the project as easy or fun for us as we'd rather be outside running the railroad than inside sitting at a computer writing code.
Location Hardware: I've purchased several $10-$15RFID readers from ebay and actually have had better than expected results so I have no douvt RFID will be the key choice for tracking consists.
Mini Computer: Raspberry-pi is currently the best choice. For $25 you get a 700mhz 128MB computer with 2 usb slots and it uses about 1Watt of power. If it has the ability to run a full OS and Desktop + DVD videos it's more than enough for what we'd need on board a loco (or trailing car)
Motor Control: TBD Maybe Gertboard, Teensy, or a USB servo controller and a car or boat ESC? (This would provide a 5VBEC we'd need to run the raspberry-pi but I've not found 5 cell ESC's for trains that are under $50. Thoughts?
Lighting: Gertboard, pic, usb controller+servo relay? Or something else, Thoughts?
Smoke: Gertboard, pic, usb controller+servo relay? Or something else. Thoughts?
Sound: The raspberry-pi has stereo out. Since trains are technically mono sound you could run two different types of locomotives in a single consist and get two different train sounds.
Well, that's it for now...
Mentality: The more prototypical a railroad is the more interesting it would be to some modelers. Prototypical railroads often operate quite differently (in terms of hardware) than what a sophisticated model railway does but with recent advances in micro computers it is now possible to have railway that can know down to an eighth of an inch where every train is at every moment and for it to think for itself and make choices on its own which can allow someone to do anything from run the entire railway by a push of a button to allowing people to become an engineer and be given all their orders by Central Control for what their train should do for the next hour, day, week or month and for modelers having to possibly contend with other computer controlled locomotives on the rails that could be higher or lower priority on the lines.
Goals: KISS (keep it simply stupid) is primarily the first goal. A well built API will allow countless different methods to control a railway. Open Standards and Software will allow anyone to get involved to help make this better for everyone.
Why not use XXXX: There are a lot of different software and hardware options in the hobby but they are primarily non-prototypical tools to simulate some prototypical behavior and have many limitations. If we take DCC and JMRI as an example, DCC was a great idea but it's 30 years old and is often slow to accept change which can sometimes be more in favor of what people making money want rather than what an individual modeler wants. Using DCC over wireless connections is limited and provides no method of sending location data back in a wireless controlled railway. DCC also lacks any method of locating a train to millimeters without very expensive equipment that needs regular calibration which takes fun out of being able to 'just run a train'. JMRI was built around dcc to help make some functions of modeling easier but as Arail is to take a whole new approach to a railway, a new foundation that's not surrounded with 30+ years fixes and patches it is a more optimal choice to start fresh (however Arail-Loco would support operation from a JMRI system).
Software in Arail: Software will consist of a software "client" (Arail-Loco) that runs on a mini computer of each locomotive (or a trailing car) and other Arail-Server applications that send commants to a locomotive.
Arail-Client:
Arail-Loco: This client software waits for a connection from a controlling piece of software and controls the physical hardware in the locomotive. XML can be sent containing more basic commands like: or 1 to other TBD instructions of how to reduce speed based on more realistic details such as slope at the current section of track and the number or types of cars (loaded vs unloaded coal cars) and so on. This will allow someone to use either a phone, tablet or JMRI to control a single train and also for more sophisticated server software (Arail-AIControl) to manage an entire railway if desired.
Arail-Servers:
Arail-ControlTest: This will be Arail-Test which will be a simple server that sends commands to a locomotiveHardware to run a short test of all available features of the locomotive or consist.
Arail-ControlBasic: This will be a non AI server controller that will run all desired trains on a railway and keep them from colliding but will not support any AI or more advanced layout functions (This will be used to create a server that exposes design flaws while allowing for me to enjoy the railway until I can develop a very complex server to do amazing things). This Arail server will work for the majority of modelers who 'just want to see their trains run' and want multiple trains running themselves at once including sharing mainlines, going different directions, and so on but aren't as interested in very realistic operation, time schedules, or don't want to spend any time "configuring" software other than measuring the distance from a sensor (ie: rfid sensor) to the front of the train and to the back of the train. In this server you can also take control of a locomotive and watch all the other trains either avoid your train or require you to avoid others depending on what operation mode you're in (obviously Arail-ControlBasic will make it hopefully impossible for any track to collide unless you _try_ to rundown another slower (ax in max speed) train that's fleeing to a siding or another line)
Arail-ControlAI: This likely be a full re-write of Arail-AutoBasic that you can configure things like "coal loading plant at X position in the track", configure what cars are in your consist so it simulates loading all coal cars, where passenger terminals are and how often you want trains to stop at them, and so on and press "go" and watch the railway learn how to possibly operate your particular railway to whatever goal is. Imagine deciding what trains you want to run that day, what time schedules you know are tough to make, and then adding a massive through consist of a coal load at the busiest "time of the day". I should note that 100% realism isn't the goal or even a realistic possibility but working towards it is a new area modelers haven't been able to do with multiple moving trains and one person before.
Software:
Licensing: First, the code will be OSS (Open Source Software) and released under the GPL license (GPL licensing basically makes it so everyone has a right to get it,, look at, modify and be able to talk about it, redistribute any changes they make and no company or person can take something that others wrote, in whole or part, and withhold anything they might do from everyone else either).
Language: At this point the server will be written in Perl as it can be easily changed and run on different platforms. There's a slight chance Arail-ControlAI could be C or C++ but unless performance becomes an issue I think perl/apache/mysql would provide for the fastest development and for others who can handle learning a little programming to maybe learn a new skill and do some specific things they like.
Data communication: XML/soap'ish
Hardware: Currently the first goal is to use a micro computer (simulating someone listening for commands and operating the controls on a locomotive), a wireless connection (as this is what prototypical railways use for communication), and a RFID reader (simulating the eyes of the engineer reading mile posts and knowing where he's at). IR, block detection, reed switches, and other sensors will likely not be supported because if a cheap, reliable, and simple method can be found to do everything we need, then by following the KISS mantra, adding support for other complex sensors that offer less data wouldn't make supporting and maintaining the project as easy or fun for us as we'd rather be outside running the railroad than inside sitting at a computer writing code.
Location Hardware: I've purchased several $10-$15RFID readers from ebay and actually have had better than expected results so I have no douvt RFID will be the key choice for tracking consists.
Mini Computer: Raspberry-pi is currently the best choice. For $25 you get a 700mhz 128MB computer with 2 usb slots and it uses about 1Watt of power. If it has the ability to run a full OS and Desktop + DVD videos it's more than enough for what we'd need on board a loco (or trailing car)
Motor Control: TBD Maybe Gertboard, Teensy, or a USB servo controller and a car or boat ESC? (This would provide a 5VBEC we'd need to run the raspberry-pi but I've not found 5 cell ESC's for trains that are under $50. Thoughts?
Lighting: Gertboard, pic, usb controller+servo relay? Or something else, Thoughts?
Smoke: Gertboard, pic, usb controller+servo relay? Or something else. Thoughts?
Sound: The raspberry-pi has stereo out. Since trains are technically mono sound you could run two different types of locomotives in a single consist and get two different train sounds.
Well, that's it for now...