miniThrottle, a DCC-Ex and WiThrottle throttle

miniThrottle: A model railroad WiFi throttle.


Features

MiniThrottle is a wireless (WiFi, for DCC-Ex or WiThrottle) or serially connected (DCC-Ex) model train throttle. WiThrottle is a protocol supported by JMRI and some hardware such as Digitrax LNWI.

Prototype miniThrottle with optional speed and brake pressure indicators, keypad and large display. miniThrottle uses the Arduino IDE to program an esp32 micro controller to act as DCC throttle and/or control station. By choosing appropriate design options the build can produce a compact DCC throttle.

The project is in a sense "incomplete". Many final design decisions are left to the constructor. This allows the builder for example to:

See Builders Notes page for some build suggestions.

Comments


A word about serial connectivity

A prebuilt miniThrottle on a header card serially driving DCC on a Mega 2560 card with a motoshield

MiniThrottle can connect directly to a DCC-Ex controller using either DCC-Ex or WiThrottle protocols. Or it can connect to JMRI using WiThrottle protocol. If connecting to DCC-Ex, the DCC-Ex unit should have a suitable WiFi interface configured OR allow miniThrottle to access DCC-Ex via serial connection.

For example a miniThrottle could be "stacked" on top of a Mega 2560 and motor shield - directly accessing the serial port. And when running as a relay that may give an adequate control system for a small layout. By using DCC-Ex protocol rather than WiThrottle allows miniThrottle to access the programming track and have internally defined locomotive rosters and turnouts.

miniThrottle optionally allows multiple WiThrottle connections to be relayed to DCC-Ex if it is connected to Dcc-Ex via a serial connection. For some small layouts or builders new to DCC that may provide sufficient "Control Station" functionality without the requirement of adding computers or network switches and access points.

While the original intent of miniThrottle was simply to act as a WiThrottle device, it can be connected to DCC-Ex as a relay. 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 upgrade to JMRI running on a computer!

Esp8266 WiFi ModuleminiThrottle
Supported by DCC-Ex projectNot part of DCC-Ex - don't ask them for help.
Many users - lots of people can help if you have problemsFew users - you are your own first line of problem solving
Tried and tested optionNew software and first iteration
Up to 4 WiFi throttlesup to 8 WiFi throttles + 1 in-built control
DCC-Ex handles all WiFi trafficSome traffic such as keep alive packets offloaded to miniThrottle
DCC-Ex needs to be compiled with WiFi supportNo WiFi config required on DCC-Ex - connect to serial port
Relatively inflexible WiFi configMore WiFi config otions at runtime
Compiler/command line configurationWeb/command line configuration
No local controlsOptionally can include a local/built-in throttle

Diagram showing WiThrottle and DCC-Ex connectivity for miniThottle DCC throttle

Putting it together

If you are not using a precompiled version, you will need to decide what options you want to include in your build. There are two main parts to this:

Once assembled, there are 2 main ways of further customising and setting up your miniThrottle:

Once assembled it is likely you may need some further diagnostics to check keypad mapping or what data is sent to the control station. The Troubleshooting section may give you some help in how to do this.


Using the MiniThrottle

It is possible to operate miniThrottle DCC/WiThrottle throttle with a very low component count

After power on the MiniThrottle searches for a WiFi network and server to join. Pressing a keypad key during this time will take you to the same configuration menu as can be accessed when the MiniThrottle is running. Once connected the control station is given a few seconds to respond and identify itself. If no identification is received the the default protocol is selected. At which point the main menu is displayed.


Main Menu

The default is to only show valid options in menus. As a result until track power is applied, the option to select a locomotive is not displayed. If track power is applied and the option is not displayed, a "previous menu" button or encoder-back will refresh the menu for you. "CV Programming" will only work if using DCC-Ex protocol.

Locomotives
Turnouts
Routes
Track Power
CV Programming
Configuration

Locomotives

Locomotive driving display of a miniThrottle DCC throttle

This presents a menu where locomotives can be either selected from the roster or controlled by their ID number. Once a locomotive has been selected, a display like that shown on the right will display, where direction, speed and functions are displayed.

When driving pressing the "#" key will take you to a "Cab Control Menu". The add and remove loco options allow the same commands to be sent to multiple locomotives at the same time without using advanced consisting.

NB: The Cab menu can only be accessed if the locomotive has stopped. The first locomotive selected can only be removed if it is the only, or last remaining, locomotive selected.


This Cab menu has the following options:

Add Loco
Remove Loco
Turnouts
Routes
Return

Turnouts

This menu is used to select a turnout by name and set it either Closed or Thrown.

Routes

This menu allows a route to be selected. It allows a particular sequence of turnouts to be set.

CV Programming

This is only operates with DCC-Ex protocol. If using WiThrottle, it is expected that the JMRI computer will be able to program locomotive CVs. This option allows locomotives to be configured with a very simple mix of miniThrottle and DCC-Ex only.

Read Loco Addr
Read CV Byte
Write Loco Addr
Write CV Byte
Write CV Bit
Prev. Menu

Configuration

Bidirectional Mode
CPU Speed
Font
Info
Protocol
Restart
Rotate Screen
Server IP
Server Port
Speed Step
Prev. Menu

Operational Modes

When driving locomotives there are 2 modes of operation, best summarised as follows:

HardwareStandard ModeBidirectional Mode
Encoder Rotating anti-clockwise reduces speed to 0%. Rotating clockwise increases speed upto 100%. Rotating anti-clockwise reduces forward speed or increases reverse speed. Rotataing clocwise reduces reverse speed or increases forward speed.
Keypad Down button reduces speed to 0%. Up button increases speed upto 100%. Down button reduces forward speed or increases reverse speed. Up button reduces reverse speed or increases forward speed.
Potentiometer Moved to one side reduces speed to 0%. Moved to the opposite side increases speed upto 100%. Center postion is idle. Moved to either extreme is full throttle in the respective direction.

Note: if including a potentiometer in your build, it is recommended that a "P" button is configured on your keyboard (if using one). This allows the potentiometer to be enabled or disabled, so that it does not over ride any speed / direction settings set from keypad or encoder.




Thank you for visiting camelthorn.cloudHome