This repository holds the most current firmware for CircuitSetup's magnificent SID. The SID, also known as "Field Containment System Display", is an important part of Doc Brown's time machine in the "Back to the Future" movies.
The hardware is available here.
Features include
- various idle patterns
- Time Travel function, triggered by button, Time Circuits Display or via MQTT
- IR remote controlled; can learn keys from third-party remote
- Spectrum Analyzer mode via built-in microphone
- Advanced network-accessible Config Portal for setup with mDNS support for easy access (http://sid.local, hostname configurable)
- Wireless communication with Time Circuits Display ("BTTF-Network"); used for synchonized time travels, GPS-speed adapted patterns, alarm, night mode, fake power and remote control through TCD keypad
- Home Assistant (MQTT 3.1.1) support
- Siddly and Snake games
- SD card support
There are different alternative ways to install this firmware:
-
If a previous version of the SID firmware was installed on your device, you can upload the provided pre-compiled binary to update to the current version: Enter the Config Portal, click on "Update" and select the pre-compiled binary file provided in this repository ("install/sid-A10001986.ino.nodemcu-32s.bin").
-
Using the Arduino IDE or PlatformIO: Download the sketch source code, all required libraries, compile and upload it. This method is the one for fresh ESP32 boards and/or folks familiar with the programming tool chain. Detailed build information is in sid-A10001986.ino.
Important: After a firmware update, a "wait" symbol (hourglass) might be shown for up to a minute after reboot. Do NOT unplug the device during this time.
A good first step would be to establish access to the Config Portal in order to configure your SID.
As long as the device is unconfigured, as is the case with a brand new SID, or later if it for some reason fails to connect to a configured WiFi network, it starts in "access point" mode, i.e. it creates a WiFi network of its own named "SID-AP". This is called "Access Point mode", or "AP-mode".
- Power up the device and wait until the startup sequence has completed.
- Connect your computer or handheld device to the WiFi network "SID-AP".
- Navigate your browser to http://sid.local or http://192.168.4.1 to enter the Config Portal.
If you want your SID to connect to your WiFi network, click on "Configure WiFi". The bare minimum is to select an SSID (WiFi network name) and a WiFi password.
Note that the device requests an IP address via DHCP, unless you entered valid data in the fields for static IP addresses (IP, gateway, netmask, DNS).
After saving the WiFi network settings, the device reboots and tries to connect to your configured WiFi network. If that fails, it will again start in access point mode.
If the device is inaccessible as a result of wrong static IPs, wait until the SID 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.
If you have your SID, along with a Time Circuits Display, mounted in a car, see also here.
The Config Portal is accessible exclusively through WiFi. As outlined above, if the device is not connected to a WiFi network, it creates its own WiFi network (named "SID-AP"), to which your WiFi-enabled hand held device or computer first needs to connect in order to access the Config Portal.
If the operating system on your handheld or computer supports Bonjour (a.k.a. "mDNS"), you can enter the Config Portal by directing your browser to http://sid.local. (mDNS is supported on Windows 10 version TH2 (1511) [other sources say 1703] and later, Android 13 and later, MacOS, iOS)
If that fails, the way to enter the Config Portal depends on whether the device is in access point mode or not.
- If it is in access point mode (and your handheld/computer is connected to the WiFi network "SID-AP"), navigate your browser to http://192.168.4.1
- Otherwise type *90 followed by OK on the remote control; the IP address will be shown on the display.
In the main menu, click on "Setup" to configure your SID.
The Config Portal's Setup page |
A full reference of the Config Portal is here.
When the SID is idle, it shows an idle pattern. There are alternative idle patterns to choose from, selected by *10OK through *14OK on the remote, or via MQTT. If an SD card is inserted, the setting will be persistent accross reboots.
If the option Adhere strictly to movie patterns is set (which is the default), the idle patterns #0 through #3 will only use patterns extracted from the movies (plus some interpolations); the same goes for when GPS speed is used. If this option is unset, random variations are shown, which is less boring, but also less accurate.
For ways 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 SID can also be controlled through the TCD's keypad.
Your SID has an IR remote control included. This remote works out-of-the-box and needs no setup.
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 at the bottom of the board.
Your SID 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, expecially ones for TVs, send keys repeatedly and/or send different codes alternately. If you had the SID learn a remote and the keys are not (always) recognized afterwards or appear to the pressed repeatedly while held, that remote is of that type and cannot be used.
First, go to the Config Portal, uncheck TCD connected by wire on the Setup page and save. The SID reboots. Afterwards, to start the learning process, hold the Time Travel button for a few seconds, until the displays shows "GO" followed by "0". Then press "0" on your remote, which the SID will visually acknowledge by displaying the next key to press. Then 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 thoses cases, the keys already learned are forgotten and nothing is saved.
To make the SID forget a learned IR remote control, type *654321 followed by OK.
You can have your SID ignore IR commands from any IR remote control (be it the default supplied one, be it one you had the SID learn) by entering *71 followed by OK. After this sequence the SID will ignore all IR commands until *71OK is entered again. The purpose of this function is to enable you to use the same IR control for your SID and other props (such as Flux Capacitor).
Note that the status of the IR lock is saved 10 seconds after its last change, and is persistent accross 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.
Single key actions | ||
1 Games: Quit |
2 - |
3 Games: New game |
4 - |
5 - |
6 - |
7 - |
8 - |
9 Games: Pause |
* Start command sequence |
0 Time Travel Siddly: Fall down |
# Abort command sequence |
↑ Increase Brightness Siddly: Rotate Snake: Up |
||
← Games: Left |
OK Execute command |
→ Games: Right |
↓ Decrease Brightness Games: Down |
Special sequences (⏎ = OK key) |
||
Function | Code on IR | Code on TCD |
Default idle pattern | *10⏎ | 6010 |
Idle pattern 1 | *11⏎ | 6011 |
Idle pattern 2 | *12⏎ | 6012 |
Idle pattern 3 | *13⏎ | 6013 |
Idle pattern 4 | *14⏎ | 6014 |
Switch to idle mode | *20⏎ | 6020 |
Start Spectrum Analyzer | *21⏎ | 6021 |
Start Siddly game | *22⏎ | 6022 |
Start Snake game | *23⏎ | 6023 |
Enable/disable "strictly movie patterns" | *50⏎ | 6050 |
Enable/disable peaks in Spectrum Analyzer | *51⏎ | 6051 |
Disable/Enable IR remote commands | *71⏎ | 6071 |
Display current IP address | *90⏎ | 6090 |
Reboot the device | *64738⏎ | 6064738 |
Delete static IP address and WiFi-AP password |
*123456⏎ | 6123456 |
Delete learned IR remote control | *654321⏎ | 6654321 |
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.)
To travel through time, type "0" on the remote control. The SID will play its time travel sequence.
You can also connect a physical button to your SID; the button must shorten "TT" and "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.
The spectrum analyzer (or rather: frequency-separated vu meter) works through a built-in microphone. This microphone is located behind the right hand side center hole of the enclosure.
Sticky peaks are optional, they can be switched on/off in the Config Portal and by typing *51 followed by OK on the remote.
Siddly is a simple game where puzzle pieces of various shapes fall down from the top. You can slide them left and right, as well as rotate them while they are falling. When the piece lands at the bottom, a new piece will appear at the top and start falling down. If a line at the bottom is completely filled with fallen pieces or parts thereof, that line will be cleared, and everything piled on top of that line will move down. The target is to keep the pile at the bottom as low as possible; the game ends when the pile is as high as the screen and no new piece has room to appear. I think you get the idea. Note that the red LEDs at the top are not part of the playfield (but show a level-progress bar instead), the field only covers the yellow and green LEDs, and that simularities of Siddly with computer games, especially older ones, exist only in your imagination.
Snakes like apples (at least so I have heard). You control a snake that feels a profound urge to eat apples. After each eaten apple, the snake grows, and a new apple appears. Unfortunately, snakes don't like to hit their heads, so you need to watch out that the snake's head doesn't collide with its body.
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). I am currently using Transcend SDHC 4GB cards and those work fine.
The SD card is used for saving secondary settings, in order to avoid flash wear on the SID's ESP32. The chosen idle pattern (*1x) is only stored on SD, so for it to be persistent accross 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 SID is running. Furthermore, do not remove the SD card while the device is powered.
Connect GND and GPIO on the SID's "Time Travel" connector to the TCD like in the table below:
SID: "Time Travel" connector |
TCD control board 1.2 | TCD control board 1.3 |
GND | GND of "IO13" connector | GND on "Time Travel" connector |
TT | IO13 of "IO13" connector | TT OUT on "Time Travel" connector |
Next, head to the Config Portal and set the ooption TCD connected by wire. On the TCD, the option "Control props connected by wire" must be set.
Note that a wired connection only allows for synchronized time travel sequences, no other communication takes place. Therefore I strongly recommend a wireless BTTFN connection, see immediately below.
The TCD can communicate with the SID wirelessly, via WiFi. It can send out information about a time travel and an alarm, and the SID queries the TCD for speed and some other data. Furthermore, the TCD's keypad can be used to remote-control the SID.
In order to connect your SID 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 SID's Config Portal. On the TCD, no special configuration is required. Note that you need TCD firmware 2.9.1 or later for using a hostname; previous versions only work with an IP address.
Afterwards, the SID 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 SID can be remote controlled through the TCD's keypad (command codes 6xxx),
- the SID queries the TCD for GPS speed if desired to adapt its idle pattern to GPS speed,
- the SID queries the TCD for fake power and night mode, in order to react accordingly if so configured.
You can use BTTF-Network and MQTT at the same time, see immediately below.
The SID supports the MQTT protocol version 3.1.1 for the following features:
The SID can - to a some extent - be controlled through messages sent to topic bttf/sid/cmd. Support commands are
- TIMETRAVEL: Start a time travel
- IDLE: Switch to idle mode
- SA: Start spectrum analyzer
- IDLE_0, IDLE_1, IDLE_2, IDLE_3, IDLE_4: Select idle pattern
If both TCD and SID are connected to the same broker, and the option Send event notifications is checked on the TCD's side, the SID 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 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.
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.
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.
If your SID, along with a Time Circuits Display, is mounted in a car, the following network configuration is recommended:
- Run your TCD in car mode;
- disable WiFi power-saving on the TCD by setting WiFi power save timer for AP-mode to 0 (zero).
Enter the Config Portal on the SID (as described above), click on Setup and
- enter 192.168.4.1 into the field IP address or hostname of TCD
- 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 SID has restarted, re-enter the SID's Config Portal (while the TCD is powered and in car mode) and
- click on Configure WiFi,
- select the TCD's access point name in the list at the top or enter TCD-AP into the 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.
Using this setup enables the SID to receive notifications about time travel and alarm wirelessly, and to query the TCD for data. Also, the TCD keypad can be used to remote-control the SID.
In order to access the SID'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://sid.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 SID'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).
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 SID, it is recommended to use a good-quality SD card and to check "Save secondary settings on SD" in the Config Portal; some settings as well as learned IR codes are then stored on the SD card (which also suffers from wear but is easy to replace). If you want to swap the SD card but preserve your settings, go to the Config Portal while the old SD card is still in place, uncheck the Save secondary settings on SD option, click on Save and wait until the device has rebooted. You can then power down, swap the SD card and power-up again. Then go to the Config Portal, change the option back on and click on Save. Your settings are now on the new SD card.
Clicking this leads to the WiFi configuration page. On that page, you can connect your SID to your WiFi network by selecting/entering the SSID (WiFi network name) as well as a password (WPA2). By default, the SID requests an IP address via DHCP. However, you can also configure a static IP for the SID 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.
Note that this page has nothing to do with Access Point mode; it is strictly for connecting your SID to an existing WiFi network as a client.
This leads to the Setup page.
This reboots the SID. No confirmation dialog is displayed.
This leads to the firmware update page. You can select a locally stored firmware image file to upload (such as the ones published here in the install/ folder).
Clicking this (and saying "yes" in the confirmation dialog) erases the WiFi configuration (WiFi network and password) and reboots the device; it will restart in "access point" mode. See here.
Enter the number of minutes until the Screen Saver should become active when the SID is idle.
The Screen Saver, when active, 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).
Check this to disable the supplied remote control; the SID 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.
The device's hostname in the WiFi network. Defaults to 'sid'. 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://sid.local)
If you have more than one SID in your local network, please give them unique hostnames.
By default, if the SID creates a WiFi network of its own ("AP-mode"), this network is named "SID-AP". In case you have multiple SIDs 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 "SID-AP-ABC". Characters A-Z, a-z, 0-9 and - are allowed.
By default, and if this field is empty, the SID's own WiFi network ("AP-mode") will be unprotected. If you want to protect your SID 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 SID, enter *123456 followed by OK on the IR remote control; this deletes the WiFi password. Then power-down and power-up your SID and the access point will start unprotected.
Number of times the firmware tries to reconnect to a WiFi network, before falling back to AP-mode. See here
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
Check this if you have a Time Circuits Display connected by wire. You can only connect either a button or the TCD to the "time travel" connector on the SID, but not both.
Note that a wired connection only allows for synchronized time travel sequences, no other communication takes place.
Also note that the process of learning keys from an IR remote control requires this option to be unchecked. After learning keys is done, you can, of course, check this option again.
Do NOT check this option if your TCD is connected wirelessly (BTTFN, MQTT).
Usually, the TCD signals a time travel with a 5 seconds lead, in order to give a prop a chance to play an acceletation 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. That that is the case, and your SID is connected by wire, you need to set this option.
If your SID is connected wirelessly, this option has no effect.
If you want to have your SID to communicate with a Time Circuits Display wirelessly ("BTTF-Network"), enter the IP address of the TCD here. Do NOT enter a host name here. If your TCD is running firmware version 2.9.1 or later, you can also enter the TCD's hostname here instead (eg. 'timecircuits').
If you connect your SID to the TCD's access point ("TCD-AP"), the TCD's IP address is 192.168.4.1.
If your TCD is equipped with a GPS sensor, the SID can adapt its display to current GPS speed. This option selects if GPS speed should be used.
If this option is checked, and your TCD goes into night mode, the SID will activate the Screen Saver with a very short timeout.
If this option is checked, and your TCD is equipped with a fake power switch, the SID will also fake-power up/down. If fake power is off, no LED is active and the SID will ignore all input from buttons, knobs and the IR control.
If this is set, in idle modes 0-3 as well as when using GPS speed, only patterns which were extracted from the movies (plus some interpolations) are shown. If this option is unset, random variations will be shown, which is less accurate, but also less monotonous. Purists will want this option to be set, which is also the default. This option can also be changed by typing *50 followed by OK on the IR remote control.
When set, the time travel sequence will not be animated (no flicker, no "moving bar"). Purists will want this option to be set; the default is unset.
This selects the boot-up setting for showing or not showing the peaks in the Spectrum Analyzer. Can be changed anytime by typing *51 followed by OK on the IR remote control.
If checked, the SID will connect to the broker (if configured) and send and receive messages via MQTT
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". Specifiying 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.
The username (and optionally the password) to be used when connecting to the broker. Can be left empty if the broker accepts anonymous logins.
If this is checked, secondary settings (brightness, 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 SID. See Flash Wear.