change two identic I2C address from SHT21

Hallo everyone,

i am very new in this field. I just got the Leonardo Board and also a few Sensirion Sensors (SHT21).

What I wanna do:
I wanna connect a few sensors (up to 3 or 4) Sensirion to the Leonardo board. The SHT21 Sensors works via I2C. :slight_smile:

In the datasheet of the Sensor (http://www.sensirion.com/fileadmin/user_upload/customers/sensirion/Dokumente/Humidity/Sensirion_Humidity_SHT21_Datasheet_V3.pdf) is written that all Sensors are set with the same I2C address. :frowning:

I am using some already written files (https://github.com/misenso/SHT2x-Arduino-Library) from Christopher Ladden and modified by Paul Badger. [Thanks a lot](http://Thanks a lot)

With one SHT21 Sensor it is working fine. Now I wanna add a second Sensor.

Problem: I have to change the I2C address of the Sensor. How does it work?
than updating the code ....

I would be very pleased if anyone could give me a hand.

Greetings
Coolf

You can't change the address - what you need is an I2C multiplexer instead.
Example: DssCircuits.com is for sale | HugeDomains

Hoi CrossRoads,

thank you for the quick responds.

Oh well an other component to order. Is there any way to use the I2C Sensor at an analog or/and digital channel?

I looked at the schematic of the 4 Channel I2C Multiplexer and found an unknown component(SJ2 = SJ3). Do you know what it is and for?

thx

They are solder jumper pads, connects the interrupt pins to pullup resistors if needed.

Using I2C sensor on a analog or digital channel? I suppose you could fake the I2C bus signals in software with a bunch of effort, switching the data line from output to input as needed. Why would you want to do that when you've got this built in hardware and great library to support it?

coolf:
Hoi CrossRoads,

thank you for the quick responds.

Oh well an other component to order. Is there any way to use the I2C Sensor at an analog or/and digital channel?

If you just need another I2C port and don't want to buy any more hardware, you could consider using a software I2C solution. Google "software i2c arduino".

coolf:
Hallo everyone,

i am very new in this field. I just got the Leonardo Board and also a few Sensirion Sensors (SHT21).

What I wanna do:
I wanna connect a few sensors (up to 3 or 4) Sensirion to the Leonardo board. The SHT21 Sensors works via I2C. :slight_smile:

In the datasheet of the Sensor (http://www.sensirion.com/fileadmin/user_upload/customers/sensirion/Dokumente/Humidity/Sensirion_Humidity_SHT21_Datasheet_V3.pdf) is written that all Sensors are set with the same I2C address. :frowning:

I am using some already written files (https://github.com/misenso/SHT2x-Arduino-Library) from Christopher Ladden and modified by Paul Badger. [Thanks a lot](http://Thanks a lot)

With one SHT21 Sensor it is working fine. Now I wanna add a second Sensor.

Problem: I have to change the I2C address of the Sensor. How does it work?
than updating the code ....

I would be very pleased if anyone could give me a hand.

Greetings
Coolf

I had to look up the SHT21 as my experience is only with the SHT75. It looks like the SHT21 is very similar to the SHT75 with the biggest change being in the two wire communication. At any rate, I used two SHT75's sharing SCL and SDA by powering the chip itself from spare Arduino pins. It only consumes a few hundred microAmps and you can just turn them on and off by toggling the pins when you want to read the values. Remember to give the chip time to come up to spec, around 15ms it looks like, before you try to read it.

That's a crap way to design things, in clear violation of datasheet recommendations:

The electrical characteristics of SHT2x are defined in Table 1....
Exposure to absolute maximum rating conditions for extended periods may affect the sensor reliability (e.g. hot carrier degradation, oxide breakdown).

Digital I/O Pins (SDA, SCL) to VSS: min-0.3 max VDD + 0.3

So if you have power connected to an IO pin sitting at 0.3V, and SCL/SDA pulled up to 5V (which is also the absolute Max) then the input pins are 4.7V over spec.

CrossRoads:
That's a crap way to design things, in clear violation of datasheet recommendations:

The electrical characteristics of SHT2x are defined in Table 1....
Exposure to absolute maximum rating conditions for extended periods may affect the sensor reliability (e.g. hot carrier degradation, oxide breakdown).

Digital I/O Pins (SDA, SCL) to VSS: min-0.3 max VDD + 0.3

So if you have power connected to an IO pin sitting at 0.3V, and SCL/SDA pulled up to 5V (which is also the absolute Max) then the input pins are 4.7V over spec.

You're absolutely right. I was thinking about my own application which uses a 3v3 Arduino. If the OP is using a 5V Arduino then they have already had to deal with running the chip off a different voltage and making sure the SCL/SDA lines are correctly interfaced so they can use that knowledge to do it correctly the way I suggested.

My suggestion was to point out that using an I2C multiplexer was not the only solution to the problem. Chill.

thanks for giving my thoughts an other direction.

Well a multiplexer is hardware solution but what is with the speed? Will it be fast enought?

cutting off the sensor from the power is to hard but with some transistors (mos-fet) i could time the dataline. I guess that would be faster than the multiplexer.

component(SJ2 = SJ3). Do you know what it is and for what?
http://www.dsscircuits.com/images/schematic/PCA9544A%20Breakout%20PCB.pdf

Does anyone have some idea?

I2C operates at 100KHz or 400KHz. The mux is plenty fast enough.

"component(SJ2 = SJ3). Do you know what it is and for what?"

They are solder jumper pads, connects the interrupt pins to pullup resistors if needed.

Not needed in your design as the part you selected only has 2 control pins.

coolf:
thanks for giving my thoughts an other direction.

Well a multiplexer is hardware solution but what is with the speed? Will it be fast enought?

cutting off the sensor from the power is to hard but with some transistors (mos-fet) i could time the dataline. I guess that would be faster than the multiplexer.

component(SJ2 = SJ3). Do you know what it is and for what?
http://www.dsscircuits.com/images/schematic/PCA9544A%20Breakout%20PCB.pdf

Does anyone have some idea?

I think you need to post the schematic diagram for your project. It's hard to give advice without that.

How do you figure adding more hardware to control the power (and stressing the parts in the meantime) is faster than writing 2 bits to select 1 of 4 channels in a multiplexer chip designed for I2C multiplexing?

CrossRoads:
How do you figure adding more hardware to control the power (and stressing the parts in the meantime) is faster than writing 2 bits to select 1 of 4 channels in a multiplexer chip designed for I2C multiplexing?

We have no idea if it's necessary to add more hardware to control the power. That's why I suggested that OP post their schematic. If OP is running a 3V3 Arduino already, then all they have to do is use a spare port to power the SHT21. If OP is running a 5V Arduino, the most they will need to do is switch the 3V3 to their part with a high side MOSFET.

You are the one that suggested OP "add more hardware" in the form of a multiplexer board. If that is the solution because OP is not capable of anything else, then so be it.

I'm only suggesting that your hardware multiplexer solution is certainly not the only solution and maybe OP can solve their problem without having to spend more money.

I have explained that when I made my first suggestion that I was thinking about my own solution to the same problem which involved a 3V3 processor. It was a mistake to not consider that OP might have a 5V processor. You have made many mistakes when offering help on this forum. Give me break! What are you trying to prove?

We have two different solutions being suggested - I am suggesting multiplexing the control signals and nothing else.
You are suggesting multiplexing by powering devices off.
I am suggesting having active control signals with no power applied overstresses the part.
You do not seem bothered by that.

I am not trying to prove anything. I only suggest that good electrical design practices be followed.

CrossRoads:
We have two different solutions being suggested - I am suggesting multiplexing the control signals and nothing else.
You are suggesting multiplexing by powering devices off.
I am suggesting having active control signals with no power applied overstresses the part.
You do not seem bothered by that.

I am not trying to prove anything. I only suggest that good electrical design practices be followed.

Okay, I see what you are saying now but I don't get how the max values are exceeded from your example. Explain it again using 3V3 for Vdd.

The electrical characteristics of SHT2x are defined in Table 1....
Exposure to absolute maximum rating conditions for extended periods may affect the sensor reliability (e.g. hot carrier degradation, oxide breakdown).

Digital I/O Pins (SDA, SCL) to VSS: min-0.3 max VDD + 0.3

So if you have power connected to an [Arduino] IO pin sitting at 0.3V, and SCL/SDA pulled up to 5V (which is also the absolute Max) then the input pins are 4.7V over spec.
Similarly, pulling SCL/SDA up to 3.3V puts them 3V over spec.

CrossRoads:
The electrical characteristics of SHT2x are defined in Table 1....
Exposure to absolute maximum rating conditions for extended periods may affect the sensor reliability (e.g. hot carrier degradation, oxide breakdown).

Digital I/O Pins (SDA, SCL) to VSS: min-0.3 max VDD + 0.3

So if you have power connected to an [Arduino] IO pin sitting at 0.3V, and SCL/SDA pulled up to 5V (which is also the absolute Max) then the input pins are 4.7V over spec.
Similarly, pulling SCL/SDA up to 3.3V puts them 3V over spec.

Okay, I get it. Vdd becomes 0.3V when you power the part down.

Here is the response I got from Sensirion in June 2009 when asking them the same question about the SHT75. Since I was using a software solution to control the non-standard two wire interface anyway, this is actually the way I dealt with it. I was successful controlling the power to the parts as well but ended up just providing separate data lines. I agree with your assessment that it would be exceeding the max ratings to switch the power pin.

Thank you for contacting us.

Yes, this approach works.
Also the other way (sharing a CLK line and reading at separate DATA lines) has been done successfully. To my knowledge, this is easier to implement.

Thank you
Michael

When you used the term "crap design" I had a knee-jerk reaction. My apologies.

Yeah, I guess I could have stated that less bluntly.

Their answer of
"Yes, this approach works."
was in regards to multiplexing by controlling power? Or to preventing the parts from seeing the data line, and thus not having an address to respond to?

CrossRoads:
Yeah, I guess I could have stated that less bluntly.

Their answer of
"Yes, this approach works."
was in regards to multiplexing by controlling power? Or to preventing the parts from seeing the data line, and thus not having an address to respond to?

To use a separate I/O pin for each data line and common up the clock lines. Presupposes that you are using software I2C.

I will try do to separate the datelines. If that doesn`t work i will order a multiplexer.

Thank you CrossRoads and Papa G for the discussion.