Multiplexing serial port ( Rx,Tx)

Hi everybody

i’m working on a project which consist on supervision with SMS ;

Now i’m stuck, i’m wondering which multiplexer do i use to connecting 4 machines to the Rx,Tx arduino pins, the picture below explain what i’m talking about :

Any suggestions are welcome :wink:

We can’t all see your picture. You can click Addition Options below, Browse to your local picture, and Attach it.

You can connect the Arduino Tx to multiple other inputs, so it’s really the Arduino Rx you need to worry about.
You can make your mux with a 74HC08 and a 74HC32:

thnx 'CrossRoads' for the response, the picture is changed by an other one :smiley:
in fact, i would use an IC instead of using some logical gates , such as : SparkFun Analog/Digital MUX Breakout - CD74HC4067 - BOB-09056 - SparkFun Electronics
any suggestion :sweat_smile:

The problem with trying to do this is that it can not receive if two units send you stuff and the messages overlap. You will only see on of them and loose the other. When the first message ends and you scan to the second that is midway through then it can take several characters to get back in sync ( and that's if your lucky ) so not only is the second message cut short some or all of it is garbage.
Finally you have to ensure that you can scan all the inputs within about a quarter of one baud period so you get a valid start bit when something starts. That is a lot of multiplexing and time the main receiver uses.

Finally 2 - Those multiplexers will not be able to switch those RS232 signals.

Grumpy_Mike, thnx for your quick response , in fact i forgot to explain some details :
i will allocate sufficient time for each combination (the combination will be sent by the 2 digital arduino pins as shown in the picture) ; ie for the first combination (00) i will send an AT command which demand from the first machine some informations (its state for exemple ), in response to this , i will receive from the machine the AT command response, all this will be executed on 30 s , by this i think that i can avoid any loss of information, the probleme is that i need some specific IC multiplexer, i found one (which mentioned in my last reply) but it contains 16 inputs :disappointed_relieved:

I was thinking during lunch this could be done simpler too - use two quad buffers with OE/ control lines:
Enable lines could be 4 outputs from Arduino, or 2 outputs driving a 74HC139 or 74HC138 (1 of 4 outputs low, or 1 of 8 outputs low).
Advantage of the 74HC125 is that the RX signal from the MAX232 are not inverted.

But you can not put RS232 voltages through any of the chips mentioned in this thread so far.
RS232 is +12V and -12V

why not just get another atmega328 and run softserial?

all the ics and board space is enough for another atmega328.

OK thunks to'CrossRoadsr' i'll try your solution :wink: , but another thing make me worry is that the arduino board work with 3.3V while the chips you mentioned work with 5V :disappointed_relieved:

To Grumpy_Mike ,a signal coming from the rs232 port will be adapted to a TTL signal through the MAX232 XD

To Platis , in fact the chips already cited are less expensive than an arduino board :*

Really?

Wide Operating Voltage Range of 2 V to 6 V

Looks like 3.3 will work to me.

Unfortunately all the chips that you mentioned before are demultiplexers (74HC138, ...) , i want chips doing multiplexing function (selecting from several inputs just 1 output according to the adress pins )

To Grumpy_Mike ,a signal coming from the rs232 port will be adapted to a TTL signal through the MAX232

Then why was that not on the diagram.
You waste everyones time by not telling the right story.
What else are you failing to tell us?

Unfortunately all the chips that you mentioned before are demultiplexers (74HC138, ...) , i want chips doing multiplexing function

Then look at the 74150, 151, 152, 153 chips

See:-

Ok thnx for your help i'll take a look,
For the MAX232, it is shown in attached file ..

Bi-directional.

Up to 4 lines: You can use it to switch two serial devices