Printing Anything With A Thermal Receipt Printer

Over the last year, [James] has been a part of a few commercial projects that used a thermal receipt printer as part of the build. Something must have cracked in his mind, because [James] spent a lot of time developing a way to print customized content on receipt printers, connecting these printers to the Internet, and sharing content with other Internet-connected receipt printers. Even [James] doesn’t know why he spent so much time on this project; [James] figured he was bound to find something interesting. We’ve got to commend him for that.

[James] had been aware of the Adafruit Thermal Printer Library, but this library is a little kludgy. Text is the Adafruit Library’s forte, and while graphics and non-ASCII characters are possible they’re certainly not easy to print with the existing libraries. With his current system based on HTML, CSS, and Javascript, [James] has a really easy way to print anything he can put on a webpage on receipt paper.

Getting his receipt printer onto the Internet had its own challenges. After wrangling with the Arduino Ethernet library through the month of February, [James] realized larger prints (about 15cm of paper) would fail inexplicably. To get around this, [James] wrote an HTTP client for the Arduino that would fetch data, put it on the SD card, and then start printing.

Right now, [James]’ project is a polished as anyone could hope. We’re a bit concerned – although we completely understand –  that he could get sucked into the black hole of pointless development of receipt printer software so easily. All was not for naught, though; now anyone can make very professional-looking prints on receipt paper very easily.

52 thoughts on “Printing Anything With A Thermal Receipt Printer

  1. “We’re a bit concerned […] that he could get sucked into the black hole of pointless development of receipt printer software so easily.” Since when do the editors criticize hacks as pointless? Isn’t that supposed to be the cynical readers’ job?

    1. It would be nice to be able to add content (e.g. “Thank You!”, signature, ASCII graphics, border, hitleresque doodle) to an existing POS printout. You know, to personalize the receipt you are handing your customer.

  2. So it works on one specific thermal printer.

    Still, it’s impressive getting even just that one to work as receipt printers, every single one of them, suck.

    They all require different drivers, weird libraries, restricted fonts, gah.

    And yes, @KG4MXV, if you work with POS hardware you can skip the ‘scan it in’ part and simply run up you own receipts to replace those you’d ‘lost’.

    1. I’ve only worked with 3 different thermal printers, but the basic concept seems to be pretty straight forward:
      – You have one shift register that holds the dot information for the head
      – The head is divided up into units of usually 64 dots, so you can reduce the power drain, each unit is activated with its individual strobe line
      – The paper feed is usually driven with a stepper motor, the coils have to be connected to a suitable driver
      – There are head up / down, temperature and paper sensors, those can usually be read out with a suitable resistor, according to the datasheet.

      Of course if you are looking for maximum printing speed, you need to look at the head temperature and how many dots are actually active. But this is also pretty similiar for all printers i’ve used so far.

    2. Hey Tony,

      I’ve only written the software for a single printer, but it’s relatively trivial to add other printers. As long as you are happy to write the code that turns an array of bits into the serial commands your printer needs, or parse the very simple alternative bitmap format on your Arduino, you can use any printer at all.

      I’m going to add a page to the wiki about adding other printers that should hopefully clarify this more.

      If you’ve got any other questions, give us a shout at printer@gofreerange.com!

      1. Yeah, it’s not particular difficult, just tedious.

        It’s like back on the good old days of DOS and dot-matrix printers, writing code to handle all the different escape codes just so you can bold a heading. I can’t say I’m keen to go back.

        The last POS printer I needed to interface had a few driver bugs, when I asked how the developer was going I was told he committed suicide by shooting himself in the head. There’s a response you rarely get. I wrote my own after that, it didn’t seem right to ask when the new guy was due to start.

        Some printers don’t have a bitmap mode, or rather it’s either undocumented or you can’t get the documentation – that’s the main hurdle.

    1. The amount of BPA in the paper is pretty low. As long as you wash your hands afterwards, especially before eating, you should be fine.

      If you’re really worried about it, it is possible to buy BPA free paper now, too.

  3. Back about a decade I was doing POS installs. We used Eltron printers (I think they’re Epson now). They had escape codes to allow bit programming.

    We used the same software at our company so I programmed the company logo and bar codes on it.

  4. From the site:

    TL;DR: In a nutshell, I’ve accidentally built a software system that makes it easy for YOU to:

    -build your own small internet-connected printers,
    -produce customised content for them, and
    -share that content with other people who also have small internet-connected printers.

    Congratulations, you invented the fax machine ;)

  5. very nice! i love thermal printers … i made 2 months back an mbed network connected that prints my transcribed Google voice voicemails from my droid and the main problem i had was conveying the strength of the transcription and without the ability to “grey” this may help make a symbol for that!

  6. I have 2 Epson TM-u88III thermal printers with the PS-180 power supplies I need to get rid of at work. Anyone want them for the price of shipping? You don’t have to take both of them…

  7. my Grandfather invented the dot matrix printer, among other things like the solar panel and the felix mouse, anyway i was thinking of a real time drawing game with a scanner on the other end, it prprints and pulls, could CALL IT A PRINT ME PULL ME. Use it for for a doodle duo or conspire on a common (or not ) interest, heck play pictionary or even learn to write chinese! it could bring back the pencil!

    1. .Sounds cool, but you have a long way to go to fill yer granddaddy’s shoes.

      I like the idea of a printer that would print in real time and replicate each pencil stroke. So it’s effectively a carbon copy. Thermal copy , Thermalopy

  8. Does anyone knows if this would work with a Label thermal printer? Specifically the QL-500. It comes with its own editing software, but I would like to make it into an app. Or would it be possible to put Label rolls in the thermal printer?
    thanks

    1. There’s no theoretical reason why you couldn’t integrate a different printer, but there *would* be some custom development required to build a software module which could turn the raw pixel maps into the right set of command codes for your printer.

      I haven’t tried putting label rolls into the printer, I’m afraid.

  9. Hi i have bought a POS-8260 thermal receipt printer and i cant print if my printer is connected to the wireless router via ethernet and printing with laptop where connection is wireless any feedback ??

    1. Assuming that you’re using the same kind of printer as described in this article, there’s a lot of information on the Printer wiki – https://github.com/exciting-io/printer/wiki – I’d suggest you read as much of that as you can, and hopefully it will point you in the right direction.

      If you have a different type of printer, then I’d suggest getting the user manual and looking at how to send bitmaps to that printer specifically.

  10. Thanks for the tips for posting Printing anything with a thermal receipt printer

    3D Technology now available on a tablet. Watch and Play 3D movies, videos and photos, Convert 2D to 3D. You can now purchase this new 3D tablet .. it is really awesome watching videos, movies and play games on it. See 3d tablet

  11. I have a Star Miconics smt300i..Im self employed and just want to be able to print a customized receipt the way I want it…what is the easiest wayt to do this..can I post the format I want and someone do it for me lol??? Joking kinda but kinda not,,,any ideas are appreciated

  12. I have a question – there’s a lot of printer-savy in here…
    All answers or opinions & recommendations welcome!

    Also recommendations of a tech assistant/programmer to hire to program/build this work..
    PLS EMAIL ME DIRECTLY thekrieg@gmail.com

    (Jokes about art I anticipate will be forthcoming, but please, it gets old very quickly.
    Straight to the point technical answers are most appreciated!)

    I have not included the concept about the work, below is simply the ideal technical specs/perameters:
    I am willing to hire someone to get this off the ground, I am in the process of securing funding…
    send me a quote!
    ___________________________________________________________________________________________
    ARTWORK INSTALLATION
    I want to produce an artwork installation that will have roughly 12-16 receipt printers mounted on a wall, in grid format.
    The printers will each print out quotes, and also statistics, ideally at different intervals, more or less continuously.
    The paper from each printer will flow out in a ream, onto the floor, and visitors are welcome to tear the ‘receipts’ (quotes & stats) off and walk away with them.

    _____________________________________________________________________________________________
    I’m guessing I’ll need a pc (multiple pc’s) behind the gallery floating wall, connected to each printer (via cable or wirelessly) and running a program equipt to deal with multiple printers.
    Can anyone suggest a program that would do this?
    A program that let’s me print text quotes
    A program that will run & print ideally without manual intervention
    costing of printers/program?
    where to buy from warehouse/online?
    Can anyone suggest reliable printers to use? (ideally an older 2nd hand model that is available?)
    The look of the printers doesnt matter – I intend on taking off the outer ‘shells’ to expose the machinery inside.
    It doesn’t even matter if the printers don’t match/are ugly, that doesnt change the meaning of the work.
    all printer donations welcome! or where to buy cheap receipt printers recommendations?

    I AM SYDNEY BASED

    Please email all relevant info to thekrieg[at]gmail.com

  13. Thank you a lot for sharing your project! Your final results are quite impressive, I’m beggining to dig into this printing everything world, so you’ll be hearing from me soon (I’ll take de PIC path though…)

Leave a Reply

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.