This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

EK-TM4C1294XL: multiple instances of SHT21

Part Number: EK-TM4C1294XL
Other Parts Discussed in Thread: HDC2010

I am trying to understand if it is possible to have 3 SHT21 sensors to the same I2C module of the TM4C.

I have the sensorhub booster pack with the EK TM4C1294XL and I can see the temp and humidity

measurements printed out to the putty term window when running the humidity_sht21 project.

 

The application will have one task to monitor these 3 sensors and operate electronics in the equipment

based on the feedback.

Looking at the code in humidity_sht21,

// Initialize the SHT21.
    //
    SHT21Init(&g_sSHT21Inst, &g_sI2CInst, SHT21_I2C_ADDRESS,
            SHT21AppCallback, &g_sSHT21Inst);

I understand that SHT21_I2C_ADDRESS will have three values one for each SHT21 sensor.

In the while loop, there seems nothing that makes the SHT21 sensor unique in these two commands:

SHT21Write(&g_sSHT21Inst, SHT21_CMD_MEAS_RH, g_sSHT21Inst.pui8Data, 0,
                SHT21AppCallback, &g_sSHT21Inst);

SHT21DataRead(&g_sSHT21Inst, SHT21AppCallback, &g_sSHT21Inst);

How can I extend this to three SHT21 sensors?

Thank you,

Priya

 

  • Hi Priya,

    The question if three SHT21 devices can be on the same I2C buss should be asked of Sensirion. My interpretation of their datasheet implies the I2C address is always fixed at the 7-bit I2C address of 1 000 000b and cannot be changed. That implies that only one SHT21 device can be on a single I2C bus. However, the TM4C1294 device supports up to 10 I2C interfaces. The simple solution would be to have each SHT21 on a separate I2C interface.

  • The TI HDC2010 humidity and temperature sensor has a single address pin that can be tied high for one address and low for a different address. This device allows two sensors to be on the same I2C bus.