Author Topic: Raspberry Pi Zero W for a JMRI Wireless Throttle?  (Read 836 times)

0 Members and 1 Guest are viewing this topic.

C855B

  • Crew
  • *
  • Posts: 8197
  • Respect: +1138
Raspberry Pi Zero W for a JMRI Wireless Throttle?
« on: May 30, 2018, 12:55:14 AM »
0
Maybe somebody is already tinkering with one.

@gkoproske and I have been discussing what throttles I'm going to "allow" for operators on my layout when the time comes for group operations. There is an active operations group within the local NMRA community, and he had a couple of experiences where the Digitrax-based layout owner provided UT-type throttles, having banned Digitrax full "DT" throttles because of experiences where an operator fat-fingered something bad and shut down the railroad. Glenn prefers his DT40x, and was frustrated by this, and challenged me on my plans.

So far I have been exclusively Wi-Fi on iPhones and Android notepads running through JMRI. I was originally planning on putting up a UR92 and accommodating Digitrax duplex wireless, but the more experience I gain with the smartphones and tablets, the more I like the idea of not having a proprietary wireless network scheme at all, letting JMRI doing all of the wireless DCC control heavy lifting. HOWEVER...

...the biggest problem I have with the phones is they are clunky for ops. Touchscreen sliders are hard to finesse. What I'd really like to have is a Wi-Fi/JMRI equivalent of a Digitrax UT4 - a physical knob and direction switch, basic F0-F7 buttons, and loco selection. Oh... and under $100. Something I can hand to visiting operators that is obvious in function and "just works".

This is where the Raspberry Pi Zero W comes in. For somebody familiar with programming the platform, it would not be difficult to make the Pi act as an interface controller between electromechanical controls and the JMRI Wi-Fi throttle command system. I'm not familiar with programming the platform and have too many other irons in the fire anyway, so it ain't gonna be me. I'm just hoping somebody knows of a project along these lines (and a lot less pricey than the Iowa Scaled Engineering throttle which is extreme overkill anyway).
...mike

http://www.gibboncozadandwestern.com

We don't make mistakes, we have happy accidents. We just don't tell anybody. -Bob Ross

railnerd

  • Crew
  • *
  • Posts: 626
  • Gender: Male
  • Respect: +157
Re: Raspberry Pi Zero W for a JMRI Wireless Throttle?
« Reply #1 on: May 30, 2018, 05:24:07 PM »
0
This is one of my personal "back burner" projects, but my day job keeps getting in the way (I like getting paid, and the idea of taking a year off in tech stops being an option once you are a 'man of a certain age')

The WiThrottle protocol is a line-oriented protocol over TCP, so this isn't too hard— whenever a control changes, send a new line to the server.  Finding the server relies on knowing the address and socket, or using MDNS (multicast DNS).

FWIW, any Raspberry Pi has a really bad habit of eating its SD card when it looses power.  I think the ESP32 or ESP8266 is probably the best starting point.  This board is what I would start with, as it already has an integrated Li+ battery circuit as well.

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

All this said, I met someone at the Portland convention who had a "WiThrottle" knob throttle in the works with a 3D-printed working demo (based upon the ESP8266), so I cannot believe that this is too far off.  The MRCS guys are also very interested in something like this.

-Dave

C855B

  • Crew
  • *
  • Posts: 8197
  • Respect: +1138
Re: Raspberry Pi Zero W for a JMRI Wireless Throttle?
« Reply #2 on: May 30, 2018, 06:18:29 PM »
0
Thanks, Dave. I should've figured this would have been on your radar.

>the idea of taking a year off in tech stops being an option once you are a 'man of a certain age'

Tell me about it. :x

I've had two Pi 3s running for over a year now and not run into the SD card problem. One I'm using for a video server is on power 100% of the time, so maybe I should move it to the UPS bus. The other (my JMRI system) is cycled with layout operation. Since I always do a "proper" shutdown I probably have avoided angering the corruption gods. But good point, it might behoove me to have a backup.

Good idea on the Feather. Much more suitable for this than the Zero W. One thought based on long, hard experience with "occasional use" portable devices - even with the integrated battery charger, I'd rather use primary cells. With one application I was spending a fortune replacing rechargeables (PbHCl, admittedly) that went flat sitting in the closet between gigs and wouldn't then accept a charge, or only a partial. The Feather looks good for 3 AA alkalines.

Nonetheless I shall stand by. Sounds like somebody will have a solution around the time I'm ready for it.
...mike

http://www.gibboncozadandwestern.com

We don't make mistakes, we have happy accidents. We just don't tell anybody. -Bob Ross