Controlling a railroad with an mbed

rr

The word hacking got its start with model railway clubs, and the state of the art belies the current advancements in computer control and very, very small microcontrollers. [Jim] put together a great tutorial for driving model locomotives with a microcontroller, in this case an ARM-powered mbed.

Low-end model locomotives are controlled with DC, so an H-bridge and a PWM out on the mbed makes sense to drive these trains. [Jim] wired up a Pololu H-bridge driver, connected it to his mbed, and everything ran great.

Rail switches are another matter entirely. These allow trains to move from one track to another, but having them go to the left or right requires powering a fairly high current solenoid with 15 to 24 volts. For this, [Jim] used a MOSFET power control board to switch the rails and came up with a pretty neat demo that shows a small locomotive going back and forth over a single rail switch.

There is another class of model locomotive – ones with Digital Command Control. This setup is just a small decoder chip that fits inside an engine and tells the locomotive to turn on a lamp or run a motor digitally, allowing the conductor to control multiple trains on the same track.

[Jim] goes through the basics of DCC using the mbed, allowing two trains to switch positions in a rail yard using computer control. It’s really cool stuff that leaves us wanting a little more room in the basement to start building a huge computer controlled model railway.

Continue reading “Controlling a railroad with an mbed”

Preserving locomotives with 3D laser scanning and 3D printing

loco

[Chris Thorpe] is a model railroading aficionado, and from his earliest memories he was infatuated with the narrow gauge locomotives that plied their odd steel tracks in northern Wales. Of course [Chris] went on to create model railroads, but kit manufacturers such as Airfix and Hornby didn’t take much interest in the small strange trains of the Ffestiniog railway.

The days where manufacturing plastic models meant paying tens of thousands of dollars in tooling for injection molds are slowly coming to an end thanks to 3D printing, so [Chris] thought it would be a great idea to create his own models of these small locomotives with 3D laser scanners and high quality 3D printers.

[Chris] started a kickstarter to fund a 3D laser scanning expedition to the workshop where the four oldest locomotives of the Ffestiniog railway were being reconditioned for their 150th anniversary. The 3D printed models he’s able to produce with his data have amazing quality; with a bit of paint and a few bits of brass, these models would fit right in to any model railway.

Even better than providing scale narrow gauge engines to model railway enthusiasts around the world is the fact that [Chris] has demonstrated the feasibility of using modern technology to recreate both famous and underappreciated technological relics in plastic for future generations. There’s a lot that can be done with a laser scanner in a railway or air museum or [Jay Leno]‘s garage, so we’d love to see more 3D printed models of engineering achievements make their way onto Kickstarter.

Router controlling choo-choos over the CAN bus

 

This setup is used to control a model railroad. Well, not entirely this setup. [Gerhard Bertelsmann] already has a proper railroad controller, and it just happens to offer CAN bus communications. He’s using OpenWRT and a cheap router to connect the bus to the network.

Originally he wanted to use a Raspberry Pi board for the project, but the incredible backorder  situation with that hardware led him to grab an old router. After loading OpenWRT he started working out how to connect a couple of ICs (MCP2515 and MCP2551) that will take care of the CAN bus communications. The hardware connections end up being pretty simple, with five data lines (and their pull-up resistors) connecting to the router’s serial header. From there it was a matter of mapping the device in software so that the hardware can be controlled over the network.

We like this example since CAN is used is a lot of other applications.