Mini thermal printer print gibberish between words and pics

Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Locked
User avatar
erkangxia
 
Posts: 5
Joined: Mon Jun 07, 2021 11:58 am

Mini thermal printer print gibberish between words and pics

Post by erkangxia »

Hi, I recently brought a mini thermal printer and hooked it up with raspberry pi 4. All the software was installed correctly and the thermal printer can print sentences in less than 10 words. However, If the sentence got too long or I tried to print some pics, it will mix with gibberish. I set the rate at 19200 which is the same as the self-test page that came within the printer. Also, I tried all the rates just in case, only 19200 can print words.
Attachments
WechatIMG36.jpeg
WechatIMG36.jpeg (151.07 KiB) Viewed 349 times
WechatIMG35.jpeg
WechatIMG35.jpeg (108.6 KiB) Viewed 349 times

User avatar
mikeysklar
 
Posts: 14194
Joined: Mon Aug 01, 2016 8:10 pm

Re: Mini thermal printer print gibberish between words and p

Post by mikeysklar »

Gibberish is usually a baudrate mismatch. We have some Arduino based posts suggesting the printer is expecting 9600. I realize you are on a Pi4, but you could try dropping down to 9600 as the printing issue looks a lot like this case:

viewtopic.php?f=19&t=28909

User avatar
erkangxia
 
Posts: 5
Joined: Mon Jun 07, 2021 11:58 am

Re: Mini thermal printer print gibberish between words and p

Post by erkangxia »

Hi,
thanks for the reply, this is what I am getting using the 9600 rates for the self-test page. it gets worse
Attachments
WechatIMG38.jpeg
WechatIMG38.jpeg (136.41 KiB) Viewed 338 times

User avatar
mikeysklar
 
Posts: 14194
Joined: Mon Aug 01, 2016 8:10 pm

Re: Mini thermal printer print gibberish between words and p

Post by mikeysklar »

Thanks for trying the 9600.

Can you post a photo of how you have connected your Pi4 to the Mini thermal printer? Our guide page shows four different ways so I'd like to confirm that you are using one of those methods.

https://learn.adafruit.com/mini-thermal ... -3004345-8

User avatar
erkangxia
 
Posts: 5
Joined: Mon Jun 07, 2021 11:58 am

Re: Mini thermal printer print gibberish between words and p

Post by erkangxia »

Thank you for replying so quickly! I will post my attachment below but to sum up in words I connected Pi GND to printer Ground (black wire)
the TX pin on the printer connects to RXD on the Pi, RX on the printer to TXD on the Pi. Also, I used an external battery case to power the printer.

I used this link to guide my printer setup and I double-checked all the connections.
https://learn.adafruit.com/networked-th ... re-printer
Attachments
WechatIMG39.jpeg
WechatIMG39.jpeg (144.96 KiB) Viewed 326 times

User avatar
mikeysklar
 
Posts: 14194
Joined: Mon Aug 01, 2016 8:10 pm

Re: Mini thermal printer print gibberish between words and p

Post by mikeysklar »

Wait.

Your Pi is a 3.3v device and the printer is 5v. It is okay for you to send out from the Pi @ 3.3v to the 5v printer, but you may not connect a printer TX to the Pi RX. The Pi cannot take a 5v input on it's GPIOs. You have mucked it up.

https://learn.adafruit.com/mini-thermal ... -3004345-8

You will have to use a voltage divider if you want to read from the printer as shown here or just remove the Pi's RX connection to the printer.

Also make sure you have shutdown the console via raspi-config to enable the UART as described in the same above link.

User avatar
erkangxia
 
Posts: 5
Joined: Mon Jun 07, 2021 11:58 am

Re: Mini thermal printer print gibberish between words and p

Post by erkangxia »

Yea... I don't think it's a voltage problem... I have divided the voltage as shown in the instruction but the problem remains. Also, I saw people on the youtube did same as mine (5v supply without voltage divider) but theirs' works
https://www.youtube.com/watch?v=r6KvQShmRJg (youtube link)
Attachments
WechatIMG40.jpeg
WechatIMG40.jpeg (180.2 KiB) Viewed 281 times

User avatar
mikeysklar
 
Posts: 14194
Joined: Mon Aug 01, 2016 8:10 pm

Re: Mini thermal printer print gibberish between words and p

Post by mikeysklar »

Okay, let's try another approach.

We know your wiring and baud rate of 19,200 are good enough in that you can print up to 10 words before the garbage begins.

Were you able to install cups and follow the setup for the TTL printer thorugh Print Settings? I'm wondering if there is some more controlled buffering when ZJ-58 cups filter is in place?

https://learn.adafruit.com/networked-th ... re-printer

User avatar
erkangxia
 
Posts: 5
Joined: Mon Jun 07, 2021 11:58 am

Re: Mini thermal printer print gibberish between words and p

Post by erkangxia »

yes, I successfully finished all the installments through this link https://learn.adafruit.com/networked-th ... re-printer
Actually I used this link as instruction at first place, I successfully installed it, all the test was fine, because all the printing test was short, such as ' this is a test' . But when I try to print raspberry pic, it started to mix with meaningless words.

User avatar
mikeysklar
 
Posts: 14194
Joined: Mon Aug 01, 2016 8:10 pm

Re: Mini thermal printer print gibberish between words and p

Post by mikeysklar »

Gotcha.

I think this is going coming down to a connection issue.

Since things printing works to a point and descends into garble on longer jobs I would focus on your connections. Can you set things up to use connectors, perf board, header pins and other things to get yourself off the breadboard? I would also remove the RX connection on the Pi side to avoid any 5v coming into the board.

User avatar
tdubb13
 
Posts: 3
Joined: Mon Jul 19, 2021 2:55 pm

Re: Mini thermal printer print gibberish between words and p

Post by tdubb13 »

I don't think it is a connection issue. It seems more like a driver issue.
I just got my mini thermal printer and I'm having the same issue, although If I print direct to the serial > /dev/serial0 I can do long prints with no errors.

Locked
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Return to “Adafruit Raspberry Pi® accessories”