dheera / mnist-clock

A clock that displays digits using randomly selected MNIST digits.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MNIST clock

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)

image Finished MNIST clock.

image ESP32 and 4 Waveshare e-Ink displays.

image Hand-drawn design by Evan Pu that was posted as a social media status in 2018.

Original design

Hardware

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.

image

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.

image Connectorized TinyPICO with JST-EH connectors.

image Displays fixed onto 3D printed housing using self-tapping M2.5 screws.

Software

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

Parts

3D printed parts

  • Bottom and top cover: see .stl files in design/

COTS parts

Tools

About

A clock that displays digits using randomly selected MNIST digits.


Languages

Language:Python 86.1%Language:OpenSCAD 13.9%