Arduino I2C shield

Most of my Arduino projects include sensors of one variety or another and most of these use the I2C bus to connect to the Arduino.  Sensors  can be either 3v or 5v; increasingly the majority are 3v; this is driven by the need for low-power sensors in modern mobile devices. While prototyping this usually involves the repeated bread-boarding of 5v and 3v sensors into the I2C bus, which gets a bit tedious with all the jumpers and level shifting.

To speed this process I decided to build an I2C shield for my UNO.  The principle of the shield is to provide 'patch' points for sensors using either 3v or 5v into a single I2C bus.


I2C shield with 'patch' points
The 5v sensors wire directly into the UNO a4 and a5 headers.  The bridge to 3v sensors uses a bi-directional SparkFun level shifter for the SCL and SDA lines.

I have collected quite a few sensors and unfortunately there doesn't seem to be a standard header layout.  Most of the cheap ebay purchases from china follow the same pattern; unfortunately the same cannot be said for one of the more expensive brands (mentioning no names).  So, I decided to use female plugs using the Chinese layout to allow direct connection, for the other sensors I will use jumper cables to a breadboard from the headers.

I2C shield loaded with 3v sensors

Note about sensors

Many cheap Chinese imports ambiguously claim to be 3v or 5v.  What they actually mean is that they can accept 5v on the VCC pin, or a separate pin, as they have a voltage regulator.  They DO NOT like 5v on the SCL and SDA lines, although they may tolerate it.  It's best to check the specs of the device to verify the voltages it can use.  If it says 3v and is a cheap import break-out board it is unlikely to have voltage level shifters, even if the supply pin is 5v.  More expensive branded boards might include the necessary components.

You have been warned ;)

Comments

Popular Posts