Thermal printer interface

INT256 is an interface for 58 mm paper width thermal printer mechanisms, 192 dots per line resolution. A direct thermal printer prints by applying heat to a special paper material. It is used mainly for POS and tax receipts and the 58 mm model is the most used dimension for these applications. There are many manufacturers of such low cost mechanisms, the most known is Epson.

The prototype of a simple electronic interface (figure 3) for this type of printer mechanism was designed and manufactured by me in 1997.

Figure 1
Figure 2
Figure 3

Specification:
- Print system: in-line thermal head
- Paper width: 58 mm
- Command for automatic paper cutter
- Resolution: 4 dots / mm (192 dots / line)
- Print speed: max 55 mm / sec
- Interface: parallel (Centronics) or serial (RS232C) from PC or other device
- Power supply: 24V DC
- Print barcodes: no
- Print labels: no
- Operating temperatures: + 10ºC ... + 35ºC

For economy, this PCB was designed to function with only one communication interface: serial or parallel. In this way, when is delivered with serial interface, connector X1 is not soldered on PCB board, switch S1 is present and when is delivered with parallel interface, switch S1 is not soldered on board, connector X1 is present. Also for the economy, I used the 68 pin microcontroller version mounted on PLCC socket.

The thermal head of the printer consists of 192 heat elements and head drivers to control the heat points. Serial printing data input from the interface is transferred to the shift register synchronously with the CLK signal, then stored in the latch register with the timing of the LATCH signal. Inputting the head activation signal (DST 1 to 3) activates heat elements in accordance with the printing data stored in the latch register. The printer mechanism has a built-in head driver IC. Applied energy is in accordance with the temperature of the thermal head and the environment the printer is used in. The thermal head has a built-in thermistor. The interface measures the temperature using thermistor resistance. Standard applied energy is based on a temperature of 25°C. The interface calculates the printing energy using equation:

E = (0.160 - TC × (TX - 25) )
TX: Detected temperature using the thermistor (°C)
TC : Temperature coefficient 0.00192

To prevent deterioration in printing quality due to backlash of the paper feed system, the motor is rotated 20 steps anticlockwise (the backlash absorption step should be input) when seen from the motor gear side, after initialization, after opening or closing the platen block, or after cutting thermal paper with the autocutter or tear bar (hand cutter). Start printing is performed after such operation. To stop the motor, the interface command for 5 ms with a phase that is the same as the final one in the printing step. The resistance of the thermistor at the operating temperature is calculated with a liniar equation, 100 KΩ at 0°C and 2KΩ at 100°C. Abnormal thermal head temperatures are detected by both hardware and software. Paper detection is performed by a reflection type photo interrupter. The interface does not activate the thermal head and motor when there is no paper. The head activation pulse width is calculated with the formula:

t = ( ( E x R) / V² ) x C x D
t: Head pulse width (ms)
E: Standard applied energy (mJ)
V: Applied voltage (V)
R: Head resistance (Ω)
C: Head pulse term coefficient
D: Heat storage coefficient

V = Vp x (1.2 - 1.3)
Vp: Head activation voltage

R = ( ( RH +16 + ( Rc + rc ) x N )² / RH
RH: Head averange resistance, typical 176Ω
16: Wiring resistance in thermal head (Ω)
Rc: Common terminal wiring resistace in thermal head, typical 0.05Ω
rc: Wiring resistance between Vp and GND (Ω)
N: number of dots driven simultaneously, typical 192/3

C = 1 - 0.5 / ( 0.8 + W )
W: activation pulse for the previous block, 1000/motor frequency

Figure 4
Head
Figure 5
Motor
Figure 6
Paper Sensor
Figure 7
Wire resistance

Disclaimer: The information on this web site is provided "AS IS", without warranty of any kind. The author has made the best efforts to ensure the design and the information provided are reliable. Under no circumstances shall the author be liable for any direct, indirect, incidental, special or consequential loss, damage, expense or injury incurred or suffered which is claimed to resulted from use of this site, even if expressly advised of the possibility of such loss, damage, expense or injury, including, without limitation, any fault, error, omission, interruption or delay with respect thereto.

Links:
[01] - Philips 80C552 datasheet
[02] - Epson LTP256 datasheet
[03] - L6202 datasheet
[04] - ULN2003 datasheet
[05] - DS1232 datasheet
[06] - UM62256 datasheet
[07] - MAX232 datasheet
[08] - M27256 datasheet