5 ms·
Raspberry Pi Model Railway Automation
- vba 7y agoBit off-topic but my friend uni’s RTOS course was all about train scheduling, which seems like a fun way to teach it (not sure if it was Hornby 00 Gauge like this)
- ink_13 7y agoSounds like the infamous Trains of CS452 at the University of Waterloo. There's a class the ruins people; it seems they do nothing but live in a lab for three months. They walk away having written a bare-metal real-time operating system, so I guess that's something. I stuck to the less soul-destroying classes.
- MisterTea 7y agoSoul destroying? Learning to write a bare metal RTOS that controls a model railway sounds hella fun.
- karlding 7y agoIf you're interested in reading more, there's a student's write-up of the course here: * Impressions [0] * Optimizing The Kernel [1] * The 72-hour bug [2] * Train Tracking [3] Notably, QNX started as a CS 452 project. I'm not too sure about the future of that course. The last I heard (Winter 2019), the professor, Bill Cowan, had decided to stop teaching. Last term, they were clearing out the CS 452 lab and were moving the trains elsewhere. I had wanted to take the course then, but unfortunately the course wasn't being offered, and it was my last term before graduating. [0] https://www.taylorpetrick.com/blog/post/cs452-impressions https://www.taylorpetrick.com/blog/post/cs452-impressions [1] https://www.taylorpetrick.com/blog/post/cs452-optimization https://www.taylorpetrick.com/blog/post/cs452-optimization [2] https://www.taylorpetrick.com/blog/post/cs452-72-hour-bug https://www.taylorpetrick.com/blog/post/cs452-72-hour-bug [3] https://www.taylorpetrick.com/blog/post/cs452-train-tracking https://www.taylorpetrick.com/blog/post/cs452-train-tracking
- elsurudo 7y agoThanks for these links. As a UW CS alum who didn't take the CS452 and now regrets it a little bit, this was fascinating reading – especially when he gets to the modelling aspects (last link).
- trayced 7y agoI took the course in 2018 and can say it was my favourite CS course I've taken. It's considered "soul destroying", not because it's hard or not fun but because of the sheer amount of hours you have to spend in the lab. Unless you're experienced in the domain or really smart (neither for me), you're probably spending many many hours in the lab almost everyday if you're trying to do well in the course. For me personally, I wouldn't say it was soul destroying and I'd say the skills you learn from the course are invaluable.
- benj111 7y agoThere seems to be a nexus between model trains and computing [1]. I get that one can be seen as a simplified model of the other, but can anyone expand further on the attraction? [1] https://en.m.wikipedia.org/wiki/Tech_Model_Railroad_Club https://en.m.wikipedia.org/wiki/Tech_Model_Railroad_Club
- mopsi 7y ago> I get that one can be seen as a simplified model of the other, but can anyone expand further on the attraction? Program errors are much more fun with trains. :)
- anticensor 7y agoBecause logic errors are no longer simple "restart and try again" incidents, instead leading to derailments or head-on collisions.
- trollied 7y agoSome of the trains you can buy now are amazing. I pass the physical presence of this place frequently https://railsofsheffield.com/ https://railsofsheffield.com/ & their window displays make me drool. I guess my loft is going to be repurposed when I retire :)
- Zenst 7y agoI remember that company, much airtime in the TV show https://www.bbc.co.uk/programmes/m00037sz https://www.bbc.co.uk/programmes/m00037sz which was focused upon Hornby and most insightful. Rails had there own design of train coming out for some model that was a gap in the market, whilst Hornby was secretly working on their own version and both came to market around the same time. Might of been in part one, but if you're even remotely into model trains or just a passing fascination into them, well worth a watch. But a most enjoyable documentary and a style that will fit even the non-train buffs abound.
- trollied 7y agoThanks for the tip - i’ll definitely try and find that show
- lizknope 7y agoThe host is James May of Top Gear and The Grand Tour. He does a lot of quirky documentaries for the BBC like "Big Trouble in Model Britain." It's two episodes and pretty interesting and I have minimal interest in model trains.
- jaxbot 7y agoI regret, though should be grateful, that I live in a space too small to fit my own model railroad setup. Been thinking about building an El onto the crowning for a while, though.
- bane 7y agoSomebody should work on proving that train systems are turing complete. That way we can compute with rails.
- applecrazy 7y agoDon’t have links, but people have done it in Transport Tycoon Deluxe.
- eat_veggies 7y agohttp://www.cr31.co.uk/stagecast/trains/tt3_ham.html http://www.cr31.co.uk/stagecast/trains/tt3_ham.html http://www.monochrom.at/turingtrainterminal/Chalcraft.pdf http://www.monochrom.at/turingtrainterminal/Chalcraft.pdf
- billfruit 7y agoIf anyone curious about railway modelling, I think, the game "Rolling Line" is an interesting simulation of it, including VR support, it is available in Steam. https://youtu.be/UjfsRfxOtU8 https://youtu.be/UjfsRfxOtU8
- Sinergy2 7y agoMay I suggest more than one magnet per train to differentiate them. Simplest way: number of magnets corresponds to train ID. Small space between magnets (calculated from Hall sensor refresh rate and max train speed). Count number of Hall sensor trips (maybe with debounce) within some time period (calculated from the minimum train speed during crossing and the magnet spacing). Disadvantage: Train minimum speed must be reasonable. Requires n(n+1)/2 magnets, or 36 for 8 trains. More reliable way: two columns of magnets, slightly offset, spaced as above. Two Hall sensors in a row under the track. Col 1 is clock. Col 2 is data. Whenever Hall 1 (clock) goes high, read Hall 2 (data) (maybe for a short period for debounce). To keep things simple and stay away from speed assumptions, put the same number of clock magnets on all trains: log2(train count), rounded up, for example 4 for 16 trains. Disadvantage: Requires twice as many Hall sensors. Requires about log2(N)1.5 magnets per train, so 96 magnets for 16 trains, as opposed to 16 for the original method. Those tiny neodymium magnet bars are cheap, though. BONUS: Train speed measurement. Speed is the clock magnet spacing divided by time between clock Hall trips. Now you can run a Pi algorithm (e.g. PID) to move trains at a target speed regardless of load, at least in the regions with Hall sensors. If you are willing to assume the train speed is constant while passing the sensors and do more complex signal analysis on the Pi, the intermediate clock magnets can be removed, reducing the magnet count to N(2 + log2(N)0.5)=64.
- MisterTea 7y agoSimilar to an old conveyor system on an Eshed Robotech system. There were 5 bits for each carriage encoded using magnets which rode the conveyor giving you 32 addresses. As the carriage passed into a station a pneumatic cylinder extended to trap it so it would stop above the sensors. If that carriage was to be processed at that station it would be picked off by a robot and placed in a dock.
- cweagans 7y agoIf you wanted to avoid the clock thing, you could probably do something like this. Have two rows of sensors set up like this: * * * * * * * * * * When both of the second row of sensors are high, read an 8 bit binary number from the first row of sensors. This allows you to have up to 255 different IDs with 10 magnets per train. First row is data, second row is alignment. Fast moving trains might have issues with this kind of setup though.
- craz8 7y agoThere was a model railway show in London in the mid 70s that my grandfather took me to. The least decorated layout there was the most interesting, as it was computer controlled. Even better, a small child could program it by writing instructions on paper and handing them to the controller who then put them into the computer For a 10 year old, this was magical! This may have triggered my interest in computers