miniThrottle: A model railroad WiFi throttle.
↓↓ Dig deeper ↓↓
NB: Version 0.5 is development work in progress. While the plan is to always have working code, expect it to get broken before it gets fixed!
There are two main features being developed. Both are optional, and miniThrottle can still be used as a stand-alone throttle:
Feature | Why do we want it?!! |
---|---|
Webserver | Using a web page for configuration is easier than a text based console.
It also means the throttle can be tweaked without it needing to be USB connected.
Some diagnostic information such as memory usage is also presented via web page. The role of webserver and serial console at this stage are:
|
WiThrottle Relay | If the miniThrottle is connected to a serial port of DCC-Ex, it can act as a control station for WiThrottle clients.
As a system on chip implementation this may be limited in what it can do, but may be sufficient to many model railroaders requirements. It should allow a miniThrottle unit to not only be a directly attached throttle head on a DCC-Ex control station, but to replace the WiFi module. By doing this the DCC-Ex unit does not need compiling with WiFi support, and the DCC-Ex unit offloads some of the WiFi communications. For example keep-alive packets no longer need to be handled by DCC-Ex. Only data related to controlling trains and turnouts gets sent to DCC-Ex. |
In the tables below the following are shown:
Uses http only, no plan for https currently
Feature | Implemented | Functional | Tested |
---|---|---|---|
Status Display | Yes | Yes, but more elements may be added in future | Yes, new features to be tested when added |
Configuration | Yes | Yes, but more elements may be added in future | Yes, new features to be tested when added |
Functions | Yes | Latching/Non-latching - for DCC-Ex connection, and relay to WiThrottle, can be locomotive specific Lead Loco only - Not tested | latching/non Latching - yes Lead loco only - Not Tested |
Local files | Yes | Yes, used to store web server CSS and configuration data | Yes |
Fast Clock | Yes | Yes, can be set using web interface on relay Yes, values shown in web page of Throttle if in use (0.5c & later) | Yes |
Passwords | Yes | WiFi Passwords - Yes Web Admin Password - Yes | Yes |
Using the standard ESP-32 Arduino Libraries the maximum number of relayed throttles is 8. However, this is reduced if you want simultaneous web connection(s). If the libraries are recompiled then a maximum 16 throttles is possible, but this has not been tested. For info on how to recompile libraries start with https://docs.espressif.com/projects/arduino-esp32/en/latest/faq.html. It is suggested you test relaying with the limitation of 8 throttles to check if miniThrottle meets your functional requirements before recompiling the IDE libraries as this requires significant effort and technical understanding.
When operating as a relay, miniThrottle acts as a wiThrottle server. miniThrottle will use native DCC-Ex commands to communicate with DCC-Ex. This allows miniThrottle to offload some work such as keep alive messages with clients from DCC-Ex, and miniThrottle can track the state of turnouts and ownership of locomotives. It is tested against miniThrottle and EngineDriver clients.
Feature | Implemented | Functional | Tested |
---|---|---|---|
Power On/Off | Yes | Yes | Yes |
Fast Clock | Yes | Yes | Yes |
Locomotive Speed/Direction | Yes | Yes | Yes |
Locomotive Functions | Yes | Yes | Under test |
Turnout Control | Yes | Yes | Under test |
Routes | Yes | Yes | Under test |
DCC-Ex Pass through | Yes | Alternative to WiThrottle relay | No |
How does a miniThrottle relay compare against a WiFi module on DCC-Ex? The table below should help. Note this only compares the WiFi module, other options such as Ethernet or JMRI fill different roles. If the relay cannot support as many connections, locomotives, turnouts etc as you would like, then connect DCC-Ex to JMRI running on a computer with a USB cable!
Esp8266 WiFi Module | miniThrottle |
---|---|
Supported by DCC-Ex | Not part of DCC-Ex |
Many users - lots of people can help if you have problems | Few users - you are your own first line of problem solving |
Tried and tested option | New software and first iteration |
Up to 4 WiFi throttles | up to 8 WiFi throttles + 1 in-built control |
DCC-Ex handles WiFi traffic | Some traffic such as keep alive packets offloaded to miniThrottle |
DCC-Ex needs to be compiled with WiFi support | No WiFi config required on DCC-Ex - connect to serial port |
Relatively inflexible WiFi config | More WiFi config otions at runtime |
Compiler/command line configuration | Web/command line configuration |
No local controls | Optionally can include a local/built-in throttle |
During the build and testing of the above, the focus is on serially connected units. It is possible some of this may break existing WiFi throttle functionality. This will need retesting and remediation of known issues at the end of this phase. There are some features under consideration, but which would be implemented once relaying and web server is implemented.
Feature | Implemented | Functional | Tested |
---|---|---|---|
Display Fast-Clock | Yes (0.5c & later) | Yes | Under test |
Menus only show valid options | Yes (0.5c & later) | Yes | Under test |
Swap Lead Loco | No | No | No |
Review of WiFi connectivity options ie support both AP & STA modes | Yes (0.5d & later) | Yes | Under test |
Thank you for visiting this website | Home |