How many Serial Connections can the arduino UNO or the NANO handle?

I am trying to get a serial digital signal from a sensor and then send that signal on at a different baud rate to a radio transmitter. for debug purposes i am currently also trying to print this sensor value to my computer via USB

this makes 3 serial that possible?

if anything i want to at least have the 2 serial connections where the arduino takes in the signal from the sensor and sends it to the Tx without the printed value through the USB

i [u]am[/u] using the SoftwareSerial library

You can use multiple SoftwareSerials, as long as only one of them is listening at a time. If you can design your solution so that you do not need to do anything else while you are receiving on a SoftwareSerial port you are in with a chance. I understand that SoftwareSerial has a relatively low upper speed limit, so you also need to ensure your serial speed is low enough. I would suggest using HardwareSerial for your interface with the highest speed or most important reliability requirements since it has the potential to be much faster and more reliable than SoftwareSerial.

Certainly a mega board with it's four hardware serial ports makes such a task easy, which is not the case for 328P based boards. Lots of traps and testing lies ahead, but it probably can be accomplished on a Uno using software serial instances, if you have a good handle on the amount of traffic you have to handle and able to properly buffer the data streams as required.

Me I'm lazy and love hardware, I'd throw one of my mega boards at the problem. ;)


Beside the Arduino Mega, there is another option. The Arduino Leonardo uses a software serial port via the USB bus. The hardware serial port is free to use. The SoftwareSerial library could be used for the third serial port, but it as limitations. The AltSoftSerial library provides a serial port without the problems of the SoftwareSerial port.