The SGP40 is a digital gas sensor designed for indoor air quality monitoring by measuring volatile organic compounds (VOCs). Key features include long-term stability, low-power consumption, and an I²C interface for easy integration with microcontrollers.

⚠️ THIS FEATURE IS AVAILABLE ON CC2652 or CC1352 CHIPS ONLY

⚠️ THIS FEATURE REQUIRES THE PREMIUM VERSION

SGP40 sensor with temperature and humidity from SHT30 on one bus
SGP40 sensor with temperature and humidity from SHT30 on one bus

The SGP40 sensor (Buy on AliExpress #1, #2) requires environmental temperature and humidity for better results. The example above shows that two I2C sensors are connected on the same bus. SHT30 provides the necessary data. It should be defined first in the configuration (above) in the configuration. You could also use separate sensors for temperature and humidity in the same manner.

The firmware converts the raw value from the sensors to the VOC index value in the range from 0 to 400 and reports it as an analog value.

0-100ExcellentNo measures needed
100-200GoodNo measures needed
200-300Lightly PollutedVentilation suggested
300-400Moderately PollutedIncrease ventilation with clean air
400-500Heavily PollutedOptimize ventilation

A home automation system can also send temperature and humidity instead of built-in sensors. You should send it as a single precision float in the analog input value cluster.

Analog value: 65NNN where NNN is a humidity value, for example, 65050 for 50%. Humidity range: 0 … 100.
Analog value: 64NNN where NNN is a temperature value, shifted by 25. For example, 64000 for -25C, 64025 for 0C, 64050 for 25C. Temperature range: -25 … 100.

write - set the temperature value 25C.
Topic: zigbee2mqtt/[friedly_name]/set
Payload: {"[channel]": 64050}
Channel: l1, l2, l3 … l16
write - set the humidity value 50%.
Topic: zigbee2mqtt/[friedly_name]/set
Payload: {"[channel]": 65050}
Channel: l1, l2, l3 … l16


There are no comments.

Leave a Reply