Raspberry Pi Zero Controlling Things

John Russo

Registered
24 Sep 2015
197
21
66
PA
Best answers
0
Country flag
I've been looking to RPi and have been fascinated at how cheap and how robust it is.

Looking at this set up, it seems you could control a loco from PC, phone, etc.

$10 for the WiFi version of Pi Zero, $5 for the DC motor control. Another $2 to step down the track voltage to power the Pi.

You would by pass the central station entirely.

https://howchoo.com/g/mjg5ytzmnjh/controlling-dc-motors-using-your-raspberry-pi
 
Last edited:
  • Like
Reactions: 1 user

John Russo

Registered
24 Sep 2015
197
21
66
PA
Best answers
0
Country flag
I also can't help but wonder if this kind of thing will attract the younger generation into the hobby.
 

Paul M

Registered
25 Oct 2016
11,951
1,709
61
Royston
Best answers
0
Country flag
  • Like
Reactions: 1 user

John Russo

Registered
24 Sep 2015
197
21
66
PA
Best answers
0
Country flag
Being on this side of the pond I'm not sure what a pip is.
 
  • Like
Reactions: 1 user

dunnyrail

DOGS, Garden Railways, Steam Trains, Jive Dancing,
Staff member
GSC Moderator
25 Oct 2009
26,247
5,001
75
St.Neots Cambridgeshire UK
Best answers
0
Country flag
This would apprar to be a possible Battery Solution, no good for me as I use an iPhone. But a possibility as said for the right sort of Dog.
 

John Russo

Registered
24 Sep 2015
197
21
66
PA
Best answers
0
Country flag
iPhone would work with this.

Track would supply power and so no battery needed
 

dunnyrail

DOGS, Garden Railways, Steam Trains, Jive Dancing,
Staff member
GSC Moderator
25 Oct 2009
26,247
5,001
75
St.Neots Cambridgeshire UK
Best answers
0
Country flag
iPhone would work with this.

Track would supply power and so no battery needed
Aha I think you miss my point, whilst I accept that many will use Track Power. Battery on board power this free of the rails is of growing interest all of the time and so far as I can see this would be good in this respect as well.
 

pugwash

impecunious pirate
Staff member
GSC Moderator
17 Nov 2009
21,254
1,831
61
Luxembourg
Best answers
0
Country flag
Being on this side of the pond I'm not sure what a pip is.
It is the annoying little bit of a small fruit that gets stuck between your teeth when eating :eek:
 
  • Like
Reactions: 1 user

Zerogee

Clencher's Bogleman
25 Oct 2009
17,363
1,725
North Essex
Best answers
0
Country flag
Sorry, this is all above my pay grade..... the only raspberries that I understand are these......


Jon.
 
  • Like
Reactions: 3 users

John Russo

Registered
24 Sep 2015
197
21
66
PA
Best answers
0
Country flag
Aha I think you miss my point, whilst I accept that many will use Track Power. Battery on board power this free of the rails is of growing interest all of the time and so far as I can see this would be good in this respect as well.

I see your point now. Thank you for clarifying that.

I was not aware of the interest in being free of the track power.

I believe that will be achieved as the batteries become stronger and smaller.

The rechargeable lithium are probably at a point where one could be made to fit in the loco. It could take the place of the lead weight.

With wireless charging I could see where you would pull the loco onto a siding to get recharged.
 

John Russo

Registered
24 Sep 2015
197
21
66
PA
Best answers
0
Country flag
After some more investigation I can see that it would be fairly simple to control points, signals, and lights.

A single Pi could handle a dozen or more items natively. With low cost relays added on you could get into the hundreds.

Same thing for feedback from reeds or other sensing devices. The $10 pi camera or a distance sensor can be used to detect presence.

Again, no central station. Just feed everything back via ip address to a PC or whatever you wish to use to control.

Has anyone done any of this kind of thing?
 

Burl Rice

Registered
20 Jan 2017
52
57
49
Sparta, TN, USA
Best answers
0
Looked at it myself a while back, and found it very interesting. I, for one, would be interested in battery power. Using WiFi in that case has more appeal for me than DCC.
 

idlemarvel

Neither idle nor a marvel
13 Jul 2015
3,136
801
Ascot
Country
Mars
Best answers
0
Country flag
Presumably you would need an iPhone or android throttle app to drive the train using wifi signal? Does such a thing exist already?
 

Paul M

Registered
25 Oct 2016
11,951
1,709
61
Royston
Best answers
0
Country flag
Being on this side of the pond I'm not sure what a pip is.
It's the little seed in the fruit, what do you call them? I didn't realise you had another word for them
 

John Russo

Registered
24 Sep 2015
197
21
66
PA
Best answers
0
Country flag
Presumably you would need an iPhone or android throttle app to drive the train using wifi signal? Does such a thing exist already?

You would not necessary need an app.

You could just have web page and use that instead of a native phone app.

The web page could also be accessed from a larger screen like a phablet or a tablet.
 

GAP

G Scale Trains, HO Trains, 1:1 Sugar Cane trains
14 Jun 2011
4,063
947
Bundaberg Queensland, Australia
Country
Australia
ringbalin-light-railway.blogspot.com
Best answers
0
Country flag
After some more investigation I can see that it would be fairly simple to control points, signals, and lights.

A single Pi could handle a dozen or more items natively. With low cost relays added on you could get into the hundreds.

Same thing for feedback from reeds or other sensing devices. The $10 pi camera or a distance sensor can be used to detect presence.

Again, no central station. Just feed everything back via ip address to a PC or whatever you wish to use to control.

Has anyone done any of this kind of thing?

John I have not done this but it is on my radar for the future.
Raspberry Pi is very versatile I have even seen someone who made a simple desktop using one.
I would just have to learn a whole new language.

Oh and by the way I am not in the younger generation category just an old dog looking for some new tricks to learn. ;) ;) ;) >:)>:)
 

Rowan Bravington

Registered
9 May 2017
149
172
73
Melbourne, Australia
Best answers
0
I was at a Narrow Gauge Convention here in Oz recently. This Raspberry Pi system was demonstrated. I missed the part about whether or not DDC chips/boards were required in every loco - none of mine have them - and a query on this forum produced an answer of a very complex nature... so I was put off a bit. And, l still don’t know the answer although I am assuming the locos do need chips/boards.
I am hoping to return to the topic (however I am now in hospital with back troubles) and will be watching this thread with great interest.
One question at the Convention stood out.... “Does this system make obsolete the $4000 worth of Massoth, or similar, equipment just invested in?”
Answer: Yes.
I hasten to add that it was not my question... I run Remote Control Systems controllers on my layouts and have done for about 12 years.
 

dunnyrail

DOGS, Garden Railways, Steam Trains, Jive Dancing,
Staff member
GSC Moderator
25 Oct 2009
26,247
5,001
75
St.Neots Cambridgeshire UK
Best answers
0
Country flag
I see your point now. Thank you for clarifying that.

I was not aware of the interest in being free of the track power.

I believe that will be achieved as the batteries become stronger and smaller.

The rechargeable lithium are probably at a point where one could be made to fit in the loco. It could take the place of the lead weight.

With wireless charging I could see where you would pull the loco onto a siding to get recharged.
Battery power is already up and running even down to such a small loco as one in Ho9 (see Voi Libre July/Aug/Sept issue 2017). For G Scale I am using NiMH batteries as I am not yet happy with some of the newer types safety. But many are using Lipo, Lithium and perhaps other types quite happily. There is a Coy (possibly not the only one for small scale http://www.micronradiocontrol.co.uk/rc_model_rail.htmlin )in UK producing a Battery System for 00 Scale. So this is where my interest in any system comes from as I am slowly working towards a Battery without Track Powered Railway.
 

John Russo

Registered
24 Sep 2015
197
21
66
PA
Best answers
0
Country flag
I was at a Narrow Gauge Convention here in Oz recently. This Raspberry Pi system was demonstrated. I missed the part about whether or not DDC chips/boards were required in every loco - none of mine have them - and a query on this forum produced an answer of a very complex nature... so I was put off a bit. And, l still don’t know the answer although I am assuming the locos do need chips/boards.
I am hoping to return to the topic (however I am now in hospital with back troubles) and will be watching this thread with great interest.
One question at the Convention stood out.... “Does this system make obsolete the $4000 worth of Massoth, or similar, equipment just invested in?”
Answer: Yes.
I hasten to add that it was not my question... I run Remote Control Systems controllers on my layouts and have done for about 12 years.

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.
 
Last edited:
  • Like
Reactions: 2 users