I am using 20 sensor nodes, each has mpu9250 i2c, Arduino atmega328 MCU 8MHz and max485 chip in it, each server has a unique id program.

I have Arduino due as Modbus client with max485 chip, I hope to use Arduino Modbus library RS485 RTU,

assume server is continually reading data and updating local variable with imu data 12bytes, and ready to send over the bus.

and client is polling data from each server node.

all sensor are connected the same bus, 1.5ft from the sensor node to sensor node away each (cat 5 cables), the reason to choose Modbus is having higher data rates compared to CAN bus or I2C,

I have a doubtable point,

how long it will take to respond to client with data?

how to calculate request/response time or the time to gather data from all sensors by the client?

in other words how many samples per second achievable?

  • \$\begingroup\$ Can you post your serial settings, are you using 9600kbps? \$\endgroup\$
    – CFCBazar
    Commented Apr 22, 2020 at 9:37
  • \$\begingroup\$ Are you using error checking? What is your protocol precisely? \$\endgroup\$
    – Andy aka
    Commented Apr 22, 2020 at 9:38
  • \$\begingroup\$ @CFCBazar com I haven't decided yet I can hope to the maximum that Arduino can handle 230.4k buad \$\endgroup\$
    – komto909
    Commented Apr 22, 2020 at 9:39
  • \$\begingroup\$ @Andy aka Modbus RS485 RTU, I plan to use Arduino library directly, I hope to use minimum error checking for data bytes, the slave will process 12 data bytes and add 2 more bytes at the end of the data payload, which master will decode and error check \$\endgroup\$
    – komto909
    Commented Apr 22, 2020 at 9:41
  • 1
    \$\begingroup\$ OK, so to work this out you need to consider the overhead bits inflicted on the transmission by the MODBUS protocol. I don't know what that is. \$\endgroup\$
    – Andy aka
    Commented Apr 22, 2020 at 9:52

2 Answers 2


It is generally accepted that RS-485 can be used with data rates up to 10 Mbit/s or, at lower speeds, distances up to 1,200 m (4,000 ft). As a rule of thumb, the speed in bit/s multiplied by the length in metres should not exceed 10 on the power of 8. Thus a 50-meter cable should not signal faster than 2 Mbit/s.

The modbus documentation from TycoElectronics.

  • \$\begingroup\$ my total cable length is 30ft or 10m, within 10m 20 slaves on the bus, so to send 12-14byte data payload with Arduino Modbus rs485 RTU library how long it will take per slave? \$\endgroup\$
    – komto909
    Commented Apr 22, 2020 at 10:17

You can run CAN at 1 Mbit/Sec ~40 meters (131 feet). With the MC2515 can controller modules on an Arduino they work great. If you use Gary Fowler's library all the work is finished including error detection, priority etc and the nice part it is a multi master bus with carrier sense and non destructive arbitration.

Using his Gary Fowler's I simply tell it to send my message and I poll the controller using his library and simply get the message when one is received. It can be set up for interrupts if wanted. The MCP2515 has three transmit and two receive buffers with two acceptance masks (one for each receive buffer) and a total of six acceptance filters. This takes a large load off of the CPU (Arduino). The higher priority messages get sent first.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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