Posts: 14
Joined: Mon Nov 28, 2011 10:49 pm

Re: Model railroad control system

Mon Nov 28, 2011 11:30 pm

Just thought I'd mention that I'll be using r-pi for an automated railway. My unique goal is I'll be using wifi and rfid readers on battery trailing cars with rfid tags placed under the track ties every foot so I can operate 7+ G scale locos at once with just 2 mainlines and have the railway fully automated. I'll also be doing some AI so I can sit back and watch the software learn how to operate a railway which I believe I'll find quite amusing.

I've solved:
Sound: Using openBVE sounds and a perl program to loop and play sounds and will use the audio jack on r-pi to play (might need a small speaker amp but I have yet to test what I can get from some basic computer speakers) - milliwatt use unknown
RFID: I've had 100% success in some test runs for hours using two different $10 rfid readers from ebay and some water resistent/proof keyfob rfid tags under the ties. - Uses 93ma on read and about 50ma on idle.

Still needing to solve 3 items:
1) Way to control motor (Been looking for pwm controllers and at usb servo controllers to go with a 4-5cell boat (and car) esc's that have a 5v BEC of 2amps)
2) Way to control front, back, cab, ditch, and aux lights on locos (all independently would be ideal)
3) Good range & low wattage wifi dongle.

Big plus is if someone made a usb pic or other controller that could do a motor at 15amp to around 18v-24v and had relays of sorts that could do up to 1-2amps since many of my locos use the normal bulbs and not led's and most relays on pics and so on are usually about 50ma is all), and if I want 5 locos in a consist that adds up on amps of those tiny bulbs. I've been looking but found nothing that's an 'all in one' solution for motor and lighting. I already know I have to use a usb hub for 3+ usb devices so even if there's a good usb motor controller and a separate good usb controller for doing lighting that would work, but I've been working on rfid and sound before I've solved the motor/lighting issueI

I have about 30 Locos, mix of everything from new to 30 years old. Newer G scale loco use 2-3amps @ 18v and older ones are .8-1.5amps @ 18v. I'll also run 2-3 loco consists regularly so at stall this could pull 30+ amps... Ouch. I think I'd likely just fuse @ 15amp so if they ever stalled it would hit the fuse and I'd walk over and investigate why it stopped and be able to solve the loco problem right there since locos should never stall. I've pulled just under 100 cars with 5 locos @ 13amps up a 2% grade and will consider that my 'max' possible load.

Anyway, here's a threat with what I'm doing if anyone wants to follow as train talk mainly should be on another site and not here when it doesn't directly involve r-pi:

I'll of course make the images of anything I do available to anyone else who wants to also load it on an SD card and give it a shot.

Oh, JMRI isn't for me, I think dcc is a hack, bloated and featureless when it comes to geeky (real trains don't operate like dcc and there's a reason why) yet simple control like tracking location and simplifying running (all I have to do is know the distance from the sensor to the front and back of a consist and that's it for accuracy down to about 6". The software knows how many inches are between rfid tags and I could always add another rev counter to get slightly less reliable 1/4" accuracy if I wanted. I place the sensor over a tag and will tell the software which direction it is facing and that's it, only quirk is if I manually move trains after that, I've also though about having a 'staging' area that uses ir sensors that can detect distance to measure the train itself and all I'd have to do is built the consist in that staging area and hit "go" and I'd not have to set or do anything else in software.

Phil Spiegel
Posts: 210
Joined: Tue Jan 17, 2012 8:17 am
Contact: Website

Re: Model railroad control system

Tue Jan 17, 2012 9:16 am

Firstly: a 'former boss'; the boss of Sony said (originally in connection with the Walkman, but appliable to many of their products)... effectively that miniaturisation brought portablility and created new markets .... the RaspberryPi as a standardised 'Module' is sufficiently self-contained (with the I/O board) to provide a compact distributed set of computerised/automated functions around a layout; each at the price of a single DCC Accessory Module, or coach, and considerably less than a loco.

My long term plan, ever since the BBC Model B - when we had to decide whether a disc drive or printer @400GBP each was the more important add-on to progress - has to been to use computer-assisted operation of my railway(s) - which was already using Zero-1 for digital control back then (30 years ago). A common Early home-computer use (ZX80/81s) was to provide information displays at shows - replacing flip-over cards, etc.

I now anticipate being able to retire the RiscPCs I still have, which were planned to locate at each main station, for local timetable displays etc, as these tasks can be replaced by networked R-Pi's actually built-in to layout boards - and at a great energy saving! - running using the distributed 5V/12V supplies already bussed around the layout. [ I already have distributed LCD screens replacing the Zero-1 Micromimic Track Panel, and with video feeds of remote locations - but 'push buttons' - which could be G/0/00/H0 scale screens! are now also available with integral video displays (admittedly sdi video) - a cheaper option at present is feeding small USB-based 'key-ring' picture displays.

At the same time these could be handling the timetable/stock location database, in connection with the RFid tag readers (MERG kits) located around the layout at similar cost each.  Compared to 70GBP each for some Feedback Modules, the R-Pi could also collate the results of the Optical (in my case) block occupation detectors which are a pre-requesite of any automation/ assisted running.

As well as our main loft-based 00 layout, and garden G-scale, we have a couple of portable layouts - and try to minimise the 'clutter' that has to be taken to exhibitions.

With compact dcc control we already have no additional control panels, and minimal wiring. On-board (literally) R-Pi processors means only a screen needs to added for extra opportunities - such as displaying progress with the LGB 'Shunting Puzzle' which is operated by the visitors (children love it... adults are reluctant!)

(If anyone could help with the Roco CentralPro's USB protocol, that would be a great help!! ... or has an old Serial-based version they don't want.., as that protocol has been published)

Return to “Other projects”

Who is online

Users browsing this forum: paulie and 13 guests