Skip to content

CircuitSetup/Flux-Capacitor

 
 

Repository files navigation

Flux Capacitor

This repository holds the most current firmware for CircuitSetup's excellent Flux Capacitor Light & Sound Control Board. The "Flux Capacitor" is a key component of the Delorean Time Machine.

The kit parts are available here.

Here is my FC, built around this Control Board and the other parts of the kit (backing board, window kit; see here for more information on the other parts used):

My Flux Capacitor My Flux Capacitor

Watch the video
Click to watch the video

The Flux Capacitor can be used stand-alone, or in connection with CircuitSetup's Time Circuits Display. If built properly, the Flux Capacitor is perfectly fit for mounting in your Delorean.

Features include

Power supply

Since the bright LEDs draw considerable power, it is recommended to use a short cable with large wire diameters (min AWG16) between the power supply and the FC, and to drive the FC at 12V-20V (as opposed to 5V). A long/thin cable, due to its resistance, might cause under-voltage and therefore problems like LEDs behaving erratically or even crashes of the FC's CPU.

Installation

If a previous version of the Flux Capacitor 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/fluxcapacitor-A10001986.ino.nodemcu-32s.bin).

If you are using a fresh ESP32 board, please see fluxcapacitor-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 inner and outer LEDs might blink alternately for short while after reboot. Do NOT unplug 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 either a the FC puts up a respective signal at startup, or your device is quiet after a firmware update, a re-installation/update is needed.

The first step is to download "install/sound-pack-xxxxxxxx.zip" and extract it. It contains one file named "FCA.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 this file in the bottom file selector and click on Upload.

  2. Via SD card:

  • Copy "FCA.bin" to the root directory of of a FAT32 formatted SD card;
  • power down the Flux Capacitor,
  • insert this SD card into the slot and
  • power up the Flux Capacitor; 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 FCs. They do not need to be repeated after a firmware update.

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

  • Power up your FC and wait until the startup sequence has completed.
  • Connect your computer or handheld device to the WiFi network "FC-AP".
  • Navigate your browser to http://flux.local or http://192.168.4.1 to enter the Config Portal.

Connecting to a WiFi network

Your FC 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 FC is unconfigured, it creates its own WiFi network named "FC-AP". This mode of operation is called "Access point mode", or "AP-mode".

It is ok to leave it in AP-mode, predominantly if used stand-alone. (To keep operating your FC in AP-mode, do not configure a WiFi network as described below, or check "Forget saved WiFi network" and click "Save" on the Config Portal's "WiFi Configuration" page.)

Please do not leave computers/hand helds permanently connected to the FC's AP. These devices might think they are connected to the internet and therefore hammer the FC with DNS and HTTP requests which might lead to packet loss and disruptions.

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

For experts: In the following, the term "WiFi network" is used for both "WiFi network" and "ip network" for simplicity reasons. However, for BTTFN/MQTT communication, the devices must (only) be on the same ip network, regardless of how they take part in it: They can be can be connected to different WiFi networks, if those WiFi networks are part of the same ip network, or, in case of the MQTT broker, by wire. If the TCD operates as access point for other props, connecting a prop to the TCD's WiFi network also takes care of suitable ip network configuration through DHCP.

▶ Home setup with a pre-existing local WiFi network

In this case, you can connect your FC to your home WiFi network: 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 FC reboots and tries to connect to your selected WiFi network. If that fails, it will again start in access point mode.

If you have a Time Circuits Display note that in order to have both FC and TCD communicate with each other, your FC must be connected to the same network your TCD is connected to. In order to use MQTT, your FC must be connected to the same network your broker is connected to.

Your FC 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, wait until it has completed its startup sequence, then type *123456OK on the IR remote; static IP data will be deleted and the device will return to DHCP after a reboot.

▶ Places without a WiFi network

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

If you have a TCD, you can connect your FC to the TCD's own WiFi network: Run the TCD in AP-Mode, and on your FC's Config Portal, click on "WiFi Configuration" and either select "TCD-AP" from the top of the page or enter "TCD-AP" under Network name (SSID). If you password-proteced your TCD-AP, enter this password below. See here for more details.

After completing WiFi setup, your FC 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 FC's configuration web site.

The Config Portal
The Config Portal's main page

It can be accessed as follows:

If FC is in AP mode

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

If FC is connected to a WiFi network

  • Connect your hand-held/computer to the same (WiFi) network to which the FC is connected, and

  • navigate your browser to http://flux.local

    Accessing the Config Portal through this address requires the operating system of your hand-held/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://flux.local fails due to a name resolution error, you need to find out the FC's IP address: Type *90 followed by OK on the supplied remote control and listen, the IP address will be spoken out loud. Then, on your handheld or computer, navigate to http://a.b.c.d (a.b.c.d being the IP address as read out loud by the FC) in order to enter the Config Portal.

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

Click for full screenshot

A full reference of the Config Portal is here.

Basic Operation

Well. It fluxes, ie the LEDs run a chase sequence. By default, this sequence matches the one in the movie in order and speed.

There are various options to control the Flux Capacitor:

  • Audio volume: Controlled by either remote control or a knob (if you chose to install one).
  • Chase speed: Controlled by either remote control or a knob (if you chose to install one).

For the options to trigger a time travel, see here.

The main control device is the supplied IR remote control. If a TCD is connected through BTTF-Network, the FC can also be controlled through the TCD's keypad.

IR remote control

Your FC kit includes an IR remote control. This remote works out-of-the-box and needs no setup.

Default IR remote control
The default IR remote control

Each time you press a (recognized) key on the remote, an IR feedback LED will briefly light up. This LED is located in the center of the board, next to the bright center LED.

IR Learning

Your FC can learn the codes of another IR remote control. Most remotes with a carrier signal of 38kHz (which most IR remotes use) will work. However, some remote controls, especially ones for TVs, send keys repeatedly and/or send different codes alternately. If you had the FC learn a remote and the keys are not (always) recognized afterwards, that remote is of that type and cannot be used.

As of firmware 1.72, IR learning can be initiated by entering *987654 followed by OK on the standard IR remote.

With earlier firmware versions, IR learning required a physical Time Travel button, and the option TCD connected by wire in the Config Portal needs to be unchecked. To start the learning process, hold the Time Travel button for a few seconds.

When IR learning is started, the chasing LEDs stop and blink twice. Afterwards, the IR feedback LED will keep blinking - this means the FC is ready to receive a key from your IR remote. Press "0" on your remote, which the FC will visually acknowledge. Then, again while the IR feedback LED is blinking, press "1", wait for the acknowledgement, and so on. Enter your keys in the following order:

0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - * - # - Arrow up - Arrow down - Arrow left - Arrow right - OK

If your remote control lacks the * (starts command sequence) and # (aborts command sequence) keys, you can use any other key, of course. * could be eg. "menu" or "setup", # could be "exit" or "return".

If no key is pressed for 10 seconds, the learning process aborts, as does briefly pressing the Time Travel button. In those cases, the keys already learned are forgotten and nothing is saved.

To make the FC forget a learned IR remote control, type *654321 followed by OK.

Locking IR control

You can have your FC ignore IR commands from any IR remote control (be it the default supplied one, be it one you had the FC learn) by entering *70 followed by OK. After this sequence, the FC will ignore all IR commands until *70OK is entered again. The purpose of this function is to enable you to use the same remote for your FC and other props (such as SID).

Note that the status of the IR lock is saved 10 seconds after its last change, and is persistent across reboots.

In order to only disable the supplied IR remote control, check the option Disable supplied IR remote control in the Config Portal. In that case, any learned remote will still work.

Remote control reference

Single key actions
[Code on TCD keypad]
1
Play "key1.mp3"
[3001]
2
Music Player: Previous song
[3002]
3
Play "key3.mp3"
[3003]
4
Play "key4.mp3"
[3004]
5
Music Player: Play/Stop
[3005]
6
Play "key6.mp3"
[3006]
7
Play "key7.mp3"
[3007]
8
Music Player: Next song
[3008]
9
Play "key9.mp3"
[3009]
*
Start command sequence
0
Time Travel
#
Abort command sequence

Increase audio volume
(unless knob is enabled)

Decrease chase speed (*)
OK
Execute command

Increase chase speed (*)

Decrease audio volume
(unless knob is enabled)

Numbers in brackets are the code to be entered on the TCD keypad if a TCD is connected via BTTF-Network.

Special sequences
(⏎ = OK key)
FunctionCode on remoteCode on TCD
Select original chase sequence *10⏎3010
Select chase sequences 1-9 *11⏎ - *19⏎3011-3019
Disable flux sound *20⏎3020
Enable flux sound *21⏎3021
Enable flux sound (30 seconds) *22⏎3022
Enable flux sound (60 seconds) *23⏎3023
Set relative flux volume level (0-3) *30⏎ - *33⏎3030-3033
Select audio volume level (00-19) *300⏎ - *319⏎3300-3319
Enable built-in volume knob *399⏎3399
Set minimum box light level (0-4) *400⏎ - *34⏎3400-3404
Music Player: Select music folder (0-9) *50⏎ - *59⏎3050-3059
Music Player: Shuffle off *222⏎3222
Music Player: Shuffle on *555⏎3555
Music Player: Go to song 0 *888⏎3888
Music Player: Go to song xxx *888xxx⏎3888xxx
Disable/Enable IR remote commands *70⏎3070
Reset chase speed to default (*) *80⏎3080
Toggle usage of speed knob *81⏎3081
Say current IP address *90⏎3090
Enter TCD keypad remote control mode *95⏎3095
Reboot the device *64738⏎3064738
Delete static IP address and AP WiFI password *123456⏎3123456
Start IR remote learning process *987654⏎3987654
Forget learned IR remote control *654321⏎3654321

(*) Chase speed changes are not executed if a speed knob is active; if the FC uses GPS speed from a TCD, the commands have no visual effect, but the changes are saved.

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.)

The Flux sound

By default, the FC plays a "flux" sound continuously.

The flux sound can be permanently disabled, permanently enabled, or enabled for 30 or 60 seconds

  • upon triggering a time travel,
  • after switching on the FC (real or fake power),
  • after a BTTFN event that has impact on the FC (eg. changing speed through a rotary encoder on the TCD)

The different modes are selected by typing *20 (disabled), *21 (enabled), *22 (enabled for 30 secs) or *23 (enabled for 60 secs), followed by OK. The power-up default is selected in the Config Portal.

The flux sound's volume level, relative to general volume, can be adjusted in four levels by typing *30 (lowest) to *33 (loudest), followed by OK. This setting is saved 10 seconds after the last change.

Box lighting

The FC features connectors for box lights, ie LEDs that light up the inside of the FC during the time travel sequence. Those should be installed, they are essential part of the time travel sequence. The kit from CircuitSetup contains suitable high-power LEDs for box lighting, and all four of those must be connected to the "Box LED" connectors. Their ideal location is in each corner, as close to the front (door) as possible.

In normal operation, those LEDs are off. You can, however, configure a minimum box light level to light up the box a little bit if you find it too dark. This level can be chosen out of five, by entering *400 through *404 followed by OK.

As an alternative to the included LEDs, one could use four pieces of 3W High-Power KEYES LED modules and drive them via the GPIO14 connector. Since those draw quite much power, their power pins should be connected directly to the power supply (provided you drive your FC at 5V; otherwise you need to grab the power from the control board), and only the "PWD" input should be wired to the "IO14" pin of the "GPIO14" connector. If you use the GPIO14 connector for your box LEDs, check the Use GPIO14 for Box Lights option in the Config Portal.

Time travel

To travel through time, type "0" on the remote control. The Flux Capacitor will play its time travel sequence.

You can also connect a physical button to your FC; the button must connect "GPIO" to "3.3V" on the "Time Travel" connector. Pressing this button briefly will trigger a time travel.

Other ways of triggering a time travel are available if a Time Circuits Display is connected.

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 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 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. The chosen chase sequence (*1x) is only stored on SD, so for your selection to be persistent across reboots, an SD card is required.

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

Since the SD card on the control board is inaccessible after assembling the FC, I used a microSD extension (like this one), and mounted the slot through a hole in the bottom of my FC so that the SD card can be accessed at any time. See here.

Sound substitution

The FC'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:

  • "flux.mp3". The standard flux sound, played continuously;
  • "alarm.mp3". Played when the alarm sounds (triggered by a Time Circuits Display via BTTFN or MQTT);
  • "0.mp3" through "9.mp3", "dot.mp3": Numbers for IP address read-out.

The following sounds are time-sync'd to display action. If you decide to substitute these with your own, be prepared to lose synchronicity:

  • "travelstart.mp3". Played when a time travel starts.
  • "timetravel.mp3". Played when re-entry of a time travel takes place.
  • "startup.mp3". Played when the Flux Capacitor is connected to power and finished booting

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.

  • "key1.mp3", "key3.mp3", "key4.mp3", "key6.mp3", "key7.mp3", "key9.mp3": Will be played if you press the "1"/"3"/"4"/"6"/"7"/"9" button on your remote.

The seemingly odd numbering is because of synchronicity with other props, especially the TCD and its keymap where the MusicPlayer also occupies keys 2, 5, 8.

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

Installing Custom & Replacement Audio Files

As of version 1.80 of the FC firmware, above mentioned audio files (both 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 default audio files; 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 FC 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 using the remote control or through the TCD keypad (305x).

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 (10 minutes for 1000 files in bad cases). Mac users are advised to delete the ._ files from the SD before putting it back into the FC as this speeds up the process.

To start and stop music playback, press 5 on your remote. Pressing 2 jumps to the previous song, pressing 8 to the next one.

By default, the songs are played in order, starting at 000.mp3, followed by 001.mp3 and so on. By entering *555 and pressing OK, you can switch to shuffle mode, in which the songs are played in random order. Type *222 followed by OK to switch back to consecutive mode.

Entering *888 followed by OK re-starts the player at song 000, and *888xxx (xxx = three-digit number) jumps to song #xxx.

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

While the music player is playing music, other sound effects are disabled/muted. Initiating a time travel stops the music player. The TCD-triggered alarm will sound as usual and stop the music player.

Connecting a Time Circuits Display

BTTF-Network ("BTTFN")

The TCD can communicate with the FC wirelessly, via the built-in "Basic-Telematics-Transmission-Framework" over WiFi. It can send out information about a time travel and an alarm, and the FC queries the TCD for speed and some other data. Furthermore, the TCD's keypad can be used to remote-control the FC.

Watch the video
Click to watch the video

Note that the TCD's firmware must be up to date for BTTFN. You can use this one or CircuitSetup's release 2.9 or later.

BTTFN connection

In order to connect your FC to the TCD using BTTFN, just enter the TCD's IP address or hostname in the IP address or hostname of TCD field in the FC's Config Portal. On the TCD, no special configuration is required.

Afterwards, the FC and the TCD can communicate wirelessly and

  • play time travel sequences in sync,
  • both play an alarm-sequence when the TCD's alarm occurs,
  • the FC can be remote controlled through the TCD's keypad (command codes 3xxx),
  • the FC can remote control the TCD's keypad (see below)
  • the FC queries the TCD for GPS speed if desired to adapt chase speed to GPS speed,
  • the FC queries the TCD for fake power and night mode, in order to react accordingly if so configured,
  • pressing "0" on the IR remote control or the FC's Time Travel button can trigger a synchronized Time Travel on all BTTFN-connected devices, just like if that Time Travel was triggered through the TCD.

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

Remote controlling the TCD's keypad

The FC can, through its IR remote control, remote control the TCD keypad. The TCD will react to pressing a key on the IR remote as if that key was pressed on the TCD keypad.

In order to start TCD keypad remote control, type *95OK on the FC's IR remote control.

Keys 0-9 as well as OK (=ENTER) will now be registrered by the TCD as key presses.

"Holding" a key on the TCD keypad is emulated by pressing * followed by the key, for instance *1 (in order to toggle the TCD alarm). Only keys 0-9 can be "held".

Pressing # quits TCD keypad remote control mode.

Since the TCD itself can remote control every other compatible prop (3xxx = Flux Capacitor, 6xxx = SID, 7xxx = Futaba Remote Control, 8xxx = VSR, 9xxx = Dash Gauges), and the IR remote can emulate the TCD keypad, it can essentially remote control every other prop.

Connecting a TCD by wire

Note that a wired connection only allows for synchronized time travel sequences, no other communication takes place. A wireless connection over BTTFN/WiFi is much more powerful and therefore recommended over a wired connection.

For a connection by wire, connect GND and GPIO on the Flux Capacitor's "Time Travel" connector to the TCD like in the table below:

Flux Capacitor TCD with control board >=1.3 TCD with control board 1.2
GND of "Time Travel" connector GND of "Time Travel" connector GND of "IO14" connector
TT_IN of "Time Travel" connector TT OUT of "Time Travel" connector IO14 of "IO14" connector

Do not connect 3V3 to the TCD!

Next, head to the Config Portal and set the option TCD connected by wire. On the TCD, the option "Control props connected by wire" must be set.

You can connect both the TCD and a button to the TT connector, which might be handy in case you want to have the FC learn an IR remote control without fiddling with cables. But the button should not be pressed when the option TCD connected by wire is set, as it might yield unwanted results. Also, note that the button connects IO13 to 3_3V (not GND!).

Home Assistant / MQTT

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

Control the FC via MQTT

The FC can - to some extent - be controlled through messages sent to topic bttf/fc/cmd. Support commands are

  • TIMETRAVEL: Start a time travel
  • FASTER, SLOWER: Make chase faster or slower. Only if speed knob is deactivated.
  • RESETSPEED: Reset chase speed to default. Only if speed knob is deactivated.
  • CHASE_x: x being 0-9, change chase pattern
  • FLUX_OFF: Disables the flux sound
  • FLUX_ON: Enables the flux sound
  • FLUX_30: Enables the flux sound for 30 seconds
  • FLUX_60 Enables the flux sound for 60 seconds
  • 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 Music Folder number for Music Player

Receive commands from Time Circuits Display

If both TCD and FC are connected to the same broker, and the option Send event notifications is checked on the TCD's side, the FC 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.

MQTT 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 event notifications). If only BTTFN-aware devices are to be used, uncheck this option to use BTTFN as it has less latency.

Setup

In order to connect to a MQTT network, a "broker" (such as mosquitto, EMQ X, Cassandana, RabbitMQ, Ejjaberd, HiveMQ to name a few) must be present in your network, and its address needs to be configured in the Config Portal. The broker 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.

Note that MQTT is disabled when your FC is operated in AP-mode or when connected to the TCD run in AP-Mode (TCD-AP).

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.

Car setup

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

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.

Flux Capacitor

Enter the Config Portal on the FC, click on Settings and

  • enter 192.168.4.1 into the field IP address or hostname of TCD under BTTFN settings;
  • check the option Follow TCD fake power if you have a fake power switch for the TCD (like eg a TFC switch)
  • click on Save.

After the FC has restarted, re-enter the FC'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 FC's Config Portal in your car, connect your hand held or computer to the TCD's WiFi access point ("TCD-AP"), and direct your browser to http://flux.local ; if that does not work, go to the TCD's keypad menu, press ENTER until "BTTFN CLIENTS" is shown, hold ENTER, and look for the FC's IP address there; 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 TCD display).

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

Flash Wear

Flash memory has a somewhat limited life-time. 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 Flux Capacitor, it is recommended to use a good-quality SD card and to check Save secondary settings on SD in the Config Portal; alarm and speed settings as well as learned IR codes 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.

▶ 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 FC's sound-pack on this page; download the current sound-pack, extract it and select the resulting FCA.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.80 or later. Maximum 16 files at a time.)


WiFi Configuration

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

Connecting to an existing WiFi network

In order to connect your FC 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 passwort (WPAx). If there is no list displayed, click on "WiFi Scan".

By default, the FC requests an IP address via DHCP. However, you can also configure a static IP for the FC 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 FC to your Time Circuits Display acting as access point ("TCD-AP"), leave these all empty.

▶ Forget Saved WiFi Network

Checking this box (and clicking SAVE) 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 'flux'. 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://flux.local)

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

This setting applies to both AP-mode and when your FC 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

Settings for AP-mode

▶ Network name (SSID) appendix

By default, when your FC creates a WiFi network of its own ("AP-mode"), this network is named "FC-AP". In case you have multiple FCs 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 "FC-AP-ABC". Characters A-Z, a-z, 0-9 and - are allowed.

▶ Password

By default, and if this field is empty, the FC's own WiFi network ("FC-AP") will be unprotected. If you want to protect your FC 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 FC, enter *123456 followed by OK on the IR remote control; this deletes the WiFi password. Then power-down and power-up your FC and the access point will start unprotected.

▶ WiFi channel

Here you can select one out of 11 channels, or have the FC 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.


Settings

Basic settings

▶ Default flux sound mode

Selects the power-up "flux" sound mode. "Auto: xx secs" enables the beep for xx seconds after triggering a time travel, upon power-on, and then the TCD sends a respective signal through BTTFN.

Can be changed at any time by typing *00 (off), *01 (on), *02 (Auto 30secs) or *03 (Auto 60secs) followed by OK, or through the TCD's keypad. Note that a change through remote or TCD is not saved.

▶ Movie sequence for 7 lights

The original flux capacitor circuit was designed for 7 lights per light bar; however, only 6 lights were installed. So there is a visual gap in the movie sequence. This option allows choosing between the 7-lights sequence (with gap), and a 6-lights sequence (without gap). Defaults to enabled.

▶ Skip Box Light animation

Normally, the Box LEDs flash during the time travel sequence. If you prefer to instead have them constantly on during a time travel, check this option.

▶ Play time travel sounds

If other props are connected, they might bring their own time travel sound effects. In this case, you can uncheck this to disable the Flux Capacitor's own time travel sounds. Note that this only covers sounds played during time travel, not other sound effects.

▶ Play TCD-alarm sounds

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

▶ Screen saver timer

Enter the number of minutes until the Screen Saver should become active when the FC is idle.

The Screen Saver, when active, stops the flux sound and disables all LEDs, until

  • a key on the IR remote control is pressed; if IR is locked, only the # key deactivates the Screen Saver;
  • the time travel button is briefly pressed (the first press when the screen saver is active will not trigger a time travel),
  • on a connected TCD, a destination date is entered (only if TCD is wirelessly connected) or a time travel event is triggered (also when wired).

The music player will continue to run.

Music Player settings

▶ 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 FC's remote control (*222 / *555) or via TCD (3222/3555); however, a change through remote or TCD is not saved.

Settings for BTTFN communication

▶ IP address or hostname of TCD

If you want to have your FC to communicate with a Time Circuits Display wirelessly ("BTTF-Network"), enter the TCD's hostname - usually 'timecircuits' - or IP address here.

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

▶ Change chase speed with GPS speed

If this option is checked and your TCD is equipped with a GPS sensor or a rotary encoder, the FC will adapt its chase speed to current GPS speed or the reading of the encoder, respectively.

While the FC receives GPS speed (or the reading from a rotary encoder) from the TCD, IR controls and MQTT commands for chase speed are not entirely ignored: They have no visual effect, but they are saved.

▶ Follow TCD night-mode

If this option is checked, and your TCD goes into night mode, the FC will activate the Screen Saver with a very short timeout, and reduce its audio volume.

▶ Follow TCD fake power

If this option is checked, and your TCD is equipped with a fake power switch, the FC will also fake-power up/down. If fake power is off, no LED is active and the FC will ignore all input from buttons, knobs and the IR control.

▶ '0' and button trigger BTTFN-wide TT

If the FC is connected to a TCD through BTTFN, this option allows to trigger a synchronized time travel on all BTTFN-connected devices when pressing "0" on the IR remote control or pressing the Time Travel button, just as if the Time Travel was triggered by the TCD. If this option is unchecked, pressing "0" or the Time Travel button only triggers a Time Travel sequence on the FC.

Home Assistant / MQTT settings

▶ Use Home Assistant (MQTT 3.1.1)

If checked, the FC 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.

Settings for wired connections

▶ TCD connected by wire

Check this if you have a Time Circuits Display connected by wire. Note that a wired connection only allows for synchronized time travel sequences, no other communication takes place.

While you can connect both a button and the TCD to the "time travel" connector on the FC, the button should not be pressed when this option is set, as it might yield unwanted effects.

Do NOT check this option if your TCD is connected wirelessly (BTTFN, MQTT).

▶ TCD signals Time Travel without 5s lead

Usually, the TCD signals a time travel with a 5 seconds lead, in order to give a prop a chance to play an acceleration sequence before the actual time travel takes place. Since this 5 second lead is unique to CircuitSetup props, and people sometimes want to connect third party props to the TCD, the TCD has the option of skipping this 5 seconds lead. If that is the case, and your Flux Capacitor is connected by wire, you need to set this option.

If your FC is connected wirelessly, this option has no effect.

Other settings

▶ Save secondary settings on SD

If this is checked, secondary settings (volume, chase speed, minimum box light level, IR lock status, learned IR keys) 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 Flux Capacitor. 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 FC needs to save data from time to time, so in order 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 FC has rebooted, power it down, and swap the SD card for your new one.
  • Power-up the FC, 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.

Hardware configuration settings

▶ Use 'GPIO14' for box lights

Normally, box lights are connected to the "Box LED" connectors. Check this option if your box lights are instead connected to the "GPIO14" connector.

▶ Use speed knob by default

Check this if your FC has a pot for chasing speed selection and you want to use this pot. Note that if this option is checked, commands regarding chasing speed from the remote control are ignored.

▶ Disable supplied IR remote control

Check this to disable the supplied remote control; the FC will only accept commands from a learned IR remote (if applicable).

Note that this only disables the supplied remote, unlike IR locking, where IR commands from any known remote are ignored.

Appendix B: LED signals

○ ● ● ● ● ●
● ● ● ● ● ○
Please wait, busy
● ● ● ● ● ○
● ● ● ● ● ●
● ● ● ● ● ○
● ● ● ● ● ●
Error: Sound pack not installed or outdated
○ ○ ● ● ● ●
● ● ● ● ○ ○
Error: Sound pack installation error
○ ● ● ● ● ●
● ● ● ● ● ●
○ ● ● ● ● ●
● ● ● ● ● ●
Error: Unknown/illegal input from remote control
○ ○ ○ ● ● ●
● ● ● ○ ○ ○
Alarm (from TCD via BTTFN/MQTT)
○ ○ ○ ○ ○ ○ (1000ms)
● ● ● ● ● ● (1000ms)
○ ○ ○ ○ ○ ○ (1000ms)
● ● ● ● ● ● (1000ms)
IR Learning: Start
● ● ○ ○ ● ●
● ● ● ● ● ●
● ● ○ ○ ● ●
● ● ● ● ● ●
IR Learning: Next
○ ○ ○ ○ ○ ○ (500ms)
● ● ● ● ● ● (500ms)
○ ○ ○ ○ ○ ○ (500ms)
● ● ● ● ● ● (500ms)
IR Learning: Done
○ ● ○ ● ○ ●
● ● ● ● ● ●
○ ● ○ ● ○ ●
● ● ● ● ● ●
TCD remote control mode started
● ○ ● ○ ● ○
● ● ● ● ● ●
TCD remote control mode end
● ● ● ○ ● ○
● ● ● ● ● ●
● ● ● ○ ● ○
● ● ● ● ● ●
No music files in currently selected music folder

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

About

Firmware for CircuitSetup's Flux Capacitor kit, known from the Delorean Time Machine

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 63.5%
  • C++ 36.4%
  • Other 0.1%