Thermal pinters have been around for a while. Everytime you go to the local supermarket or gas station, the printout of the receipt is usually from a thermal printer. It’s a quick, easy and cheap method to print on small paper rolls. Recently, Sparkfun introduced a thermal printer that can be easily connected to an Arduino, hence good for custom DIY applications. Furthermore, the ability to connect it to the Internet (e.g. through an Arduino Ethernet shield), makes the thermal printer an interesting device for Internet-of-Things applications. Check out this post from Wired-magazine for more background info.

I ordered the Sparkfun thermal printer, and did a bit of research what software solutions exist to control it via Arduino. Here’s my outcome, grouped into 3 categories according to their functionality:

1) Solution using manual commands and formatting: The tronixstuff-tutorial explains basic setup and connection, and a couple of Arduino sketches for basic printouts using manual commands over the Serial port. These sketches won’t work on Arduino 1.0, but require the old v22 or v23.

The full set of commands (bold, underline, etc) supported by the thermal printer can be found in the printer’s user manual:

2) Libraries for easier text layouting / formatting: Manually controlling and formatting the printer output can be a pain. However, Buildr and Adafruit provide Arduino-libraries that make this process much easier. The libraries abstract from the printer’s formatting codes, and provide simple methods that you can call in your sketch. This saves a lot of time, as it spares you from looking up individual codes in the printer’s user manual.

– Bildr: http://bildr.org/2011/08/thermal-printer-arduino/
– Adafruit: http://www.ladyada.net/products/thermalprinter/

The Adafruit library seems to base on the Buildr library, but includes some extra features such as printing images. Don’t expect anything high-resolution, but basic logos or QR codes work great. Any image needs to be pre-converted into a 1-bit Bitmap with a max widht/height of 384 pixels.

3) Solutions to network-enable your thermal printer: I found three projects that provide a framework for connecting the thermal printer to the net:

http://wiki.ladyada.net/tutorials/products/iotp: This is not really a framework, but rather a hardware-kit that Ladyada put together for people to start building “Internet of Things” based printing applications. She provides a simple sketch that checks for and prints particular Twitter feeds. You can modify this sketch for your own needs.

http://newsinternational.github.com/iot-assistant/. This is a Ruby-on-Rails based solution, which provides a web-based interface to send printing jobs or schedule them for a particular date and time. It also includes a some example apps that e.g. print a personal daily agenda based on google calendar or emails from one’s gmail inbox.

Gofreerange Printer: I found this probably the most flexible and powerful framework for network enabled thermal printing applications. It has a modular architecture which consists of a Backend Server, Content Services and the physical printer itself. Each printer is registered with a unique address at a Backend Server and polls it regularly to check for new content. Different Content Services (simple HTML webpages) can push print-jobs to a backend server which are then printed by the according printer. The nice thing is that everyone can provide a Backend Server or develop Content Services for someone else’s printer. This makes it a great distributed solution. The framework is open source and available from github https://github.com/freerange/printer/.


5 thoughts on “Getting started with a Thermal Printer

  1. Hi Mark,

    I’m James – the developer behind the GFR Printer software. I just wanted to say hi, and that I’m really happy to read your description of our architecture; not a lot of people really pick up on the distributed nature of the architecture, which was really important to me, so it’s really great when I see that someone gets it 🙂

    All the best,

    James / GFR


  2. Hi James,

    Thanks, glad to hear you liked the post. You did a great job with the printer software and architecture. Not many people know about the possibilities of IoT printers, however, I think it’s a hype yet to come. Your software might be a bit ahead of its time, but I can see many developers appreciating it in future, when mainstream realises their need and applications for networked IoT printers. Maybe that will change when first commercial printers hit the markets, e.g. http://bergcloud.com/littleprinter/? It’ll be good to have your software as an open-source alternative out there. Till then we’ll have to expand it’s functionality. I’ve started working on a real-time RSS module that pushes out printjobs via pubsubhubbub as soon as they’re published. Longterm, I think it would be good to have a yahoo-pipes sort of interface that allows users to create mashup content services from various online sources.



  3. Pingback: Internet of Things Printer – Laser Cut Enclosure Box | kavasmlikon

  4. Pingback: Gelatine – Designing for Digital Encounters in Coworking Spaces | kavasmlikon

  5. It’s perfect time to make some plans for the longer term and it is time to be happy. I have read this publish and if I may I want to suggest you few interesting things or suggestions. Perhaps you can write next articles relating to this article. I wish to learn even more things approximately it!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s