Go Down

Topic: Practical Limits of Serial communications? (Read 1 time) previous topic - next topic

Constantin

Hi everyone,
As you may have read elsewhere, I am grappling with implementing RS485 on the Arduino platform using the hardware serial ports on the 1284P and the 328P. I am now wondering if I was over-complicating matters... whether it doesn't make more sense to just stick to serial communications between Arduinos and drop RS485 altogether. The folk at the Openenergy project are showing something akin, i.e. using  74AHC125 driver chips to isolate Arduinos from the serial line until needed - not unlike RS485 chips, mind you.

What other options should I be considering for line sets shorter than 50' and multiple arduinos?

Coding Badly

Quote
line sets shorter than 50' and multiple arduinos


Entire books can be (and have been) written on the subject when there are so few constraints.  Your question is not unlike this one: "How can I best travel 5 miles?  I will need to make 3 stops."  If the route is through suburban neighborhoods then foot, bicycle, scooter, motorcycle, and car are all reasonable choices.  If the route is through rugged mountainous terrain, none of those choices are reasonable.

Start with these constraints: Will the communications cable pass through electrically noisy areas?  Any large motors or fluorescent lights along the path?

Will the communications cable pass between buildings?  Will the cable need to be electrically isolated?  Protected from lighting?

robtillaart


in general the longer the lines the lower the baudrate that works.

googled baud rate cable length => http://www.chipkin.com/articles/cable-lengths-and-baud-rates-fro-rs485-or-bacnet-mstp -
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Constantin

Hi Coding Badly,

Indoor application only. Unlikely to be hit by large EMI sources as described above. Just a link between various dataloggers running on Arduinos to share power and a communications bus. My preferred implementation would be to use Ethernet wiring, thanks to to the abundance of cables at different pre-confectioned lengths, twisted pairs, and 8 conductors, where I'm proposing to use two pairs for power, one pair for interrupt signaling, and one pair for the serial / RS485 communications.

Communication / power sharing is happening among a master unit (1284p processor) and various modules that are using 328Ps.

Reading up more on the travails by others re: RS485 a couple of things have become apparent. For one, there are some considerations that have to be made regarding the hardware serial buffer, since those are the pins I am using right now. I also wonder if it would make sense for me to not use the hardware serial pins on the 328Ps and go with the SoftSerial library instead - I have spare pins.

Additionally, I neglected to use resistors as described here to give the FTDI header on the 328P boards priority whenever it is connected. But that shouldn't be a big concern on the 1284p since it has two serial ports. On the 328P boards, I worry if the FTDI cable may be causing some trouble, but I kind of doubt it - it just sits there on the bus, listening.

Constantin

No need for super-fast comms. The RS485 chips are rated for 5+MBits/s and I'm going to use maybe 250kbit/s...

Go Up