I've a thermal printer which has TTL, RS232 & a four pin interface. I want to connect it to an Arduino and take printouts with it. It has the following pinouts:

RS232 & TTL

  • GND
  • TXD
  • RXD
  • DSR
  • DTR

Another Four Pins Interface

  • LED
  • FEED
  • GND

I've tried printing using the serial communication by sending serial print commands from the TX of the Arduino to the RXD of the printer but for some reason it did not work.

How can I connect it to an Arduino and write a program for it?

Datasheet Links https://drive.google.com/file/d/1F7it7uGA20YBPsqsTllIjLz1V8hDCv9Y/view?usp=drivesdk


Item Image

  • \$\begingroup\$ You find the datasheet \$\endgroup\$
    – user253751
    Nov 16 '20 at 13:26
  • \$\begingroup\$ I have what seems to be a data sheet..what exactly should I look for in it? It only mentions about some ESC codes. Not much about pin descriptions. \$\endgroup\$ Nov 16 '20 at 13:27
  • 1
    \$\begingroup\$ One issue you could have is your voltage to your printer is too low. I've had issues trying to print at lower voltages like 5v. If you have the one I'm thinking of, I would recommend printing at 9v. \$\endgroup\$ Nov 16 '20 at 13:52
  • 1
    \$\begingroup\$ "It is both TTL and RS23[2]" How? Provide documents. Also sketch out, and share, your wiring connections once you provide the documents. \$\endgroup\$ Nov 16 '20 at 16:03
  • 1
    \$\begingroup\$ Maybe: tronixstuff.blogspot.com/2011/07/… (be weary of dead links) and sites.google.com/site/tronixstuff/home/… will get you going. See example38p1.ino \$\endgroup\$ Nov 16 '20 at 21:24

You might want to take a look at this library. The command set seems similar (for example Init is ESC + @). If anything, you can try to copy fragments of code for a simple printout.

Couple of things to consider:

  1. Thermal printers need a stronger power supply. Get an external 9V power supply and connect it to the printer (not the Arduino!) - Seems like you did that.
  2. Make sure GND on both the printer and board are connected.
  3. Make sure the baudrate of the Arduino is compatible with the printer (e.g. Serial1.begin(19200);
  4. Be patient. Hardware development is an art that fights back. Good luck!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.