Zum Inhalt springen

WSAL20168 – SGP40 VOC Sensor/en

Aus JW Tech Wiki

Documentation notice: This technical documentation was independently rewritten from an archived supplier source. Check technical details and commands against the product version and manufacturer documentation before use.

Summary

The SGP40 VOC sensor is a digital sensing module for air quality monitoring that incorporates the SGP40 chip from Sensirion. It measures volatile organic compounds (VOCs) in the range of 0 to 1000 ppm ethanol equivalents and provides digital signals via an I2C bus for controlling air treatment devices.

Related products at JW Tech

Technical overview

  • Measurement range: 0–1000 ppm ethanol equivalents
  • Communication: I2C with fixed address 0x59
  • Operating voltage: 3.3 V or 5 V thanks to onboard voltage translator
  • Response time: under 10 s (tau 63%)
  • Switch-on time: under 60 s
  • Dimensions: 27 x 20 mm; mounting hole 2.0 mm
  • Pinout: VCC, GND, SDA, SCL
  • Use cases: detection of smoke, gas emissions, emissions from construction materials, furniture, and home appliances

Commands and examples – verify before use: 

sudo raspi-config
sudo reboot
wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.60.tar.gz
tar zxvf bcm2835-1.60.tar.gz
cd bcm2835-1.60/
sudo ./configure
sudo make
sudo make check
sudo make install
sudo apt-get install wiringpi
cd /tmp
wget https://project-downloads.drogon.net/wiringpi-latest.deb
sudo dpkg -i wiringpi-latest.deb
gpio -v
sudo apt-get install p7zip-full
wget https://files.waveshare.com/upload/6/62/SGP40_Voc_Sensor_code.7z
7z x SGP40_Voc_Sensor_code.7z -r -o./SGP40_Voc_Sensor_code
sudo chmod 777 -R SGP40_Voc_Sensor_code
cd SGP40_Voc_Sensor_code/RPI/c
sudo make clean

Notes and version constraints

  • Exact commands and library versions are version-sensitive; verify compatibility with your system before running them.
  • The module requires a warm-up phase after power-on; during this time the raw value slowly rises until it stabilizes.
  • The sensor is extremely sensitive to ethanol; under normal conditions the VOC reading is near zero unless strong contaminants are present.
  • If serial output stops or shows zero after startup: check hardware connections, ensuring SDA and SCL are not swapped; reconnect the sensor and rerun the program.
  • Raw data values cannot be directly converted to PPM or PPB; the Sensirion library is required for conversion.

Source and revision record

  • SGP40 VOC Sensor - Waveshare Wiki
  • Source revision: 69092
  • Captured: 2026-09-02T03:28:20+00:00
  • SHA-256: 3d8869d67a4ffa0d1e134c55c453c0554c5bdbae0321cabbaa3a82f82f43c7e8