I2C bus question

Hello everybody,

I must read/send info on an i2c bus with cerberus or spider (i think both have same specifiation voltage for i2c buses). My problem is I never work with i2c but it seems that all devices must share Vcc. All devices on bus share 9V Vcc indeed in my case.

1/ What I have understood is correct ?

2/ For me, mainboard is limited to 3.3 V (or 5V, but I don’t think so !). How can I control i2c bus (read/write) ?

If someone have a schema it would be nice !

https://www.ghielectronics.com/docs/12/i2c will help with code if you need it.

Your devices are unusual if they require 9v signals. Are you sure they do ? What are they ?? They may in fact use a 9v power line but have a regulated supply at less than that. The simplest way to unravel this will be to point to datasheets for the ICs or modules you have, and potentially the schematics.

If you really do have devices with this 9v logic level, then you will need to have a logic level converter.

All mainboards use 3v3 logic levels, even though they may have 5v power rails around the place.

1 Like

It’s a telescope. But I don’t have any datasheet.

I just know that it use i2c protocol !

There is 4 lines: 9V, SDA, SCL and GND.

What I’ve done is place a volmeter between GND and SDA: it seems to be 5V, so you’re right 9V is just power rails. :clap:
But my problem still exists: how to convert 3V3 from gadgeteer board to 5V for I2C ? or i2C bus is compatible with 5V ?

Thanks for putting me on the way !

you now can leverage the “5v tolerant” nature of digital IO pins. There’s a good chance you’re now fine but don’t connect the 9v to anything :slight_smile: Now you would need to make sure you use common GNDs on your two power supplies.

1 Like

What about this

http://playground.arduino.cc/Main/I2CBi-directionalLevelShifter
http://www.nxp.com/documents/application_note/AN10441.pdf

1 Like

As @ Brett says, there is a good chance you are fine.

If things still do not work, depending on the device the signaling from the 3.3 v side will not be sufficient for the I2C protocol to function correctly. For example the AVR ATMega328P specifications require a high of 3.5 volts, this is specific to the I2C peripheral.

If you faces issues you could look at using a bidirectional level shifter, I have the one from Sparkfun.
https://www.sparkfun.com/products/12009

1 Like

@ freeck - You were too quick for me :slight_smile:

Thanks for all informations !!! Links are very good. :clap: :clap:

Now I just have to build a cable since connections are specials. And I can give a try !!!

In this situation the possibly easiest way to deal with the level shift problem is to supplement the pull-up resistors but pull them up to 5v (and rely on the 5v tolerance of the IO pins). A 3v3 master with 5v device is easier to deal with than a 5v master 3v3 slave :slight_smile:

Signals seems to be more clean with shift leveler. Picture shows what I have done. (mosfet are probably not the more adequat model but I have only those !)

Now, it’s seems to be a modified i2c protocol … :wall: