Saturday, October 10, 2009

Multidrop network for RS232

I got a requirement to communicate one master device and eight slave devices. I intended to use RS485 half-duplex communication for this system but all devices happened to have only RS232 interfaces. RS232 communication is a sort of communication that is to be used for one-to-one system. There is no problem if only the master device transmits and all slaves are receiving. The problem is that transmit lines of the slaves cannot be disabled and so that they cannot connect to the same line. After analyzing the voltage signals, I have got an alternative solution to this problem. By adding a diode to the transmit line of each slave, I can use the system just like RS485 half-duplex communication. See the following figure for the hardware connection.

11 comments:

  1. so pretty much the master will never kno about any Rx data as the diodes will be blocking the signal but my question is why? if what we want is a master to many slaves then software handles this already so why wud slave send anything when is not programmed to do so?

    also i like the approach but how do we go about addressing each Arduino "Slave/Rx" individually?
    me sending this block via serial from master "PC" 'LT2|LP3|LM5|LR4|LI6 clearly is meant for a specific slave mcu while other block being tx shortly after the first may look like this 'RT2RP3RM5RR4RI6' and so on and this are just for addressing which pin on that particular slave and speed of actuation after this i want to send direction/coordinates to desire location,

    ReplyDelete
  2. can you reply here ? i forgot to check the notify me check box

    ReplyDelete
    Replies
    1. We need to put diodes because you cannot short circuit many output lines to a single wire line. But there is no problem in connecting many RX lines to a single wire line.

      Delete
    2. thank you and i understand tho what about the addressing issue of each mcu?

      Delete
    3. In my case, master send a request message that contains a slave address. And only the slave with correct address responds. That means communication is always initiated by the master.

      Delete
    4. can you demonstrate a example of this approach Yan? im sorta new to this protocol of communication

      Delete
  3. This comment has been removed by the author.

    ReplyDelete
  4. Hi, this multidrop network solution works through a TTL (UART) port?. I need to connect many arduinos modules as a Master-Salve.

    ReplyDelete
    Replies
    1. No, it won't work for TTL logic output. For that, you need a pull up resistor at RX of master (blue), and reverse all diodes (connect anodes to the resistor).

      Delete
    2. I got it. I found a post with this image:

      https://forum.poppy-project.org/uploads/default/original/2X/7/76419c9d41163af84d2e8226c22342d2c874aa4a.png

      If Vcc = 5v (arduino), R1 should be 10k, or 1M ohm?

      Thanks.

      Delete

Comments are moderated and don't be surprised if your comment does not appear promptly.