Rotating Photobook with Embedded Graphics and Low-Fat Computing

TinyPhoto consists of a low-power ATtiny85 microcontroller and a 128×64 pixel OLED display.

CabeAtwell
about 4 years ago Displays / Sensors

A completed embedded graphics project posted by Assad Ebrahim on mathscitech.org uses the low-power ATtiny85 microcontroller to give at least 20 hours of continuous play. The handful of required electronic components are all low-cost, and the embedded software is c.150 lines of C code, using less than 1300 bytes of on-chip memory. As it rotates through a series of five photos stored on the on-chip Flash RAM, it uses a total of 4900 bytes.

The electronics for the TinyPhoto are simple. All told, it’s a total of twelve components and a bit of wiring that fits on a 3cm x 7cm PCB. An 8-pin DIL socket holds the ATtiny85, so the controller chip can be easily removed, reprogrammed, and reinserted to change the images displaying.

The method for creating the crisp display with few resources is enabled by the software. Algorithms resize the color images and convert them to grayscale. The display itself is a 128x64 OLED, built for easy display of text. Image data is displayed by sending a byte stream, each vertical byte code containing the eight pixels from a given text row. Finally, this 0-1 matrix enters post-processing and the vertical byte codes needed to display the image on the OLED are extracted and burned to the onboard Flash memory of the ATtiny85. To fit all this on the microcontroller, Ebrahim has written a custom driver code for the SSD1306 integrated into the OLED display.

With the ATtiny running at 8MHz or faster, the display’s refresh is so quick as to be undetectable to the human eye. The 8MHz setting can be selected using an ISP programmer, and the chip itself is programmed via the Arduino IDE. All code is available in the post, where you can also read further details on the process and result.

Latest Articles