Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 10:29 31 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Small tickets printer on Pico

Author Message
grroel.tech
Newbie

Joined: 09/12/2021
Location: Spain
Posts: 24
Posted: 10:08am 03 Aug 2025
Copy link to clipboard 
Print this post

Hello,
I have tried to connect a thermal ticket printer (EW5820) to a Raspberry Pi Pico 2 with WebPicoMite. I have followed and checked all the steps:

The printer is working, tested on Windows.

It is powered with sufficient power at 5v.

Using the connector labelled "TTL" I have connected the following wires to the Pico:
- GND to GND
- RX to GP16
- TX to GP13

As a precaution I used a 3.3v - 5v level adapter (BSS138) with RX and TX.

I have assigned the pins to COM1: SETPIN GP13,GP16, COM1

I have tried two methods:
- OPEN "COM1:19200" AS #5 : PRINT #5, "Hello" : CLOSE#5
- DEVICE SERIALTX GP13,19200, "Hello".

None of them worked. I changed the baud rate to other values with no result.

On Aliexpress page  a customer says that the TTL connector RX and TX pins are swapped. I tried reversing them and it didn't work.

Have I done something wrong or have I omitted something? What else can I do to verify the operation?

Thanks, best regards.
 
toml_12953
Guru

Joined: 13/02/2015
Location: United States
Posts: 454
Posted: 10:20am 03 Aug 2025
Copy link to clipboard 
Print this post

  grroel.tech said  Hello,
I have tried to connect a thermal ticket printer (EW5820) to a Raspberry Pi Pico 2 with WebPicoMite.

Have I done something wrong or have I omitted something? What else can I do to verify the operation?

Thanks, best regards.


I use that printer with a Pico 2W and it works fine. I use a TTL to RS-232 converter such as this one:


Edited 2025-08-03 20:23 by toml_12953
 
grroel.tech
Newbie

Joined: 09/12/2021
Location: Spain
Posts: 24
Posted: 11:04am 03 Aug 2025
Copy link to clipboard 
Print this post

  toml_12953 said  

I use that printer with a Pico 2W and it works fine. I use a TTL to RS-232 converter such as this one:



Once that MAX3232 adapter is connected to the Pico, what is the cable layout to the printer? Do you need to take into account the CTS pin and the voltage of the printer connector?
 
toml_12953
Guru

Joined: 13/02/2015
Location: United States
Posts: 454
Posted: 01:14pm 03 Aug 2025
Copy link to clipboard 
Print this post

  grroel.tech said  
  toml_12953 said  

I use that printer with a Pico 2W and it works fine. I use a TTL to RS-232 converter such as this one:


Once that MAX3232 adapter is connected to the Pico, what is the cable layout to the printer? Do you need to take into account the CTS pin and the voltage of the printer connector?


I use a straight-through connector. I have a 9-pin to 25-pin adapter on the back of the printer and a gender changer since the adapter has a female 9-pin side and the cable I use to connect to the MAX3232 needs a male. You connect the Vcc and Gnd connectors on the MAX3232 to the PicoCalc. Connect the RXD and TXD lines to the corresponding GPs. If you get no response, switch RXD and TXD. It's that simple.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5193
Posted: 02:32pm 03 Aug 2025
Copy link to clipboard 
Print this post

When a printer has both rs232 and ttl serial, it mpst likely has a jumper to select what pprt to use. If you troed it on a pc, the selector is set to rs232.

Volhout
PicomiteVGA PETSCII ROBOTS
 
toml_12953
Guru

Joined: 13/02/2015
Location: United States
Posts: 454
Posted: 03:04pm 03 Aug 2025
Copy link to clipboard 
Print this post

  grroel.tech said  Hello,
I have tried to connect a thermal ticket printer (EW5820) to a Raspberry Pi Pico 2 with WebPicoMite. I have followed and checked all the steps:



Have you been to

EM5820 Thermal Receipt Printer

to see if anything there might give you a clue? The default baud rate of the printer is 9600 and I don't have a manual so I can't see how (if possible) to change it.

TBH, I've never tried going directly to the TTL interface since I wanted to use other RS-232 serial devices as well. Since the RS-232 interface works so well, I've never had any incentive to try anything else. Now that I've read your message, though, maybe I'll try going directly and see if I can get it to work.
 
grroel.tech
Newbie

Joined: 09/12/2021
Location: Spain
Posts: 24
Posted: 06:30pm 03 Aug 2025
Copy link to clipboard 
Print this post


The simplest solution is the best.
The printer's RX and TX lines are reversed, as they said on AliExpress.
I connected only the TX line, pin GP4, and ground from the Pico. At 9600 baud via COM2, printing was successful.
Thanks for the replies.
Best regards.
 
toml_12953
Guru

Joined: 13/02/2015
Location: United States
Posts: 454
Posted: 10:28pm 03 Aug 2025
Copy link to clipboard 
Print this post

  grroel.tech said  
The simplest solution is the best.
The printer's RX and TX lines are reversed, as they said on AliExpress.
I connected only the TX line, pin GP4, and ground from the Pico. At 9600 baud via COM2, printing was successful.
Thanks for the replies.
Best regards.


Congrats! I knew it was a simple thing to do. Persistence pays!
Edited 2025-08-04 08:28 by toml_12953
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9630
Posted: 09:29am 04 Aug 2025
Copy link to clipboard 
Print this post

These are great little printers - I have used several of them.

Normally, I feed the printer with about 7v via an LM2596 buck-converter, as thermal printers are quite thirsty for current, and they can EASILY overload a simple 5v USB connection for power.  This one sucks around 1.5A when printing, and if connected to a 5v supply that is not grunty enough, it can cause your entire project to hiccup/reboot/hiccup/reboot.....

Other then that wee pointer, have fun - they are easy to use and work very well.
I have the programming software for these units, that allows you to setup which font set it uses, and also set the serial baud-rate.  All the ones I have got in the past, had a default baudrate of 19k2, but perhaps the latest ones, they have slowed it to make them easier to get going on MCU's that can't run that fast.
Smoke makes things work. When the smoke gets out, it stops!
 
toml_12953
Guru

Joined: 13/02/2015
Location: United States
Posts: 454
Posted: 10:46am 04 Aug 2025
Copy link to clipboard 
Print this post

  Grogster said  These are great little printers - I have used several of them.
I have the programming software for these units, that allows you to setup which font set it uses, and also set the serial baud-rate.  All the ones I have got in the past, had a default baudrate of 19k2, but perhaps the latest ones, they have slowed it to make them easier to get going on MCU's that can't run that fast.


Is the software available on a website? If so, do you have a URL? I'm stuck at 9600 baud until I get some more info about this tiny wonder.
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9630
Posted: 03:15am 05 Aug 2025
Copy link to clipboard 
Print this post

See this ZIP file.

It has the programming tool, and the user manual.


Thermal Printer Update tool and manual.zip
Smoke makes things work. When the smoke gets out, it stops!
 
grroel.tech
Newbie

Joined: 09/12/2021
Location: Spain
Posts: 24
Posted: 07:58am 05 Aug 2025
Copy link to clipboard 
Print this post

As shown in the PicoMite manual:

DEVICE SERIALTX GP4, 9600, ‘Hello, World’

does not work. With SETPIN, OPEN as # and PRINT# it works.

Any clues?
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5193
Posted: 06:07pm 05 Aug 2025
Copy link to clipboard 
Print this post

Hi Grroei.tech,

Yes, I have a clue....

First of all, I just double checked, and using a UART, or using SERIALTX does not make any difference. The signals on the CPx pin are the same. Tested on PicoMite RP2040 VGA.

About the clue:

You are sending a single string via a GPIO pin. Before you can send the data, you have to make sure the port (or pin) is set up correct. Using UART this is performed by the OPEN command.

With SERIALTX, at the moment you give the command, the pin is typically in INput mode.  Which is 0V. However, the 'idle" level of the serial port (TTL serial levels) is +3.3V.

There are 2 options:
1/ hardware: connect a pullup (i.e. 10k) resistor from the GP pin used for TX to +3.3V. After this SERIALTX will work correctly. This will cause the signal to be "idle" for serial before the first SERIALTX.

2/ software: At the start of your program, set the pin used for TX to DOUT and HIGH. Then wait minimal 1 UART character time.
SETPIN GPx,DOUT : PIN(GPx)=1 : PAUSE 10

Good luck with the thermal printer...

Volhout
Volhout
PicomiteVGA PETSCII ROBOTS
 
scruss
Regular Member

Joined: 20/09/2021
Location: Canada
Posts: 94
Posted: 03:51am 06 Aug 2025
Copy link to clipboard 
Print this post

I used to use and program a whole bunch of these type of printers. They mostly all used very similar firmwares. I don't see it in the manual for this one (tnx, Grogster!) but there was a self-test feature built in. I *think* it was holding down feed as you turned the printer on, and it printed the configuration. If you tapped feed, each time it would change the baud rate and print the new value. Once you got the speed where you wanted it, you turned the printer off.

Others had a header you could jumper to show/set config
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10375
Posted: 07:08am 06 Aug 2025
Copy link to clipboard 
Print this post

There is a bug in DEVICE SERIALTX in 6.00.03. It may work on GP0 but no other pins. Will be fixed in 6.01.00
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5193
Posted: 10:14pm 06 Aug 2025
Copy link to clipboard 
Print this post

  matherp said  There is a bug in DEVICE SERIALTX in 6.00.03. It may work on GP0 but no other pins. Will be fixed in 6.01.00


Oops, that is why I did not find it. I used GP0 since GP4 in my platform was used.
Can this still be fixed in 6.00.03 ? (for the 2040 platforms, that would otherwise have to live with this bug forever?).

Volhout
Edited 2025-08-07 08:15 by Volhout
PicomiteVGA PETSCII ROBOTS
 
PilotPirx

Senior Member

Joined: 03/11/2020
Location: Germany
Posts: 101
Posted: 09:58am 07 Aug 2025
Copy link to clipboard 
Print this post

Do you know the power consumption of the CSN-A2?
It's not in the manual.
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025