Is I2C a good option for such application or are there other protocols? I know that modules like these exists to extend I2C range, and I'm planning to use this one (P82B96).

I'd like to use a frequency of 100kHz for I2C and use DMX cables of 20m connected in series.

So, is there any alternative that is more adapted for Arduino to Arduino data transmission over a cable?

EDIT : The solution here is CAN because it allows to have multiple devices on the bus. But if it is a simple communication between two arduinos, then go for the RS-232. Solution mentionned by @Dmitry Grigoryev and @Joe S

Thanks in advance.

  • I2C is intended fo very short ranges. The capacitance of long cables makes the signal unusable. There are other communication standards designed for long distances that mostly use differential signals. You won't get such a signal out of the Arduino itself but need some peripherals that do that. – Kwasmich Jun 22 '18 at 8:04
  • And some of those peripherals can be controlled with I2C, – ratchet freak Jun 22 '18 at 8:07
  • 1
    @Kwasmich So what are the "other communication standards designed for long distances" ? :) – Storca Jun 22 '18 at 9:45
  • something like RS-485 might be an overkill. But RS-232 (the 12V variant) is also rated for longer distances than I2C. – Kwasmich Jun 22 '18 at 10:19
  • 2
    RS-485 or CAN is the way to go here. – Joe S Jun 22 '18 at 13:57

With I2C, you're unlikely to get reliable communication on a cable longer than 1m. For your reference, here's a table showing what you can achieve with regular RS-232:

Length (m)  Maximum Baud Rate
1600        600
800         1200
400         2400
200         4800
100         9600
50          19,200
25          38,400
16          57,600
8           115,200

So, if you don't really need 100 kHz data rate, you could use regular RS-232 (which is cheap). If RS-232 is not fast enough for you, consider more complex solutions. RS-485 is one possiblility. Another one is CAN, which supports topologies up to 500m at 100kHz. The key difference of CAN is that it's a bus, meaning that all devices will share the same pair of wires.

| improve this answer | |
  • It should be noted that regular RS-232 uses +/-12V signals not 5V signals like arduino serial interfaces. – Craig Jun 22 '18 at 14:07
  • The problem is that I control multiple devices on a bus and they have to be able to send data back to "master", and RS-232 is not adapted for this usage but CAN seems to have that functionnality. – Storca Jun 22 '18 at 17:59
  • @Storca CAN is more complex (you have to deal with message priority, bus arbitration, etc), but it's totally worth learning if your project is complex enough. BTW, this is how typical CAN transcievers look like. – Dmitry Grigoryev Jun 24 '18 at 10:08

I2C is perhaps the worst possible choice for this type of communication. Instead you should be using something like RS-485 (which is incidentally what DMX uses) with differential signalling.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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