Thermal Printer contrast issue

Breakout boards, sensors, Drawdio, Game of Life, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Post Reply
User avatar
bbbartt
 
Posts: 7
Joined: Wed Aug 07, 2019 10:18 am

Thermal Printer contrast issue

Post by bbbartt »

Hi Adafruit,

I've recently purchased a Thermal Printer of yours through a third party reseller. I've been struggling to get a sufficient amount of contrast from the printer since April. I've tried different power supplies (currently 9V 2.2A) and various settings (heating time etc.) found on the forum. Unfortunately, these attempts proved to be unsuccessful.

However, I recently met someone with the same Thermal Printer. I swapped the printer in my setup which resulted in a much darker print with a great amount of contrast. I've added an attachment for clarification: top = my printer, low contrast - bottom: new printer, great contrast. Both prints were printed using the exact same setup (both hardware + software). It seems like the printer that I have received is broken, causing the heat to be not sufficiently transferred to the paper.

Please let me know what I could still try to resolve the issues or whether the printer needs to be replaced. If the item should be replaced, I can forward this topic and issue to the reseller.

Thank you in advance for your help.

Bart
Attachments
Photo of issue and comparison with other printer
Photo of issue and comparison with other printer
Thermal Printer Issue.jpg (117.45 KiB) Viewed 234 times

User avatar
adafruit_support_carter
 
Posts: 24115
Joined: Tue Nov 29, 2016 2:45 pm

Re: Thermal Printer contrast issue

Post by adafruit_support_carter »

Do you happen to have the test print that originally came with the printer? Should have been included in the box.

It's very common for this behavior to be power related. The power supply as well as the cabling matters. When you did the swap out with the other printer, was everything the same except for the printer module itself? All the same cables, power supply, connectors, etc?

Do you get the same difference in contrast with a test print? (hold button while applying power)

User avatar
bbbartt
 
Posts: 7
Joined: Wed Aug 07, 2019 10:18 am

Re: Thermal Printer contrast issue

Post by bbbartt »

Thank you for your quick reply!

Unfortunately, I do not have the original test print anymore.

I confirm that the setup has been exactly the same in the photo of the original post. This includes power supply, firmware of microcontroller, hardware, cables, everything. The only thing that was changed is the printer (even keeping the printer's cables the same).

When printing the test print, my results are fine as you can see in the attached image. The image on the left is the faulty printer while the test print on the right is of the working one. The issue really only seems to occur on darker lines where more pixels need to be darkened, as in the original post. It seems like the printer is not able to get enough power in those cases.

Thanks again for your help :)
Attachments
printertest.jpeg
printertest.jpeg (219.66 KiB) Viewed 216 times

User avatar
adafruit_support_carter
 
Posts: 24115
Joined: Tue Nov 29, 2016 2:45 pm

Re: Thermal Printer contrast issue

Post by adafruit_support_carter »

The self test print is doing OK with the barcode and QR code parts. Those are the darkest parts of the test prints. Quite often when there's a power issue, the test print will misbehave at that point.

But agree it still seems somehow power related. The failing print is just darker than anything in the test print and pushing the power requirements beyond anything in the test print.

Can you provide more info on the failing print. What's the actual output trying to be printed?

User avatar
bbbartt
 
Posts: 7
Joined: Wed Aug 07, 2019 10:18 am

Re: Thermal Printer contrast issue

Post by bbbartt »

I agree with you that the test print is not failing as it is using less black 'per line', and as a result the issue does not occur.

I'm trying to print bitmap images (in sections of 10 pixels). There is still an issue that I need to resolve that causes the image to be so poorly visible (mainly due to the horizontal lines). I can verify that it isn't caused by the send bitmap, as I can use online tools to view the 1-bit bitmap image. This is however another issue that I still need to resolve, which is unrelated to the power issue as it occurs on the 'working' printer as well!

Any ideas on how I could resolve the power related issue? Or do you think that the printer does not function as it should?

Thanks!

User avatar
adafruit_support_carter
 
Posts: 24115
Joined: Tue Nov 29, 2016 2:45 pm

Re: Thermal Printer contrast issue

Post by adafruit_support_carter »

There are some density and heater config settings available for the printer. For example, there's setHeatConfig() and setPrintDensity() in the Arduino library:
https://github.com/adafruit/Adafruit-Th ... er-Library

Is the second printer exactly the same make/model printer? Could it possibly have different default settings that make it darker?

User avatar
bbbartt
 
Posts: 7
Joined: Wed Aug 07, 2019 10:18 am

Re: Thermal Printer contrast issue

Post by bbbartt »

Im aware of the printer settings of the library, and I've tried the various setHeatConfig / setPrintDensity settings in my project. It changed the result a bit, but the provided image in the original post has been the best out of all values that I've tried.

The models seems a bit. The working printer is model CSN-A2-T and the recently purchased printer with low contrast is the CSN-A2. I'm not sure whether this could explain the difference? I hope not as I expected other results from the printer (also based on the price).

I'm not sure about the mentioned 'default settings'. Aren't these settings overwritten when using the various setHeatConfig (etc.) configuration options that I've already tried?

User avatar
adafruit_support_carter
 
Posts: 24115
Joined: Tue Nov 29, 2016 2:45 pm

Re: Thermal Printer contrast issue

Post by adafruit_support_carter »

Can you share or link to your full code being used to print the bitmap.

User avatar
bbbartt
 
Posts: 7
Joined: Wed Aug 07, 2019 10:18 am

Re: Thermal Printer contrast issue

Post by bbbartt »

How do the printer's setup:

Code: Select all

  mySerial.begin(19200);

  // Start printer
  printer.begin();
  int dots = 11;
  int heatTime = 200;
  int heatInterval = 40; 
  printer.setHeatConfig(dots, heatTime, heatInterval);
  delay(1000);


  // Default printer config
  printer.setDefault();

How I print a section of an image:
I have a backend endpoint that returns 384 * 10 pixels of an image for every "image fraction". The code below prints a fraction, and increases the fraction variable. As a result, the next fraction will be fetched from the server during a consecutive call.

Code: Select all

  

if (WiFi.status() == WL_CONNECTED) { //Check WiFi connection status
    String url = imageFractionUrl + "?frac=" + String(frac) + "&img=" + imageName;
    std::unique_ptr<BearSSL::WiFiClientSecure> client(new BearSSL::WiFiClientSecure);
    client->setInsecure();

    HTTPClient http;  //Declare an object of class HTTPClient
    http.begin(*client, url);  //Specify request destination
    http.addHeader("Authorization", "Basic REPLACED_FOR_ONLINE_POST");
    int httpCode = http.GET();                                  //Send the request
 
    if (httpCode > 0) { //Check the returning code

     // file found at server
     if (httpCode >= 200 and httpCode <= 299) {
        WiFiClient * stream = http.getStreamPtr();
        uint8_t imageBuffer[byteArrayLength];  // 384 x 10 pixels / 8
        size_t size = stream->available();
        
          if(size) {
            // read up to 480 byte
            int c = stream->readBytes(imageBuffer, ((size > byteArrayLength) ? byteArrayLength : size));
            if (printer.hasPaper()){
              printer.printBitmap(imageWidth, 10, imageBuffer, false);
              delay(200);
            } 

            fraction++;

User avatar
bbbartt
 
Posts: 7
Joined: Wed Aug 07, 2019 10:18 am

Re: Thermal Printer contrast issue

Post by bbbartt »

Hi Adafruit,

Any news on the defect printer? I am currently unable to use the printer that I purchased for this project.

pburgess
 
Posts: 4109
Joined: Sun Oct 26, 2008 2:29 am

Re: Thermal Printer contrast issue

Post by pburgess »

Email support@adafruit.com and provide a link to this post, requesting a replacement printer. Thanks for your patience.

This may or may not actually fix the problem. If it does, fantastic, everything’s peachy and we can all get on with our projects! If not, and if you see the same issues…any chance you could move your project to Raspberry Pi? (and/or, if you have some time, could you test the problem printer there?) The problem printer has newer firmware that unfortunately is a bit of a black box…we don’t really know all the commands for this version…but there’s a driver for Raspberry Pi that seems to work pretty okay with it.

It’s explained a bit here:
https://learn.adafruit.com/networked-th ... i/overview

If Pi isn’t an option, fingers crossed then that it’s just a bum printer and the replacement fixes the issue.

User avatar
bbbartt
 
Posts: 7
Joined: Wed Aug 07, 2019 10:18 am

Re: Thermal Printer contrast issue

Post by bbbartt »

Thank you for your response!

It is so unfortunate that we do not have access to the full documentation of the printer's software! Thanks as well for the link, it's an interesting read for later. Unfortunately, a Pi is not an option due to power usage and size...

I will get in touch with support@adafruit.com!

Post Reply
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”