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…

Advertisement

11 Responses to Thermal Printer Remotely Controlled through an ESP32

  1. Rex Thomas says:

    Hi,
    I tried to connect up slightly as your diagram, but I went on the multipin of the interface card, on pins 24 & 25 which look to be connected to the other side of the resistors 8 & 9 you have tailed into.
    Would you expect this to work?
    Ive tried your code and I can’t get it to print, or though a hexadecimal dump. I can reach the web page, so I think the ESP32 side is working….

    • trandi says:

      Do you have the exact *same* model with the same board ?
      Have you tried to have a look at the manual / schematic ?

      > the other side of the resistors 8 & 9 you have tailed into

      This might now work, I would suggest you connect to *exactly* the same points as in my pictures and then use an USB – TTL adapter and a terminal to check the serial connection (and remove the ESP32 out of the picture so that you know it’s not that causing issues…)

  2. rex says:

    How did you identify TX and RX on the printer board please? I have a EPSON TM-T88IV wanting to do the same. It does have serial input so I could do it with level shifting if needed but it’s a lot of clunky units outside the board.
    Thanks

    • trandi says:

      hi there, sorry for the delay in replying, I can’t remember much details beyond the “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” that I mention in the post… I think there were schematics in the manual which pointed at what I needed to look after…

  3. Tymek says:

    what is the dip switch settings in this configuration (interface card also)

  4. claudio says:

    I can do the same project with ESP8266

  5. 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 )

Facebook photo

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

Connecting to %s

%d bloggers like this: