i2c With Photon

I’ve connected my photon to a http://www.adafruit.com/product/881 and http://www.adafruit.com/product/1782 (later, I will be adding a http://www.adafruit.com/product/1712) all over i2c. For reference, VIN is receiving 5v, a CR2032 is connected to VBAT, the boards connected via i2c are being powered off 5v, and I am not using level shifters. They appear to work okay but I would like to clarify a few things.

Apparently, I’m a bit confused with i2c because i did not think this would work properly (and it does - I think). I thought the photon was using 3.3V logic and given that the i2c boards are being powered by 5v, I expected this to create problems since i’m not using any level shifter. Have I done something wrong and only think it’s working? Could someone please explain this to me? (I’m really hoping i don’t need to go and buy something for level shifting). Additionally, the TPA2016D2 board (last link) requires a i2c vcc input to differentiate between 5v and 3.3v i2c logic regardless of the actual boards supply; does this need 3.3v or 5v?

Also, on a somewhat unrelated note, when can we expect version 4.3 to be used in cloud compiling/flashing.

@core16, wikipedia says:

I2C uses only two bidirectional open-drain lines, Serial Data Line (SDA) and Serial Clock Line (SCL), pulled up with resistors. Typical voltages used are +5 V or +3.3 V although systems with other voltages are permitted.

Because the D0 and D1 lines on the Photon are 5V tolerant, pulling up to 5V will not damage it. Each of the I2C boards you have has built-in pull-up resistors so you don't need to add any. This is why things are working.

As for the TPA2016D2 board, it clearly states that it can run between 2.7 and 5.5V DC so the I2C Vcc can be powered like the other boards (5V) and the I2C will work.

As for when 0.4.3 will be released to the cloud compilers, I'll leave that up to @mdma to answer. :smiley:

2 Likes