Blog

Mini Wireless Thermal Printers Get Arduino Library (and MacOS App) | Hackaday

[Larry Bank]’s Arduino library to print text and graphics on BLE (Bluetooth Low Energy) thermal printers has some excellent features, and makes sending wireless print jobs to a number of common models about as easy as can be. These printers are small, inexpensive, and wireless. That’s a great mix that makes them attractive for projects that would benefit from printing out a hardcopy.

It’s not limited to simple default text, either. Fancier output can be done using Adafruit_GFX library-style fonts and options, which sends the formatted text as graphics. You can read all about what the library can do in this succinct list of concise functions. Printer Receipt

Mini Wireless Thermal Printers Get Arduino Library (and MacOS App) | Hackaday

But [Larry] hasn’t stopped there. While experimenting with microcontrollers and BLE thermal printers, he also wanted to explore talking to these printers from his Mac using BLE directly. Print2BLE is a MacOS application that allows dragging image files into the application’s window, and if the preview looks good, the print button makes it come out of the printer as a 1-bpp dithered image.

Small thermal printers make for neat projects, like this retrofitted Polaroid camera, and now that these little printers are both wireless and economical, things can only get easier with the help of a library like this. Of course, if that’s all starting to look a little too easy, one can always put the thermal back in thermal printing by using plasma, instead.

Was browsing the repository, was wondering if anyone has knowledge on those cheap printers, i.e. Phomemo M02, M02s, M02pro aren’t listed as being compatible but looking up the cat, pig and other printers, they probably have all more or less the same underlying mechanism? Wonder if it would work with that library. Another repository on github for a phomemo python script for printing on linux. Those things are cheap and look quite cool to play with. Wondering why it doesn’t get more traction.

There are a ton of variants to these BLE printers. Internally, they probably all have the same print head and UART interface, but the companies adding the BLE boards like to change things to make it hard to use outside of their apps. Two of the printers I support had to be reverse engineered through their Android apps because they don’t support the ESC/POS standard command set. The GOOJPRT behaves correctly and just sends the standard commands over BLE. I suspect that a lot of the ‘odd’ ones decided to muck around with the communication protocol to force you to use their mobile app.

So, good chance if I buy one of these and gut it, pulling out the BLE part, you just have a UART thermal printer?

In the cat printer, it appears that there is only one microcontroller for BLE and everything.

I’ve been having fun with an 80mm NETUM wireless/rechargeable printer from Amazon. It cost $80 and shows up on a serial com port. It supports ESC/POS, so I’ve written my own PowerShell libraries for images. The only drawback for the NETUM is that it doesn’t have the capacity for very large printer rolls, but that’s the price for compactness. I’ve found that I can take some medium sized rolls, and just unroll half of one onto an empty spool. It takes less than five minutes and at the rate I use them isn’t really a major inconvenience.

Printer Link (I guess it’s $90, not $80): https://www.amazon.com/gp/product/B08B5Z2D4L

Ah, thermal printers. Fond memories of the thermal printer I had with my timex Sinclair

The sinclair printer is not thermal.

you could buy a thermal printer for the TX-81 ,Commodore 64 and I have an old Epson portable BASIC computer with a thermal printer add on. These printers were sold in Compute magizine,The TX-81 Magazine and many others also I had a 4 pen ,plotter for my 64.

Can these thermal printers be used with a Raspberry Pi ?

The short answer – yes! Bluetooth low energy (BLE) is pretty consistent across different platforms, so doing it on Linux isn’t going to be much different.

For scalable text, simple lines, and barcodes, no complex drivers are needed because almost all generic label/receipt printers support the relatively simple Epson Standard Code for Printers, also known as ESC/P.[1] More precisely, label/receipt thermal printers use the ESC/POS (Epson Standard Code/Point Of Sale) variant of ESC/P.[2] The name ESC/P or ESC/POS is also appropriate because the printer commands are preceded by an ESCape character (ASCII code 27).

Bare-bones generic thermal label/receipt printers can be had cheaply at the likes of AliExpress.[3] These generic printers have a RS-232 UART TTL-level interface that supports ESC/POS. The RS-232 UART TTL level interface is easily converted to USB using a UART/USB bridge chip (e.g. CH340x) or cable. For both WiFi and BLE wireless connectivity simply connect the likes of an Espressif ESP32 module to the UART TTL interface.[4] Or add $10-$15 USD to the generic thermal label/receipt printer’s price and it will come with USB/WiFi/BLE straight out of the box. But where’s the fun in that?

Where complex drivers come into play is when you want to process an image (scale/dither/B&W-convert) and send it to the label printer. For Windows there are drivers available online, search for “Windows thermal label printer driver” without the ” “s. For microcontrollers doing photos with a generic label/receipt printer is more challenging, that’s were [Larry Bank]’s Arduino library seems to step up to the plate.

https://en.wikipedia.org/wiki/ESC/P

https://en.wikipedia.org/wiki/ESC/P#Variants

3. Goojprt Qr203 58Mm Micro-Mini Embedded Thermal Printer Rs232+Ttl Panel Compatible Eml203 for Receipt Ticket Barcode US $15.17 + US $2.67 Shipping:

https://www.aliexpress.com/item/1005002872641830.html

4. Wireless Module NodeMcu V3 V2 Lua WIFI Development Board ESP8266 ESP32 With Pcb Antenna And Usb Port ESP-12E CP2102 $2.94 + US $0.82 Shipping:

https://www.aliexpress.com/item/1005002952149285.html

OMG u used references, brilliant & thanks

thank you for a very helpful comment.

The paper used by these printers has been implicated with a ton of health concerns. Also it’s not recyclable or eco friendly in any way.

It contains the potent endocrine disruptor bisphenol-a. BTW, bisphenol-a-free products often contain bisphenol-s – technically not the same, but an even worse endocrine disruptor.

Has been implicated yes. Those nasty chemicals (bisphenols) are now forbideen (at least here in EU).

I stand corrected, bisphenol-A is forbidden but not the less known/studied bisphenol-S.

Anyway with or without those nasty chemicals, thermal paper isn’t eco(logical) friendly by any stretch of the definition

You’re not likely to be handling even a fraction of the quantity that a cashier does. Still worth being aware of though.

I wonder if that is why Wal-Mart and Sam’s Club have you rip off your own receipts now…

Inspired by this Hackaday post by [Donald Papp] pointing to [Larry Bank]’s photo-printing capable Arduino library for thermal printers, [Jeff Epler] over at Adafruit has a new (Sep. 28, 2021) ‘BLE Thermal “Cat” Printer with CircuitPython’ tutorial [1][2][3] that results in a photo-print capable thermal printer driven by the adorable little (but rather pricey IMHO) Adafruit CLUE nRF52840 Express with Bluetooth LE board plus on-board 1.3″ 240×240 Color IPS TFT display.[4]

Unfortunately the CircuitPython code just prints an image that has been pre-processed by a photo editing application such as the free-open-source cross-platform GIMP photo editor.[5] But to be fair, I doubt the CLUE board with its Nordic nRF52840 Bluetooth LE processor, 1 MB of Flash, 256KB RAM, 64 MHz Cortex M4 processor running full-up CircuitPython would have space to pre-process anything but rather simple images on-board.

1. NEW GUIDE: BLE Thermal Printer with @adafruit @CircuitPython

[Jeff Epler] writes: When I saw the “cat” printer in this Hackaday article (https://hackaday.com/2021/09/21/mini-wireless-thermal-printers-get-arduino-library-and-macos-app/), I simply had to have one for myself. The original poster made a library for Arduino, but I wanted to make a version that worked on CircuitPython instead.

https://blog.adafruit.com/2021/09/28/new-guide-ble-thermal-printer-with-adafruit-circuitpython/

2. Adafruit’s ‘BLE Thermal “Cat” Printer with CircuitPython’ tutorial [single-page html format]

https://learn.adafruit.com/ble-thermal-cat-printer-with-circuitpython?view=all

3. 1. Adafruit’s ‘BLE Thermal “Cat” Printer with CircuitPython’ tutorial [pdf format]

https://cdn-learn.adafruit.com/downloads/pdf/ble-thermal-cat-printer-with-circuitpython.pdf?timestamp=1632888339

4. Adafruit CLUE – nRF52840 Express with Bluetooth LE, $44.95 ea.

https://www.adafruit.com/product/4500

5. The GIMP, a free-open-source cross-platform photo editor.

Hello, thank you for this work! I am looking to get the BLE version working. The printer connects correctly, and even starts printing a few lines of the image, but stops every time (after even less is printed than in the “feed” function). Trying to go over the Xcode, maybe something to do with the “withResponse every 16 packets” but what do I know. Anyone else has that problem?

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Mini Wireless Thermal Printers Get Arduino Library (and MacOS App) | Hackaday

Portable Terminal Printer By using our website and services, you expressly agree to the placement of our performance, functionality and advertising cookies. Learn more