The Adafruit SGP30 is an advanced sensor that measures the levels of Total Volatile Organic Compounds (TVOC) and equivalent Carbon Dioxide (eCO2) in the air. It is designed for indoor air quality monitoring and can be used in various applications such as smart homes, HVAC systems, and air purifiers. The sensor is known for its high accuracy, reliability, and long-term stability.
Pin Number | Name | Description |
---|---|---|
1 | VDD | Power supply (1.62V to 1.98V) |
2 | GND | Ground |
3 | SDA | I2C Data |
4 | SCL | I2C Clock |
5 | SEL | Interface select (tied to GND for I2C) |
6 | NC | No Connection (do not connect) |
Power Connections:
I2C Connections:
Interface Select:
#include <Wire.h>
#include "Adafruit_SGP30.h"
Adafruit_SGP30 sgp;
void setup() {
Serial.begin(9600);
if (!sgp.begin()){
Serial.println("Sensor not found :(");
while (1);
}
Serial.print("Found SGP30 serial #");
Serial.print(sgp.serialnumber[0], HEX);
Serial.print(sgp.serialnumber[1], HEX);
Serial.println(sgp.serialnumber[2], HEX);
}
void loop() {
if (!sgp.IAQmeasure()) {
Serial.println("Measurement failed");
return;
}
Serial.print("TVOC ");
Serial.print(sgp.TVOC);
Serial.print(" ppb\t");
Serial.print("eCO2 ");
Serial.println(sgp.eCO2);
delay(1000);
}
Q: How often should the sensor be calibrated? A: The manufacturer recommends recalibrating the sensor every six months or as needed based on usage and environmental conditions.
Q: Can the sensor measure CO2 directly? A: No, the sensor measures eCO2, which is an estimation of CO2 levels based on the detected TVOCs.
Q: Is the sensor suitable for outdoor use? A: The SGP30 is designed primarily for indoor use and may not perform accurately or reliably outdoors.
For further assistance, consult the manufacturer's datasheet and resources, or contact technical support.