Pages: [1]   Go Down
Author Topic: Another I2C question  (Read 514 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
***
Karma: 2
Posts: 106
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have 2 devices that will use the I2C bus talking to an UNO. I understand that I need 1 set of Pullup resistors between the SDA/SCL lines and VCC.
My problem is the 2 devices have different supply voltages. One is an LCD display that only has 3.3v supply and the other is ADS1114 A-D converter that will read a sensor powered off 5v, so I intended to use a 5V supply for this part.
Can these 2 communicate on the same I2C bus?
Where do I connect the pullup resistors to? 5v or 3.3v?

Any help would be appreciated.
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 473
Posts: 18695
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You probably want a logic-level converter, eg.

https://www.sparkfun.com/products/8745

I think I would put the resistors on the 5V side (where the Uno is).
Logged

Left Coast, CA (USA)
Online Online
Brattain Member
*****
Karma: 361
Posts: 17253
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have 2 devices that will use the I2C bus talking to an UNO. I understand that I need 1 set of Pullup resistors between the SDA/SCL lines and VCC.
My problem is the 2 devices have different supply voltages. One is an LCD display that only has 3.3v supply and the other is ADS1114 A-D converter that will read a sensor powered off 5v, so I intended to use a 5V supply for this part.
Can these 2 communicate on the same I2C bus?
Where do I connect the pullup resistors to? 5v or 3.3v?

Any help would be appreciated.

Yes the I2C bus (via the two pull-up resistors) can only work at one voltage, suitable to the devices that wire to the I2C bus although there may be I2C slave devices that run at 3.3vdc Vcc power but are '5 volt toleration' on their two I2C I/O pins. As you may already know the ADS1114 chip will work at 3.3vdc or 5vdc.

 The fact that you have a sensor that requires +5vdc is not a show stopper by itself but rather what is the signal measurement range that the sensor outputs to the ADS1114 input pins? If it's 3.3vdc or less not a problem. If it can output up to +5vdc then maybe you could just use a two resistor voltage divider to knock down the maximum sensor output (say /2) and then in your sketch software just un-divide it with a simple x2 of the measurement value returned by the ADS chip.

Lefty
Logged

Offline Offline
Full Member
***
Karma: 2
Posts: 106
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you. That was going to be my next question. Although the sensor is powered off 5v, the output is only between 0 and 2.5v.
Before using the ADS I was using the internal 1.1v reference to improve reolution a little.
So in this case I would power both off the 3.3V rail? The Atmega328 is still using 5v so that is ok, correct?

Thanks again for your time and input.
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 473
Posts: 18695
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

That sounds OK.

Ultimately if you deploy your project "in the field" it might be easier to run the whole lot off 3.3V and avoid having to use the level converters.
Logged

Offline Offline
Full Member
***
Karma: 2
Posts: 106
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I would like to but the sensor is unstable below 4v.
Logged

Pages: [1]   Go Up
Jump to: