Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Many UART device on same bus

Status
Not open for further replies.
RS232 is strictly a 1:1 system & the official maximum cable length is 50ft / 15m at 19200 Baud.
Longer cables can be used if the speed is decreased proportionally.

You may be able to cheat it by adding a pulldown resistor as the Arduino RS232 port RXD pin (to -12V), then using a diode from each module TXD to the common RXD point.

That would allow any to transmit without harmful conflict, but either the speed or cable length will have to be low, as it's relying on a pulldown to return to mark state, rather than active drive.

It will still go wrong if any two reader modules send data at the same instant.

You can get addressable RFID readers intended to work on an RS485 bus. RS485 allows very long distances and many devices on a bus.
 
With multiple devices on a single bus, you may not be able to achieve full duplex communication. If this is the case, you will have to come up with a scheme to allocate access to the bus for each transmitter. This gets complicated very quickly.
 
Build the equivalent of Ethernet collision scheme. Or use internet derived time of day
buss allocation. Or derived simple logic enable of UARTs. Or traffic detection algorithm,
possible proprietary protocol. Many possibilities.


Regards, Dana.
 
Receiving on multiple UARTs is ok. Sending is going to be complicated. In addition to the collision problem, there's a hardware issue. At UART holds the transmit line at a fixed level when idle (sorry, don't remember if it's high or low) so it's not just a matter of connecting all the transmit lines in parallel.

In the shadows of my mind, I have done this before so I could see data from several devices at once. IIRC, it involved diodes and pull(up or down) resistors.
 
As mentioned combining a bus is trickey business, my suggestion is to stay away, however alot of arduinos have 2 or 3 busses plus you can use software uart with other pins, but not as efficent as hardware 232.
 
Receiving on multiple UARTs is ok. Sending is going to be complicated. In addition to the collision problem, there's a hardware issue. At UART holds the transmit line at a fixed level when idle (sorry, don't remember if it's high or low) so it's not just a matter of connecting all the transmit lines in parallel.

In the shadows of my mind, I have done this before so I could see data from several devices at once. IIRC, it involved diodes and pull(up or down) resistors.
The idle level (mark) on RS-232 is the most negative voltage corresponding to a logic high in the TTL/CMOS world. This might work with open collector buffers (not inverters). That was how bus systems were built before tri-state outputs were invented. This might work on a backplane between boards but probably not on a capacitive load like a long cable.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top