Hello everyone,
This is my first time posting here on the forums. I am in the process of creating timers for an escape room and have been having issues with the SDA and SCL communication over a long distance. I am using the AdaFruit 1.2' LCD display with backpack to cut down on wires. This package requires the use of the SDA and SCL ports to communicate. The displays for the timers function perfectly with about 3 inches of wire when testing but as soon as I hook it up to the wiring I put in place for the timers, the voltage is able to travel the distance, but the SDA and SCL signals cannot. The display is about 50 feet from the arduino and the arduino cannot be moved as it it hooked up to another timer and controls. The wire I am using is a six conductor 22 awg un shielded solid core signal wire for machinery. I have tried lowering the baud rate from 9600 to 500 Any help would be greatly appreciated!
50 feet is very long for I2C.
I use CAT-6 (low capacitance) for I2C, and run SCL and SDA on different pairs.
The right value pullup resistor is important.
Arduino should be able to drive harder than the "normal" 3mA standard.
Try two 1k resistors on the Arduino side. One from +5volt to SDA, one from +5volt to SCL.
If that doesn't work, do the same at the display side (leave the Arduino side as it is).
If that doesn't work, lower the default 100kHz I2C clock (leave all the resistors in).
Post your findings. Long distance I2C is frequently seen here as dark magic.
Leo..
50ft should be fine with RS232 or maybe even 0-5V TTL logic. Can you spare another arduino, maybe a cheap nano for $3-5 and two RS232 adapters? Make some simple protocols and send commands through RS232.
No way I2C will work over that distance unless you beef up the signal.
Look into buffer chips like the P82B96, according to the data sheet
Restrictions on the number of I2C-bus devices in a system, or the physical separation between them,
are virtually eliminated.
The P82B96 will drive 60mA and 20 meters at 400kHZ by itself. If that’s not good enough you can split the signals from it and drive them with something like RS-485 drivers for a kilometer or more in theory.