![]() |
Forum Index : Microcontroller and PC projects : Small tickets printer on Pico
Author | Message | ||||
grroel.tech Newbie ![]() Joined: 09/12/2021 Location: SpainPosts: 24 |
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 StatesPosts: 454 |
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: SpainPosts: 24 |
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 StatesPosts: 454 |
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: NetherlandsPosts: 5193 |
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 StatesPosts: 454 |
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: SpainPosts: 24 |
![]() 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 StatesPosts: 454 |
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 ZealandPosts: 9630 |
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 StatesPosts: 454 |
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 ZealandPosts: 9630 |
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: SpainPosts: 24 |
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: NetherlandsPosts: 5193 |
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: CanadaPosts: 94 |
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 KingdomPosts: 10375 |
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: NetherlandsPosts: 5193 |
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: GermanyPosts: 101 |
Do you know the power consumption of the CSN-A2? It's not in the manual. |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |