1
\$\begingroup\$

I would like to connect 4 UART output sensors to one serial port of my controller. The distance between sensors and controller will be about 10m. Initially I was thinking of using 485 as physical layer (SP3485 tranceivers). Sensor UART --> SP3485 -- (485 layer) -- SP3485 --> UART Controller. A seperate current controlled cirquit will do the sesnor select job enabling the transmit output for each sensor (DE/RE' pins SP3485) 2,5mA - Enable transmit from sensor 1 7,5mA - Enable transmit from sensor 2 12,5mA - Enable transmit from sensor 3 17,5mA - Enable transmit from sensor 4

Is there any other ideas or suggestions?

\$\endgroup\$
6
  • \$\begingroup\$ Why not standard RS232? The distance of 10m is not that much with decent shielded cables. But it will depend on your baud rate. \$\endgroup\$
    – Turbo J
    Commented Jun 25, 2016 at 13:36
  • 1
    \$\begingroup\$ In addition to being differential, RS485 is usually thought of as having transmitters which can be disabled to permit bussed wiring, while RS232 is not. However, one can indeed do custom remixes - even (in the short range case) using MCU output levels, since pretty much any modern MCU UART's transmit line can be disabled by re-configuring it as a GPIO input. \$\endgroup\$ Commented Jun 25, 2016 at 16:23
  • \$\begingroup\$ If you enable transmitters asynchronously from any sense of when they are trying to talk, you may have to have code to identify and throw away fragmented messages from them. You will also need some sort of way of telling which one is talking, if there is not identity encoded in their messages. Most bused RS485 setups use a software-level protocol where slave devices speak only when queried (at configured logical addresses) by the master. \$\endgroup\$ Commented Jun 25, 2016 at 16:25
  • 1
    \$\begingroup\$ Note that one required behavior of RS485 drivers and receivers is that they provide a high impedance when they are powered-off (in effect, an unpowered device becomes almost invisible to the bus). RS232, on the otherhand, has no such requirement, and an unpowered device will likely load down the bus, making it unusable. \$\endgroup\$
    – Mark
    Commented Jun 25, 2016 at 20:27
  • 1
    \$\begingroup\$ Using dinosaur RS232 for any purpose is a pretty bad idea. There is no reason why you shouldn't use RS422/RS485, unless you need backwards compatibility. \$\endgroup\$
    – Lundin
    Commented Jun 27, 2016 at 12:01

2 Answers 2

0
\$\begingroup\$

Finally I will try the RS232 communication (since there is one RS232 port available on the controller...

Cirquit on controller side...enter image description here

Cirquit on sensor side...

enter image description here

\$\endgroup\$
1
  • \$\begingroup\$ Is this an answer or part of the question? \$\endgroup\$
    – Transistor
    Commented Oct 19, 2017 at 7:50
0
\$\begingroup\$

I have no tried it over long distance, but you can do this:

From the controller side the TX line can go to all the sensor RX. On the controller side you pull the RX line up with a resistor(idle UART is 1 logic). For each sensor you connect a Schottky diode with the cathode at the sensor TX. This gives you an OR operation which is better than relying on the sensors to release the line to high Z and does not require their code to be changed to do so. Provided that sensors always say something after a command is issued, you can use a single line for communication, like in the answer here Tx/Rx UART communication between 2 MCU over 1 line

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.