My project involves sensors located at different places inside a small building, and other sensors located outside. A few sensors will be mounted near the RasPi / GrovePi control unit, but most need to be located 1m or more away. Along with my sensors, I bought various longer cables and two pair of the RJ45 extended cable drivers. The program itself reads all sensors once per minute. Between readings, it displays data and listens for user input on several push buttons. The most important sensors in the project are DHT Pro units. I also use one (and will use more) digital temperature only sensors (the board units, not the 2-wire, bc GrovePi does not support 2-wire).
I use try / except to catch errors, and have modified the GrovePi grovepi.py code to raise IO errors to the parent program. I log all IO errors and track a count of errors as well as program uptime. The program continues to operate after logging IO errors. Using the short cables that came with the sensors, I get (as an example from the test that is running right now) 62 IO errors in 1081 minutes of uptime. This is typical of other tests with “short” cables.
When I switch to cables longer than 20cm, the error rate climbs very sharply. With 1m cables or the RJ45 cable extenders, I get an error every sensor reading cycle. I have not done enough isolation to know if this is an error on every sensor read, or at least one of the reads is throwing an error every cycle. Will do that testing next.
As I bought Grove/Seeed wires, I would expect that the longer lengths would work with Grove/Seeed sensors. At least I have not found warnings otherwise. I have discussed this problem on the GrovePi forum, but folks there have not tried longer wires. Can you please help with advice / experience using the longer cables with sensors?