← How-Tos
electronics 1 hr ago ◯ 5 min read

Thermal Receipt Printers for Maker Projects: ESC/POS Commands and ESP32/Arduino Wiring

thermal printeresc/posesp32arduinoreceipt printermaker project

Cheap thermal receipt printers — the same kind behind every cash register — have become a small maker staple: to-do lists that print themselves each morning, a "ticket" printed for every 3D print job queued, a physical readout for a weather API, party photo-booth strips, or just a fun way to get data out of a microcontroller onto paper without a screen. They're inexpensive, they need no ink or toner, and they talk a text-and-graphics protocol — ESC/POS — that's decades old, well documented, and easy to drive from an ESP32 or Arduino. This guide covers the protocol basics, wiring, and the gotchas that trip up a first attempt.

What ESC/POS Actually Is

ESC/POS is a command language originally defined by Epson for point-of-sale printers, and it's become the de facto standard that nearly every cheap thermal printer — genuine Epson or a generic clone board — understands. Commands are simple byte sequences: printable ASCII text is sent as-is and printed, while control sequences (starting with the ESC byte, 0x1B, or GS, 0x1D) select bold, underline, font size, alignment, cut the paper, or drop into bitmap graphics mode for printing a logo or QR code. There's no negotiation or handshake to speak of — you send bytes, the printer prints them — which is exactly why it's so easy to drive from a microcontroller with almost no RAM to spare.

Choosing a Printer

Wiring a TTL Serial Thermal Printer to an ESP32

Printing Graphics and QR Codes

Beyond plain text, ESC/POS supports raster bitmap printing: convert an image to 1-bit monochrome at the printer's dot width (commonly 384 or 576 dots for 58mm/80mm paper), dither it if it's a photo (the same halftone/dithering concepts covered in our laser engraving photo-prep guides apply here), and send it as a raster graphics command. Many printer firmwares also support a built-in QR code command (GS ( k in the ESC/POS spec) that lets the printer generate and print a QR code from a text string without you rendering the bitmap yourself — useful for printing a link, a WiFi join code, or a print-job tracking code directly from firmware with no image processing at all.

Common Failure Modes

SymptomLikely cause Printer prints garbage charactersBaud rate mismatch between firmware and printer, or wrong UART pins Printer resets or browns out mid-printUnderpowered supply — the thermal head draws far more current while actively printing than idle Faint or uneven printLow supply voltage, worn print head, or heat/darkness setting too low in firmware Paper jams or feeds crookedWrong paper width for the module, or paper roll not seated in guides Nothing prints at allTX/RX swapped, missing common ground, or printer needs an initialize command (ESC @) sent first

Project Ideas Worth Building

Thermal printers are one of the few output devices that need no screen, no ink, and almost no code to drive — a UART connection, a beefy enough power supply, and a handful of ESC/POS bytes is the entire interface. That low barrier is exactly what makes them a fun weekend add-on to a project that would otherwise just log data to a screen or a phone app nobody opens.