Raspberry Pi Zero Controlling Things

John Russo

Registered
24 Sep 2015
197
21
66
PA
Best answers
0
Country flag
  • Like
Reactions: 2 users

stockers

Trains, aircraft, models, walking, beer, travel
24 Oct 2009
25,631
3,795
65
Nr. Ashford, Kent. England.
Best answers
0
Country flag
Simples, Save $4000.
But I don't see anyone using it?
 

idlemarvel

Neither idle nor a marvel
13 Jul 2015
3,136
801
Ascot
Country
Mars
Best answers
0
Country flag
That's true Alan, I guess because there's a lot of DIY presently, so currently there are pioneers doing their own thing. I can do all the things I need with DCC and Lenz, that gives me a wifi interface, a dirt cheap iPhone app and automation through Rocrail freeware (which BTW can run on Raspberry Pi), so I'm not incented to invest in another technology. That probably applies to a lot of us in different ways.

As John says it's the new generation that will run with this. It's a bit like battery power and R/C was a few years back, lots of experimentation and home grown solutions, now it's starting to become mainstream although it's still not that common to find a ready-to-run battery and R/C fitted loco. But it will come, maybe not with Raspberry Pi but with something along those lines.
 
  • Like
Reactions: 1 user

John Russo

Registered
24 Sep 2015
197
21
66
PA
Best answers
0
Country flag
Dave,

Well said.

For the general community,

I did not mean to imply that this was going to change overnight. DCC, and the current stuff will be around for a long time. Depending on one's age, it may not make sense to consider any change. I am also not wedded to Rasspberry Pi or other (e.g. Aurduino) and it is hard to say what exact technology emerges.

I just see that the low cost and high capability of the technology is going to disrupt this hobby.

I can envision a time when we will have cameras mounted in the locos and we will drive the trains as if we were in the cab. Things like that are exciting to think about.
 

Paul M

Registered
25 Oct 2016
11,909
1,698
61
Royston
Best answers
0
Country flag
Dave,

Well said.

For the general community,

I did not mean to imply that this was going to change overnight. DCC, and the current stuff will be around for a long time. Depending on one's age, it may not make sense to consider any change. I am also not wedded to Rasspberry Pi or other (e.g. Aurduino) and it is hard to say what exact technology emerges.

I just see that the low cost and high capability of the technology is going to disrupt this hobby.

I can envision a time when we will have cameras mounted in the locos and we will drive the trains as if we were in the cab. Things like that are exciting to think about.
Just think, in years to come, people will be saying "DCC"? That's worth a fortune on the antique market!
 
  • Like
Reactions: 1 user
8 Mar 2014
7,806
972
San Diego
Country
Armenia
www.elmassian.com
Best answers
0
Country flag
There's a ton of people making low cost systems with these processors, using Bluetooth, etc.

The issues come down to the throttle (can you use an app on a smart phone or do you want buttons and knobs) and to really sound and more sophisticated functions.

It's really not the hardware, you can make a cheap system already, but sound is becoming more of a standard, and fewer people want endless monotonous loops of the same sound.

It's a big jump from basic remote control (and there are already inexpensive systems) to very functional DCC systems and decoders.

Using US dollars, a Revolution system with features almost to DCC (consisting, sound, etc.) is $275 for the transmitter and sound decoder, wireless. And it's a nice LCD display with a lot of information, and buttons, etc.

Go to the simpler R/C systems, they can be had cheap, although when you add an aftermarket sound decoder, they are about the same price.

Greg
 
  • Like
Reactions: 1 user

Rowan Bravington

Registered
9 May 2017
149
172
73
Melbourne, Australia
Best answers
0
Sorry to hear of your troubles. I hope your back is on the mend.

The answer to the board in every loco is 'yes. That being said, a full size Rasperry Pi (RPi) is $35 and the size of thick credit card. The RPi-Zero is smaller and cost $10 for the WiFi version. It has the close the to same capaibility of the regular pi, but draws less power and is much smaller.

raspberry_pi_quarter.jpg


It is a shame the presented in a confusing manner. The RPi is simply a computer. It loads an operation system just like a PC and can run programs and applications. For our purpose you have direct access to the 40 pins to control sensors, motors, lights, relays, etc.

I came to the same conclusion regarding the $4,000 obsolete equipment.

I have LGB MTS III on a simple layout. I was investigation automation. Historically, I have kept everything LGB whenever I could. I did so to avoid vendor incompatibility. Over time learned of Massoth's relationship with LGB and as I investigated automation, it seem I had to start thinking about Massoth, give LGB has stopped issuing electronic products. (I realize Massoth made them for LGB)

As I investigated, I got the usual sticker shock along with low function. $100 for a simple box to connect a Rs-232 to the Dimax or LGB Bus. RS-232 is ancient. They don't even provide USB. Wireless costs $120 for a receiver and you need at least two to start and then another $120 if you add additional. The LGB wireless uses a proprietary protocol. LGB or Massoth track sensing is done with reed switches that cost $15-30 and $10 for the magnet.

In discussing this with one of my employees, I smart computer programmer, he says, "why don't you use RPi"? I thought RPi was a programming language. I start looking into it and I see this whole new world.

A full function computer for $10 that can handle many many inputs or outputs !
Hall Effect sensors for $5 with $3 magnet. (Much cheaper and more reliable than the reeds)
IP based WiFi that gives immediate access to cell phones, tablets, PCs, etc.
A full programming environment that allows for all kinds of logics, display, etc.
Radio Frequency transceivers for $5
On and on. Google "50 sensors for Raspberry Pi" and see what you get

Having said all this, I do realize there is a big difference with using commercial products that exist and fiddling with this stuff. I have no visions of being the next Massoth. I do think over time they will be greatly disrupted by this technology.

My hope is that it lowers the cost to do this stuff and attracts younger people to the hobbyy. I am 60 years old. I wonder if I will be able to pass my trains on to anyone. Kids today play video games. Trains are for old farts. Now I see a future. Kids now play with flying drones and radio controlled cars. Kids like to program computers. I can see now that a young lad or lass might have a good time playing and learning with this stuff.

If you have interest, watch the 7 or so videos this guy has. It will open your eyes. The first few are about set up. The latter ones show a simple example of what you can do with it. After that, your mind and creativity are the only limit. There is so much open information out there and so many people working with this stuff.


(Note, his videos use the full size RPi. The Zero would work the same)

This is a classic disruptive technology. Similar to steam taking over for sails or electricity taking over for steam. It will be resisted by those who are vested but in the end things will change.
After reading this I am much more comfortable... even the back pain has lessened. Thanks. I will be trolling thru the vids today.
 
  • Like
Reactions: 1 user

pugwash

impecunious pirate
Staff member
GSC Moderator
17 Nov 2009
21,170
1,819
61
Luxembourg
Best answers
0
Country flag
I just see that the low cost and high capability of the technology is going to disrupt this hobby.
It already has to other hobbies, one of mine is photography and you really can't compare todays products to those of ten years ago. Today seems to be point, press and let the machine work everything out, when I started everything was knowledge of the photographer and even today guess who gets the best results.
 
  • Like
Reactions: 4 users

Fred2179G

Registered
20 Apr 2017
1,060
186
USA
Best answers
0
Country flag
John, as Greg says, there are several guys experimenting with similar systems over this side of the pond. Dave Bodnar has a website with all kinds of projects
http://www.trainelectronics.com/
His latest is using a wireless charger to power a moving object, like a marquee sign.

Martin Sant has posted (on LSC) lots of interesting stuff, and there's a guy (Eric?) who has reverse-engineered the airwire system
 

Railway42

LGB, Radio Control Model Boat, Electronics
28 Feb 2013
430
48
Cheddar
Best answers
0
Country flag
I have been using them since the first addition the Zero is OK but a bit slow for sum programs. Raspberry Pi 3 is the latest and very fast. To use it you need to learn Python or just copy a program if you can find one for your use.
I am on Voice control so its a Pi 3. Take a look at http://www.explainingcomputers.com
 

Dave Ottney

Registered
24 Oct 2009
51
1
upstate NY
Best answers
0
Country flag
I'm just going to toss this in to muddy the waters even more. The Pi is the computer, ok we have that. Here are some links to DCC++ information.

https://sites.google.com/site/dccppsite/
http://www.trainboard.com/highball/...-open-source-dcc-station-and-interface.84800/

DCC++ is an Ardunio based system that is pretty much a full blown DCC system with components costing around $25-30 (that's like 20-25 British pounds I think). The software is free. This has been driven by a variety of computers, including the PI, running JMRI software. If you have wifi you can connect with a mobile phone to the computer running JMRI which is connected to the Arduino DCC++ system and voila, you're running trains. Of course you need decoders in the locomotives.

I built a system on a whim to see how well it works. I've run it connected to a Windows 10 computer and to a Linux computer and it works great. Its not at all difficult to do.

Just thought you might like something to read on a cold winter's night (ahh it summer in Austalia, so a warm night).
Dave
 
Last edited:
  • Like
Reactions: 1 user
D

Deleted member 4232

Guest
Moved
 
Last edited by a moderator:

dunnyrail

DOGS, Garden Railways, Steam Trains, Jive Dancing,
Staff member
GSC Moderator
25 Oct 2009
26,206
4,997
75
St.Neots Cambridgeshire UK
Best answers
0
Country flag
I can envision a time when we will have cameras mounted in the locos and we will drive the trains as if we were in the cab. Things like that are exciting to think about.
That is and can already be done. There is a 00 Tram Layout with a Rptram that has a Camera at each end with the Tram being driven from a PC Monitor and Controller. Playmobil do a Train Camera and Monitor as well.

But the point is well taken about RPi, set up and Programming may be beyond many of us on here but it is great that you are informing us and there is clearly a good supportive and helping community out there.

Programming anything is pretty well Witchcraft to me, I was in the Computer Industry but that was not my expertise. Some can program some cant. That would leave me very challenged with this tech.

But who knows if some guys on here come up with projects that I may find a use for I could certainly do all the hook up of hardware and plagiarise someone elses code.

Keep up the good work.
 

Rowan Bravington

Registered
9 May 2017
149
172
73
Melbourne, Australia
Best answers
0
  • Like
Reactions: 1 user

GAP

G Scale Trains, HO Trains, 1:1 Sugar Cane trains
14 Jun 2011
4,061
947
Bundaberg Queensland, Australia
Country
Australia
ringbalin-light-railway.blogspot.com
Best answers
0
Country flag
Dave,

Well said.

For the general community,

I did not mean to imply that this was going to change overnight. DCC, and the current stuff will be around for a long time. Depending on one's age, it may not make sense to consider any change. I am also not wedded to Rasspberry Pi or other (e.g. Aurduino) and it is hard to say what exact technology emerges.

I just see that the low cost and high capability of the technology is going to disrupt this hobby.

I can envision a time when we will have cameras mounted in the locos and we will drive the trains as if we were in the cab. Things like that are exciting to think about.

DC has been around since the beginning of the 20th Century if not earlier and endures and will for the foreseeable future.

DCC was the next evolution and will be around, like DC, I feel till way after the end of my lifetime.

As for cameras in trains that exists already I saw that demonstrated about 15 years ago in a HO loco transmitting to a laptop.

The drive the trains as if in the cab, well that technology already exists; from what I have heard after talking to the model aircraft crowd at work there is a thing called "First Person View" (FPV). Evidently it uses cameras transmitters etc and and goggles apparently you get a view as if you are flying the plane there is also info on battery level and heaps of other telemetry. Think it is rather expensive but if you had the coin I can't see why it could not be put into a train, as I have said before battery R/C trains are the same as aircraft they just don't get to high in the air much.

At the end of the day no matter what technology we cling to, be it DC, DCC, Battery R/C or whatever is coming down the pipeline hobbies will change we can, either embrace the new technology or stay as we are; either way there is no right or wrong its just what we are comfortable with and can afford.
 
  • Like
Reactions: 2 users
D

Deleted member 4232

Guest
Moved
 
Last edited by a moderator:
  • Like
Reactions: 1 users

stockers

Trains, aircraft, models, walking, beer, travel
24 Oct 2009
25,631
3,795
65
Nr. Ashford, Kent. England.
Best answers
0
Country flag
With all due respect to John, who certainly seems to know his stuff -

that just killed it!
 
  • Like
Reactions: 1 users
8 Mar 2014
7,806
972
San Diego
Country
Armenia
www.elmassian.com
Best answers
0
Country flag
So it might look complex from the sheer size of the post, but JMRI has been around a long time. It is a free software program that will control a DCC system. There is a phone app that connects to the JMRI "computer" by WiFi. That's been around for years.

Recently, people have gotten JMRI to run on these small computers, so that was a step forwards.

Next step was to make a cheaper DCC command station on these computers.

So originally you had a laptop or computer
JMRI software
DCC system (like NCE, Digitrax, etc.)
Wi-Fi Access point / router

All these thing were expensive.

So, you get the laptop replaced by one of these small computers
you get a way to make DCC signals without the expensive "traditional DCC system"
you get an inexpensive wi-fi access point by adding software and wi-fi to the inexpensive computer
you build inexpensive decoders with the inexpensive computer

So all of that is great...


Of course I have a slightly different viewpoint.
I have a windows 10 laptop with a keyboards, screen, wi-fi, everything I need and it was $57 new
I have a small access point, cost $13
I have a small real DCC system, with a wired throttle, $150 (NCE)
and even sound decoders are cheap now, HO ones for $80

So, I can use the same windows and DCC hardware systems I have always used, with many more features, debugged software, my pick of smaller more capable decoders for just about the same cost... AND I have a standalone DCC system and a nice handheld throttle with buttons and knobs and it works in the sunlight.

So, it's a fun exercise, but I submit you should do it for fun, not to try to save money overall...

Greg
 
  • Like
Reactions: 1 users

stockers

Trains, aircraft, models, walking, beer, travel
24 Oct 2009
25,631
3,795
65
Nr. Ashford, Kent. England.
Best answers
0
Country flag
Nice comment Greg - it is a hobby in its self. I respect people who have the skill and patience to do this sort of thing but is it mainstream - not yet I think. There will always be businesses around to put all these bits together and offer a working solution, at a margin of course.
 

John Russo

Registered
24 Sep 2015
197
21
66
PA
Best answers
0
Country flag
I have been away fora bit and just now reading some of these replies.

Been looking at the DCC++ and seeing the things that are being done with that.

John S's set up is excellent.

Also found a hobby electronics company called Adafruit that has been kicking out low cost small components with plenty of instruction and community.

I agree with the poster who said saving money is not the objective. My reason for posting the cost is to show that cost is not a barrier to get started with the newer stuff. I think the ultimate capability is extremely high.

Here is an example of a tiny WiFi unit for $10 that can run Arduino code natively and when combined with a $2 L293, it can control solenoids, dc motors, lights, etc.

https://www.adafruit.com/product/2471

I am not promoting Adafruit. I just recently found their website and was amazed at the stuff they have and the help available that is in plain English.