What Is I2C and why Sox Needs it

Just What is I2C?

I2C stands for Inter Integrated Circuit protocol. It consists physically of 2 wires between all masters and slaves, forming a single bus network. A bus is 2 or more wires that connect to many other devices. A power bus is quite common, where one wire is 5V and another ground. In digital systems, they contain signals that are useless without each other. For example, the earliest Universal Serial Bus (USB) standard used 2 power and 2 data signals. 

Protocol? Protocol refers to the fact that it I2C is more than just 2 wires, there is an entire form that I2C needs to work, and that is what makes it different from other protocols. I2C needs to have 1 wire be a clock generated by the master, which all the slaves listen to, along with a bidirectional data line. On top of these hardware requirements, there is software requirements regarding clock speed, and how the data forms individual packets (like the mail) to send to each other. It also controls who can talk and when. If all the chips shout at once, no one hears anything. 

Integrated Circuit? An integrated circuit is any circuit contained within 1 package or chip. I2C is a protocol to talk between various chips very easily. 

Why I2C? The Big Question for this post. I2C is a very common standard that many sensors use to communicate to a higher powered controller. It is relatively fast and good for short distances, relative to a cat. It is not great for long transmission distances like across a house due to signal degradation. The longer a wire the more distorted a signal becomes. I2C was never designed for long distance, bercause the chips on either end are not built to filter out the noise. caused by electrical interference. Sox is small, so I2C is a good choice of commuinication standard. There are also many dedicated breakout boards that take a single chip and place it on a printed circuit board (PCB) so it can be used with basic tools such as a soldering iron, rather than needing reflow stations. 

I2C is also directly supported by Raspberry Pi and with an Adafruit library, is literally plug and play into python to make it function. For Sox, the gyroscope, servo controller, and touch sensor all come with an I2C connection so using it is the easiest method to access this data. 

Since the last post, Sox has now been able to be pet, can dim an LED through the servo controller, and know which way the ground is due to using I2C. This is all done with 2 wires, making it a very effective way to communicate to many sensors with very little hardware. Inside Sox, space will be at a premium, so the fewer breakout boards I need, the better, and saving space on wiring harnesses is huge also. 

Overall, I2C is widely supported, easy to implement and easy to connect to a Raspberry Pi that incorporating as many sensors onto it will be a major goal of the hardware phase of this project. 

The image above is an example of the data that can be pulled by I2C from the Gyrosocpe.


You need to log in to post comments