miniThrottle, a DCC-Ex and WiThrottle throttle

miniThrottle: A model railroad WiFi throttle.

↓↓ Dig deeper ↓↓

Software download and compilation

The software can be downloaded from github or as a zip file which may be updated less regularily. When selecting a version to use, please be cautious if selecting odd numbered development releases. These may have half implemented features which don't fully function or have partial functionality. They may even break some previously implemented features.

VersionStatusGithubZip fileFile DateComments
0.4"Stable"githubV0.4 zip 15-Jun-2022Original public release version
0.5DevelopmentSame as above but use "development" branchV0.5 zip 02-Feb-2023Unstable development work
Adds web management interface
Adds WiThrottle relay to serially attached DCC-Ex
Rework of include file should simpify initial configuration
Timeline: expect stable feature set Feb/Mar 2023

Once downloaded, the first step is to configure the software to match the hardware you want to use. To do this edit "miniThrottle.h" - initially copy this from "miniThrottle.h.example". This will include the display type selected, keypad geometry, default network etc. In order to reduce component count the keypad is attached directly to the esp32 module.

To compile, configure Arduino IDE to support the esp32 processor as described at either:

Note: Using the links in the above instructions you will install the ESP platform version 1. A version 2 of the ESP platform is available, but MiniThrottle won't compile with that version at this stage. There are some library features used by MiniThrottle which are unfortunately not compatible with the newer development libraries.

Add the libraries below. Using the GUI (Graphical User Interface) "Tools" > "Manage Libraries...". Or if using the CLI (Command Line Interface), the instructions in the table.

FunctionLibraryVersionArduino CLI installation
keypad support:keypad3.1.1$ arduino-cli lib install "keypad"
encoder support:ESP32encoder0.9.1$ arduino-cli lib install "ESP32encoder@0.9.1"
display support:lcdgfx1.1.4$ arduino-cli lib install "lcdgfx"

Note: From development version 0.5a (18-Nov-2022), it is possible to compile miniThrottle witout the above 3 libraries, but only if NODISPLAY is configured in miniThrottle.h. The purpose of this is to create a "headless" relay device that effectively replaces the ESP8266 WiFi interface on a DCC-Ex controller. Such a device has no display, keypad or buttons. However, a relay could still operate without NODISPLAY, ie relay and be a throttle with a display and user input. The relay connects to DCC-Ex over the serial connection, has WiFi enabled, and has a RELAYPORT defined. Optionally it may also have the web interface enabled.

A wide variety of compiler settings will work, but on the prototype units, the following were used for the prototype build:

If using the CLI (Command Line Interface) of the Arduino development environment: (ignore this if using the graphical interface)

mkdir miniThrottle_bin
arduino-cli compile --output-dir ./miniThrottle_bin --fqbn esp32:esp32:lolin32:CPUFreq=80,PartitionScheme=min_spiffs ESP32_miniThrottle
arduino-cli upload -p /dev/ttyUSB0 --fqbn esp32:esp32:lolin32 ESP32_miniThrottle

A CPUFreq=240 option is preferred if you intend operating MiniThrottle as a WiThrottle to serial relay.

Once flashed, connect to the serial console 115200, 8 bits, No parity, 1 stop bit. If using a terminal emulation such as Putty or TeraTerm to access the console set your line terminations to LF. The console has a "help" function which will list supported commands. At this point the supported wireless networks can be configured. No web configuration interface exists and initial configuration is via the serial console.

Note to Serious geeks: It is possible to add fonts if you require more than are provided in the project. See adding fonts to LCDGFX for instructions on how to convert a fixed Linux font for use by lcdgfx. The resultant output should include a define for "CUSTOM_FONT" and the name of the font variable. Follow the example fonts in the project and name your font file so that it appears ahead of where it is used in the project.

const PROGMEM uint8_t font_12x24[] = {

Thank you for visiting this websiteHome