Hi everybody,
I am new here and I hope I found the right spot for my question. I just got the Mini Thermal Printer from Adafruit and am trying to use it with the adafruit_thermal_printer (atp) library for Python3.
The problem I have is that the printer is not consistent. Half of the time, it does print what I tell him to, but half of the time it doesn't. The most frequent error is that only the upper half line is printed instead of the entire line. This happens especially often, when I try to print with atp.SIZE_LARGE. Sometimes however, the entire line is omitted. This already happens for the example in the Github from atp. Instead of printing
Selftest
Hello world!
Bold hello world!
Thin underline!
Thick underline!
Inverse hello world!
Upside down hello!
Double height!
Double width
Strike-through hello!
Medium size text!
Large size text!
Center justified!
Right justified!
[barcode]
I only get
Selftest
Thin underline! (without underline)
Thick underline! (without underline)
Upside down hello!
Double height!
Double width (here I only get the upper half)
Strike-through hello!
Medium size text!
Large size text! (here I only get the upper forth)
Center justified! (this is left justified for some reason)
Right justified!
[barcode]
Another thing that I have problems with is the function has_paper. It does not terminate and seems stuck in some sort of loop (perhaps waiting for some signal). In the above and in my testing, I thus didn't use it.
I append an image of the test page of the printer and of the above example from atp.
I would be very happy for any help. Thank you in advance
Mushunrek
P.S.: I use a 5V 2.1A power supply and used the setup fromhere: https://learn.adafruit.com/networked-th ... re-printer. (Here too, although I can set up CUPS, it is not possible to print pictures, but that is not as important to me and I don't know if it suits this place...)
Problems with Adafruit Mini Thermal Printer
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_carter
- Posts: 29056
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Problems with Adafruit Mini Thermal Printer
Can you post a photo showing the actual power supply connection, with all the wires and connectors being used.
- mushunrek
- Posts: 5
- Joined: Wed May 05, 2021 8:13 am
Re: Problems with Adafruit Mini Thermal Printer
Of course!
The first picture shows the USB Power Adapter 5V 2.1A connected to a USB to DC cable which I cut open. I connected the open ends to a female to female cable which are the usual connectors from RasPi projects I guess. The second image then shows this female to female cable plugged into a male to male cable which are then connected to the cable from the printer.
The last image shows again the connection from the male to male to the cable of the printer, plugged into the printer.
Eventually, I will simply plug the cut open DC connector into the printer cable, but for the testing phase, I wanted something easier to manipulate.
The first picture shows the USB Power Adapter 5V 2.1A connected to a USB to DC cable which I cut open. I connected the open ends to a female to female cable which are the usual connectors from RasPi projects I guess. The second image then shows this female to female cable plugged into a male to male cable which are then connected to the cable from the printer.
The last image shows again the connection from the male to male to the cable of the printer, plugged into the printer.
Eventually, I will simply plug the cut open DC connector into the printer cable, but for the testing phase, I wanted something easier to manipulate.
- adafruit_support_carter
- Posts: 29056
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Problems with Adafruit Mini Thermal Printer
Thanks for the photos. This is most likely power related. It could either be the supply or the cabling, or both. The power supply rating *seems* OK. But the number and length of wires might be preventing adequate current from getting to the printer. The darker the print, the more current demand there is.
Could you try cutting the USB cable shorter and see if you could go directly from USB cable wires into printer power cable. Guessing those USB cables are stranded, so might not be super easy. But something along those lines and try again and see if it improves things.
Could you try cutting the USB cable shorter and see if you could go directly from USB cable wires into printer power cable. Guessing those USB cables are stranded, so might not be super easy. But something along those lines and try again and see if it improves things.
- mushunrek
- Posts: 5
- Joined: Wed May 05, 2021 8:13 am
Re: Problems with Adafruit Mini Thermal Printer
You were right. It seems the femal-to-female and/or the male-to-male cable limited the current. When I plug the DC directly into the cable from the printer, everything works very nicely.
Thank you very much!
Musxhu
Thank you very much!
Musxhu
- adafruit_support_carter
- Posts: 29056
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Problems with Adafruit Mini Thermal Printer
Cool. Sounds like it was just the cabling after all. Glad that fixed it.
Please be positive and constructive with your questions and comments.