Skip to content

CircuitSetup/Remote

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Remote Control (Delorean Time Machine)

This repository holds the most current firmware for CircuitSetup's Futaba remote control kit, meant mainly for use in combination with a CircuitSetup Time Circuits Display with a connected speedo. Of course, the Remote can also be used stand-alone.

See here for information on the hardware (parts, disassembly & building instructions).

My Futaba1 My Futaba2

Watch the video
See it in action. Click to watch the video

See it controlling the lights and blinds through Home Assistant:

Watch the video
Click to watch the video

A video of an early proof-of-concept is here (note that the hardware shown isn't even in prototype stage).

Firmware features:

  • Wireless communication with Time Circuits Display; when (fake) powered up by "ON/OFF" switch, the Remote will take over speed control on the TCD-connected speedo.
  • Elevator stick on actual Futaba remote control used for throttle control, like in the movie. The throttle can increase or decrease speed, in five steps towards each direction. When the speed on the TCD's speedo reaches 88mph, a time travel is triggered.
  • Optional coasting, optional auto-throttle
  • controlling the Futaba's power LED and battery level meter (static display only, no actual battery level display)
  • Movie-accurate "Stop" light and stop switch behavior
  • Movie-accurate sound effects
  • Eight optional "User Buttons" for playback of user-provided sound effects and/or sending user-configurable Home Assistant/MQTT messages
  • SD card support for custom audio files for effects, and music for the Music Player
  • Music player: Play mp3 files located on an SD card, controlled by the "O.O"/"RESET" buttons or Time Circuits Display keypad via BTTFN
  • Advanced network-accessible Config Portal for setup (http://dtmremote.local, hostname configurable)
  • Home Assistant (MQTT 3.1.1) support
  • Smart battery monitoring for certain LiPo batteries (requires M-version Control Board, or non-M-board with BatMon add-on)
  • Built-in OTA installer for firmware updates and audio files

Firmware Installation

If a previous version of the Remote firmware is installed on your device, you can update easily using the pre-compiled binary. Enter the Config Portal, click on "Update" and select the pre-compiled binary file provided in this repository (install/remote-A10001986.ino.nodemcu-32s.bin).

If you are using a fresh ESP32 board, please see remote-A10001986.ino for detailed build and upload information, or, if you don't want to deal with source code, compilers and all that nerd stuff, go here and follow the instructions.

Important: After a firmware update, the "wait" symbol might be shown a while longer while booting. Do NOT unplug or switch off the device during this time.

Sound-pack installation

The firmware comes with a sound-pack which needs to be installed separately. The sound-pack is not updated as often as the firmware itself. If you have previously installed the latest version of the sound-pack, you normally don't have to re-install it when you update the firmware. Only if the Remote displays "ISP" briefly during boot, a re-installation/update of the sound-pack is needed.

The first step is to download "install/sound-pack-rmXX.zip" and extract it. It contains one file named "REMA.bin".

Then there are two alternative ways to proceed. Note that both methods require an SD card.

  1. Through the Config Portal. Click on Update, select the "REMA.bin" file in the bottom file selector and click on Upload.

  2. Via SD card:

  • Copy "REMA.bin" to the root directory of a FAT32 formatted SD card;
  • power down the Remote,
  • insert this SD card into the slot and
  • power up the Remote; the sound-pack will be installed automatically.

After installation, the SD card can be re-used for other purposes.

Initial Configuration

The following instructions only need to be followed once, on fresh Remotes. They do not need to be repeated after a firmware update.

The first step is to establish access to the Remote's configuration web site ("Config Portal") in order to configure your device:

  • Power up your Remote and wait until it has finished booting.
  • Connect your computer or handheld device to the WiFi network "REM-AP".
  • Navigate your browser to http://dtmremote.local or http://192.168.4.1 to enter the Config Portal.

Connecting to a WiFi network

Your Remote knows two ways of WiFi operation: Either it creates its own WiFi network, or it connects to a pre-existing WiFi network.

As long as your Remote is unconfigured, it creates its own WiFi network named "REM-AP". This mode of operation is called "Access point mode", or "AP-mode". In this mode, computers/handhelds can connect to your Remote in order to access the Config Portal, but ways of communication end right here. There is no inter-prop-communication (BTTFN) and no HA/MQTT.

APmode

It is ok to leave it in AP-mode, predominantly if used stand-alone. To keep operating your Remote in AP-mode, simply do not configure a WiFi network connection as described below.

More...

Please do not leave computers/handhelds permanently connected to the Remote in AP-mode. These devices might think they are connected to the internet and therefore hammer your Remote with DNS and HTTP requests which might lead to disruptions.

If you wish for your device to remain in AP-mode, please select a suitable WiFi channel on the Config Portal's "WiFi Configuration" page. See here.

In AP-mode, the SID can switch off WiFi to save power. See here.

Home setup with a pre-existing local WiFi network

In this case, you can connect your Remote to your home WiFi network. This allows for inter-prop-communication (BTTFN) and HA/MQTT.

STAmode-home

Click on "WiFi Configuration" and either select a network from the top of the page or enter a WiFi network name (SSID), and enter your WiFi password. After saving the WiFi network settings, your Remote reboots and tries to connect to your selected WiFi network.

More...

Your Remote requests an IP address via DHCP, unless you entered valid data in the fields for static IP addresses (IP, gateway, netmask, DNS). If the device is inaccessible as a result of incorrect static IPs,

  • power-down the device,
  • hold the Calibration button,
  • power-up the device (while still holding the Calibration button)
  • wait until the displays shows a circle animation,
  • press Button "O.O" twice within 10 seconds,
  • wait until the display shows "RST",
  • then release the Calibration button.

This procedure causes static IP data to be deleted; the device will return to DHCP after a reboot.

If the Remote fails to connect, it falls back to AP-mode. You can trigger another connection attempt by fake-powering it down and up.

Places without a WiFi network

In this case and with no Time Circuits Display at hand, keep your Remote operating in AP-mode.

If you have a TCD, you can connect your Remote to the TCD's own WiFi network:

STAmode-car

This setup is meant for cars, but suitable for any place with no WiFi network. See here for details.

After completing WiFi setup, your Remote is ready for use; you can also continue configuring it to your personal preferences through the Config Portal.

The Config Portal

The "Config Portal" is the Remote's configuration web site.

The Config Portal
The Config Portal's main page

It can be accessed as follows:

If Remote is in AP mode

  • Connect your computer or handheld device to the WiFi network "REM-AP".
  • Navigate your browser to http://dtmremote.local or http://192.168.4.1 to enter the Config Portal.
  • (For proper operation, please disconnect your computer or handheld from REM-AP when you are done with configuring your Remote. These devices can cause high network traffic, resulting in severe performance penalties.)

If Remote is connected to a WiFi network

  • Connect your handheld/computer to the same (WiFi) network to which your Remote is connected.

  • Navigate your browser to http://dtmremote.local

    More...

    Accessing the Config Portal through this address requires the operating system of your handheld/computer to support Bonjour/mDNS: Windows 10 version TH2 (1511) [other sources say 1703] and later, Android 13 and later; MacOS and iOS since the dawn of time.

    If connecting to http://dtmremote.local fails due to a name resolution error, you need to find out the Remote's IP address: Power up and fake-power-up the Remote and hold the Calibration button for 2 seconds. The Remote will display its current IP address (a. - b. - c. - d). Then, on your handheld or computer, navigate to http://a.b.c.d (a.b.c.d being the IP address as displayed on the Remote) in order to enter the Config Portal.

In the main menu, click on "Settings" to configure your Remote.

Click for full screenshot

A full reference of the Config Portal is here.

Basic Operation

After calibration, your Remote is ready for use.

If battery monitoring is available, the battery state (in percent, or "FUL") is shown briefly upon (real) power-on.

The Remote can be operated stand-alone, but is really meant to be (wirelessly) connected to a TCD.

After fake-power-on, the Remote's throttle controls the speed displayed on the TCD's Speedo.

For acceleration, there are two modes: Linear mode and "movie mode". In linear mode, acceleration is even over the entire range of 0 to 88mph. In "movie mode", the Remote (mostly) accelerates in the same pace as shown in the movie. In this mode, acceleration becomes slower at higher speeds. The mode can be selected in the Config Portal.

When the remote hits 88.0mph, the TCD triggers a BTFN-wide time travel; all connected props will play a synchronized time travel sequence. If operated stand-alone, a time travel sequence will be played on the Remote.

Auto-throttle: If this option is checked in the Config Portal, acceleration will continue to run after briefly pushing up the throttle stick and releasing it into neutral. Acceleration is stopped when pulling down the throttle stick, or when 88mph is reached.

Coasting: If this feature is enabled through the Config Portal, the Remote will ever so slightly reduce the current speed when the throttle lever is in neutral. Like a car when you put the transmission in neutral or press the clutch.

All the operation modes described above can also be switched on/off through the TCD keypad or HA/MQTT.

Buttons and switches:

"ON/OFF": Fake power

The "ON/OFF" switch turns the Remote on and off in a sense that it takes over speed control on the TCD when fake-powered on, and hands back speed control when fake-powered off.

"ON/OFF" must be a maintained contact.

"Stop"

The "Stop" switch activates the brakes on your virtual Delorean; if the brakes are on, speed changes on the Remote are not followed by the TCD, instead the TCD will count speed down to 0. Upon releasing the brake, the virtual car accelerates up to the speed shown on the Remote, and will then follow its speed changes.

"Stop" must be a maintained contact.

Calibration

Short pressLong press
Fake-power offCalibrate, see belowCalibration, see below
Fake-power onReset speed to 0Display IP address, battery charge percentage(*), battery time-to-empty(*)

(* M-board (>= 1.6), or non-M-board (>= 1.6) with BatMon Add-on required; if LiPo battery is properly connected to battery monitor)

The throttle of the Remote needs calibration:

  • Put the "ON/OFF" switch in "OFF" position.
  • Put the throttle lever in neutral (center) position, press the Calibration button. The display will briefly show "CAL" to show acceptance.
  • Hold the Calibration button for >= 2 seconds, "UP" will be displayed. Now push the throttle to the up-most position and press the Calibration button. "DN" will be displayed.
  • Pull the throttle lever to the bottom-most position and press the Calibration button. The display will clear, calibration is finished.

If you change power-source (ie a new battery, or power via USB to the ESP32), re-calibration is required.

The Calibration button needs to be a momentary contact.

Buttons "O.O" and "RESET"

When fake power is on:

Short pressLong press
Button "O.O"Prepare TT
or
Music Player: Previous Song
(depending on configuration)
Music Player: Play/Stop
Button "RESET"Music Player: Next SongMusic Player: Toggle Shuffle

When fake power is off, the buttons are used to set up audio volume and display brightness:

Short pressLong press
Button "O.O"Volume upBrightness up
or
Take over TCD Fake-Power control
(depending on configuration)
Button "RESET"Volume downBrightness down
or
Release TCD Fake-Power control

Here is a cheat sheet for printing or screen-use. (Note that MacOS' preview application has a bug that scrambles the links in the document. Acrobat Reader does it correctly.)

User Buttons

These buttons are entirely optional. You can install any number of buttons, they only serve the purpose of playing back user-provided sound effects and/or send user-configurable messages to an MQTT broker.

Sound playback is mapped as follows:

Short pressLong press
Button 1Play "key1.mp3"Play "key1l.mp3"
Button 2Play "key2.mp3"Play "key2l.mp3"
Button 3Play "key3.mp3"Play "key3l.mp3"
Button 4Play "key4.mp3"Play "key4l.mp3"
Button 5Play "key5.mp3"Play "key5l.mp3"
Button 6Play "key6.mp3"Play "key6l.mp3"
Button 7Play "key7.mp3"Play "key7l.mp3"
Button 8Play "key8.mp3"Play "key8l.mp3"

If a "button" is configured as a maintained switch in the Config Portal, keyX will be played on every flip (ON->OFF, OFF->ON) by default. If the option Maintained: Audio on ON only is checked for a switch, keyX will only be played when the switch is brought into ON position. This is especially useful for three-position switches where each of the "ON" positions is wired to a different "Button" on the Control Board. Note that maintained switches cannot trigger play-back of keyXl.

If the button/switch is pressed/flipped while audio from a previous press/flip of the same button/switch is still playing, play-back will be stopped.

SD card

Preface note on SD cards: For unknown reasons, some SD cards simply do not work with this device. For instance, I had no luck with Sandisk Ultra 32GB and "Intenso" cards. If your SD card is not recognized, check if it is formatted in FAT32 format (not exFAT!). Also, the size must not exceed 32GB (as larger cards cannot be formatted with FAT32). Transcend, Sandisk Industrial, Verbatim Premium and Samsung Pro Endurance SDHC cards work fine in my experience.

The SD card, apart from being required for installing of the sound-pack, can be used for custom sound effects, substituting built-in sound effects and for music played back by the Music player. Also, it is strongly recommended to store secondary settings on the SD card to minimize Flash Wear.

Note that the SD card must be inserted before powering up the device. It is not recognized if inserted while the Remote is running. Furthermore, do not remove the SD card while the device is powered.

Sound substitution

The Remote's built-in sound effects can be substituted by your own sound files on a FAT32-formatted SD card. These files will be played back directly from the SD card during operation, so the SD card has to remain in the slot.

Your replacements need to be put in the root (top-most) directory of the SD card, be in mp3 format (128kbps max) and named as follows:

  • "poweron.mp3": Played when the Remote is (fake)-powered on.
  • "brakeon.mp3": Played when the brake is switched on (= when the "Stop" light is switched on).
  • "alarm.mp3". Played when the alarm sounds (triggered by a Time Circuits Display via BTTFN or MQTT);

Additional Custom Sounds

The firmware supports some additional user-provided sound effects, which it will load from the SD card. If the respective file is present, it will be used. If that file is absent, no sound will be played.

  • "poweroff.mp3": Played when the Remote is (fake)-powered off.
  • "brakeoff.mp3": Played when the brake is switched off.
  • "key1.mp3" - "key9.mp3": Will be played upon pressing the respective button (except key9), and commands from the TCD's keypad or HA/MQTT
  • "key1l.mp3" - "key9l.mp3": Will be played upon long-pressing the respective button (except key9). Naturally, this only works for momentary buttons, not maintained switches. Those sounds also play on commands from the TCD's keypad or HA/MQTT.

Those files are not provided here. You can use any mp3, with a bitrate of 128kpbs or less.

Installing Custom & Replacement Audio Files

Replacements and custom sounds can either be copied to the SD card using a computer (as before), or uploaded through the Config Portal.

Uploading through the Config Portal works exactly like installing the sound-pack; on the main menu, click "UPDATE". Afterwards choose one or more mp3 files to upload using the bottom file selector, and click "UPLOAD". The firmware will store the uploaded mp3 files on the SD card.

In order to delete a file from the SD card, upload a file whose name is prefixed with "delete-". For example: To delete "key3.mp3" from the SD card, upload a file named "delete-key3.mp3"; the file's contents does not matter, so it's easiest to use a newly created empty file. The firmware detects the "delete-" part and, instead of storing the uploaded file, it throws it away and deletes "key3.mp3" from the SD card.

For technical reasons, the Remote must reboot after mp3 files are uploaded in this way.

Please remember that the maximum bitrate for mp3 files is 128kbps. Also note that the uploaded file is stored to the root folder of the SD card, so this way of uploading cannot be used to upload songs for the Music Player.

The Music Player

The firmware contains a simple music player to play mp3 files located on the SD card.

In order to be recognized, your mp3 files need to be organized in music folders named music0 through music9. The folder number is 0 by default, ie the player starts searching for music in folder music0. This folder number can be changed in the Config Portal or through the TCD keypad (705x).

The names of the audio files must only consist of three-digit numbers, starting at 000.mp3, in consecutive order. No numbers should be left out. Each folder can hold up to 1000 files (000.mp3-999.mp3). The maximum bitrate is 128kpbs.

Since manually renaming mp3 files is somewhat cumbersome, the firmware can do this for you - provided you can live with the files being sorted in alphabetical order: Just copy your files with their original filenames to the music folder; upon boot or upon selecting a folder containing such files, they will be renamed following the 3-digit name scheme (as mentioned: in alphabetic order). You can also add files to a music folder later, they will be renamed properly; when you do so, delete the file "TCD_DONE.TXT" from the music folder on the SD card so that the firmware knows that something has changed. The renaming process can take a while (11 minutes for 1000 files in bad cases). Mac users are advised to delete the ._ files from the SD before putting it back into the control board as this speeds up the process. While the renaming is in progress, the Remote's display shows how many files are still left to be processed.

To start and stop music playback, hold "O.O" for 2 seconds. Briefly pressing "O.O" jumps to the previous song, pressing "RESET" to the next one. (The same can be achieved by entering codes on the TCD's keypad: 7002 = previous song, 7005 = play/stop, 7008 = next song).

By default, the songs are played in order, starting at 000.mp3, followed by 001.mp3 and so on. Holding "RESET" toggles Shuffle mode. The power-up Shuffle mode can be set up in the Config Portal.

See here and here for a list of controls of the music player.

While the music player is playing music, other sound effects might be disabled/muted. The TCD-triggered alarm will, if so configured, interrupt the music player.

Battery monitoring

If a suitable control board is in use, and battery warnings are enabled in the Config Portal, battery state can be monitored, and a warning is issued when the battery is low.

Monitoring can be done through the Calibration button and the TCD (7091/7092).

The "low battery" warning is given as follows:

  • A sound is played once
  • If the Futaba's battery level meter is connected and enabled, it is switched off (= it reads 0).
  • If the Futaba's original power LED is connected and enabled, it blinks.
  • If the power LED is disabled, depending on fake power, either "BAT" is displayed periodically, or the display blinks periodically.

Connecting a Time Circuits Display

The TCD communicates with the Remote wirelessly, via the built-in "Basic-Telematics-Transmission-Framework" (BTTFN) over WiFi. Note that a wired connection is not supported.

The actual remote controlling is done wirelessly, and the TCD's keypad can be used to remote-control the Remote (to control the Music Player, for instance).

Watch the video
Click to watch the video

BTTFN requires the props all to be connected to the same network, such as, for example, your home WiFi network. BTTFN does not work over the Internet.

STAmode-bttfn

The term "WiFi network" is used for both "WiFi network" and "ip subnet" here for simplicity reasons. However, for BTTFN communication, the devices must be on the same IP subnet, regardless of how they take part in it: They can be connected to different WiFi networks, if those WiFi networks are part of the same ip subnet.

In order to connect your Remote to the TCD, just enter the TCD's IP address or hostname in the IP address or hostname of TCD field in the Remote's Config Portal. On the TCD, no special configuration is required apart from enabling remote controlling through the command 993 followed by ENTER.

Afterwards, the Remote and the TCD can communicate wirelessly and

  • the TCD's speed control is done by the Remote,
  • the Remote can switch Fake-Power on the TCD,
  • both play an alarm-sequence when the TCD's alarm occurs (if so configured),
  • the Remote can be remote controlled through the TCD's keypad (command codes 7xxx; see below),
  • the Remote can - while fake powered off - display the TCD's speed (eg from GPS).

You can use BTTF-Network and MQTT at the same time.

TCD remote command reference

FunctionCode on TCD
Toggle "movie mode" 7060⏎
Toggle display of TCD speed while off 7061⏎
Toggle auto-throttle 7062⏎
Toggle coasting 7063⏎
Set volume level (00-19) 7300⏎ - 7319⏎
Enable / disable click sound 7350⏎ / 7351⏎
Set brightness level (00-15) 7400⏎ - 7415⏎
Music Player: Play/Stop 7005⏎
Music Player: Previous song 7002⏎
Music Player: Next song 7008⏎
Music Player: Select music folder (0-9) 7050⏎ - 7059⏎
Music Player: Shuffle off 7222⏎
Music Player: Shuffle on 7555⏎
Music Player: Go to song 0 7888⏎
Music Player: Go to song xxx 7888xxx⏎
Play "key1.mp3" 7001⏎ / 7501⏎
Play "key2.mp3" 7502⏎
Play "key3.mp3" 7003⏎ / 7503⏎
Play "key4.mp3" 7004⏎ / 7504⏎
Play "key5.mp3" 7505⏎
Play "key6.mp3" 7006⏎ / 7506⏎
Play "key7.mp3" 7007⏎ / 7507⏎
Play "key8.mp3" 7502⏎
Play "key9.mp3" 7009⏎ / 7509⏎
Play "keyXl.mp3" (X=1-9) 7511⏎ - 7519⏎
Display current IP address 7090⏎
Display battery charge percentage1 7091⏎
Display battery "Time to empty"1 7092⏎
Display battery voltage1 7093⏎
Toggle Fake-Power control 7096⏎
Reboot the device2 7064738⏎
Delete static IP address
and WiFi-AP password2
7123456⏎

1: M-board (>= 1.6), or non-M-board (>= 1.6) with BatMon Add-on required; if LiPo battery is properly connected to battery monitor. 2: Not supported through HA/MQTT INJECT command

Here is a cheat sheet for printing or screen-use. (Note that MacOS' preview application has a bug that scrambles the links in the document. Acrobat Reader does it correctly.)

Controlling TCD Fake-Power

The Remote can, if so configured, control Fake-Power of a wirelessly connected Time Circuits Display.

By holding O.O when Fake-Power on the Remote is off, the Remote takes over control of Fake-Power on the TCD. The same can be achieved by entering 7096 on the TCD keypad.

From now on, whenever you flip the Fake-Power switch on the Remote, the TCD will follow.

To release Fake-Power control, hold RESET when Fake-Power on the Remote is off.

If the option "Fake-Power controls TCD Fake-Power" is checked in the Config Portal, the Remote will take over Fake-Power control from the TCD at its startup, ie there is no need to initially press O.O.

Remarks:

  • Buttons O.O/RESET need to configured for this function, see here.
  • The Remote has the highest Fake-Power priority. The TCD's TFC switch and Fake-Power control through HA/MQTT have lower priority; state changes are tracked but do not become effective until the Remote releases Fake-Power control.

Home Assistant / MQTT

The Remote supports the MQTT protocol version 3.1.1 for the following features:

Send messages through User Buttons

In the Config Portal, you can configure MQTT topics and messages for "on" and/or "off" for each of the eight User buttons/switches. This allows for arbitrary functions in your Home Assistant/MQTT realm. You could switch HA-integrated lights on or off, or send TIMETRAVEL to your Time Circuits Display (bttf/tcd/cmd), or REFILL to your Dash Gauges (bttf/dg/cmd).

The ON message will be sent when a button has been pressed, the OFF message when it has been released. In case of a button being configured as a maintained switch in the Config Portal, the ON message will be sent when the switch is closed, the OFF message when it is opened.

For a video how this works, see here.

Control the Remote via MQTT

The Remote can be controlled through messages sent to topic bttf/remote/cmd. Supported commands are

  • AUTOTHROTTLE_ON, AUTOTHROTTLE_OFF: Enable/disable auto-throttle
  • COASTING_ON, COASTING_OFF: Enable/disable coasting
  • MOVIEACCEL_ON, MOVIEACCEL_OFF: Switch between movie and linear acceleration
  • DISPTCDSPD_ON, DISPTCDSPD_OFF: Enable/disable speed display while fake-off
  • MP_PLAY: Starts the Music Player
  • MP_STOP: Stops the Music Player
  • MP_NEXT: Jump to next song
  • MP_PREV: Jump to previous song
  • MP_SHUFFLE_ON: Enables shuffle mode in Music Player
  • MP_SHUFFLE_OFF: Disables shuffle mode in Music Player
  • MP_FOLDER_x: x being 0-9, set folder number for Music Player
  • PLAYKEY_x: Play keyX.mp3 (from SD card), X being in the range from 1 to 9.
  • PLAYKEY_xL: Play keyXl.mp3 (from SD card), X being in the range from 1 to 9.
  • STOPKEY: Stop playback of keyX file. Does nothing if no keyX file is currently played back.
  • INJECT_x: See immediately below.

The INJECT_x command

This command allows remote control of the Remote through HA/MQTT in the same way as through the TCD keypad by injecting commands in the Remote's command queue (hence the name). Commands are listed here; nearly all are supported.

To toggle movie/linear mode (7060), issue the following command: INJECT_7060

To play "key2.mp3" (7502), issue INJECT_7502

To select the 'music1' folder (7051), issue INJECT_7051

Receive commands from Time Circuits Display

If both TCD and Remote are connected to the same broker, and the option Send time travel/alarm event notifications is checked on the TCD's side, the Remote will receive information on time travel and alarm and play their sequences in sync with the TCD. Unlike BTTFN, however, no other communication takes place. The actual remote controlling requires a BTTFN connection.

MQTT and BTTFN can co-exist. However, the TCD only sends out time travel and alarm notifications through either MQTT or BTTFN, never both. If you have other MQTT-aware devices listening to the TCD's public topic (bttf/tcd/pub) in order to react to time travel or alarm messages, use MQTT (ie check Send time travel/alarm event notifications). If only BTTFN-aware devices are to be used, uncheck this option to use BTTFN as it has less latency.

Setup

MQTT requires a "broker" (such as mosquitto, EMQ X, Cassandana, RabbitMQ, Ejjaberd, HiveMQ to name a few).

STAmode-mqtt

The broker's address needs to be configured in the Config Portal. It can be specified either by domain or IP (IP preferred, spares us a DNS call). The default port is 1883. If a different port is to be used, append a ":" followed by the port number to the domain/IP, such as "192.168.1.5:1884".

If your broker does not allow anonymous logins, a username and password can be specified.

Limitations: MQTT Protocol version 3.1.1; TLS/SSL not supported; ".local" domains (MDNS) not supported; server/broker must respond to PING (ICMP) echo requests. For proper operation with low latency, it is recommended that the broker is on your local network. MQTT is disabled when the Remote is operated in AP-mode or when connected to the TCD run in AP-Mode (TCD-AP).

Car setup

If your Time Circuits Display is mounted in a car, the following network configuration is recommended:

STAmode-car

TCD

  • Run your TCD in car mode;
  • disable WiFi power-saving on the TCD by setting Power save timer to 0 (zero) in the "AP-mode settings" section on the WiFi Configuration page.

Remote

Enter the Config Portal on the Remote, click on Setup and

  • enter 192.168.4.1 into the field IP address or hostname of TCD under BTTFN settings;
  • click on Save.

After the Remote has restarted, re-enter the Remote's Config Portal (while the TCD is powered and in car mode) and

  • click on WiFi Configuration,
  • select the TCD's access point name in the list at the top ("TCD-AP"; if there is no list, click on "WiFi Scan") or enter TCD-AP into the Network name (SSID) field; if you password-protected your TCD's AP, enter this password in the password field. Leave all other fields empty,
  • click on Save.

In order to access the Remote's Config Portal in this setup, connect your handheld or computer to the TCD's WiFi access point ("TCD-AP"), and direct your browser to http://dtmremote.local ; if that does not work, hold the Calibration button for 2 seconds while the Remote is fake-powered on, it will display its IP address. Then direct your browser to that IP by using the URL http://a.b.c.d (a-d being the IP address displayed on the Remote display).

This "car setup" can also be used in a home setup with no local WiFi network present.

WiFi power saving features

In AP-mode (ie when the device acts as an access point), WiFi can only be used for the Config Portal. Since changing settings in the Config Portal isn't something done on a regular basis, the Remote can switch off WiFi in AP-mode after a configurable period of time in order to save battery power.

To enable this power-saving feature, navigate to the "WiFi Configuration" page and enter into the field Power save timer in the "Settings for AP-mode" section the number of minutes that need to elapse from (real-)power-on until WiFi is supposed to be switched off. Anything between 10 and 99 minutes is allowed. Entering 0 disables this feature.

After WiFi has been switched off due to timer expiration, and the option Re-enable WiFi on Fake Power is checked, WiFi will be re-enabled on fake-power-up, and the timer is restarted (ie WiFi is again switched off after timer expiration).

If the Remote ended up in AP-mode because the configured WiFi network wasn't reachable on (real-)power up, and the option Attempt re-connection on Fake Power is checked, the Remote will attempt to connect to the WiFi network on fake-power-on (and, as usual, fall back to AP-mode on failure; the timer is, of course, restarted in that case).

Flash Wear

Flash memory has a somewhat limited lifetime. It can be written to only between 10.000 and 100.000 times before becoming unreliable. The firmware writes to the internal flash memory when saving settings and other data. Every time you change settings, data is written to flash memory.

In order to reduce the number of write operations and thereby prolong the life of your Remote, it is recommended to use a good-quality SD card and to check Save secondary settings on SD in the Config Portal; secondary settings are then stored on the SD card (which also suffers from wear but is easy to replace). See here for more information.

Appendix A: The Config Portal

Main page

⏩ WiFi Configuration

This leads to the WiFi configuration page

⏩ Settings

This leads to the Settings page.

⏩ HA/MQTT Settings

This leads to the HomeAssistant/MQTT Settings page.

⏩ Update

This leads to the firmware and audio update page.

In order to upload a new firmware binary (such as the ones published here in the install/ folder), select that image file in the top file selector and click "Update".

You can also install the Remote's sound-pack on this page; download the current sound-pack, extract it and select the resulting REMA.bin file in the bottom file selector. Finally, click "Upload". Note that an SD card is required for this operation.

Finally, this page is also for uploading custom or replacement sound files to the SD card. Select an mp3 file in the bottom file selector and click upload. (Requires firmware 1.06 or later. Maximum 16 files at a time.)


WiFi Configuration

Through this page you can either connect your Remote to your local WiFi network, or configure AP mode.

Connecting to an existing WiFi network

In order to connect your Remote to your WiFi network, all you need to do is either to click on one of the networks listed at the top or to enter a Network name (SSID), and optionally a password (WPAx). If there is no list displayed, click on "WiFi Scan".

By default, the Remote requests an IP address via DHCP. However, you can also configure a static IP for the Remote by entering the IP, netmask, gateway and DNS server. All four fields must be filled for a valid static IP configuration. If you want to stick to DHCP, leave those four fields empty. If you connect your Remote to your Time Circuits Display acting as access point ("TCD-AP"), leave these all empty.

If the WiFi network the Remote is supposed to connect to wasn't reachable when the Remote was powered up, it will run in AP mode. You can trigger a re-connection attempt by fake-powering it down and up. This technique is also used for WiFi power-saving in AP-mode, see here.

⏩ Forget Saved WiFi Network

Clicking this button (and selecting "yes" in the confirmation dialog) deletes the currently saved WiFi network (SSID and password as well as static IP data) and reboots the device; it will restart in "access point" (AP) mode. See here.

⏩ Hostname

The device's hostname in the WiFi network. Defaults to 'dtmremote'. This also is the domain name at which the Config Portal is accessible from a browser in the same local network. The URL of the Config Portal then is http://hostname.local (the default is http://dtmremote.local)

If you have more than one Remote in your local network, please give them unique hostnames.

This setting applies to both AP-mode and when your Remote is connected to a WiFi network.

⏩ WiFi connection attempts

Number of times the firmware tries to reconnect to a WiFi network, before falling back to AP-mode. See here

⏩ WiFi connection timeout

Number of seconds before a timeout occurs when connecting to a WiFi network. When a timeout happens, another attempt is made (see immediately above), and if all attempts fail, the device falls back to AP-mode. See here

⏩ Attempt re-connection on Fake Power

If the configured WiFi network wasn't reachable during power-up (and the Remote, as a result, fell back to AP-mode), and this option is checked, the Remote will re-try to connect to the configured WiFi network upon Fake-Power-On. If this option is unchecked, no connection attempts are made, the Remote will remain in AP-mode until (real-)powered-down.

Settings for AP-mode

⏩ Network name (SSID) appendix

By default, when your Remote creates a WiFi network of its own ("AP-mode"), this network is named "REM-AP". In case you have multiple Remotes in your vicinity, you can have a string appended to create a unique network name. If you, for instance, enter "-ABC" here, the WiFi network name will be "REM-AP-ABC". Characters A-Z, a-z, 0-9 and - are allowed.

⏩ Password

By default, and if this field is empty, the Remote's own WiFi network ("REM-AP") will be unprotected. If you want to protect your access point, enter your password here. It needs to be 8 characters in length and only characters A-Z, a-z, 0-9 and - are allowed.

If you forget this password and are thereby locked out of your Remote,

  • power-down the device,
  • hold the Calibration button,
  • power-up the device (while still holding the Calibration button)
  • wait until the display shows a counter-clockwise circle animation,
  • press Button "O.O" twice within 10 seconds,
  • wait until the display shows "RST",
  • then release the Calibration button.

This procedure temporarily (until a reboot) clears the WiFi password, allowing unprotected access to the Config Portal. (Note that this procedure also deletes static IP address data; the device will return to using DHCP after a reboot.)

⏩ WiFi channel

Here you can select one out of 11 channels, or have the Remote choose a random channel for you. The default channel is 1. Preferred are channels 1, 6 and 11.

WiFi channel selection is key for a trouble-free operation. Disturbed WiFi communication can lead to disrupted sequences, packet loss, hanging or freezing props, and other problems. A good article on WiFi channel selection is here.

If a WiFi Scan was done (which can be triggered by clicking "WiFI Scan"),

  • a list of networks is displayed at the top of the page; click "Show All" to list all networks including their channel;
  • a "proposed channel" is displayed near the "WiFi channel" drop-down, based on a rather simple heuristic. The banner is green when a channel is excellent, grey when it is impeded by overlapping channels, and when that banner is red operation in AP mode is not recommended due to channels all being used.

The channel proposition is based on all WiFi networks found; it does not take non-WiFi equipment (baby monitors, cordless phones, Bluetooth devices, microwave ovens, etc) into account.

⏩ Power save timer

See here.

⏩ Re-enable WiFi on Fake Power

If a power save timer is configured and has expired, and this option is checked, the Remote will re-enable WiFi upon Fake-Power-On. If this option is unchecked, WiFi will not be re-enabled, it will stay off until (real-)power down. See also here.


Settings

Basic settings

⏩ Auto throttle

If this is checked, acceleration is, after being started by pushing the throttle stick up, continued even if the stick is released into neutral. Acceleration is stopped when pulling down the throttle stick, or when 88mph is reached.

⏩ Coasting when throttle in neutral

Normally, when this is unchecked, keeping the throttle in neutral (center) position holds the current speed. If this option is checked, speed will slowly decrease in neutral, just like a car when the kludge is held down or the gear is in neutral.

⏩ Movie-like acceleration

The Remote knows to modes of acceleration: "Movie mode" and "linear".

In movie mode, acceleration changes with speed. At lower speeds, it is faster, and will gradually become slower as speed increases. The pace matches the movie mostly; unfortunately, the remote is only shown for a very few seconds and timing is inconsistent (to say the least), so some interpolations were required.

In linear mode, the acceleration curve is a straight line, ie the time between each mph is the same.

⏩ Play acceleration 'click' sound

Check this to play a click sound for each "mph" while accelerating. Uncheck to stay mute. Note that the click is only played when accelerating, not with reducing speed.

⏩ Play TCD-alarm sounds

If a TCD is connected via BTTFN or MQTT, the Remote visually signals when the TCD's alarm sounds. If you want to play an alarm sound, check this option.

⏩ Display TCD speed when fake-off

When this is checked, the Remote (when fake-powered off) shows whatever the TCD displays on its speedo. For instance, if your TCD is in a car along with a GPS-equipped speedo, the Remote can show the GPS speed.

⏩ Brightness level

This selects brightness level for the LED display.

This can also be done through buttons "O.O" and "RESET", as well as the TCD (7400-7415); a change through buttons or TCD is saved 10 seconds after it occurred.

Music Player settings

⏩ Music folder

Selects the current music folder, can be 0 through 9.

This can also be set/changed through a TCD keypad via BTTFN (7050 - 7059). Such a change will be saved immediately.

⏩ Shuffle at startup

When checked, songs are shuffled when the device is booted. When unchecked, songs will be played in order.

Shuffle mode can be changed at any time through the Remote's "RESET" button or via TCD (7222/7555); however, a change through button or TCD is not saved.

Settings for BTTFN communication

⏩ IP address or hostname of TCD

In order to connect your Remote to a Time Circuits Display wirelessly ("BTTF-Network"), enter the TCD's hostname - usually 'timecircuits' - or IP address here.

If you connect your Remote to the TCD's access point ("TCD-AP"), the TCD's IP address is 192.168.4.1.

⏩ Remote Fake-Power controls TCD Fake-Power

This selects the power-up behavior of Fake-Power control over the TCD.

If this option is checked, the Remote takes over Fake-Power control from the TCD when booting. If the TCD is powered-up after the Remote, it will recognize the Remote's state and stay silent and dark until the Remote is fake-powered up.

If this option is unchecked, you need to hold O.O to gain Fake-Power control on the TCD, as described here.

Other settings

⏩ Save secondary settings on SD

If this is checked, some settings (volume, etc) are stored on the SD card (if one is present). This helps to minimize write operations to the internal flash memory and to prolong the lifetime of your Remote. See Flash Wear.

Apart from flash Wear, there is another reason for using an SD card for settings: Writing data to internal flash memory can cause delays of up to 1.5 seconds, which interrupt sound playback and have other undesired effects. The Remote needs to save data from time to time, so for a smooth experience without unexpected and unwanted delays, please use an SD card and check this option.

It is safe to have this option checked even with no SD card present.

If you want copy settings from one SD card to another, do as follows:

  • With the old SD card still in the slot, enter the Config Portal, turn off Save secondary settings on SD, and click "SAVE".
  • After the Remote has rebooted, power down, and swap the SD card for your new one.
  • Power-up the Remote, enter the Config Portal, re-enable Save secondary settings on SD, and click "SAVE".

This procedure ensures that all your settings are copied from the old to the new SD card.

Button assignment settings

⏩ Pressing O.O when Fake-Power on

This selects what happens when you (briefly) press the O.O button when Fake-Power is on:

  • Plays previous song in Music Player: As it says, as part of Music Player control, O.O jumps to the previous song.
  • Makes throttle-up trigger a time travel: Briefly pressing O.O prepares a Time Travel, which is then triggered when pushing the throttle stick upward.
⏩ Holding O.O/RESET when Fake-Power off

This selects what happens when you hold the O.O or RESET button for 2 seconds when Fake-Power is off:

  • adjusts display brightness: O.O increases display brightness, RESET decreases it.
  • takes/releases control of TCD Fake Power: O.O takes over TCD Fake-Power control, RESET releases it.

Hardware configuration settings

⏩ Button x is maintained

You might want use one or more switches of the Futaba remote for sound effects and/or MQTT messages. If that switch is a maintained contact, check this option for the respective "button" number. Leave unchecked when using a momentary button.

⏩ Maintained: Play audio on ON only

If this is unchecked, audio is played on every flip (OFF->ON, ON->OFF) of the maintained switch. If checked, keyX is only played when the switch is brought into "ON" position. Check this if using three-position switches where both ON positions are wired to different "Buttons" on the Control Board.

⏩ Use Futaba Power LED

This setting is for using the Futaba's original power LED. If this LED isn't connected to the control board, this setting has no effect.

If unchecked, the power LED stays dark, which is the default. If checked, the power LED lights up on either real power or fake power.

⏩ Power LED on fake power

If unchecked, the power LED lights up on real power. If checked, it does so on fake power.

⏩ Use Futaba Battery Level Meter

This setting is for using the Futaba's original battery level meter. If this meter isn't connected to the control board, this setting has no effect.

If unchecked, the level meter stays at zero, which is the default. If checked, the level meter shows a fictious battery level of around 75%.

Please note that the meter does not show actual battery level; the built-in battery monitor, as described below, only works through the Stanley display.

⏩ Level Meter on fake power

If unchecked, the level meter comes to life on real power. If checked, it does so on fake power.

Battery monitoring

⏩ Battery monitoring/warnings

Enable or disable battery monitoring and respective warnings. Battery monitoring requires using an "M"-version Control Board, or a non-M version with the BatMon Add-On, plus a properly connected LiPo battery.

If the battery level is lower than 8 percent, a warning is issued. The way it is given depends on hardware and software settings, see here.

⏩ Battery type

Battery monitoring only works reliably with the LiPo batteries listed. Select the type you are using.

The battery CircuitSetup supplies as part of their kit is of the 3.7/4.2V type.

⏩ Capacity per cell (1000-6000)

Battery monitoring requires knowledge about the cell capacity. Note that the capacity per cell is required to be entered. Most batteries consist of two or more cells; in that case divide the nominal capacity by the number of cells and enter the number here.

The battery CircuitSetup supplies as part of their kit is a dual-cell 5000mAh LiPo battery. The value to enter here is therefore 2500.


HA/MQTT Settings

⏩ Use Home Assistant (MQTT 3.1.1)

If checked, the Remote will connect to the broker (if configured) and send and receive messages via MQTT

⏩ Broker IP[:port] or domain[:port]

The broker server address. Can be a domain (eg. "myhome.me") or an IP address (eg "192.168.1.5"). The default port is 1883. If different port is to be used, it can be specified after the domain/IP and a colon ":", for example: "192.168.1.5:1884". Specifying the IP address is preferred over a domain since the DNS call adds to the network overhead. Note that ".local" (MDNS) domains are not supported.

⏩ User[:Password]

The username (and optionally the password) to be used when connecting to the broker. Can be left empty if the broker accepts anonymous logins.

⏩ Button x topic

The MQTT topic for on/off messages. Nothing is published/sent if the topic is empty.

⏩ Button x message on ON/OFF

The MQTT message to publish to the button's topic when a button is pressed/released (or in case of a maintained switch: when the switch is put in "on"/"off" position). If a field is empty, nothing is published/sent.

Appendix B: Display messages

  • "ISP": Please install/update the sound pack
  • "BAT": Battery is low
  • "CAL", "UP", "DN": Shown during calibration
  • "ERR": Error while installing the sound-pack, or during calibration. Please try again.
  • "FUL": Battery is full, ie 100% charged
  • "IP": IP address is going to be shown.
  • "RST": WiFi password temporarily cleared; static IP permanently deleted

Text & images: (C) Thomas Winischhofer ("A10001986"). See LICENSE. https://remote.out-a-ti.me
Other props: Time Circuits Display ... Flux Capacitor ... SID ... Dash Gauges ... VSR ... TFC

About

Firmware for Futaba remote control kit (Delorean Time Machine)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 62.2%
  • C++ 37.7%
  • sed 0.1%