Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Goal

Arduino Create arduino based device to compare data for as much t/RH sensors as possible (without manual sensor switch)

Preparation

Use of same sensor on i2c usually limited by 1 or 2 (using ALT i2c address) of same type. And SHT20, SHT21, SHT25, HTU21 is actually same type, so to be able to compare measurement there is need to use i2c multiplexer. In case of 8 line multiplexer there is possibility to have 8-16 sensor of same time to be connected with Arduino.

Sensor i2c addresses and voltages

to devide between multiplexers

...

Texas Instruments

3 Bosch Sensortec

Multiplexer Lines

...

i2c Scan

Code Block
Port:0  i2c addr 64  i2c addr 68  i2c addr 119
Port:1  i2c addr 64  i2c addr 68  i2c addr 119
Port:2  i2c addr 64  i2c addr 68  i2c addr 118
Port:3  i2c addr 64  i2c addr 68  i2c addr 118
Port:4  i2c addr 64  i2c addr 68  i2c addr 118
Port:5  i2c addr 64  i2c addr 68  i2c addr 92  i2c addr 118
Port:6  i2c addr 64  i2c addr 68  i2c addr 92  i2c addr 118
Port:7  i2c addr 64  i2c addr 68  i2c addr 92

Hardware in use

  1. Mega2560 keyestudio
  2. LCD 3.5 inch Arduino Mega2560
  3. DFRobot i2c multiplexer (or compatible ShangSi MoudleCX TCA9548A i2c multiplexer)
  4. Sensors (DHT11, SHT21, SHT20, SHT25, HTU21D, SHT30, SHT31, SHT35, SHT85, BME280, BME680)

Draft sketch

github code: https://github.com/liutyi/arduino-humidity-sensors-test/tree/master

Libraries

Screen

Image Removed

Children Display