Jump to content
 

Raspberry Pi subforum?


DavidB-AU

Recommended Posts

For those not familiar with a Raspberry Pi, it is a single board computer slightly larger than a credit card, costing around £30 and designed to encourage experimentation.

 

post-6959-0-26795800-1356573509.jpg

 

The General Purpose I/O (top left) can drive all sorts of home made electronics.

 

A few members seem to have been given a Raspberry Pi for Christmas and others may already have one or be considering getting one or more!). Would it be possible to create a subforum where we can share circuits and code with model railway applications?

 

Cheers

David

Link to post
Share on other sites

Model railway applications of any technology should be suitable for a model railway forum. The small amount of discussion about model railways on the RPi forum has a fair bit of noise from people who know nothing about model railways. Detecting trains, driving signals, point motors and getting them to interlock are quite specific applications.

 

Cheers

David

Link to post
Share on other sites

Using the Raspberry Pi for MR operations seems an excellent idea. I so want to use this device, what can I do with it, how many servos can I control for points and signalling? I don't need an answer to this now but I think we have an opportunity here to start an interesting mini forum for PC Control that is sadly lacking on RMweb. No doubt somebody will come along shortly and start voicing the virtues of mERG!

 

IH

 

By the way I've still got the BBC micro in the cupboard somewhere and the "DIY Robotics & Sensors by John Billingsley" just never got round to using it for MR Control!

Link to post
Share on other sites

I could easily be persauded to Pi my railway.  If the question is how do I install XYZ on my Pi it belongs on the Pi forum.  if the question is whats the most reliable train detection system to use with a Pi - why would that not belong on here?

 

I don't have a Pi (yet).  But I do know a decent amount about linux based platforms etc.  But what I don't know is where the limits of using a Pi are with MR.  The Dutch_Master implies the Pi is not suitable for MR.

by its nature the RPi is not really suited for a model railway forum
Or was that just not for a forum?  I don't get why not on either count.  I can see logic to putting Pi questions in one place on here... ...if a few of us dabble with a Pi we can hopefully help others & each other, that works better if its all in one place...

 

I certainly want to know if a Pi is a good way to detect and interlock etc.  I haven't found anything useful on Pi's forum...

 

Calum

Link to post
Share on other sites

  • RMweb Premium

I think that all three things mentioned there deserve forums. PICs are extremely versatile and are very useful in model railways, I use and intend to use them a lot myself. An Arduino is a slightly easier to use PIC, with an easier language and most of the I/Os already soldered on for you, and a wide variety of other systems that just clip on, so probably more suited to a beginner  And then the Raspberry Pi is a full blown computer.

 

 

David, by its nature the RPi is not really suited for a model railway forum. 

 

 

 

I certainly want to know if a Pi is a good way to detect and interlock etc.  I haven't found anything useful on Pi's forum...

 

Calum

 

A Raspberry Pi most certainly is suited to a model railways forum. I've been doing some research into this for my own layout and it can run JMRI (Jave Model Railroad Interface), so you can have full computer control for your layout on this tiny thing, no more lugging laptops, or even desktops around. JMRI allows easy detection as it supports most systems that exist, and (through easy to write Java scripts) interlocking, and even automatic control. It can drive DCC trains through it's throttle software, and even act as a bridge to allow you to use iPhones, iPads and so on to drive the trains. 

 

Oh, and I WOULD advocate the virtues of MERG, being a very happy member. It provides good kits at reasonable prices that will do just about anything you can imagine. But each to there own and i have no row with those who wish to advocate Lenz, or Hornby or whatever. The point is that the software exists out there to hook most systems up to a Raspberry Pi, and then use it to control the trains, signals, points, lights ad infinitum.  

 

At the end of the day it is up to Andy, it's his forum after all, but having a sub-forum or three would allow this stuff to be found by those who want it, and ignored by those who don't. I don't thing though that we should be advocating shunting traffic away from the site just because it doesn't fit with 'traditional' model trains. The times they are a changing, and we ignore this at our peril. There are limits of course, and all topics in these forums need to be related to trains in some way, but that is easily policed by the Mods, and other users reporting off-topic stuff. 

Link to post
Share on other sites

I am afraid that to me Raspberry Pi should be served up with Cream or Custard! :sclerosis:

 

You say it is a computer, but where is the screen or keyboard, so as you can see it will be a steep learning curve for such as me, but I still think it has a place here, if there are some real benefits to be had for our models, IF we so wish. People always have the right to ignore anything on here, just as the TV has an off switch.

 

Just remember that some of us will be at a very early stage with this sort of technology, but if I can get my head round DCC (with the Laird's help), then I am open to hear a bit more about this.

 

Don't worry, I already realise that the cream won't sit well with the electronics - so I've moved on a bit. :devil:

 

Kevin

Link to post
Share on other sites

If you look at the picture provided at the top.  The yellow socket is a TV out socket - will connect to the yellow socket on your TV if you have one.  Going Clockwise - black socket is an audio connector, First metal box is USB Ports to plugin a keyboard and mouse if required (or other usb objects), Next box is an ethernet post to network the computer, front port is an HDMI post which will let you plug in to a modern TV. Small connector is a Micro USB power connector like most modern mobiles take

 

The two rows of sticky up pins let you connect sensors: thats the absolute genius part of this device.  A standard PC doesn't let you do that, so you'd spend £30 on a board to do this alone to plug into a USB port... From what I understand there may be a need to build a tiny interface to take information from say a sensor and make it readable but its probably £5 of parts and 10 minutes with a soldering iron?

 

The single row let you do something evil to the processor! So lets ignore that!

 

Yellow white and black rectangular object plugs in something video related I haven't understood and the plain black and white something camera that I also don't understand.

 

Underneath you can plug in a SD card which you can then save things to (you use this like a hard disk).

 

You could use this just like a normal PC (well I may be stretching things a little) - it has the processing power of an old Pentium II.  But you can have a monitor, keyboard mouse etc.  OR you can run it 'headless' and remote into it (terminal screen like 'the old days') from another computer (or ipad, phone etc.)  or more likely what I''d want to do is have it run a minature web server and connect to that to control things.   Its ABSOLUTELY tiny.  And rediculourly cheap.  Cheaper than a DC Loco!

 

Its not clear whats controlled by what on this video... http://www.youtube.com/watch?v=VdGRsR1m2Oo  If he describes it right you can have 16 sensors feeding up to 8 of those little breadboards, thats 128 different inputs.  Need more?  I guess you'd be able to have two Pis and get them to network!  Getting the info in may be easy (sense a train [i'd use IR not magnets] the harder bit is maybe sending something back out that the train world understands.  You could send things out to a DCC controller but four colour light signals?  This is why a discussion section would be useful as there will be people trying to devise the best way to message that out and then process that into the 'right' colours.  It would be wasteful to use a seperate pin on the GPIO for each light colour, so I guess reversing the principle of the little breadboard is needed...

Link to post
Share on other sites

The Raspbery Pi does offer an awful lot of the things that you need for a PC on a layout at a ridiculously cheap price and in a tiny no frills low power package. It is vital that it is discussed on forums such as this in order for people to realise just what a capable and useful device it is, almost appears that it was designed specifically for the model railway enthusiast. It has networking so you can control your layout with a phone, and USB so can talk to your DCC system to control routing, signalling and automation using off the shelf (and free) software, it has a HDMI screen port to run your train sequence display, and you just plug a keyboard and screen in when you want to program it.

 

Even if there is no sub forum there should be room for a few threads discussing how people are using it - there is no Raspberry Pi Inc. going to advertise on prime time telly telling us how good it is for us, and no Raspberry shop in the high street to see it working.

 

Even if you only use it for one of those things I have listed above it is a real bargain. Buy ten and it is still cheaper than a laptop.

Link to post
Share on other sites

I am interested in using whatever modern technology is available and appropriate to improve my model railway layout, but I am a model maker not a computer enthusiast.

 

So I don't want to have to learn about programming computers, etc. I see no point in using a phone to control locomotives (what's the point, other than proving it can be done/how well you understand the technology) but I can see the value of easily accessible, value for money, hardware and easily downloaded software for specific activities. I did join MERG for a period, but found that I didn't understand 90% of the Newsletter, nor have a use for most of the technology they have developed. I don't have the same difficulty with my membership of the EMGS or the Scalefour Society, clearly a case of horses for courses.

 

So any such sub forum would have to recognise that there are people like me who recognise our own limitations/knowledge and include them in it's discussions, or else it'll be a forum solely for a small, select, group of specialists.

 

Jol

Link to post
Share on other sites

  • RMweb Gold

I do intend to run my layout via PI in the long term but face a steep learning curve to get there. I personally would love a sub forum to allow me to ask questions and absorb other peoples successes (and lessons learned...).

Link to post
Share on other sites

Using the Raspberry Pi for MR operations seems an excellent idea. I so want to use this device, what can I do with it, how many servos can I control for points and signalling? I don't need an answer to this now but I think we have an opportunity here to start an interesting mini forum for PC Control that is sadly lacking on RMweb. No doubt somebody will come along shortly and start voicing the virtues of mERG!

Certainly, most, if not all of these things are already well described and documented within MERG, as the obvious special interest group for this subject. A Raspberry Pi on its own won't do much for you apart from provide a human interface. A knowledge of various interfacing techniques is required to do anything particularly useful with a device like this.

Previous attempts to cover fundamental electronic technical matters like this on RMWeb (and others) have been decried as being over the heads of the vast majority of readers. Unfortunately there are no real short cuts to overcome this, only perseverance and willingness to learn a bit about the subject.

By the way I've still got the BBC micro in the cupboard somewhere and the "DIY Robotics & Sensors by John Billingsley" just never got round to using it for MR Control!

So have I, and I did (though not using that book). In 1986 I produced my own shift register interface for the Model B User Port, whose principles are still in use to this day in several MERG items. This was in readiness for exhibition on our club layout 'High Gill' at IMREX '86 in the Royal Horticultural Halls. Eventually, we used the Light Pen interface for route selection as well.

A few years ago I unearthed the BBC Model B and used its serial interface to control a DCC system, just to prove to myself (and others) that it could be done.

Link to post
Share on other sites

I still have several BBC B's in my loft. Ironically the Raspberry Pi has been touted as THE new BBC in terms of programming education for schools. Like the BBC, I think the I/O on the Pi also looks limited. I remember with the BBC user port you got half of a R6522 to play with, so unless you were good at multiplexing or using the 1MHz TUBE bus you were limited. I think the Pi may have similar limitations where the GUI is good, but you need to be a wiz at serial comms or ethernet to connect additional devices such as Arduino's to it to gain plenty of I/O.

Link to post
Share on other sites

  • RMweb Premium

To me this is no different to building a loco' from a white metal kit and getting it up to a fully finished working model. The skills sets required are different, but the level of learning, for me, is comparable. Whether a separate sub-forum or just a thread is required is debatable, personally any coverage of it is useful. Threads can always be revived.

 

Rob 

Link to post
Share on other sites

Move in to the noughties and you have USB for IO (as found on any PC and the R-pi). You can buy off the shelf interface modules with USB interface that you can communicate with without having to know anything about how USB works and they all just plug together with USB hubs and standard USB cables. IO is not limited on the R-pi unless you are trying to do things the old fashioned way.

Link to post
Share on other sites

Move in to the noughties and you have USB for IO (as found on any PC and the R-pi). You can buy off the shelf interface modules with USB interface that you can communicate with without having to know anything about how USB works and they all just plug together with USB hubs and standard USB cables. IO is not limited on the R-pi unless you are trying to do things the old fashioned way.

Does the RPi have the drivers/control software to drive these USB devices in Linux?

Link to post
Share on other sites

Raspberry Pi(e) with onboard chips - WOT, NO GRAVY ?

 

12V DC man myself, lots of wires and on off switches, thats about it.

 

But I agree, the advance of technology in all aspects of life is un-stopable, and nor would I want to either. Certainly would be an interesting sub topic to have an occasional look-see for myself.

 

Brit15

Link to post
Share on other sites

So I don't want to have to learn about programming computers, etc. I see no point in using a phone to control locomotives (what's the point, other than proving it can be done/how well you understand the technology) but I can see the value of easily accessible, value for money, hardware and easily downloaded software for specific activities.

You might not need to learn to programme.  If one of us created a decent version of a Pi that controlled things well we could simply copy the SD card and you plug it into your machine.  Yes - you might need to 'programme' your turnouts signals etc - but no different to what might be needed on DCC.

 

Phone -  it means for zero cost (assuming you have a smart phone) you can add a second, third, fourth or fifth controller.  For some that will be of no interest.  I can see my son and I both wanting to control when he's old enough... would rather not spend another £100+ on a second controller...

 

I still have several BBC B's in my loft. Ironically the Raspberry Pi has been touted as THE new BBC in terms of programming education for schools. Like the BBC, I think the I/O on the Pi also looks limited. I remember with the BBC user port you got half of a R6522 to play with, so unless you were good at multiplexing or using the 1MHz TUBE bus you were limited. I think the Pi may have similar limitations where the GUI is good, but you need to be a wiz at serial comms or ethernet to connect additional devices such as Arduino's to it to gain plenty of I/O.

 

The GPIO is not as limitted as the BBC stuff.  While everyone compares it to the BBC - its FAR more powerfull than a beeb.  And since its got USB you have the freedom to do whatever you might want... This is a proper computer - as powerful as an ipad, far more configurable than an ipad.  The concept is to get people programming and thinking about functionality not pretty design stuff.  Plenty of people out there building pretty websites etc, but far fewer who could create a small robot to do something.  I can think of half a dozen robotic projects I'd like to achieve at work given half a chance!  The technology has always been too complex and too expensive to do it till now.  If I did it with a Pi it'd probably be proof of concept for someone to then turn into a full on robot.

 

Does the RPi have the drivers/control software to drive these USB devices in Linux?

 

Depends on the device.  libusb in python will let you do a lot to control a USB device.  BUT you need to have  the data in a meaningful format... and some devices don't have chipsets that are readable on linux because the developers of the device have not released the code...  This again becomes where it matters to know what works and doesn't - so if someone has something working out of the box sharing it on here would help others be reassured they don't need a tin opener and a mallat to get it to work...

 

BTW does anyone else of a certain age feel like this is a new era of ZX81, and what goes around comes around?

 

Still got my ZXs.. ..again the idea is to get people understanding how puters work rather than just using them for the output.  BUT you don't need to understand if you don't want to.  Whats more this is exponentially more powerful than a ZX81!  Plus there will be no silver printer and no cassette tapes!  You can control at command line level or at a Graphic Interface Level - i think this is what makes it 100% different from the ZX and BBC world where you were confined to the command line to do most things...

Link to post
Share on other sites

Does the RPi have enough oomph to run the new Hornby e-Link, I wonder? :dontknow:

Depends what you mean by power?  Processing power - not an issue. 

 

the e-Link connects a layout to RailMaster which is windows software.  Windows needs an intel based processor (ix86) and a Pi doesn't have that it has a broadcom processor.  So you can't run RailMaster on a Pi. 

 

Not clear if any other software (JMRI?) can talk to the e-Link?  If it can the next question is can that software work on a Pi (JMRI apparently will) and then can the e-Link be read on the USB interface.  That wont be a power issue - just a 'driver' issue. 

 

If I was chosing I'd chose JMRI with a SPROG - but people who enter as newbies may well get an eLink as part of a kit...

Link to post
Share on other sites

Depends what you mean by power?  Processing power - not an issue. 

 

the e-Link connects a layout to RailMaster which is windows software.  Windows needs an intel based processor (ix86) and a Pi doesn't have that it has a broadcom processor.  So you can't run RailMaster on a Pi. 

 

Not clear if any other software (JMRI?) can talk to the e-Link?  If it can the next question is can that software work on a Pi (JMRI apparently will) and then can the e-Link be read on the USB interface.  That wont be a power issue - just a 'driver' issue. 

 

If I was chosing I'd chose JMRI with a SPROG - but people who enter as newbies may well get an eLink as part of a kit...

Processing power was what I was getting at. Could RailMaster maybe run on a Pi under a Windows emulator?

It's thinking out loud for me just now, I have an old PC that could do the job perfectly well. But the small size of the Pi would make it a very attractive alternative...

Link to post
Share on other sites

Processing power was what I was getting at. Could RailMaster maybe run on a Pi under a Windows emulator?

It's thinking out loud for me just now, I have an old PC that could do the job perfectly well. But the small size of the Pi would make it a very attractive alternative...

Sadly not.  Wine is the standard linux windows "emulator" but you can't use it to emulate on anything other than an ix86 based machine. 

 

Now cue the techies who will point out Wine is not an emulator (wine=wine is no emulator!)   It doesn't translate every processor action like a true emulator would.  Not aware of a true windows emulator...  I think the closest you'd get would be to use a Pi as a terminal for a virtual machine with the VM running windows on a different machine which defeats the purpose!

Link to post
Share on other sites

Most of the USB I/O devices are based on FTDI USB interface modules (including FTDI's own R-pi targeted I/O module) so the drivers are already there.

 

All the write-ups I have seen indicate that the new Hornby system is an Elite without the screen and controls so it should be supported from day one in JMRI being an ExpressNet based system.

 

It really should be quite easy for anyone to put a system together once there is enough collective knowledge to create an SD card image that can be downloaded. The collective knowledge will be gained in a forum like this with the people who will be using the system rather than a R-pi forum where the knowledge will be on the whole abstract. The R-pi is just a tool, a component of the system and not an entity.

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...