HDC2021 Temperature and humidity configuration and measurement

Hello …

I have a requirement for temperature and humidity sensor operation .
and i am not able to communicate with the device using I2C ,

need help in configuring the measurements set up and device communication

please guide me in establishing the communication between the device and Arduino.

1.Used sensor : HDC2021
2.Arduino UNO

Thanks in advance …

hdc2021(1).pdf (1.77 MB)

how have you connected the sensors? do you have pullup resistors?
if you do an I2C scan can you see the sensor address ?

Thanks for your quick reply ,

i did the same and found the address for the HDC2021,
and i am able to read the data .

one more question ...

i want to connect the 16 identica (HDC2021)l sensors on the same line (I2C) , please suggest me the best way ,

looking at the HDC2021 datasheet the ADDR pin enables you to select between two I2C addresses
therefore you can connect a maximum of two HDC2021 device to an I2C channel

you can extend this by using an I2C multiplexor such as the Adafruit TCA9548A


i will try this , can i use TMUX1108 ?

thanks for your response ... :slight_smile:

i will try this , can i use TMUX1108 ?

do not think you can use the TMUX1108
you need a I2C compatible mux such as the TCA9548, see the datasheet
The TCA9548A device has eight bidirectional
translating switches that can be controlled through
the I2C bus.

hello i need to connect 16 sensors and read the temperature and for the same.and addressees of 16 sensors are same, and using I2C protocol how can i do this ?,
please suggest me the best option and configuration code for the same .

you can use a I2C multeplexor such as

A common way is to use the address pin as a chip select pin.
Then you can set the chip you talk to to one (active) address, and all the others to the other (unused) address.
A 74HC4067 breakout board could be used for that.

Note that this is a 3.3volt chip, and the Uno has 5volt I2C logic.

Not sure why 16 humidity sensors.
If you are thinking of having sensors in different rooms, then forget about it.
With 16 sensors you can only have up to about 20cm of wire on each sensor before running into problems.

@anil8495, please do not cross-post. Threads merged.