GT Mills

Has anyone pioneered a DIY sketch of a WiFi interface for Digitrax?  The OEM model is $80, but an Arduino Uno, MEGA, or Raspberry Pi with a ESP8266 WiFi can be assembled for a total cost of $6 to $10. 

Seems like it should be do-able, but I am no electrical engineer by any stretch. 

Just askin'.  

Greg

Greg

Grew up next to the Flint & Pere Marquette RR tracks originally laid 1871 through Northville, Michigan

 

 

Reply 0
jeffshultz

That's called JMRI.

https://mstevetodd.com/rpi

"Many model railroaders would benefit from using smartphones as Throttles, but most are not computer experts, and may be intimidated by the setup required. To lower this bar, I've preconfigured everything needed to get started, and provide the software free of charge.
First, start with the tiny  RaspberryPi computer ($40). Download my free, preconfigured image to your computer, unzip the image (.img) file and write it to a microSD card. Connect your  supported DCC hardware, then simply turn on main power, and the RPi will start up and load  JMRI, scanning for your layout hardware connection. It will also start up a dedicated wireless network on the RPi. Within 30 seconds, you can connect your phone(s) or pad(s) to the RPi's WiFi and start running trains! The RPi needs no screen, keyboard or mouse, so it can stay nicely out of the way under the layout, or in your electronics box  [photo]."

Geoff Bunza also did this for an article in MRH some time back.  The advantage to Mr. Todd's download is that he is keeping it up to date to the point the newest download was only created on March 5th. 

 

orange70.jpg
Jeff Shultz - MRH Technical Assistant
DCC Features Matrix/My blog index
Modeling a fictional GWI shortline combining three separate areas into one freelance-ish railroad.

Reply 0
GT Mills

Say wha?

Jeff, I have been searching all day, this is [exactly] what I couldn't seem to find.  Thanks!

 

 

Greg

Grew up next to the Flint & Pere Marquette RR tracks originally laid 1871 through Northville, Michigan

 

 

Reply 0
GT Mills

Wait a minute...

Does this RPi have WiFI already???  When I checked out the Newark hardware on the site you listed at   https://mstevetodd.com/rpi there is no mention of it already being WiFI enabled, no WiFI hardware listed on the RPi spec sheet.  

But your site says "you can connect to the RPi WiFi..."  

I'm lost, and I haven't even begun. 

 

 

Greg

Grew up next to the Flint & Pere Marquette RR tracks originally laid 1871 through Northville, Michigan

 

 

Reply 0
ekull01

Re Wait a minute...

According to the complete list of specs (here:  https://www.digikey.com/en/maker/blogs/2019/raspberry-pi-4-vs-raspberry-pi-3-a-new-slice-of-pi),  it is WiFi equipped (IEEE 802.11b/g/n/ac wireless LAN). 

You can read a concise description of what IEEE802.11 is here:  https://en.wikipedia.org/wiki/IEEE_802.11

You might watch the Youtube video at the above Digikey link as it provides some overview of board features by comparing the previous board iteration.

 

Reply 0
HVT Dave

WiFi

Yes, the Raspberry Pi 3B and 4B both have built in WiFi.  Either will work just fine with Steve Todd's image (program).

Dave

Member of the Four Amigos

 

Reply 0
ironman63

Digitrax and Wifi

If you have an older Digitrax sytem without the USB connection you will still need to get a PR4 or an LNWI module to connect the R Pi

Later Richard

 

Reply 0
Prof_Klyzlr

Yes (but think it thru....)

Dear GT,

Firstly, I feel it''s important you first understand the actual signal path you are trying to make work.
Read thru the below ordered-list of devices, and consider how the throttle-commands you/the-operator flow from one-to-the-other towards the locomotive for actual final actioning...

1- "WiFi Throttle" (Smartphone + app, TCS UWT-xxx, whatever WiThrottle-compatible "human input device")

2 -> WiFi (wireless) Network

3 -> JMRI software on (some kind of hardware/computer/RasPi)

4 -> USB (cable)

5 -> Digitrax LocoNet (via either Digitrax PR3 interface,
or one of the newer Digi systems with USB-interface built-in)

6 -> Digitrax "host DCC system" (Command Station + Booster)

7 -> Rails
8 -> Locomotive/Decoder

(Read that thru slowly, think it thru, and get comfy with which actual-physical-devices you already have on-hand which slot into the positions in the signal path. ALL parts need to be present, working, and "talking to each other" in order to make a "Complete Working System/Solution". 

Understanding this NOW will help you immensely forever-more) 

With the above in mind,

Yes, the "Raspberry Pi 3B+" hardware "computer" you load Steve Todd's excellent RTR "Image" onto does indeed have WiFi Access Point capabiility built-in. (NO additional dongles, network devices, or "network stuff" required, at least for relatively small layouts/rooms).

Simply:

- Grab a Raspberry Pi 3B+ (or the newer Raspberry Pi 4) and associated power supply
- Follow Steve Todd's instructions to write the preconfigured "Image" file onto a suitable microSD Card.
- Insert microSD part into Raspberry Pi
- and power-on

The Raspberry Pi will start transmitting a preconfigured WiFi network
(Steve Todd's instructions give the default WiFi Name/SSID and Password,
these can be changed to suit your needs once you're comfy everything is basically working).

which you can connect-to using your smart-phone (with appropriate app)
or other "JMRI WiThrottle enabled device",

Refer again above to the "signal path" list, 
and you'll see that the "Raspberry Pi" thus covers both parts "2" (WiFi network)
and "3" (JMRI software on, in this particular case, Raspberry Pi hardware)
parts of the signal path.

We assume you already have a SmartPhone running "EngineDriver" (Android) or "WiThrottle" (iOS) apps,
or one of the various "hardware WiThrottle-compatible throttle units" currently on the market,
so assume part "1" of the signal path is also taken-care-of.

You've implied you have a Digitrax system, so we're further assuming that parts "6", "7", and "8" of the path are taken care of...

SOOOOOOO....

The bit you are (possibly, likely?) missing is how to connect your "cheap solution JMRI-on-RasPi WiFi --> Digitrax interface" to the actual Host Digitrax DCC system you initially-thought-of...
(IE we have a air-gap in the Signal Path at parts "4" and "5"!?!?!)

Now, just to muddy the waters a little, Digi do actually make a RTR "LNWI" unit which effectively takes care of parts '2", "3", "4", and "5" in one single device, with no need for the user to build, load, re-image, or configure much-of-anything.... which may be a better solution if "lack-of-confidence in technical things" exceeds "financial concern"...

https://www.digitrax.com/products/wireless/lnwi/

(FYI compare cost of buying a single Digi LNWI,
VS
buying and build/configuring a RasPi/JMRI + PR3 combo...
The "saving" in using a RasPi and actual hard numbers may surprise...)

I hope this helps,

Happy Modelling,
Aim to Improve,
Prof Klyzlr
 

Reply 0
AlexW

Rpi and Wi-Fi

You can configure it to use it's own Wi-Fi, or to join your home LAN and use that like you would with JMRI on a PC. You can almost remote into it with VNC and control it from anywhere on your network if you so desire.

-----

Modeling the modern era freelanced G&W Connecticut Northern

Reply 0
GT Mills

Yeppirs!

After i wrote post #3 I found the info I had missed first time looking things over, thought I'd edited the post but see this morning the changes didn't get saved when I logged out of MRHF.

I'm surprised the DL file is so large, all this just to run the WiFi interface!  Cost savings isn't all that much at this point, although the RPi is very inexpensive for what it is over at Newark electronics supply...so it seems the more elegant solution for just another $30 after all is said and done is to go with the OEM LNWI, which obviously stands for LocoNet WiFi for $80.  The few extra bucks is probably worth the time spent going with the RPi, although it is tempting to DIY if for no other reason than doing it for the first time. 

All hail MRH and its staff, helpers and engaged citizenry! 

Now, I've got my work cut out for me...

Greg

Grew up next to the Flint & Pere Marquette RR tracks originally laid 1871 through Northville, Michigan

 

 

Reply 0
marcfo68

. . .

"  If you have an older Digitrax sytem without the USB connection you will still need to get a PR4 or an LNWI module to connect the R Pi  "

You gain nothing by adding the Digitrax LNWI to the RPi.  JMRI can not use the LNWI, no tools in JMRI work with the LNWI.  The LNWI is not JMRI aware so can not use the  Roster of DecoderPro or anything created in PanelPro or other.

The LNWI is a standalone WiFi solution for Loconet.  

The LNWI can not act as a Loconet Interface. It does not replace a PR4, PR3 or Locobuffer-USB  for JMRI.

The DL file is large because it contains a Raspbian Buster operating system for the RPi + JAVA +  JMRI + other software. it is not just WiFi code.

Marc

 

Reply 0
George Sinos gsinos

"large" download file has more than wifi

Greg -

The download file from Steve Todd has much more than the wifi throttle server.  It has the complete operating system for the Raspberry Pi, the full installation of JMRI and Steve Todd's installation code.

JMRI, the part that includes the WiThrottle Web server, has several major parts.  It's managed as one big file.  You can choose to use part or all of it.  Go to the JMRI website to get an overview.

On the other hand, unless things have changed since I last checked, the LNWI is extremely limited.  It acts as the throttle server for only 4 throttles max.  You get none of the other JMRI features.  My opinion has always been that you're paying a huge price for very little.  Not knocking Digitrax.  It is fairly priced for a product that need to be produced and supported.  But you don't get much functionality for your money.

gs

 

 

Reply 0
YoHo

As noted, the RaspPi image is

As noted, the RaspPi image is a full computer image with Full JMRI on it, not just a standalone WiFi system.

Also as noted, there is a cost in converting from Loconet to USB.

Honestly, if you already have a home wifi network for your house that reaches your train room, and you already have a computer a reasonable distance (to run a USB or Loconet or both cable to) Then you're just as well to run JMRI on your PC. That would cost very much less Assuming you have the equipment at hand. The RaspPi is really only a value if you don't have a pre-existing computer at an appropriate location and/or don't already have wifi.

 

 

 

Reply 0
GT Mills

Layout

Here's the layout.  It's not very big.  Benchwork and first layer of 2" foam are finished, just started the first sections of track - inner loop from the lift bridge north to the double crossover.  The command station and a booster will go in the upper middle of the "east" module and cut the bus legs equally up to the lift bridge, top of the "U".  Circuit-protected sub-districts will be each town/ siding.  A DC throw is planned for running older stock, switching the entire layout between DC & DCC. Which explains the choice of Code 100 rail.   

Thinking about a Digitrax Zephyr DCS-52 with a 3/5/8A booster for two power districts; and DIY Arduino WiFi as an alternative to LNWI.  I think the stand-alone RPi might be overkill since I plan on using a PC running JMRI as a bridge, and to run servos, lighting, signaling and animations from the PC itself, with a couple of smartphones.  

The DCS-52 has USB (and 3 Ethernet ports) but I want to use a WiFi interface to connect the (PC) bridge via LAN, not cables.  I already have all the Arduino-based hardware.

I can definitely see the value of the RPi mentioned above, but...not really what I had in mind. 

10314-17.jpg 

0314-17c.jpg 

Greg

Grew up next to the Flint & Pere Marquette RR tracks originally laid 1871 through Northville, Michigan

 

 

Reply 0
YoHo

So, what you want to do is

So, what you want to do is basically do a bridge changing from the serial interface that is Loconet to Wifi and then back to serial on the PC?

 

Poking around briefly, it looks like the commercial solutions out there have latency and bandwidth issues. So I would be concerned it won't work very well for throttle control.

 

You might look into XBee, but I have to say, this is going to be a serious science project.

Reply 0
marcfo68

. . .

Say what !...

All you need is the DCS52 and it's SINGLE  USB port, a computer to run JMRI and you are done.  You get computer aided programming of decoders and WiFi support in one box  with added bells and whistles to boot. 

No 3 Ethernet ports on a DCS52. There are 2 Loconet ports.  3 Loconet ports is reserved to the higher end end uniits.

Marc

Reply 0
Prof_Klyzlr

Please review

Dear GT,

Please review the "signal path" outlined early in this thread, and consider/explain how you see your envisaged DIY-WIFI system fitting/substituting into the path.

Happy Modelling,

Aim to Improve,

Prof Klyzlr

PS NB that a DCS52 effectively covers parts "5" AND "6" of the Signal Path as declared, as the DCS52 "USB port" is effectively a built-in PR3, mounted in the one single self-same enclosure/box as the "Digitrax Host DCC system".

Reply 0
AlexW

LNWI

The LNWI not only doesn't do anything for getting JMRI connected, but it runs a substandard version of the WiThrottle protocol and is limited to only 4 throttles.

You can't connect to JMRI wirelessly, but if you want to connect somewhere other than the command station, you can use either a long USB cable, or get another LocoNet-USB interface elsewhere on the LocoNet. You could also use the RPi to run JMRI and remote into it from another machine on your LAN, effectively giving you Wi-Fi control over JMRI and the layout.

Power is determined by number of operators (not an issue in this case, as it's a small layout), or number of locos sitting on the track on startup.

Code 100 rail has nothing to do with DC or DCC, any code nickel silver will work with either, but save yourself the hassle and all the extra wiring and just go with 100% DCC. Quality of locos running over quantity.

Also, consider if you can reduce the number of tracks somewhere in there.... you've got a LOT of stuff packed into a small area.

-----

Modeling the modern era freelanced G&W Connecticut Northern

Reply 0
GT Mills

LNWI

Substandard version of Withrottle protocol - meaning it lacks certain functions available on the Withrottle phone that it won't process, such as bells/whistles/lights??  That will be disappointing...

 

    

Greg

Grew up next to the Flint & Pere Marquette RR tracks originally laid 1871 through Northville, Michigan

 

 

Reply 0
George Sinos gsinos

Greg - substandard is

Greg - substandard is probably not the best choice of words as it implies not doing a very good job.  Subset of the protocol might be a better choice.  You can control the speed and function buttons for four locomotives.  But that's pretty much it.  You can purchase up to 8 LNWI's to allow control up 32 locos, 4 per LNWI.

At the last time I looked, you can't use it to control stationary decoders to throw switches, etc. But check the stats, that might have changed.  

The value in the LNWI is in the fact that you need to know practically nothing to make it work. Plug it in, download an app for your phone or tablet and you're running trains.  For the person that wants that trade off, it is perfectly fine.

However, for just a tiny bit more effort, you can put a full installation of JMRI on a Raspberry Pi and get full functionality, and all of the other JMRI apps that will let you grow in the hobby.   

I am obviously biased.  Now - I put the link to JMRI.org in my previous message, and the link to the LNWI instruction sheet is pretty easy to find by googling "digitrax lnwi."

Reading the material at both of those should give you all of the information you need to fit your needs.

gs

Reply 0
GT Mills

JMRI

Been reading the JMRI site on and off for a few months now, got it saved to my favorites folder for future reference.  It is partly what got my interest in trying DIY, along with Steve's, and Jeff Bunza's blogs which I  tapped into a few months ago when I found them. 

Gotta say the MRH site here is really my style, my cup of tea, and so easy to browse and find tons of helpful stuff w/o getting a request for mo money every time I turn around.  If ya know what I mean. 

Love this place. 

I got back into MR-ing at just the right time: just ahead of the COVID shut down!  

 

BTW, please offer your suggestions as to what trackage you see could be eliminated.  I already have taken out some, believe it or not. I'm not too interested in artistic scenery and the 'wide open spaces" feel for this starter layout, it is about operations first, beauty and realism in a distant second.  The idea is to have one train running on a mainline while working the various yards and industries off the other loop, without interfering with the train running continuously on the other mainline.  So a double main is necessary.  I added a second layer to free up more space where the mine and mill are. 

Greg

Grew up next to the Flint & Pere Marquette RR tracks originally laid 1871 through Northville, Michigan

 

 

Reply 0
marcfo68

. . .

" At the last time I looked, you can't use it to control stationary decoders to throw switches, etc. But check the stats, that might have changed.   "

LNWI and WiThrottle have had the capability to control stationary decoder ( turnouts) all along.

There is an OPSW in the LNWI that must be set to accept turnout commands from WiFi throttles (OPSW 14). By default this is active (T).

The catch is there is no list of turnouts, the user must know the turnout # (address).  JMRI can provide a List of turnouts (address)  once the appropriate table is populated (PanelPro).  Without this table JMRI acts the same as the LNWI, you must know what address to punch in.

The good part is JMRI will populate the table on it's own, if the OPSW of command station are set to permit the interrogation.

Marc

Reply 0
AlexW

LNWI

The exact differences in what the LNWI does are rather arcane, and I don't claim to fully understand them, but there have been some weird compatibility bugs that had to be worked out with the UWTs and PT. You also cannot load a locomotive roster or function labels from JMRI, and you cannot attach it to your home WLAN, so you end up with two different SSIDs.

As for trackage, do you really need a trolley line? That seems like a distraction from the railroad. Do you need two bridges going up to Mohawk mining? One would probably be more realistic. I think you may need another inch of vertical clearance over your mainlines- make sure you can clear AAR Plate H in case you ever want to run Plate H equipment. What does the second siding in Port Huron do? The switching area behind the ramp is going to be awkward, and that double slip switch is weird- why is the switching area connected to both mains? The lead to go into Plymouth is basically hiding under Mohawk Mining. I like operations too, but I feel like you're trying to cram one of everything into a small bedroom. I'd go to a single main, but that's the least of the track packing that's going on here.

BTW, my grandmother lives in Novi, I've been to modern Novi many times. It's basically all new though, was farmland not too long ago.

-----

Modeling the modern era freelanced G&W Connecticut Northern

Reply 0
GT Mills

AlexW

My buddy runs his web server business off a RPi 4 with 8 G of memory!, he called yesterday and got me geeked over Pi.  

I bought a Digitrax Zephyr for $190 and LNWI for $60 from BobtheTrainGuy.com, figured at that price I can get up and running quickly and swap out the LNWI with Pi later on, affordably.  Also bought a Digitrax DB210 single, auto reversing 3/5/8A booster for $70 from this place:  https://www.ausenook.com/products/dcc-autoreversing-3-5-8-single-digitra-amp-booster-db210

I'll let you guys know if this latter thing turns out to be some sort of scam.  Seems too good to be true. 

About the track plan:  Trolley line doubles as a freight siding, but trolley was a big thing in my old hometown Northville and the pond crossing with curved bridge is from the prototype.  (Did you know that metro Detroit was the trolley capital of the world, with more track than any other city? I just found this out a couple of years ago.)

 72241-1.jpeg 

72255-2.jpeg 

No container stuff on this 1950's era layout, 4" seems like enough but I could go higher... 

Two bridges to Mohawk Mine is to provide a run-around for dropping empties for the local switcher to handle after a mainline loco drops them off, since access is a long, curvy, steep, uphill grade and backing full trains up it won't be practical.  

The second Port Huron siding is for shuffling empties with loaded cars at the lumber mill since the length of the siding at the mill deck is so short. 

The double track will allow and force me as a lone operator to work around [constant running] passenger or manifest freights while working yards and sidings on the opposite direction mainline loop (there is not enough room to make/break trains at the staging yard, it requires using the EB main).

The double slip switch is a fascinating bit of proto track work to me so I bought one and added it to the design.  That's all. 

The layout it is not very high compared to many others I've read about, only 46".  So a 1"- 2" ramp in front of the manufacturing siding is not nearly as visually or physically obtrusive as it would be on one that is, say, 9 or 10" higher.  I actually started out at 53" height with this layout and after getting the first module completed did not like it at all. It was terribly awkward to work on, and once I sat down on a stool pretty much everything disappeared except the facia and a few inches beyond.   I think at this height the ramp will make an interesting break in line-of-sight to the big passenger station and siding beyond, which is a run-around connecting to the EB outer main, not the WB inner trunk.   

Yeah I hafta agree there is a lot of track packing going on here, but then I'm not going for a landscape artist's model of realism, beauty, and wide-open spaces.  This is purely to get up and running as much, and as quickly, as possible; and a learning exercise for a future 15 x 25 layout in another room in the house which quietly awaits...< grin>   

 

Greg

Grew up next to the Flint & Pere Marquette RR tracks originally laid 1871 through Northville, Michigan

 

 

Reply 0
AlexW

Scam?

Quote:

I'll let you guys know if this latter thing turns out to be some sort of scam.  Seems too good to be true. 

That looks WAY too good to be true. Also, that site sells women's handbags? Although Mint thinks that Tony's Train Exchange is clothing so who knows!

Quote:

 About the track plan:  Trolley line doubles as a freight siding, but trolley was a big thing in my old hometown Northville and the pond crossing with curved bridge is from the prototype.  (Did you know that metro Detroit was the trolley capital of the world, with more track than any other city? I just found this out a couple of years ago.)

I knew they had an extensive streetcar system, I didn't know that they were the trolley capital of the world, however. Traction modeling is a whole different thing, you're trying to cram a LOT into a small space. If you're focused on operations, who cares about the trolley? If you're trying to set a scene for a time and a place, I'd spread things out a bit more.

Quote:

 Two bridges to Mohawk Mine is to provide a run-around for dropping empties for the local switcher to handle after a mainline loco drops them off, since access is a long, curvy, steep, uphill grade and backing full trains up it won't be practical.  

So I can see the operational purpose for it- there really isn't enough room for another track and escape in the mine complex itself. It still sort of ruins the effect of a mine branch to have two bridges going up to it.

Quote:

The second Port Huron siding is for shuffling empties with loaded cars at the lumber mill since the length of the siding at the mill deck is so short. 

Is it for storage? Typically you'd pull out the loads, and spot empties and that would be it, negating the need for another track.

Quote:

The double track will allow and force me as a lone operator to work around [constant running] passenger or manifest freights while working yards and sidings on the opposite direction mainline loop (there is not enough room to make/break trains at the staging yard, it requires using the EB main).

You could work around a train on a one-track line, and then you'd also have to arrange a meet or something.

Quote:

The double slip switch is a fascinating bit of proto track work to me so I bought one and added it to the design.  That's all.

Hah, fair enough. I'm trying to work in a 3-way and wye switch into my next layout. At the rate I'm going to be buying Fast Tracks jigs, my layouts are going to be really, really expensive....

Quote:

 The layout it is not very high compared to many others I've read about, only 46".  So a 1"- 2" ramp in front of the manufacturing siding is not nearly as visually or physically obtrusive as it would be on one that is, say, 9 or 10" higher.  I actually started out at 53" height with this layout and after getting the first module completed did not like it at all. It was terribly awkward to work on, and once I sat down on a stool pretty much everything disappeared except the facia and a few inches beyond.   I think at this height the ramp will make an interesting break in line-of-sight to the big passenger station and siding beyond, which is a run-around connecting to the EB outer main, not the WB inner trunk.

That's true, at that height, it shouldn't be as much of an issue, it's still just awkward. I'm 6'3", I've determined that 51" is about right for me, but for construction, 48" is perfect. I also built workbenches that are 48" high.

Quote:

Yeah I hafta agree there is a lot of track packing going on here, but then I'm not going for a landscape artist's model of realism, beauty, and wide-open spaces.  This is purely to get up and running as much, and as quickly, as possible; and a learning exercise for a future 15 x 25 layout in another room in the house which quietly awaits...< grin>

I still think you're trying to cram too much into the space. There's plenty you can learn and build without that much track density. I see the same thing with club layouts, but in a different way. While they often have more space to work with, the layout seems unfocused, as many have a streetcar/trolley line, a mine branch, a logging line, etc, etc, and feels like a jumble of this and that.

If you really want to work towards that amount of layout, you could try building it without Novi, Port Huron, or Mohawk at first, and you may well find that you already have plenty of layout.

-----

Modeling the modern era freelanced G&W Connecticut Northern

Reply 0
Reply