Length of i2c / serial cabling run?
__red__
Posts: 470
Greetings!
Our hackerspace has been given a challenge to build a debate timer for a local debate. The premise is that every candidate gets five minutes of question answering time for the entire debate so they can choose how much time they want to use on each question.
As such, they'll have a small display in front of them at their podium (There are 11 candidates in this race) to show them their remaining time.
My current thought is this:
Each candidate will have a 4 digit LED segmented display and an AS1108 or equivilent in a box on their table. I'd run five wires to each box from the central control box (GND, 3.3V, CLK, DATAZ, LOAD) - Maximum length I would guess would be 15ft or so. Central control would be a prop quickstart board.
My question is - is running this data (it can be a low baud rate - only needs one clock to update per second) over this distance impractical?
Do the denizens of this forum have any additional advice?
Thanks,
Red
Our hackerspace has been given a challenge to build a debate timer for a local debate. The premise is that every candidate gets five minutes of question answering time for the entire debate so they can choose how much time they want to use on each question.
As such, they'll have a small display in front of them at their podium (There are 11 candidates in this race) to show them their remaining time.
My current thought is this:
Each candidate will have a 4 digit LED segmented display and an AS1108 or equivilent in a box on their table. I'd run five wires to each box from the central control box (GND, 3.3V, CLK, DATAZ, LOAD) - Maximum length I would guess would be 15ft or so. Central control would be a prop quickstart board.
My question is - is running this data (it can be a low baud rate - only needs one clock to update per second) over this distance impractical?
Do the denizens of this forum have any additional advice?
Thanks,
Red
Comments
It might work with some sort of shielded wire and maybe a higher voltage logic. I know there are higher voltage I2C logic level shifters.
If you could afford to use a QuickStart with each button, you could use cheap (<$2.50) Nordic modules and have a wireless solution. They actually plug right into the QuickStart (they can be powered from a pair of IO pins).
Of you could use these fobs from SparkFun.
My favorite buttons are these things.
I used a combination of buttons and fobs in my panic button project.
RS-485 is the better solution as it is intended for distances and only requires two wires.
The easily way to resolve the issue is to test your I2C set up with 50' of wire and then 25' and finally 15'. Nothing is as helpful as some direct evaluation.
The full I2C spec is on this page:
http://www.nxp.com/search?ptyp%5B%5D=PDF&rows=10&type=keyword&q=um10204&page=2&tab=All
...and can be found under "UM10204".
There basically is no low limit to the clock (SCL), so low data rates may improve the chances of a long cable run. Of course, going differential transmission w/shielded cabling would help also.
Loopy's idea of testing different lengths is sound; impirical data = good stuff.
then just use the uart, although the driver would have to be modded to enable the drive line, or use the 555 trick.
And so, I set up a send loop on one end and a recieve and reply loop on the other with an LED that would go on whenever a reply was received. I ran such for about 3 months without any problems.
I suppose a similar scheme could be provided for I2C. Having a counter for sent packets and another for received packet (using LCDs maybe) might be a nice touch.
Nobody but you as the builder is going to know how reliable your scheme is. So create some bench tests.
I doubt if you really need to slow down significantly and you may even create problems if you go extremely slow.