A clock that displays using randomly selected MNIST digits.
Hardware/software implementation by Dheera Venkatraman (www, twitter)
Original idea/concept by Evan Pu (www, twitter)
ESP32 and 4 Waveshare e-Ink displays.
Hand-drawn design by Evan Pu that was posted as a social media status in 2018.
It uses an TinyPICO which is an awesome, compact ESP32 board with plenty of GPIO pins, 4MB flash, Wi-Fi, and lots of other features not needed for this project.
4 e-Ink displays are used for the digits. I chose e-Ink since it matches with the idea of handwritten digits, works well in all lighting conditions, and doesn't light up your bedroom when you're trying to sleep. The Waveshare e-Ink displays are mostly SPI, although they have some annoying extra pins. One would wish they were just SPI + one CS pin for each board, but a few more connections are necessary. Here is a diagram of the connections to the ESP32. Crimp the wires according to this.
I use 2 10-pin JST-EH connectors on the TinyPICO. JST-EH connectors are awesome, lower profile than JST-XH, more satisfying to plug in than JST-XH, and shorter and more secure than standard pin headers. I use them to connectorize almost all 0.1"/2.5mm pitch breakout boards.
Connectorized TinyPICO with JST-EH connectors.
Displays fixed onto 3D printed housing using self-tapping M2.5 screws.
I usually write in C++ or C but I was curious about this new MicroPython stuff, so I tried it for this project.
I use 2 bits per pixel of greyscale depth on each MNIST digit (i.e. 4 greyscale levels). At that bit depth, each 28x28 pixel MNIST digit occupies 196 bytes, so 4MB of flash should be able to fit the entire MNIST validation set. If you want to fit more digits you could (a) use a microcontroller board with a lot more flash (b) use 1-bit depth (c) use compression or some combination of the above.
Put all the files in /code in the root directory of your TinyPICO. Also create a file called .wifi with you Wi-Fi credentials:
yourssid
yourpassword
- Bottom and top cover: see .stl files in design/
-
4 x Waveshare 1.54 inch e-Ink display -- CAUTION: There are V1, V2, and V2.1 versions of the board that use different communication protocols. Some sellers have mixed-up stockpiles of both versions. You may do best to order 8 or more, pick out 4 identical ones and return the rest. The current state of this repo supports V1 and V2 only. If you get a board that says "Rev 2.1" on it, it will not work.
-
1 x TinyPICO
-
20 x JST-EH crimps
-
E6000 or similar adhesive to attach the TinyPICO to the case
- PA-09 crimp tool works for JST-EH