Air Quality Sensor - SGP40 (Qwiic) Hookup Guide
The SparkFun Air Quality Sensor - SGP40 (Qwiic) is a robust metal oxide (MOx) based indoor air-quality measurement tool using the SGP40 gas sensor from Sensirion. The SGP40 is based on Sensirion's CMOSens® technology that uses a MOx sensor with a temperature controlled micro hotplate and a humidity-compensated indoor air quality signal. The SGP40 is highly responsive and reports valid volatile organic compount (VOC) data within minutes of powering on the sensor.
The SGP40 outputs a digital value based on all VOC gases typically present in an indoor environment and this value can be combined with Sensirion's VOC Index Algorithm to provide responsive indoor air quality data. The SGP40 detects the relative intensity of VOC events in relation to the average readings in a 24hr period but does not return specific concentrations of VOC gases. Think of the SGP40 as a sensitive electronic nose for detecting VOCs in a room.
Users looking to measure specific gas concentrations may want to use the SparkFun Air Quality Sensor - SGP30 (Qwiic) instead.
This guide will cover the SGP40 sensor and other hardware present on this breakout, how to connect it to a microcontroller and use the Arduino and Python libraries so by the end you'll be able to easily monitor VOC events indoors.
To follow along with this guide you will need a microcontroller to communicate with the SGP40. Below are a few options that come Qwiic-enabled out of the box:
SparkFun RedBoard QwiicDEV-15123
SparkFun RedBoard ArtemisDEV-15444
If your chosen microcontroller is not already Qwiic-enabled, you can add that functionality with one or more of the following items:
SparkFun Qwiic Cable KitKIT-15081
SparkFun Qwiic AdapterDEV-14495
SparkFun Qwiic Shield for ArduinoDEV-14352
SparkFun Qwiic Shield for Arduino NanoDEV-16789
You will also need at least one Qwiic cable to connect your sensor to your microcontroller.
Qwiic Cable - 100mmPRT-14427
Qwiic Cable - 500mmPRT-14429
Qwiic Cable - 50mmPRT-14426
Qwiic Cable - 200mmPRT-14428
If you aren't familiar with the Qwiic system, take a look here for an overview.
We also recommend taking a look at the following tutorials if you aren't familiar with the concepts covered in them. If you are using one of the Qwiic Shields listed above, you may want to read through their respective Hookup Guides as well before you get started with the SparkFun Air Quality Sensor - SGP40 (Qwiic).