Gone back to dc

Started by kevin141, January 25, 2014, 08:44:01 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

Robin2

Quote from: PostModN66 on January 28, 2014, 11:04:58 AM
I have a vague idea of what a Raspberry Pie is (!) and an Arduino, but it is not very clear.  Just for general edification could someone point me in the direction of something that spells it out for the intelligent (?) but ignorant  :dunce: layman?

Cheers  Jon  :)

While the Raspberry Pi is a full Linux computer in a very small package the Arduinos (there are various types) are microntrollers or which have limited program and RAM memory and are intended for controlling physical devices - temperature sensors, motors, lights, whatever. The Arduinos use Atmel chips rather than PICs which are a rival product made by a company called Microchip - I suspect there is little to choose between the two, but they are not interchangeable.

The essence of the Ardunio system is making microcontrollers easy to use and all the software and the hardware designs are Open Source. The Arduino Uno is the recommended starter product because it is the most "standard". To program it you need to download the Arduino IDE (programming system) onto your PC and connect the Uno to the PC with a USB cable. The Arduino IDE includes loads of simple example programs and the Arduino Forum http://forum.arduino.cc/ is a great source of almost instant advice for anything you don't understand. Beginners are especially welcome.

You can download and install the Arduino IDE without buying any Arduino hardware if you just want to study how the programs are written.

As an indication of how simple the Arduino is to program you can make a servo arm move to an angle of 63degrees with myservo.Write(63).

...R

PostModN66

Quote from: Robin2 on January 28, 2014, 05:37:07 PM
Quote from: PostModN66 on January 28, 2014, 11:04:58 AM
I have a vague idea of what a Raspberry Pie is (!) and an Arduino, but it is not very clear.  Just for general edification could someone point me in the direction of something that spells it out for the intelligent (?) but ignorant  :dunce: layman?

Cheers  Jon  :)

While the Raspberry Pi is a full Linux computer in a very small package the Arduinos (there are various types) are microntrollers or which have limited program and RAM memory and are intended for controlling physical devices - temperature sensors, motors, lights, whatever. The Arduinos use Atmel chips rather than PICs which are a rival product made by a company called Microchip - I suspect there is little to choose between the two, but they are not interchangeable.

The essence of the Ardunio system is making microcontrollers easy to use and all the software and the hardware designs are Open Source. The Arduino Uno is the recommended starter product because it is the most "standard". To program it you need to download the Arduino IDE (programming system) onto your PC and connect the Uno to the PC with a USB cable. The Arduino IDE includes loads of simple example programs and the Arduino Forum http://forum.arduino.cc/ is a great source of almost instant advice for anything you don't understand. Beginners are especially welcome.

You can download and install the Arduino IDE without buying any Arduino hardware if you just want to study how the programs are written.

As an indication of how simple the Arduino is to program you can make a servo arm move to an angle of 63degrees with myservo.Write(63).

...R

Thanks Robin,

This sounds interesting to me - and simpler than the Raspberry Pi !  Maybe I could use one for driving animated scenes on my layout.

In my youth I was a Fortran programmer - maybe that would stand me in good stead for programming the Arduino

Cheers  Jon  :)
"We must conduct research and then accept the results. If they don't stand up to experimentation, Buddha's own words must be rejected." ― Dalai Lama XIV

My Postmodern Image Layouts

Lofthole http://www.ngaugeforum.co.uk/SMFN/index.php?topic=14792.msg147178#msg147178

Deansmoor http://www.ngaugeforum.co.uk/SMFN/index.php?topic=14741.msg146381#msg146381

MikeDunn

Quote from: PostModN66 on January 28, 2014, 05:29:20 PM
What's a "wireless adapter", and why do you plug it in?
What does "connect via a browser" mean? And what are you connecting?
I have Googled a "Sprog" and it looks like it is a DCC box without the hand held bits - is this right?
A wireless adapter is a simple USB dongle that gives the device it is plugged into wireless capabilities; such as connecting to an ADSL router with wireless.  Basically it allows the RasPi to remotely link to your ADSL unit without having to have the RJ45 Ethernet cable running to it.  Think of it as like your internet phone or tablet, the way that connects to the router; with those, the adapter is built-in.

Connect via browser - basically, you point your browser of choice to the web page that the RasPi/JMRI unit is running; instead of going out to the internet for the page, it connects locally to your unit.

Sprog - it's a matchbox sized DCC controller that is "commanded" via the JMRI application.  As you say, there is no handheld, so you use your PC (or in this case, RasPi) or an internet phone (Apple or Android), or a tablet to run the loco controls.  It's a very good way of doing DCC on a budget - you just buy the Sprog, you get JMRI with it (or can d/load from the web) free, and you use your other kit (PC, Mac, phone, tablet, whichever).  Plenty of info on it on this Forum, or on the Sprog website.  It's a spin-off from MERG, but is already built.

Quote from: PostModN66 on January 28, 2014, 05:43:45 PM
This sounds interesting to me - and simpler than the Raspberry Pi !  Maybe I could use one for driving animated scenes on my layout.
Er - the Arduino (like the PIC that I am more familiar with) is a development tool; not a computer you can use straight off.  You would need to develop the hardware connectivity from the Arduino to the relevant scene(s) as well as developing the software you run them once connected ...  I wouldn't say it's simpler than the RasPi except in a technical sense - you would have to spend a lot of time understanding how to do the connectivity (I'm having just this with the PICs ::))

Quote
In my youth I was a Fortran programmer - maybe that would stand me in good stead for programming the Arduino
The RasPi uses Python as one of its languages; there are others.  You can 'break out' from the RasPi and develop hardware & software to do things; I think the Arduino can also interface with it, to become a platform the RasPi uses ?  To program a PIC (and I believe the Arduino) you write in C; it's then compiled and stored onto the unit.  While you can always re-blow them, you can't amend the programming on the fly once you've moved off the development platform.

Mike

Robin2

I use Linux all the time on my netbook (on which I am writing this) and be assured you need a great deal more expertise to get a Raspberry Pi working than an Arduino Uno. There is no operating system on an Arduino, and it can only hold one program at a time. It's the simplest form of computing, but it is still very capable.

Connecting things to an Arduino is very straightforward. It comes with sockets for making connections to all the input/output pins. And if you want to connect to (say) a motor which needs more power than an Arduino can provide there are various additional boards (called shields) that plug into the Arduino and have connections for the motor (or whatever). If you know a little about electronics you can probably replace the shields with something much cheaper.

The Arduinos are programmed in a simplified form of C++ - simplified in the sense that you don't need to bother with all the complex "housekeeping" that is usual with C/C++ programs.

...R

red_death

Quote from: Robin2 on January 28, 2014, 08:35:53 PM
I use Linux all the time on my netbook (on which I am writing this) and be assured you need a great deal more expertise to get a Raspberry Pi working than an Arduino Uno.

The Arduinos are programmed in a simplified form of C++ - simplified in the sense that you don't need to bother with all the complex "housekeeping" that is usual with C/C++ programs.

Sorry Robin, but that just isn't true, particularly given that you can follow the JMR-Pi instructions to install JMRI easily with 4 lines of commands. How much code would you need to write to get even a fraction of the functionality of JMRI onto an Arduino?



PostModN66

Thanks guys for these helpful responses.  I hope it is not annoying anyone by hi-jacking the thread!

It is definitely arousing my interest in these two devices, (though not necessarily related to DCC).  I think I am getting a fairly good idea of what the Arduino is; I can conceive of writing something in a fairly low level language (I'm imagining Fortran though I know things have moved on a bit!) and exporting it onto a simple computing device.  I am a bit more hazy about the Raspberry Pi; it seems much more difficult to understand needing to go wireless via your router and involving two different sets of software, web pages etc, multiple computing devices (the RasPi and a tablet) but nevertheless I'm better informed than I was before!

Cheers Jon  :)
"We must conduct research and then accept the results. If they don't stand up to experimentation, Buddha's own words must be rejected." ― Dalai Lama XIV

My Postmodern Image Layouts

Lofthole http://www.ngaugeforum.co.uk/SMFN/index.php?topic=14792.msg147178#msg147178

Deansmoor http://www.ngaugeforum.co.uk/SMFN/index.php?topic=14741.msg146381#msg146381

red_death

Quote from: PostModN66 on January 28, 2014, 10:36:53 PM
It is definitely arousing my interest in these two devices, (though not necessarily related to DCC).  I think I am getting a fairly good idea of what the Arduino is; I can conceive of writing something in a fairly low level language (I'm imagining Fortran though I know things have moved on a bit!) and exporting it onto a simple computing device.  I am a bit more hazy about the Raspberry Pi; it seems much more difficult to understand needing to go wireless via your router and involving two different sets of software, web pages etc, multiple computing devices (the RasPi and a tablet) but nevertheless I'm better informed than I was before!

Hi Jon

A Raspberry Pi is just a small computer which runs Linux as the operating system.  JMRI is a programme (actually a whole suite of programmes to run/configure/control a whole host of things - all entirely optional) like any other which creates the DCC instructions.  You don't need to use a tablet, wifi or browser to run JMRI on an R Pi (or any other computer), but you may find it more convenient. Apart from a computer of some kind + the free JMRI software the only extra item needed is some interface from the computer to the track - many of us use a Sprog to do this as it is cheap and very good! You then have a fully functioning DCC controller with an awful lot of functionality (if you want to use it).

Cheers, Mike






PostModN66

Quote from: red_death on January 28, 2014, 11:56:31 PM
[Hi Jon

A Raspberry Pi is just a small computer which runs Linux as the operating system. 

Cheers, Mike

Sorry in advance - way off topic - but could I use a Raspberry Pi to run PowerPoint and connect to a projector to deliver presentations?  That would be very handy for me in my working life.

Cheers  Jon  :)
"We must conduct research and then accept the results. If they don't stand up to experimentation, Buddha's own words must be rejected." ― Dalai Lama XIV

My Postmodern Image Layouts

Lofthole http://www.ngaugeforum.co.uk/SMFN/index.php?topic=14792.msg147178#msg147178

Deansmoor http://www.ngaugeforum.co.uk/SMFN/index.php?topic=14741.msg146381#msg146381

MikeDunn

Quote from: PostModN66 on January 29, 2014, 08:15:32 AM
Sorry in advance - way off topic - but could I use a Raspberry Pi to run PowerPoint and connect to a projector to deliver presentations?  That would be very handy for me in my working life.
Not PowerPoint, no - MS Office is not available in Linux.

After saying that, LibreOffice is available, and opens most (all ?) of the MS Office file formats, including PowerPoint - so yes you can run a presentation from the RasPi :D

See http://store.raspberrypi.com/projects/libreoffice for details - it's free  :beers:

kevin141

As i posted the original topic it may have strayed a little bit but what is showing what else you can do with your model railway while being at the cutting edge of the electronics quite a few posts have pointed me in a direction i had no knowledge about so keep the info coming as i am sure there are other modelers on here that have had the same thoughts and as i have said before the control you use is the one that suits your requirements until something better comes along
kevin141 :Class37:   
Good dinner

Robin2

I wrote a reply about Pi vs Arduino this morning but it seems to have vanished into the ether.

@RedDeath, you are comparing apples and oranges when you mention JMRI in the context of an Arduino. JMRI or anything like that can't run on an Arduino but can run on a Pi. However I can't figure why anyone would use a Pi for that when an old PC or laptop would be so much more convenient.

Installing JMRI on a Pi may be relatively simple - assuming you have already figured out how to load Linux onto it first. But there is so much functionality within JMRI that is is probably more complex than an Arduino even after it is installed successfuly.

I suspect if you just want to write your own software to control points and signals or to detect the position of trains that would be far easier on an Arduino.

My advice to anyone debating the choice between a Pi and an Arduino would be...

If you want to run complex software like JMRI start using it on an old PC or laptop and by a Pi later if it becomes necessary.

If you want to write your own software to control points etc. whether standalone or having an operating connection to a PC then use an Arduino Uno or Mega.

.... And I use Open Office (pretty much identical to Libre Office) all the time - it's just as good as as Microsoft Office.

...R

red_death

Errr Robin, I was replying to your strange assertion that "you need a great deal more expertise to get a Raspberry Pi working than an Arduino Uno" :confused1:

As to why use a cheap computer like an R Pi for JMRI - because you can have fully functioning DCC control system for a small cost and stick it to the layout and have a self-contained system without needing an old PC or laptop. Installing Linux on the R Pi is hardly complex and certainly much less difficult than writing C++ !



grumbeast

To bring this back to DC/DCC for a second..

DCC is awesome,  but I'm happily back with DC..


Partially funds.. As has been said before.. I have a lot of old locos

Not because of computer jiggerypokery ( I teach game programming, and yes I own a Pi). .. This has been said before, and I used a zephyr and DT400 in Canada.

It's all because...  I love all the switches and dials and just sheer simple beauty of toggle switch, make juice flow (or not) feel of it all....  I dream about one day (soon I hope!) making a lovely switchy toggly control panel to go with my lovely (straight out of the sixties soviet missile launch system looking) Morley vortrack!

There is no doubt that technically DCC is better operationally, but for me it's just not as cool, there's a lovely granularity about knowing precisely where the power is flowing on my layout as opposed to packets of power data block wishing around everywhere.  It's probably the same kind of feeling that people who prefer vintage cars over modern ones get...

Anyhow, that's my 2 cents, anyone else get a real buzz out of DC?

Graham


MikeDunn

Quote from: Robin2 on January 29, 2014, 06:00:16 PM
However I can't figure why anyone would use a Pi for that when an old PC or laptop would be so much more convenient.[/i]
And how many people happen to have an old laptop or PC lying about ?  Not that many, I would wager ...  Techies certainly, but not your average person.

Quote
Installing JMRI on a Pi may be relatively simple - assuming you have already figured out how to load Linux onto it first.
Oh, it's horrendously difficult ... as many of the sellers will also include a pre-loaded SD card  ;)  And the instructions for doing it yourself isn't that much harder - assuming you know how to unZip a file.

Quote
But there is so much functionality within JMRI that is is probably more complex than an Arduino even after it is installed successfuly.
But less functionality than that old laptop or PC you were on about  ;)  Sorry - you can't have it both ways  :D

Let's be honest - you can quickly and easily d/load a Linux variant with JMRI already deployed within it ... all you need to is extract the file and put onto the SD card, then boot it up in the RasPi.  You get a fully-working DCC application with nothing more to do than use it ...

On the Arduino (or PIC), you need to develop both the hardware and software yourself ... Now, granted, some people would rather do that (I'm working on a remote control for a DC system, as it happens, using a PIC), but most will go for the ready-made solution that the RasPi offers.

Neither are wrong ... it just depends on what floats your boat ...

Mike

Robin2

Quote from: MikeDunn link=topic=19075.msg195076#msg195076
b]Neither are wrong [/b] ... it just depends on what floats your boat ...


Which is what I was saying - it depends what you want to do with it.

But I object strongly to any suggestion that an Arduino is difficult.

...R

Please Support Us!
June Goal: £100.00
Due Date: Jun 30
Total Receipts: £20.00
Below Goal: £80.00
Site Currency: GBP
20% 
June Donations