Using three arduino to one thermal printer

Hello!

Pardon me if I'm posting on the wrong section of the forum,so yeah,
my question is very straight forward from the title.

In my project I have 3 arduino in which each of them prints words/characters
and I'm just wondering if it's okay to use single thermal printer to get my output.
What really bothers me is what will happen when I connect the three through
the printer, each rx and tx pin will be parallel (am I right? ) and the ground from the thermal printer
through the 3 arduino will connect. Do these actions will have an effect on my board?

P.S I haven't tried connecting the 3 arduino to the thermal printer because I just recently
purchased and it will arrive next week. I just want to know if it's possible (pertaining to my
question) to lessen my expenses by using one instead 3 different printer for each arduino.

Appreciate any response and advises,

Thank you so much.

You can't connect two outputs together. Two pins trying to transmit HIGH and LOW at the same time will fight each other.

It also doesn't make sense to connect 3 things to one printer. What if one starts printing before another is finished? Do they have any way to coordinate their actions? It may be better to designate one as the "print server" and have the others send it commands when they want to print. An Arduino Mega has 4 serial ports so it can connect a separate Tx and Rx to the 3 slaves. If you need something smaller, a Teensy 3.2 will be good too.

MorganS:
It may be better to designate one as the "print server" and have the others send it commands when they want to print. An Arduino Mega has 4 serial ports so it can connect a separate Tx and Rx to the 3 slaves

Thank you for the fast reply,

Mmm In the end I need a mega as the printer server, is it a serial to serial communication? (Kinda new to this stuff but I'm going to look it up further ). The mega receive the data from the uno and then it will transfer to the thermal printer to get an output?

MorganS:
What if one starts printing before another is finished? Do they have any way to coordinate their actions?

If I did put a print server will this problem be solve or not?

If I did put a print server will this problem be solve or not?

If you write the code correctly, yes.

You would queue the data to be printed, with possibly different queues for each input, and only send data to the printer when it is ready for more data.

PaulS:
If you write the code correctly, yes.

You would queue the data to be printed, with possibly different queues for each input, and only send data to the printer when it is ready for more data.

Okay! thank you so much , going to try it myself and ask again if I have troubles.

If you can arrange things so that only one Arduino transmits at any one time then you can connect several Tx lines to one Rx line with a few extra components.

At the printer's Rx you need a resistor (5600 ohms should be fine) connecting the Rx line to 5v so that the line is normally HIGH.

For each of the Arduino Tx lines you need a diode oriented so that the Arduino can pull the printer's Rx line LOW but the HIGH 5v from the Arduino cannot get to the printer's Rx line.

...R

Robin2:
If you can arrange things so that only one Arduino transmits at any one time then you can connect several Tx lines to one Rx line with a few extra components.

At the printer's Rx you need a resistor (5600 ohms should be fine) connecting the Rx line to 5v so that the line is normally HIGH.

For each of the Arduino Tx lines you need a diode oriented so that the Arduino can pull the printer's Rx line LOW but the HIGH 5v from the Arduino cannot get to the printer's Rx line.

...R

Does this still requires a mega?

You might want to connect the 3 Arduinos with I2C or SPI bus. One would be master mode and the other two slave mode. The master controls the bus. This would be better if the printer has I2C or SPI interface, a 4th device on the same bus.

You don't need a Mega2560 to do any of that. With SPI bus you can also connect an SD card module to buffer loads of text and print from it. There is also SPI interface serial RAM that can be used to buffer data, 32Kbits (8KB) chip is pretty cheap.

Much strength of Arduino is what you can connect to it, even more Arduinos.

SPI bus -- fastest but shortest, uses 4 pins.

I2C/TWI bus -- fast, uses 2 pins.

More tutorial on I2C with Arduino.

gorgonopsis:
Does this still requires a mega?

No. You could use 3 Unos or 3 Nanos.

As can be inferred from what @GoForSmoke has said, there are several ways to deal with this problem.

...R

I think that the Mega is for having 4 hardware serial ports but it might also be for the RAM or some other reason.

Time to learn how buses work!