Microprinter

This page has also been translated into Belorussian by Amanda Lynn.

daily summary

A sample message from the Microprinter

Introduction

The microprinter is an experiment in physical activity streams and notification, using a repurposed receipt printer connected to the web.

I use it for things like reminders, notifications, and my day at-a-glance, but anything that can be injected from the web and suits text only, short format messaging, will work.

Background

Back in October 2006, Matt Webb from Schulze & Webb wrote about the social letterbox: a remote printer used by friends and family to print directly to your desk.

This is perhaps a short form, unrefined version of that, for activity streams and notifications from those who matter most to me. A receipt printer is the perfect medium for this: quick to print, disposable, recyclable and cheap.

Making It

The microprinter consists of three main components:

  • Printer – a standard thermal receipt printer you might find in any shop
  • Connectivity – Arduino with ethernet shield
  • Message queue – Web application that serves up the next message to be printed when requested

Printer

Printer

Citizen CBM-231

The printer is an ordinary, second hand, receipt printer sourced from eBay. Since the entire high street is going bust at the moment, there's plenty of opportunity to find one cheap. Mine came from MFI apparently. Don't start looking in the consumer printer category though; it's Point of Sale Equipment you want.

The particular make and model I picked up was a Citizen CBM-231, for £28 delivered, and you can probably find a similar one for less. It turns out that it's pretty much perfect. It has a serial RS232 interface and autocut functionality for splitting the receipt after printing. I didn't think about this at the time, but this is a must. It makes clean cuts with a good, solid clunk.

Connectivity

Arduino + breadboard

Arduino + ethernet shield + MAX233

The printer connects to the web using an Arduino and Ethernet Shield. The software on the Arduino makes an HTTP request to the message queue every ten seconds, and if there's a non-blank response, it prints it.

If it wasn't for the signalling difference between printer (RS232: ±12V) and the Arduino (TTL: 0-5V), the two could be connected directly (and if I had the parallel version of the same printer I could). As it is, they need a MAX232 chip or equivalent to convert the levels. I'm using a MAX233 which is identical, except it doesn't need four external capacitors.

My Arduino sketch (available on Github) is based on examples from Tom Igoe's Making Things Talk. It need some tidying up, but it works.

Message queue

The message queue was written in Sinatra, a lightweight Ruby framework, backed by a SQLite database. It's fairly unexciting.

It has two purposes: 1) Accept messages POSTed to the queue, and 2) handle requests from the printer for the next message.

The printer makes a GET request to a specific URL to request the next message every ten seconds. If there's one, the app returns it and deletes it, ready for the next request. There's a little token in the query string used to stop prying eyes from picking up my messages.