# Adafruit SGP40 Air Quality Sensor

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/097/504/medium800/sensors_SGP40_top.jpg?1607381315)

\*sniff\* \*sniff\* ... do you smell that? No need to stick your nose into a carton of milk anymore, you can build a digital nose with the [SGP40 Multi-Pixel Gas Sensor,](https://www.adafruit.com/product/4829) a fully integrated MOX gas sensor. This is a very fine air quality sensor from the sensor experts at Sensirion, with I2C interfacing so you don't have to manage the heater and analog reading of a MOX sensor. It combines multiple metal-oxide sensing and heating elements on one chip to provide more detailed air quality signals.

![](https://cdn-learn.adafruit.com/assets/assets/000/097/505/medium800/sensors_SGP40_back.jpg?1607381335)

The SGP40 has a 'standard' hot-plate MOX sensor, as well as a small microcontroller that controls power to the plate, reads the analog voltage and provides an I2C interface to read from. Unlike the CCS811, this sensor does not require I2C clock stretching. [We currently have an Arduino library with examples of reading the raw value and also running the Sensirion algorithm to calculate VOC index](https://github.com/adafruit/Adafruit_SGP40) as well as a [CircuitPython / Python library](https://github.com/adafruit/Adafruit_CircuitPython_SGP40).

This is a gas sensor that can detect a wide range of Volatile Organic Compounds (VOCs) and H2 and is intended for indoor air quality monitoring. **The SGP40 is the next generation after the SGP30, but does not give TVOC/eCO2 values out like the SGP30.** Instead, [raw signal from the sensor is processed using their software algorithm to give an overall 'air quality' value form 0 to 500](https://github.com/Sensirion/embedded-sgp/tree/master/sgp40_voc_index).

![](https://cdn-learn.adafruit.com/assets/assets/000/097/506/medium800/sensors_SGP40_top_angle.jpg?1607381347)

 **Please note, this sensor, like all VOC/gas sensors, has variability, and to get precise measurements you will want to calibrate it against known sources!** &nbsp;That said, for general environmental sensors, it will give you a good idea of trends and comparison.

Another nice element to this sensor is the ability to set humidity compensation for better accuracy. [An external humidity sensor is required and then the RH% is written over I2C to the sensor](https://github.com/adafruit/Adafruit_SGP40/blob/master/examples/sgp40_voc/sgp40_voc.ino), so it can better calibrate the MOX sensor reading and reduce humidity/temperature-based variations..

![](https://cdn-learn.adafruit.com/assets/assets/000/097/507/medium800/sensors_SGP40_STEMMA_side.jpg?1607381355)

Nice sensor right? So we made it easy for you to get right into your next project. The surface-mount sensor is soldered onto a custom made PCB in the[&nbsp; **STEMMA QT** &nbsp;form factor](https://www.adafruit.com/?q=stemma%20qt%20sensor "STEMMA QT form factor"), making them easy to interface with. The&nbsp;[STEMMA QT connectors](https://learn.adafruit.com/introducing-adafruit-stemma-qt/what-is-stemma-qt)&nbsp;on either side are compatible with the&nbsp;[SparkFun Qwiic](https://www.sparkfun.com/qwiic)&nbsp;I2C connectors. This allows you to make solderless connections between your development board and the SGP40 or to chain it with a wide range of other sensors and accessories using a&nbsp;[**compatible cable**](https://www.adafruit.com/?q=stemma%20qt%20cable).&nbsp;[QT Cable is not included, but we have a variety in the shop](https://www.adafruit.com/?q=stemma+qt+cable&sort=BestMatch)

We’ve of course broken out all the pins to standard headers and added a 3.3V voltage regulator and level shifting so allow you to use it with either 3.3V or 5V systems such as the Arduino Uno, or Feather M4, or Raspberry Pi.

- [Next Page](https://learn.adafruit.com/adafruit-sgp40/pinouts.md)

## Primary Products

### Adafruit SGP40 Air Quality Sensor Breakout - VOC Index

[Adafruit SGP40 Air Quality Sensor Breakout - VOC Index](https://www.adafruit.com/product/4829)
\*sniff\* \*sniff\* ... do you smell that? No need to stick your nose into a carton of milk anymore, you can build a digital nose with the SGP40 Multi-Pixel Gas Sensor, a fully integrated MOX gas sensor. This is a very fine air quality sensor from the sensor experts at Sensirion, with I2C...

Out of Stock
[Buy Now](https://www.adafruit.com/product/4829)
[Related Guides to the Product](https://learn.adafruit.com/products/4829/guides)

## Featured Products

### STEMMA QT / Qwiic JST SH 4-pin to Premium Male Headers Cable

[STEMMA QT / Qwiic JST SH 4-pin to Premium Male Headers Cable](https://www.adafruit.com/product/4209)
This 4-wire cable is a little over 150mm / 6" long and fitted with JST-SH female 4-pin connectors on one end and premium Dupont male headers on the other. Compared with the chunkier JST-PH these are 1mm pitch instead of 2mm, but still have a nice latching feel, while being easy to insert...

In Stock
[Buy Now](https://www.adafruit.com/product/4209)
[Related Guides to the Product](https://learn.adafruit.com/products/4209/guides)
### JST SH 4-pin Cable with Alligator Clips - STEMMA QT / Qwiic

[JST SH 4-pin Cable with Alligator Clips - STEMMA QT / Qwiic](https://www.adafruit.com/product/4398)
This cable will make it super easy to use our plug-and-play STEMMA QT boards with boards like Circuit Playground. On one end you get a Qwiic / STEMMA QT connector (technically known as a JST SH 4-pin plug)&nbsp; into 4 individual wires with grippy alligator clips. We're carrying these to...

Out of Stock
[Buy Now](https://www.adafruit.com/product/4398)
[Related Guides to the Product](https://learn.adafruit.com/products/4398/guides)
### 4-pin JST PH to JST SH Cable - STEMMA to QT / Qwiic

[4-pin JST PH to JST SH Cable - STEMMA to QT / Qwiic](https://www.adafruit.com/product/4424)
Are you a maker in the midst of&nbsp;a [**STEMMA**](https://learn.adafruit.com/introducing-adafruit-stemma-qt/what-is-stemma) dilemma? This 200mm long 4-wire cable is a fantastic chimera-cable fitted with **STEMMA QT / Sparkfun Qwiic JST SH** on one end,...

In Stock
[Buy Now](https://www.adafruit.com/product/4424)
[Related Guides to the Product](https://learn.adafruit.com/products/4424/guides)
### STEMMA QT / Qwiic JST SH 4-pin Cable with Premium Female Sockets

[STEMMA QT / Qwiic JST SH 4-pin Cable with Premium Female Sockets](https://www.adafruit.com/product/4397)
This 4-wire cable is a little over 150mm / 6" long and fitted with JST-SH female 4-pin connectors on one end and premium female headers on the other. Compared with the chunkier JST-PH these are 1mm pitch instead of 2mm, but still have a nice latching feel, while being easy to insert and...

In Stock
[Buy Now](https://www.adafruit.com/product/4397)
[Related Guides to the Product](https://learn.adafruit.com/products/4397/guides)
### STEMMA QT / Qwiic JST SH 4-pin Cable - 100mm Long

[STEMMA QT / Qwiic JST SH 4-pin Cable - 100mm Long](https://www.adafruit.com/product/4210)
This 4-wire cable is a little over 100mm / 4" long and fitted with JST-SH female 4-pin connectors on both ends. Compared with the chunkier JST-PH these are 1mm pitch instead of 2mm, but still have a nice latching feel, while being easy to insert and remove.

<a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/4210)
[Related Guides to the Product](https://learn.adafruit.com/products/4210/guides)

## Related Guides

- [Adafruit Terminal PiCowbell for Pico](https://learn.adafruit.com/adafruit-terminal-picowbell-for-pico.md)
- [Adafruit Feather RP2040 RFM69](https://learn.adafruit.com/feather-rp2040-rfm69.md)
- [Getting Started with the nRF8001 Bluefruit LE Breakout](https://learn.adafruit.com/getting-started-with-the-nrf8001-bluefruit-le-breakout.md)
- [Adafruit Pixel Shifter](https://learn.adafruit.com/adafruit-pixel-shifter.md)
- [Adafruit Feather 32u4 Adalogger](https://learn.adafruit.com/adafruit-feather-32u4-adalogger.md)
- [Adafruit QT Py ESP32-C3 WiFi Dev Board](https://learn.adafruit.com/adafruit-qt-py-esp32-c3-wifi-dev-board.md)
- [Adafruit NeoPot](https://learn.adafruit.com/adafruit-neopot.md)
- [Adafruit STEMMA & STEMMA QT](https://learn.adafruit.com/introducing-adafruit-stemma-qt.md)
- [Adafruit MPR121 12-Key Capacitive Touch Sensor Breakout Tutorial](https://learn.adafruit.com/adafruit-mpr121-12-key-capacitive-touch-sensor-breakout-tutorial.md)
- [Adafruit INA228 I2C Power Monitor](https://learn.adafruit.com/adafruit-ina228-i2c-power-monitor.md)
- [Adafruit SGP41 Multi-Pixel Gas Sensor Breakout](https://learn.adafruit.com/adafruit-sgp41-multi-pixel-gas-sensor-breakout.md)
- [Adafruit MCP3421 18-Bit ADC](https://learn.adafruit.com/adafruit-mcp3421-18-bit-adc.md)
- [Adafruit Sensirion SHTC3 - Temperature & Humidity Sensor Breakout](https://learn.adafruit.com/adafruit-sensirion-shtc3-temperature-humidity-sensor.md)
- [Adafruit ADS122C04 24-Bit ADC](https://learn.adafruit.com/adafruit-ads122c04-24-bit-adc.md)
- [Analog Devices ADXL343 Breakout Learning Guide](https://learn.adafruit.com/adxl343-breakout-learning-guide.md)
