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 :
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:
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
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.
OK thunks to'CrossRoadsr' i'll try your solution , but another thing make me worry is that the arduino board work with 3.3V while the chips you mentioned work with 5V
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 :*
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 )