The enclosure is a laser-cut acrylic cuboid.

FrontA mini-USB connector just below the sensor cover provides power:
Back


The front face is a PCB with a window in it. The space occupied by the window is a tiny board to hold the components. Using the PCB meant the display was less recessed into the enclosure (the acrylic is ~3mm)

PCB



Starting from the top of the display:

  • The current pressure is shown in hPa (or inHg)
  • The pressure trend (rising/falling/steady) is show, or N/A.

The current pressure, optionally reduced to sea level, and the pressure trend are used to infer a "forecast" by emulating the Zambretti Forecaster. This reuses code from my Chrondrian project
 The result is a forecast letter from 'A' ("Settled fine.") to 'Z' (Stormy, much rain.").  This range is mapped to an icon in (Sun, Cloud/Sun, Cloud, Cloud/Sun/Rain, Cloud/Rain, Cloud/Lightning). 

  • The icon is shown.
  • The descriptive text corresponding to the forecast letter is shown.
  • Finally, the temperature (C or F) and the humidity (%) are shown together.
Display

A sensor reading (from a BME/BMP280 or an SPL06/BME) is taken every half hour and the display updated. The pressure trend is over 3 hours (6 readings). Prior to having a trend, it and the forecast are shown blank or N/A, but optionally, a random forecast, greyed out, can be shown, for entertainment.

Forecase Unavailable

In general, the forecast should NOT be taken seriously!
The display is XC3747
The sensor is, for example, XC3702

This project was mainly an excuse to play with a new display. I've done a fair bit with LCD's and the ePaper interface is extremely limited and the refresh rate very slow, so this wasn't about frame rates/fast updates for a change. I've also done a lot with displaying text on an LCD, with a variety of bitmap fonts, many of which I've crafted myself.  The *paper* aspect of this display led me to create a "stroked" font. This consists of line segments and arc quadrants encoded in a fairly compact form, 740 bytes. 

Stroked Font

The Arduino doesn't have the RAM to create a frame buffer, but things like rendering the forecast icon and drawing the lines and arcs in the stroked font are much easier if you can access a buffer of pixels.
I took the idea of a "sparse" algorithm from things like my ElitePetite and LittleZone and wrote a new one, simpler and not focused on speed -- SparseInk.  This provides a "virtual" frame buffer which compresses the few pixels that are actually on, and is row-oriented, so sending the pixel information to the display is straight-forward. Additionally, the display is built from the top down, in bands, so the number of pixels stored at one time is small. The stroked font lines are a single pixel wide so the text is sometimes repeated offset by a pixel in the x and/or y direction for emphasis (bold).  There is also a slanted (italic) effect. Text and icons are dithered with grey pixels to reduce their intensity.

The folded page "corner" is a nod to the paper nature of the display.

Several things can be configured via defines in Config.h. Units, sensor, folded corner etc.

The display came with an awkwardly placed connector -- pointing straight up (beige). I wanted to make something compact so I soldered another connector pointing backward (white):

Connector

A tricky job, and it shows in the quality of the soldering:

Connector

But it worked and I build a stack to go inside the enclosure with a cut-down cable between boards:

Side

From the left is the PCB front-face, the display, an intermediary laser-cut acrylic support, the main circuit and another support.

The main circuit is a "Leo Tiny" Atmega32U4 with the I2C SDA/SCL and ICSP MOSI/SCK pads on the underside soldered to wires going to protruding pins which are socket-ed on the board:
Board
The enclosure is quite complex, written in Python using my Inksnek library. I paint through the laser-etched protective coat on the acrylic to create the text etc.  Unusually for me, I added some...

Read more »