Thermal Printer Remotely Controlled through an ESP32


Again one of these things that I’ve been wanting to do for a long time, but never found the time to… having one of these little thermal printers that spit out your receipt at the till in a supermarket, and hack it to print little snippets of information like reminders or shopping lists, etc. …

So a while ago I got an old but still functional such a printer from eBay for 20£ or so, but couldn’t make it work after a few attempts through its dedicated RS422 connector.
Bought a TTL to RS485 adapter given that I had read that RS485 was a superset of RS422 (though I’m still not sure I understand exactly what the exact differences are and what people mean when saying that nowadays the “hardware is almost always RS485”, especially the 4 vs 2 wires, etc. …) but to no avail.

Not being able to talk to this printer using such a standard serial protocol became very frustrating, so it finally forced me to buy an logic analyser and try to understand what was happening on the wires.
Before I could start doing that that though, I realised that I could sidestep the RS422 card at the back of the printer and tap directly into the TTL serial lines of the main micro-controller. Which would obviously be much simpler given that I wanted to interact with a TTL speaking MCU, and would obviate the need for a TTL to RS485 adapter…

Once I got the above set up (thanks to finding the “Technical Manual TM-T88 Series” pdf only with the schematic of the main board and also after some probing with the multimetre), everything became super easy.
I had to configure the switches inside the printer to allow for software flow control and increase the serial speed to 19200bps (not that the default 9600 was a problem…) and then write some very basic Arduino code for the lovely Wemos ESP32 OLED integrated board (apparently these have actually nothing to do with Wemos, but are probably clones of this one from Tindie ) which you can find on my github page.

As usual, please let me know in the comments if you like it or if you can think of any improvements…

Advertisements

One Response to Thermal Printer Remotely Controlled through an ESP32

  1. Pingback: Receipts Printer Photo Booth | Robotics / Electronics / Physical Computing

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: