Taking the Leap Off Board: An Introduction to I2C Over Long Wires

Image result for i2c sensor array
prototyping starts here, but we’re in danger when projects finish with this sort of wiring

If you’re reading these pages, odds are good that you’ve worked with I²C devices before. You might even be the proud owner of a couple dozen sensors pre-loaded on breakout boards, ready for breadboarding with their pins exposed. With vendors like Sparkfun and Adafruit popping I²C devices onto cute breakout boards, it’s tempting to finish off a project with the same hookup wires we started it with. It’s also easy to start thinking we could even make those wires longer — long enough to wire down my forearm, my robot chassis, or some other container for remote sensing. (Guilty!) In fact, with all the build logs publishing marvelous sensor “Christmas-trees” sprawling out of a breadboard, it’s easy to forget that I²C signals were never meant to run down any length of cable to begin with!

As I learned quickly at my first job, for industry-grade (and pretty much any other rugged) projects out there, running unprotected SPI or I²C signals down any form of lengthy cable introduces the chance for all sorts of glitches along the way.

I thought I’d take this week to break down that misconception of running I²C over cables, and then give a couple examples on “how to do it right.”

Heads-up: if you’re just diving into I²C, let our very own [Elliot] take you on a crash course. Continue reading “Taking the Leap Off Board: An Introduction to I2C Over Long Wires”

i2c for the fonera

La Fonera’s are getting pretty popular lately. [Lefinnois] hacked his to get i2c working. He used a 75LS05 to adapt the io levels, and some bit banging in the software to pull it off. Now the Fonera can be used for inexpensive remote monitoring via inexpensive i2c devices. Not to mention that this could provide a cheap network interface for various micro-controller projects. (I’m thinking networked thermostat for my new house.)