Go Down

Topic: Multiplexing serial port ( Rx,Tx) (Read 16462 times) previous topic - next topic

Abdel-MOR

Mar 03, 2014, 03:58 pm Last Edit: Mar 03, 2014, 04:50 pm by Abdel-MOR Reason: 1
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  ;)

CrossRoads

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:
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Abdel-MOR

thnx 'CrossRoads' for the response, the picture is changed by an other one  :D
in fact, i would use an IC instead of using some logical gates , such as :  https://www.sparkfun.com/products/9056
any suggestion  :smiley-sweat:

Grumpy_Mike

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.

Abdel-MOR

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  :smiley-sad-blue:

CrossRoads

#5
Mar 03, 2014, 07:50 pm Last Edit: Mar 03, 2014, 07:52 pm by CrossRoads Reason: 1
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.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Grumpy_Mike

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

Palatis

why not just get another atmega328 and run softserial?

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

Abdel-MOR

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  :smiley-sad-blue:

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  :*

CrossRoads

Really?
Quote
Wide Operating Voltage Range of 2 V to 6 V

Looks like 3.3 will work to me.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Abdel-MOR

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 )

Grumpy_Mike

Quote
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?

Quote
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:-
http://en.wikipedia.org/wiki/List_of_7400_series_integrated_circuits

Abdel-MOR

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

CrossRoads

http://www.ti.com/lit/ds/symlink/sn74hc151.pdf
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

jfmateos

http://www.ti.com/lit/ds/symlink/sn74cbt3257c.pdf

Bi-directional.

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

Go Up