ESP8266 based display of the current Aare river temperature on a seven-segment display.
Long time in the making, but finally finished during the Corona lockdown in spring 2021.
More information (german) on my blog: hymnos.existenz.ch.
- The housing is an old decommissioned alarm clock.
- Contains an ESP8266 NodeMCU V3 Development Board, stuck on a breadboard and powering the whole thing via USB.
- Uses WifiManager to search and connect to a WLAN.
- Uses the Arduino Wire library to set up the I2C bus.
- A MCP21017 I/O expander is put on the I2C bus.
- The MCP connects to the LEDs on the Sparkfun 7-segment-display.
- Uses the HTTP client to fetch the current Aare river temperature in Bern, Schönau from the Aare.guru API.
A sketch file for the Arduino IDE containing all the code running on the ESP8266 microcontroller.
KiCad schematics file containing the wiring information.
Note that I'm not an electrical engineer by trade and this has been my first time writing up a circuit.
Note also that the I2C-bus pins are correctly wired on the schematics, I fixed them in code.
Archived development notes (German).
- Display refresh: Every time the display fetches new data via HTTP (Every 5 minutes), it can no longer refresh the display LEDs and it flickers.
- Floating point value: In order to calculate the digit characters, a division operation on a floating point number is made. Which on this CPU can lead to small +/- discrepancies already on the second digit after the point.
- Nicer wiring: By changing the order of the output pins of the MCP port expander to better correspond to the input pins of the display, you might get a nicer looking circuit board.
- OTA-Updates for the firmware.
- Maybe using a two-core EPS32 would allow updating on one core and driving the LED display on the other core, preventing the flickering.
Done.
The display runs multiple months without issues.
Christian Studer, cstuder@existenz.ch