I try to print some text with python and a thermal receipt printer by a Raspberry Pi 2 model B. I use the library developped by Adafruit and the printer sold by Adafruit too. But it fails. The only thing working is the println function, and at least not well. I have to print some characters like .--``[#]..--``--. but I have some random results. Sometimes the line is correctly printed, sometimes the line is vertically mid printed (like a negative interline), sometimes not all the characters.

I use an AC power adaptor from an old Sony electronic equipment to power the printer. Output: DC5V 800mA. The printer is connected to the PI by GPIO and powered by the Sony power supply.

from Adafruit_Thermal import *
printer = Adafruit_Thermal("/dev/ttyAMA0", 19200, timeout=5)
def printfile():
   with open('output') as f:a=f.read()
   for i in range(int(len(a))):

an output file example:

        .--`     |  .--``--.    
        |       .--`        `--.
        `--.    |              |
`--.        .--``--.           |
 x x`--..--[#]      `--.    .--`
    .--``-[#]][#]      |.--`    
.--`      [#]-[#]   .--`        
|     {`}  ||--|`--.            
`--.    .--|   |x   `--.        
    `--.|              |        
        `--.        .--`        

I saw that when it is bad printed, a red led blinks under the printer, that means there are some errors...

Any Idea ?


  • 1
    Have you checked that your power supply is not overloaded?
    – Craig
    Commented Dec 14, 2015 at 15:25
  • How is the printer powered and connected to the Pi? You should also link to the product and tutorial on adafruit's site in your question. Commented Dec 14, 2015 at 15:49

1 Answer 1


It sounds like your power supply is inadequate for the printer. According to Adafruit's documentation (on the link you provided), the printer requires a power supply that can support at least 1.5A output.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.