Air Quality Sensor - SGP40 (Qwiic) Hookup Guide

Pages
Contributors: El Duderino, MAKIN-STUFF
Favorited Favorite 0

Introduction

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.

SparkFun Air Quality Sensor - SGP40 (Qwiic)

SparkFun Air Quality Sensor - SGP40 (Qwiic)

SEN-18345
$18.50

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.

Required Materials

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 Thing Plus - ESP32 WROOM (Micro-B)

SparkFun Thing Plus - ESP32 WROOM (Micro-B)

WRL-15663
$22.50
13
SparkFun Qwiic Pro Micro - USB-C (ATmega32U4)

SparkFun Qwiic Pro Micro - USB-C (ATmega32U4)

DEV-15795
$21.50
10
SparkFun RedBoard Qwiic

SparkFun RedBoard Qwiic

DEV-15123
$21.50
18
SparkFun RedBoard Artemis

SparkFun RedBoard Artemis

DEV-15444
$21.50
10

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 Kit

SparkFun Qwiic Cable Kit

KIT-15081
$8.95
20
SparkFun Qwiic Adapter

SparkFun Qwiic Adapter

DEV-14495
$1.60
4
SparkFun Qwiic Shield for Arduino

SparkFun Qwiic Shield for Arduino

DEV-14352
$7.50
9
SparkFun Qwiic Shield for Arduino Nano

SparkFun Qwiic Shield for Arduino Nano

DEV-16789
$4.95

You will also need at least one Qwiic cable to connect your sensor to your microcontroller.

Qwiic Cable - 50mm

Qwiic Cable - 50mm

PRT-14426
$0.95
Qwiic Cable - 100mm

Qwiic Cable - 100mm

PRT-14427
$1.50

Qwiic Cable - 500mm

PRT-14429
1 Retired

Qwiic Cable - 200mm

PRT-14428
Retired

Suggested Reading

If you aren't familiar with the Qwiic system, take a look here for an overview.

Qwiic Connect System

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).

I2C

An introduction to I2C, one of the main embedded communications protocols in use today.

Serial Terminal Basics

This tutorial will show you how to communicate with your serial devices using a variety of terminal emulator applications.

Qwiic Shield for Arduino & Photon Hookup Guide

Get started with our Qwiic ecosystem with the Qwiic shield for Arduino or Photon.

SparkFun Qwiic Shield for Arduino Nano Hookup Guide

Hookup Guide for the SparkFun Qwiic Shield for Arduino Nano.