← back to projects
Ongoing · Embedded Camera System

Tiny Squares: Camera System

Engineering a camera that shoots, converts image, bitmaps jpg, and prints instantly.

Embedded SystemsComputer VisionImage Processing
ESP32 camera prototype connected to a thermal printer

Overview

Tiny Squares is a compact camera system built around an ESP32 camera module and a thermal printer. The goal is to make taking a photo feel physical again: press a button, capture an image, process it on the embedded device, and receive a printed copy seconds later.

The project combines camera control, constrained image processing, serial communication, and power management in one small embedded pipeline. Each stage has to operate within the ESP32's limited memory while still producing an image that remains recognizable on a monochrome thermal print.

From capture to print

The system begins by capturing a JPEG frame from the camera. That compressed image is useful for storage and transport, but the thermal printer cannot interpret it directly. The ESP32 therefore has to decode the frame, resize it to the printer width, convert its pixels to grayscale, and prepare a one-bit bitmap.

Treating the project as a pipeline makes each failure easier to isolate. A captured frame can be validated before conversion, the bitmap can be inspected before transmission, and the printer can be tested independently with known patterns.

Converting the image

A thermal printer only produces black or white dots, so the captured color image must lose most of its original information. The important decision is how to preserve edges, faces, and contrast while reducing every pixel to a single bit.

The processing stage converts RGB values into luminance and then applies thresholding or dithering. A fixed threshold is fast, but it can erase detail under uneven lighting. Dithering distributes error between nearby pixels, creating the appearance of additional shades while still producing a valid monochrome bitmap.

Printing instantly

Once the bitmap is packed into bytes, it is sent to the thermal printer one row at a time. The printer's width determines the final image dimensions, and its speed has to be balanced against heat, power draw, and print density.

The printer is the highest-current part of the system, so it cannot be treated like a normal logic peripheral. Stable power, shared grounding, and controlled transmission timing are necessary to prevent resets and incomplete prints while the heating elements are active.

Current stage

The current prototype can capture camera frames and produce recognizable monochrome prints. Development is focused on improving conversion quality, reducing the time between capture and print, and packaging the electronics into a portable camera enclosure.

Tools & Skills

ESP32Camera ModuleEmbedded C++JPEGBitmap ProcessingThermal Printing