Тёмный
No video :(

How to connect a thermal printer to the Arduino | Small Project 

Good Electronics
Подписаться 934
Просмотров 26 тыс.
50% 1

Опубликовано:

 

29 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 79   
@Lagggerengineering
@Lagggerengineering 4 года назад
Very nicely shown and explained! I didn't even know that the cutting blade was adjustable :D
@GoodElectronics
@GoodElectronics 4 года назад
Not adjustable, you turn the knob to reset its position when it gets stuck :)
@Lagggerengineering
@Lagggerengineering 4 года назад
@@GoodElectronics Oh uhh, thanks for the clarification :D
@hoanganhson4967
@hoanganhson4967 11 месяцев назад
Nice job bro, Can you explain the parameter to change the size of the font when they were printed in the paper, I mean, what's the relation to the height of the font (millimeter unit) and the parameter of your programing code? thanks
@umbrellainnovation5194
@umbrellainnovation5194 4 месяца назад
Thank you very much 😊
@E2ESolutionsDIY
@E2ESolutionsDIY 4 года назад
Good explanation dear , keep going 👍
@E2ESolutionsDIY
@E2ESolutionsDIY 4 года назад
Hope you also viewed my channel and subscribe it to support back 👍
@coreykreisel6091
@coreykreisel6091 2 года назад
Hi there! i have purchased this printer and am trying to copy your instructions for the simplified connection method (method 2). Unfortunately the video is not very HD and it is hard to see how things are wired. Could you please share the name of the chip or the pinout diagram and explain with a bit more detail where you have connected the wires? Thank you! Great work!
@GoodElectronics
@GoodElectronics 2 года назад
The best way is to look at the chip markings and search for its data sheet, you will be 100% sure about the connections. If you won't find anything, here's some similar chip: www.openimpulse.com/blog/products-page/product-category/max3232-rs232-to-ttl-converter-module/ Remember to check the connections (the rs232 side needs to be connected to the rs232 port, the ttl side needs to be connected somewhere inside the printer with the main chip), as long as your printer has ttl inside. If you won't find the chip, I think the printer will use rs232, so you need to stay with method 1.
@danielfarkas6334
@danielfarkas6334 4 года назад
Great demonstration! Would you please add the whole arduino code to the desctription? Thanks!
@GoodElectronics
@GoodElectronics 4 года назад
You're welcome! void setup() { Serial.begin(9600); delay(1000); int delTime=0; // delay between each instruction begin(); //reset all settings justification(0); //left side Serial.println("Arduino"); delay(delTime); justification(1); //middle size(2); //big text Serial.println("TEST V 0.2"); delay(delTime); size(0); //small text justification(0); //left side color(1); //white text Serial.println(" White text "); delay(delTime); color(0); //black text Serial.println("Hello world!!!!!"); delay(delTime); feed(1); //print 1 line below Serial.println("Good Electronics Thermal Printer TEST"); delay(delTime); feed(1); //print 1 line below justification(1); Serial.println("SIMPLE THERMAL PRINTER"); delay(delTime); feed(1); //print 1 line below Serial.println("CONNECTED TO ARDUINO"); delay(delTime); feed(1); //print 1 line below Serial.println("very very very long text in this line......"); delay(delTime); feed(1); //print 1 line below Serial.println("very very very long text in this line again"); delay(delTime); feed(1); //print 1 line below Serial.println("Printing complete!"); cut(); //cut the paper } void loop() { } void begin() { Serial.write(27); Serial.write(64); Serial.write(10); } void justification(int just) { Serial.write(27); Serial.write(97); Serial.write(just); Serial.write(10); } void feed(int lines) { Serial.write(27); Serial.write(100); Serial.write(lines); Serial.write(10); } void cut() { feed(3); Serial.write(27); Serial.write(105); Serial.write(10); } void color(bool col) { Serial.write(29); Serial.write(66); Serial.write(col); Serial.write(10); } void size(int siz) { Serial.write(29); Serial.write(33); Serial.write(siz); Serial.write(10); }
@danielfarkas6334
@danielfarkas6334 4 года назад
@@GoodElectronics Thanky you!
@danielfarkas6334
@danielfarkas6334 4 года назад
@@GoodElectronics For me its just prints a bunch of strange characters. My printer settings are the same as yours. I dont know what am i doing wrong. I use Epson TM-20II. Do you have any idea? Thank you very much!!
@GoodElectronics
@GoodElectronics 4 года назад
@@danielfarkas6334 Do you use the same baudrate in arduino as it is in your printer?
@danielfarkas6334
@danielfarkas6334 4 года назад
Good Electronics yes i tried both the printer and arduino with 9600 and 19200 too
@garcia3137
@garcia3137 4 года назад
thanks a lot! but i have a doubt, where can i find more codes or information about ones ?
@GoodElectronics
@GoodElectronics 4 года назад
Hi. All of information I got from this documentation page. Sending commends with arduino is my idea, so there isn't much about it.
@o0julek0o
@o0julek0o 3 года назад
@@GoodElectronics is there some place where one could find all or most of these lists of commands for each printer? Or are they generally the same across most models?
@GoodElectronics
@GoodElectronics 3 года назад
@@o0julek0o They should be the same, but some printers may have some other functions. I think it will work with my commands.
@aijax3609
@aijax3609 4 года назад
Awesome. You’ve just complicated the printer.
@bonaventureokoli7988
@bonaventureokoli7988 3 года назад
Thanks a bunch.
@tobychow4761
@tobychow4761 3 года назад
My printer has a parallel interface card (UB-P02II). How should I go about this project in my case?
@GoodElectronics
@GoodElectronics 3 года назад
As well as I know arduino don't support parallel interfaces, maybe there are some converters for rs232, but I don't know if it will work
@Rafael_Bueno
@Rafael_Bueno 2 года назад
great video! what is the instruction to cut the paper at the end?
@GoodElectronics
@GoodElectronics 2 года назад
Hi. All these instructions are in the code so you can copy them. The cutting instruction is a bit tricky, because you need to eject some more paper before cutting, because the cutting blade is in the front of the printer
@sharingtechnical8312
@sharingtechnical8312 4 года назад
hi! i'm using xpprinter xp-58ii it's not support ttl you can help me comunication xpprinter with arduino. thanks so much!
@GoodElectronics
@GoodElectronics 4 года назад
I don't know if you can connect this printer to arduino. Maybe you can connect to arduino using USB host shield, but I didn't test it yet, so I can't help you with it. Maybe you will find some code to it.
@sharingtechnical8312
@sharingtechnical8312 4 года назад
@@GoodElectronics OKE, Pro if i find it! i will Share with you! thanks u so much.
@victorenriquecastillomarti8366
@victorenriquecastillomarti8366 3 года назад
Hi. I got an epson printer, model M244A. It has an input for USB and RS232. I also have a USB Host Shield for arduino. Can I use the USB connection of the printer with the USB connection of the USB Host Shield, and it works the same as you show in the video? I hope you can help me friend, I would appreciate it very much, there is my subscription and I like it
@GoodElectronics
@GoodElectronics 3 года назад
Sure, you can use USB, but I didn't test any of these shields. It's harder to do, because with RS232 there's already a Serial in Arduino, but with USB you have to implement USB protocols and so. Simply: USB can work, but Serial is much more simple to use.
@BilalKhan-do9il
@BilalKhan-do9il 3 года назад
i have a real pos rpt iv classic printer, in which im usnig an RS 232 to ttl converter to connect it with arduino, in my printer it seems that the rx and tx ports are messed up coz when i connect printer to ttl converter using a cable nothing prints on paper, then i used bare connectors and manually soldered tx and rx pin only, in my case rx pin seems to be at pin 1, despite of doing all these stuffs myprinter is only printing some random character, im using adafruit thermal library, can you tell me whats the issue?
@GoodElectronics
@GoodElectronics 3 года назад
Try changing baudrate and try with every one, that's the only way to figure out the baudrate used in your printer. Most common ones are 9600 and 115200
@BilalKhan-do9il
@BilalKhan-do9il 3 года назад
@@GoodElectronics yeah its working now very well , baud rate is 9600 and main culprits were rx and tx pin , thanks!
@davidorozco971
@davidorozco971 3 года назад
The db9 cable Is a 1 to 1 cable? or what kind of cable is it? Can you send me the link to buy It, please
@GoodElectronics
@GoodElectronics 3 года назад
I bought it at a local store, so I can't send you a link. This is non-crossed cable
@janm6380
@janm6380 4 года назад
Hi! I have the same epson printer with this stupid db25 port. when you connect it to the pc, will it work as normal, so i can install epson driver, print from any pos software and so on? please let me know.
@GoodElectronics
@GoodElectronics 4 года назад
I didn't test it, but if you have an rs232 port or rs232 to USB adapter, it will work. It won't work that way I connected it, you must have a direct rs232 to usb (without serial) converter
@lordnoah3366
@lordnoah3366 2 года назад
hey Good Electronics ! please help me !!!! I use " Dump File to Port " in realterm ... exemple". txt" file eject very good but "pdf and outher(-png -jpeg )" file not printig.... why not work .... what would you suggess?
@GoodElectronics
@GoodElectronics 2 года назад
Hi. I tried to see any documentations how to print images and I also haven't found the solution. I think that png, jpeg won't work, you need at least a bitmap, but I don't know how to prepare it to print with this printer.
@lordnoah3366
@lordnoah3366 2 года назад
​@@GoodElectronics i try bitmap file ..... i searched . maybe work esc/p commands inside page print mode
@amitnamdeo7446
@amitnamdeo7446 8 месяцев назад
can we do it on citizens barcode printer ?
@lovrobebic6059
@lovrobebic6059 2 года назад
@Good Electronics, I have thermal printer with only USB port, Can you explain me how can I communicate with arduino? WIll it work if I use USB to TTL converter?
@GoodElectronics
@GoodElectronics 2 года назад
No, it's impossible to connect it that way. I have no idea how you could connect it.
@lovrobebic1447
@lovrobebic1447 2 года назад
@@GoodElectronics Hi, I have bought the used STAR Micronics TSP650 printer with serial port, and also i have ordered rs232 to ttl adapter and conected everything like you, but I still can't get communication between arduino and printer. Do You have idea what could be problem?
@GoodElectronics
@GoodElectronics 2 года назад
Maybe check every baudrate? Or try to swap rx and tx
@lovrobebic6059
@lovrobebic6059 2 года назад
@@GoodElectronics Thanks for Your reply. I have tried to change baudrates, and swap rx and tx pins, but without any progress. Then I bought USB to RS232 adapter cable to try send commands from Realterm to printer and this works well , so now I'm sure that printer works correctly. Now I'm wondering why it doesnt print when I'm using RS232 to TTL adapter. I am total beginer in arduino programing but as I understand just this two lines of code should be enough to send print request to printer: Serial.begin(9600); Serial.print("Hello world"); So if that doesn't work I supose that maybe my RS232 to TTL adapter doesn't work well. What do You think?
@lycheesack
@lycheesack 3 года назад
did the use bluetooth printer network? what id number do the communication chip use?
@GoodElectronics
@GoodElectronics 3 года назад
If you meant using a printer via bluetooth, then yes, this is possible, with HC-06 module. It works in the same way as Arduino Serial, so commands are the same. Make sure that the module is set to proper baudrate to work.
@tenij000
@tenij000 4 месяца назад
do got the arduino code
@kaniduperera7681
@kaniduperera7681 3 года назад
why you use Serial.write(10); after every command ?
@GoodElectronics
@GoodElectronics 3 года назад
That's the enter symbol, it tells the printer that the command is finished
@yordicdelacruz7477
@yordicdelacruz7477 4 года назад
good afternoon, is there any way to print small images? Thank you very much in advance
@GoodElectronics
@GoodElectronics 4 года назад
Hi. I tried to print images, but I didn't find and way to get it to work with arduino.
@yordicdelacruz7477
@yordicdelacruz7477 4 года назад
@@GoodElectronics ok u.u thx
@iamguruman
@iamguruman 3 года назад
Hello. Can you show how to do this with godex g500?
@GoodElectronics
@GoodElectronics 3 года назад
Hi. I don't have ability to show you with every model of printer, I showed you how to modify a printer if it has RS232 connector. All printers that have this connector will be built in the similar way.
@lapatronale
@lapatronale 3 года назад
hi, i have the same model but it is usb, how can i interface with Arduino? pls Marco
@GoodElectronics
@GoodElectronics 3 года назад
Unfortunately, arduino can't control usb devices, the only way is to use external USB host module.
@lapatronale
@lapatronale 3 года назад
@@GoodElectronics Ie could I use a usb ttl converter? tks a lot!
@GoodElectronics
@GoodElectronics 3 года назад
@@lapatronale no, it won't work.
@jahn_star
@jahn_star 4 года назад
thanx
@bonaventureokoli7988
@bonaventureokoli7988 3 года назад
Please can you list the items you used in the conversion to arduino
@GoodElectronics
@GoodElectronics 3 года назад
It depends if you prefer the adapter connection or direct soldering connection, and if you want to use a step up converter, write so I will be able to type the list
@bonaventureokoli7988
@bonaventureokoli7988 3 года назад
@@GoodElectronics i mean the device for serial to arduino board, that small chip what is it, and also if you dont mind, you can mention others, you can even paste an affiliate link i'll buy them.
@GoodElectronics
@GoodElectronics 3 года назад
It's a serial to rs232 converter, all these converters should work in the same way.
@bonaventureokoli7988
@bonaventureokoli7988 3 года назад
@@GoodElectronics Thank you very much. that's it.
@DucNguyenMinh
@DucNguyenMinh 4 года назад
Can you capture the circuit connected more clearly?
@GoodElectronics
@GoodElectronics 4 года назад
Which circuit?
@DucNguyenMinh
@DucNguyenMinh 4 года назад
@@GoodElectronics at time 0:17
@GoodElectronics
@GoodElectronics 4 года назад
It's a simple time logger with DS1307. You can find a video about it on my channel. Simply add a switch to any analog input, and make an if that detects when this button is pushed. Like this (you also have to add the time script): pinMode(A0, INPUT_PULLUP); if(!digitalRead(A0)) { Serial.print(time); Serial.print(27 100 3); delay(500); }
@gasour1
@gasour1 2 года назад
Whats the model of this printer
@GoodElectronics
@GoodElectronics 2 года назад
It's some Epson printer, I don't know the model, I bought it used
@gasour1
@gasour1 2 года назад
@@GoodElectronics thanks also iam ask if you can renewing th link of epson programing guide pdf if you please the old link not working
@GoodElectronics
@GoodElectronics 2 года назад
Unfortunately, I don't have the pdf downloaded and I don't know where to search for the other files, but you can try to search for similar models, for example I found this: files.support.epson.com/pdf/general/escp2ref.pdf Of course most of the commands won't work, but some basic comands are common to all the printers, so they will work.
@lekhanhsau4536
@lekhanhsau4536 3 года назад
Rx to Rx, Tx to Tx - something wrong here. I Know that "rx to tx and tx to rx".
Далее
SIGMA ENVY IS UNTOUCHABLE 🔥 #insideout2
00:10
Просмотров 4 млн
журавли в пятницу
00:14
Просмотров 83 тыс.
Jumping and Running Animation for MLP
3:02
Raspberry Pi Zero Thermal Printer fun project
10:56
Просмотров 18 тыс.
Adafruit Internet of Things Printer
1:29
Просмотров 27 тыс.
Top 20 Arduino Projects | Arduino project compilation
24:55
The coolest robot I've ever built!
19:40
Просмотров 4,6 млн
From Idea to Schematic to PCB - How to do it easily!
11:05
SIGMA ENVY IS UNTOUCHABLE 🔥 #insideout2
00:10
Просмотров 4 млн