The thermal printer you may have come across this term or you may have seen this printing machine in a handheld card swiping machine, in an ATM, in petrol pumps, etc... Right after the payment, you get a received payment in a small paper. Everywhere when it comes to a small readily available cost-effective printing solution to a big machine or a handheld device. Now a day’s thermal printer is used in almost every corner of applications where printing is becoming an add-on feature to the device or machine.

Thermal Printer uses a special quality of paper known as thermo-chromic paper, this paper is active to a temperature that changes its color when a specific amount of heat or proper temperature is provided to this paper.  So when a signal maintains a specific temperature at the head of the printer and paper starts to pass through it, According to the heated head the color of the paper turns into blue/black, and thus we can see printed content on it.

In this tutorial, we have a block diagram, circuit explanation, and code explanation and the end upload the code and test the thermal printer using the Adafruit library.

Basic to know:  (my printer)

  • Interfacing protocol which is Serial (RS232, TTL) and USB:  I am using TTL serial mode of communication, reason easy to use.
  • Power rating 9v DC: this means we need to use any 9v DC power adapter.

Serial Communication: It is done through the pin available as TTL. Here I am not using RS232 just to reduce circuitry, you can use it to communicate with the printer but again you need to use an RS232 to TTL converter for using any microcontroller.  

The printer is powered with a 9v, 2amp after converting the voltage using a buck converter from a 12v, 2aps SMPS.

Requirements Hardware:

  • Arduino any version you want, I am using Arduino UNO.
  • Thermal printer.
  • Power supply – Here we are using a 12v, 2AMPs SPMS
  • A buck converter (2nos) is used to convert to 9v for the printer and another to power up Arduino.

Note: You can use a 9v, 2amps power adapter and supply it to your printer and Arduino board as well.

Requirements Software:

  • Arduino IDE setup in a computer/ laptop (You can find the IDE download link HERE)
  • Printer Adafruit library (Download link HERE). 
  • Software Serial library (Inbuilt within the IDE)

Block Diagram:



Circuit diagram:



The circuit is the simplest circuit as it is an interfacing tutorial. So, you need to connect the serial pins only and power them up. You can follow the circuit diagram and connect the Tx in of the thermal printer to the Rx pin of Arduino (which is PIN5 in this case) and connect the Rx pin of the thermal printer to the Tx pin of Arduino (which is PIN6 in this case).


Download the complete source code: click here

Video Tutorial: