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
@@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 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?
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
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!
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.
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?
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
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.
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.
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.
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.
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
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?
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.
@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 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 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?
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
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.
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
@@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.
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.
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); }
Very nicely shown and explained! I didn't even know that the cutting blade was adjustable :D
Not adjustable, you turn the knob to reset its position when it gets stuck :)
@@GoodElectronics Oh uhh, thanks for the clarification :D
Good explanation dear , keep going 👍
Hope you also viewed my channel and subscribe it to support back 👍
Thank you very much 😊
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
Great demonstration!
Would you please add the whole arduino code to the desctription?
Thanks!
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);
}
@@GoodElectronics Thanky you!
@@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!!
@@danielfarkas6334 Do you use the same baudrate in arduino as it is in your printer?
Good Electronics yes i tried both the printer and arduino with 9600 and 19200 too
thanks a lot! but i have a doubt, where can i find more codes or information about ones ?
Hi. All of information I got from this documentation page. Sending commends with arduino is my idea, so there isn't much about it.
@@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?
@@o0julek0o They should be the same, but some printers may have some other functions. I think it will work with my commands.
Awesome. You’ve just complicated the printer.
great video! what is the instruction to cut the paper at the end?
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
can we do it on citizens barcode printer ?
Thanks a bunch.
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!
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.
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
I bought it at a local store, so I can't send you a link. This is non-crossed cable
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?
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
@@GoodElectronics yeah its working now very well , baud rate is 9600 and main culprits were rx and tx pin , thanks!
did the use bluetooth printer network? what id number do the communication chip use?
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.
hi!
i'm using xpprinter xp-58ii
it's not support ttl you can help me comunication xpprinter with arduino. thanks so much!
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.
@@GoodElectronics OKE, Pro if i find it! i will Share with you! thanks u so much.
My printer has a parallel interface card (UB-P02II). How should I go about this project in my case?
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
Hello. Can you show how to do this with godex g500?
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.
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.
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
good afternoon, is there any way to print small images?
Thank you very much in advance
Hi. I tried to print images, but I didn't find and way to get it to work with arduino.
@@GoodElectronics ok u.u thx
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?
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.
@@GoodElectronics i try bitmap file ..... i searched . maybe work esc/p commands inside page print mode
@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?
No, it's impossible to connect it that way. I have no idea how you could connect it.
@@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?
Maybe check every baudrate? Or try to swap rx and tx
@@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?
why you use Serial.write(10); after every command ?
That's the enter symbol, it tells the printer that the command is finished
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
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.
do got the arduino code
Please can you list the items you used in the conversion to arduino
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
@@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.
It's a serial to rs232 converter, all these converters should work in the same way.
@@GoodElectronics Thank you very much. that's it.
hi, i have the same model but it is usb, how can i interface with Arduino? pls Marco
Unfortunately, arduino can't control usb devices, the only way is to use external USB host module.
@@GoodElectronics Ie could I use a usb ttl converter? tks a lot!
@@lapatronale no, it won't work.
Whats the model of this printer
It's some Epson printer, I don't know the model, I bought it used
@@GoodElectronics thanks also iam ask if you can renewing th link of epson programing guide pdf if you please the old link not working
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.
thanx
Can you capture the circuit connected more clearly?
Which circuit?
@@GoodElectronics at time 0:17
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);
}
Rx to Rx, Tx to Tx - something wrong here. I Know that "rx to tx and tx to rx".