# Adafruit SCD-30 - NDIR CO2 Temperature and Humidity Sensor

## Overview

Take a deep breath in...now slowly breathe out. Mmm isn't it wonderful? All that air around us, which we bring into our lungs, extract oxygen from and then breathe out carbon dioxide. CO2 is essential for life on this planet we call Earth - us and plants take turns using and emitting CO2 in an elegant symbiosis. But it's important to keep that CO2 balanced - you don't want too much around, not good for humans and not good for our planet.

![](https://cdn-learn.adafruit.com/assets/assets/000/098/500/medium800/adafruit_products_4867-00.jpg?1609958879)

The SCD-30 is [an NDIR sensor](https://en.wikipedia.org/wiki/Nondispersive_infrared_sensor), which is a 'true' CO2 sensor, that will tell you the CO2 PPM (parts-per-million) composition of ambient air. [Unlike the SGP30, this sensor isn't approximating it from VOC gas concentration](https://www.adafruit.com/product/3709) - **it really is measuring the CO2 concentration**! That means its a lot bigger and more expensive, but it is the real thing. Perfect for environmental sensing, scientific experiments, air quality and ventilation studies and more.

![](https://cdn-learn.adafruit.com/assets/assets/000/098/499/medium800/adafruit_products_4867_top_v2_ORIG_2021_01.jpg?1609958763)

Data is read over I2C, so it works very nicely with just about any microcontroller or microcomputer. We've written both Arduino and Python/CircuitPython code so you can get started in a jiffy. Another nice element to this sensor is it comes with an [SHT31 temperature and humidity sensor already built in](https://www.adafruit.com/product/2857). The sensor is used to compensate the NDIR CO2 sensor, but its also readable so you get full environmental data.

![](https://cdn-learn.adafruit.com/assets/assets/000/098/489/medium800/adafruit_products_4867_quarter_ORIG_2021_01.jpg?1609953238)

Nice sensor right? So we made it easy for you to get right into your next project. The sensor is hand-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) I2C connectors. This allows you to make solderless connections between your development board and the SCD-30 or to chain it with a wide range of other sensors and accessories using a [**compatible cable**](https://www.adafruit.com/?q=stemma%20qt%20cable).

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 Raspberry Pi, or Metro M4 or Arduino Uno.

![](https://cdn-learn.adafruit.com/assets/assets/000/098/488/medium800/adafruit_products_4867_side_ORIG_2021_01.jpg?1609953205)

# Adafruit SCD-30 - NDIR CO2 Temperature and Humidity Sensor

## Pinouts

![](https://cdn-learn.adafruit.com/assets/assets/000/098/492/medium800/adafruit_products_SCD30_pinouts.jpg?1609953331)

## Power Pins

- **VIN** - this is the power pin. Since the sensor chip uses 3 VDC, we have included a voltage regulator on board that will take 3-5VDC and safely convert it down. To power the board, give it the same power as the logic level of your microcontroller - e.g. for a 5V microcontroller like Arduino, use 5V
- **3Vo** &nbsp;- this is the 3.3V output from the voltage regulator, you can grab up to 100mA from this if you like
- **GND** - common ground for power and logic

## I2C Logic Pins

- **SCL** - I2C clock pin, connect to your microcontroller I2C clock line. This pin is level shifted so you can use 3-5V logic, and there's a **10K pullup** on this pin.
- **SDA** - I2C data pin, connect to your microcontroller I2C data line. This pin is level shifted so you can use 3-5V logic, and there's a **10K pullup** on this pin.
- [**STEMMA QT**](https://learn.adafruit.com/introducing-adafruit-stemma-qt) **&nbsp;-** These connectors allow you to connect to dev boards with **STEMMA QT** connectors or to other things with&nbsp;[various associated accessories](https://www.adafruit.com/?q=JST%20SH%204)

## Other Pins

- **RDY** - Data Ready Pin. High when data is ready for read-out, it helps if you want to avoid polling the I2C port to verify data is ready.

# Adafruit SCD-30 - NDIR CO2 Temperature and Humidity Sensor

## Arduino

Using the SCD30 with Arduino is a simple matter of wiring up the sensor to your Arduino-compatible microcontroller, installing the [Adafruit SCD30](https://github.com/adafruit/Adafruit_SCD30) library we've written, and running the provided example code.

## **I2C Wiring**

Here is how to wire up the sensor using one of the [**STEMMA QT**](https://learn.adafruit.com/introducing-adafruit-stemma-qt) connectors. The examples show a Metro but wiring will work the same for an Arduino or other compatible board.

- Connect&nbsp;**board VIN (red wire)** to&nbsp; **Arduino 5V** &nbsp;if you are running a **5V** board Arduino (Uno, etc.).&nbsp;If your board is **3V,** connect to that instead.
- Connect **board GND (black wire)&nbsp;**to&nbsp; **Arduino**  **GND**
- Connect **board SCL (yellow wire)&nbsp;**to&nbsp; **Arduino**  **SCL**
- Connect **board SDA (blue wire)&nbsp;**to&nbsp; **Arduino**  **SDA**

![adafruit_products_SCD30_arduino_I2C_STEMMA_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/098/479/medium640/adafruit_products_SCD30_arduino_I2C_STEMMA_bb.jpg?1609893467)

Here is how to wire the sensor to a board using a solderless breadboard:

- Connect&nbsp;**board VIN (red wire)** to&nbsp; **Arduino 5V** &nbsp;if you are running a **5V** board Arduino (Uno, etc.).&nbsp;If your board is **3V,** connect to that instead.
- Connect **board GND (black wire)&nbsp;**to&nbsp; **Arduino**  **GND**
- Connect **board SCL (yellow wire)&nbsp;**to&nbsp; **Arduino**  **SCL**
- Connect **board SDA (blue wire)&nbsp;**to&nbsp; **Arduino**  **SDA**

![adafruit_products_SCD30_arduino_I2C_breadboard_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/098/480/medium640/adafruit_products_SCD30_arduino_I2C_breadboard_bb.jpg?1609893503)

## **Library Installation**

You can install the **Adafruit SCD30** library for Arduino using the Library Manager in the Arduino IDE.

![](https://cdn-learn.adafruit.com/assets/assets/000/098/481/medium800/adafruit_products_Arduino_Manage_Libraries.png?1609893656)

Click the&nbsp; **Manage Libraries ...** menu item, search for **Adafruit SCD30** ,&nbsp;and select the&nbsp; **Adafruit&nbsp;**** SCD30** library:

![](https://cdn-learn.adafruit.com/assets/assets/000/098/482/medium800/adafruit_products_SCD30_arduino_lib_install.png?1609947386)

Finally, search for **Adafruit Unified Sensor** and install that too (you may have to scroll a bit)

![](https://cdn-learn.adafruit.com/assets/assets/000/098/483/medium800/adafruit_products_Arduino_adafruit_unified_sensor_install.png?1609947437)

## **Load Example**

Open up&nbsp; **File -\> Examples -\> Adafruit SCD30 -\> adafruit\_scd30\_test**

![](https://cdn-learn.adafruit.com/assets/assets/000/098/485/medium800/adafruit_products_SCD30_Arduino_open_test.png?1609949266)

After opening the demo file, upload to your Arduino wired up to the sensor. Once you upload the code, you will see the **temperature, humidity and eCO2 data** &nbsp;values being printed when you open the Serial Monitor ( **Tools-\>Serial Monitor** ) at **115200 baud** , similar to this:

![](https://cdn-learn.adafruit.com/assets/assets/000/098/495/medium800/adafruit_products_image.png?1609955536)

Info: 

The sensor has a lot going on, there's temperature and humidity reading thanks to an SHT31 sensor on board. These values are used internally to normalize the NDIR CO2 readings as well. You can only get data every 2 seconds, which is pretty fast for this kind of sensor! If you want to slow down the readings to reduce power usage, uncomment this section:

```python
// if (!scd30.setMeasurementInterval(10)){
//   Serial.println("Failed to set measurement interval");
//   while(1){ delay(10);}
// }
```

The valid range is 2 seconds per reading up to 1800 seconds per reading.

## Example Code
https://github.com/adafruit/Adafruit_SCD30/blob/master/examples/adafruit_scd30_test/adafruit_scd30_test.ino

# Adafruit SCD-30 - NDIR CO2 Temperature and Humidity Sensor

## Arduino Docs

# Adafruit SCD-30 - NDIR CO2 Temperature and Humidity Sensor

## Python & CircuitPython

It's easy to use the **SCD-30** with Python or CircuitPython, and the [Adafruit CircuitPython SCD30](https://github.com/adafruit/Adafruit_CircuitPython_SCD30) module. This module allows you to easily write Python code that reads CO2, temperature, and humidity from the **SCD30** sensor.

You can use this sensor with any CircuitPython microcontroller board or with a computer that has GPIO and Python [thanks to Adafruit\_Blinka, our CircuitPython-for-Python compatibility library](https://learn.adafruit.com/circuitpython-on-raspberrypi-linux).

## **CircuitPython Microcontroller Wiring**

First wire up a SCD-30 to your board exactly as shown below. Here's an example of wiring a Feather M4 to the sensor with I2C using one of the handy [**STEMMA QT**](https://learn.adafruit.com/introducing-adafruit-stemma-qt) connectors:

- **Board 3V** &nbsp;to&nbsp;**sensor VIN (red wire)**
- **Board GND** &nbsp;to&nbsp;**sensor GND (black wire)**
- **Board SCL** &nbsp;to&nbsp;**sensor SCL (yellow wire)**
- **Board SDA** &nbsp;to&nbsp;**sensor SDA (blue wire)**

![adafruit_products_SCD30_Feather_I2C_STEMMA_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/098/474/medium640/adafruit_products_SCD30_Feather_I2C_STEMMA_bb.jpg?1609893044)

You can also use the standard **0.100" pitch** headers to wire it up on a breadboard:

- **Board 3V** &nbsp;to&nbsp;**sensor VIN (red wire)**
- **Board GND** &nbsp;to&nbsp;**sensor GND (black wire)**
- **Board SCL** &nbsp;to&nbsp;**sensor SCL (yellow wire)**
- **Board SDA** &nbsp;to&nbsp;**sensor SDA (blue wire)**

![adafruit_products_SCD30_Feather_I2C_breadboard_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/098/475/medium640/adafruit_products_SCD30_Feather_I2C_breadboard_bb.jpg?1609893075)

## **Python Computer Wiring**

Since there's _dozens_ of Linux computers/boards you can use, we will show wiring for Raspberry Pi. For other platforms, [please visit the guide for CircuitPython on Linux to see whether your platform is supported](https://learn.adafruit.com/circuitpython-on-raspberrypi-linux).&nbsp;

Here's the Raspberry Pi wired to the sensor using I2C and a [**STEMMA QT**](https://learn.adafruit.com/introducing-adafruit-stemma-qt) connector:

- **Pi 3V** &nbsp;to&nbsp;**sensor VIN (red wire)**
- **Pi GND** &nbsp;to&nbsp;**sensor GND (black wire)**
- **Pi SCL** &nbsp;to&nbsp;**sensor SCL (yellow wire)**
- **Pi SDA** &nbsp;to&nbsp;**sensor SDA (blue wire)**

![adafruit_products_SCD30_RasPi_I2C_STEMMA_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/960/medium640/adafruit_products_SCD30_RasPi_I2C_STEMMA_bb.jpg?1616617527)

Finally here is an example of how to wire up a Raspberry Pi to the sensor using a solderless breadboard

- **Pi 3V** &nbsp;to&nbsp;**sensor VIN (red wire)**
- **Pi GND** &nbsp;to&nbsp;**sensor GND (black wire)**
- **Pi SCL** &nbsp;to&nbsp;**sensor SCL (yellow wire)**
- **Pi SDA** &nbsp;to&nbsp;**sensor SDA (blue wire)**

![adafruit_products_SCD30_RasPi_I2C_breadboard_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/098/478/medium640/adafruit_products_SCD30_RasPi_I2C_breadboard_bb.jpg?1609893283)

## **CircuitPython Installation of SCD30 Library**

You'll need to install the [Adafruit CircuitPython SCD30](https://github.com/adafruit/Adafruit_CircuitPython_SCD30) library on your CircuitPython board.

First make sure you are running the&nbsp;[latest version of Adafruit CircuitPython](https://learn.adafruit.com/welcome-to-circuitpython/installing-circuitpython)&nbsp;for your board.

Next you'll need to install the necessary libraries&nbsp;to use the hardware--carefully follow the steps to find and install these libraries from&nbsp;[Adafruit's CircuitPython library bundle](https://circuitpython.org/libraries).&nbsp; Our CircuitPython starter guide has [a great page on how to install the library bundle](https://learn.adafruit.com/welcome-to-circuitpython/circuitpython-libraries).

Required libraries:

- **adafruit\_scd30.mpy**
- **adafruit\_bus\_device/**
- **adafruit\_register/**

Your CIRCUITPY drive should look like the image.

Before continuing make sure your board's **lib** folder or root filesystem has the **adafruit\_scd30.mpy** file, and the **adafruit\_bus\_device** and **adafruit\_register** folders copied over.

![adafruit_products_SCD30_lib_folder.png](https://cdn-learn.adafruit.com/assets/assets/000/098/486/medium640/adafruit_products_SCD30_lib_folder.png?1609950019)

## **Python Installation of SCD30 Library**

You'll need to install the **Adafruit\_Blinka** library that provides the CircuitPython support in Python. This may also require enabling I2C on your platform and verifying you are running Python 3.&nbsp;[Since each platform is a little different, and Linux changes often, please visit the CircuitPython on Linux guide to get your computer ready](https://learn.adafruit.com/circuitpython-on-raspberrypi-linux)!

Once that's done, from your command line run the following command:

- `sudo pip3 install adafruit-circuitpython-scd30`

If your default Python is version 3 you may need to run 'pip' instead. Just make sure you aren't trying to use CircuitPython on Python 2.x, it isn't supported!

Next&nbsp;[connect to the board's serial REPL&nbsp;](https://learn.adafruit.com/welcome-to-circuitpython/the-repl)so you are at the CircuitPython&nbsp; **\>\>\>** &nbsp;prompt.

## **CircuitPython & Python Usage**

To demonstrate the usage of the sensor we'll initialize it and read the CO2, temperature and humidity data from the board's Python REPL.

Run the following code to import the necessary modules and initialize the I2C connection with the sensor:

```python
import board
import adafruit_scd30

scd = adafruit_scd30.SCD30(board.I2C())
```

![](https://cdn-learn.adafruit.com/assets/assets/000/098/496/medium800/adafruit_products_image.png?1609957224)

Now you're ready to read values from the sensor using these properties:

- **data\_available** - Check the sensor to see if new data is available.
- **eCO2** - The CO2 concentration in PPM (parts per million).  
- **temperature** - The current temperature in degrees Celsius.  
- **relative\_humidity** - The current relative humidity in %rH.  

```python
print("Data available?", scd.data_available)
print("CO2:", scd.CO2, "PPM")
print("Temperature:", scd.temperature, "degrees C")
print("Humidity:", scd.relative_humidity, "%%rH")
```

![](https://cdn-learn.adafruit.com/assets/assets/000/098/497/medium800/adafruit_products_image.png?1609957281)

# Full Example Code
https://github.com/adafruit/Adafruit_CircuitPython_SCD30/blob/main/examples/scd30_simpletest.py

You'll be able to get a new reading every 2 seconds, that's as fast as data comes out of the sensor.

It's normal for the first reading to be 0, as the sensor 'warms up'. Simply skip that reading when logging data.

![](https://cdn-learn.adafruit.com/assets/assets/000/098/498/medium800/adafruit_products_image.png?1609957348)

To change things like the interval delay (how often data is calculated)&nbsp; check out this example which shows how you can tweak the sensor to change the interval, or tune the sensor with things like the known altitude/barometric pressure. Check the datasheet for the SCD-30 for more details on tuning the sensor.

https://github.com/adafruit/Adafruit_CircuitPython_SCD30/blob/main/examples/scd30_tuning_knobs.py

# Adafruit SCD-30 - NDIR CO2 Temperature and Humidity Sensor

## Python Docs

# Adafruit SCD-30 - NDIR CO2 Temperature and Humidity Sensor

## WipperSnapper

![](https://cdn-learn.adafruit.com/assets/assets/000/128/301/medium800/adafruit_products_01_DeviceList.png?1709220922)

## What is WipperSnapper

WipperSnapper is a firmware designed to turn any WiFi-capable board into an Internet-of-Things device without programming a single line of code. WipperSnapper connects to [Adafruit IO](https://io.adafruit.com/), a web&nbsp;platform designed ([by Adafruit!](https://www.adafruit.com/about)) to&nbsp;_display_,&nbsp;_respond_, and&nbsp;_interact_&nbsp;with your project's data.

Simply load the WipperSnapper firmware onto your board, add credentials, and plug it into power. Your board will automatically register itself with your Adafruit IO account.

From there, you can add&nbsp;_components_&nbsp;to your board such as buttons, switches, potentiometers, sensors, and more! Components are&nbsp;_dynamically&nbsp;_added to hardware, so you can&nbsp;immediately start interacting, logging, and streaming the data your projects produce without writing code.

If you've never used WipperSnapper, click below to read through the quick start guide before continuing.

[Quickstart: Adafruit IO WipperSnapper](https://learn.adafruit.com/quickstart-adafruit-io-wippersnapper)
## Wiring
First, wire up a SCD30 to your board exactly as follows. Here is an example of the SCD30 wired to an&nbsp;[Adafruit ESP32 Feather V2](https://www.adafruit.com/product/5400)&nbsp;using I2C&nbsp;[with a STEMMA QT cable (no soldering required)](https://www.adafruit.com/product/4210)

- **Board 3V** &nbsp;to&nbsp;**sensor VIN (red wire on STEMMA QT)**  
- **Board GND** &nbsp;to&nbsp;**sensor GND (black wire on STEMMA QT)**  
- **Board SCL** &nbsp;to&nbsp;**sensor SCL (yellow wire on STEMMA QT)**  
- **Board SDA** &nbsp;to&nbsp;**sensor SDA (blue wire on STEMMA QT)**

![adafruit_products_scd30-2.png](https://cdn-learn.adafruit.com/assets/assets/000/113/707/medium640/adafruit_products_scd30-2.png?1659032728)

![adafruit_products_scd30-1.png](https://cdn-learn.adafruit.com/assets/assets/000/113/708/medium640/adafruit_products_scd30-1.png?1659032733)

## Usage

Connect your board to Adafruit IO Wippersnapper and **[navigate to the WipperSnapper board list](https://io.adafruit.com/wippersnapper).**

On this page, **select the WipperSnapper board you're using** to be brought to the board's interface page.

![](https://cdn-learn.adafruit.com/assets/assets/000/117/354/medium800/adafruit_products_ksnip_20230106-140025.png?1673031679)

If you do not see your board listed here - you need [to connect your board to Adafruit IO](https://learn.adafruit.com/quickstart-adafruit-io-wippersnapper) first.

On the device page, quickly&nbsp; **check that you're running the latest version of the WipperSnapper firmware**.

The device tile on the left indicates the version number of the firmware running on the connected board.

- **If the firmware version is green with a checkmark -** &nbsp;continue with this guide.
- **If the firmware version is red with an "X" -** &nbsp;[update to the latest WipperSnapper firmware](https://learn.adafruit.com/quickstart-adafruit-io-wippersnapper)&nbsp;on your board before continuing.

![adafruit_products_04_LatestVersion.png](https://cdn-learn.adafruit.com/assets/assets/000/128/302/medium640/adafruit_products_04_LatestVersion.png?1709220858)

![adafruit_products_04_UpdateRequired.png](https://cdn-learn.adafruit.com/assets/assets/000/128/303/medium640/adafruit_products_04_UpdateRequired.png?1709220910)

Next, make sure the sensor is plugged into your board and click the **&nbsp;I2C Scan&nbsp;** button.

![](https://cdn-learn.adafruit.com/assets/assets/000/113/177/medium800/sensor_page_crop_scan.png?1657724520)

You should see the SCD30's default I2C address of `0x61`&nbsp;pop up in the I2C scan list.

![](https://cdn-learn.adafruit.com/assets/assets/000/113/709/medium800/adafruit_products_ksnip_20220728-141115.png?1659032801)

###  I don't see the sensor's I2C address listed! 


First, double-check the connection and/or wiring between the sensor and the board.

Then, reset the board and let it re-connect to Adafruit IO WipperSnapper.

With the sensor detected in an I2C scan, you're ready to add the sensor to your board.

**Click the New Component button or the + button** to bring up the component picker.

![](https://cdn-learn.adafruit.com/assets/assets/000/127/931/medium800/sensor_page_temperature___humidity_06_AddComponent.png?1708631009)

Adafruit IO supports a large amount of components. To quickly find your sensor, type&nbsp;`SCD30`&nbsp;into the search bar, then select the&nbsp; **SCD-30** &nbsp;component.

![](https://cdn-learn.adafruit.com/assets/assets/000/128/304/medium800/adafruit_products_ZhlYTBnBzr.png?1709220980)

On the component configuration page, the SCD30's sensor address should be listed along with the sensor's settings.

The&nbsp; **Send Every** &nbsp;option is specific to each sensor's measurements. This option will tell the Feather how often it should read from each of the SCD30's three sensors and send the data to Adafruit IO. Measurements can range from every 30 seconds to every 24 hours.

For this example, set the&nbsp; **Send Every&nbsp;** interval for each sensor to every 30 seconds.

![](https://cdn-learn.adafruit.com/assets/assets/000/113/711/medium800/adafruit_products_ksnip_20220728-141217.png?1659032867)

Your device interface should now show the sensor components you created. After the interval you configured elapses, WipperSnapper will automatically read values from the sensor(s) and send them to Adafruit IO.

![](https://cdn-learn.adafruit.com/assets/assets/000/113/712/medium800thumb/adafruit_products_ezgif.com-gif-maker_%284%29.jpg?1659032897)

To view the data that has been logged from the sensor, click on the graph next to the sensor name.

![](https://cdn-learn.adafruit.com/assets/assets/000/113/713/medium800/adafruit_products_ksnip_20220728-141729.png?1659032910)

Here you can see the feed history and edit things about the feed such as the name, privacy, webhooks associated with the feed and more. If you want to learn more about how feeds work, [check out this page](https://learn.adafruit.com/all-the-internet-of-things-episode-four-adafruit-io/advanced-feeds).

The SCD30 has three sensors that each have their own feeds. In this picture, we're looking at the CO2 sensor, but if you click on the graph icon for the different sensors you'll see their feed history.

![](https://cdn-learn.adafruit.com/assets/assets/000/113/714/medium800/adafruit_products_ksnip_20220728-142933.png?1659032984)

For IO Free accounts, feed data is stored for a maximum of 30 days and there's a maximum of 10 feeds. In this guide, you created three feeds (one for each of the SCD30's sensors). If you’d like to store data for more than 30 days, increase the number of feeds (components) you can use with WipperSnapper, or increase your data rate to send more sensor measurements to Adafruit IO - [upgrade your account to Adafruit IO Plus](https://io.adafruit.com/plus).

# Adafruit SCD-30 - NDIR CO2 Temperature and Humidity Sensor

## Field Calibration

Performing a re-calibration of the SCD-30 can help maintain accurate CO2 readings over time. Various factors can cause the SCD-30 sensor reading to drift and there are two available re-calibration options: **Forced Re-Calibration** (FRC) and **Automatic Self-Calibration** (ASC).

This Application Note from [Sensirion](https://www.sensirion.com) goes into lots of detail and is **worth reading** :

[Field calibration for SCD30](https://sensirion.com/media/documents/33C09C07/620638B8/Sensirion_SCD30_Field_Calibration.pdf)
Here we summarizes the two approaches.

## Forced Re-Calibration

This is the easiest approach. The SCD-30 is placed in an environment with a known CO2 concentration. Then the FRC routine is called and this known concentration value (in ppm) is supplied. But how do you come up with that known value? That is a caveat of this approach and Sensirion (see PDF linked above) suggests three approaches:

1. Using a separate secondary calibrated CO2 sensor to provide the value.
2. Exposing the SCD-30 to a controlled environment with a known value.
3. Exposing the SCD-30 to fresh outside air and using a value of 400 ppm.

However, once you have your reference value, performing a FRC is super easy. Assuming a reference CO2 concentration of 800 ppm has been determined, then with the **CircuitPython** library use:

```python
scd30.forced_recalibration_reference = 800
```

or with the **Arduino** library use:

```cpp
scd30.forceRecalibrationWithReference(800);
```

## Automatic Self-Calibration

Hey, automatic! That sounds great! Set and forget, right? Well, not so fast. The ASC feature has some requirements which should be considered to determine if it is suitable for any given end use application. If the conditions can not be met, then the FRC mentioned above should be used.

1. The SCD-30 should regularly be exposed to fresh air with CO2 concentration of 400 ppm.
2. The SCD-30 needs to operate in continuous mode, i.e. do not power it down.
3. The ASC needs 7 good readings separated by at least 18 hours (that's ~5 days).

See the PDF linked above for many more details. If you want to use ASC, enabling it is very simple. In **CircuitPython** use:

```python
scd30.self_calibration_enabled = True
```

or with the **Arduino** library use:

```cpp
scd30.selfCalibrationEnabled(true);
```

With either, simply use `False`/`false` to disable ASC.

## FRC vs. ASC

Both the Forced Re-Calibration (FRC) and Automatic Self-Calibration (ASC) are ways of arriving at the same "Reference Value" which is then used in determining the CO2 ppm reading reported by the SCD-30. With the FRC approach, the Reference Value is specified. With the ASC approach, the Reference Value is determined algorithmically. Either one will overwrite the Reference Value from the other one. For example, running a FRC will immediately change to the new Reference Value. However, if ASC is enabled, then it may replace the Reference Value at a later time.

# Adafruit SCD-30 - NDIR CO2 Temperature and Humidity Sensor

## Downloads

## Files:

- [SCD-30 Datasheet](https://sensirion.com/media/documents/4EAF6AF8/61652C3C/Sensirion_CO2_Sensors_SCD30_Datasheet.pdf)
- [SCD-30 Design-in Guidelines](https://sensirion.com/media/documents/84D49268/616536CB/Sensirion_CO2_Sensors_SCD30_Design-In_Guidelines_D1.pdf)
- [SCD-30 Interface Description](https://sensirion.com/media/documents/D7CEEF4A/6165372F/Sensirion_CO2_Sensors_SCD30_Interface_Description.pdf)
- [Fritzing object in the Adafruit Fritzing Library](https://github.com/adafruit/Fritzing-Library/blob/master/parts/Adafruit%20SCD30.fzpz)
- [EagleCAD PCB files on GitHub](https://github.com/adafruit/Adafruit-SCD-30-PCB)
- [3D models on GitHub](https://github.com/adafruit/Adafruit_CAD_Parts/tree/master/4867%20SCD-30%20C02%20Sensor)

# Schematic
![](https://cdn-learn.adafruit.com/assets/assets/000/098/472/medium800/adafruit_products_SCD30_sch.png?1609874872)

# Fab Print
![](https://cdn-learn.adafruit.com/assets/assets/000/098/473/medium800/adafruit_products_SCD30_fab_print.png?1609874881)


## Primary Products

### Adafruit SCD-30 - NDIR True CO2 Temperature and Humidity Sensor

[Adafruit SCD-30 - NDIR True CO2 Temperature and Humidity Sensor](https://www.adafruit.com/product/4867)
Take a deep breath in...now slowly breathe out. Mmm isn't it wonderful? All that air around us, which we bring into our lungs, extracts oxygen from and then breathes out carbon dioxide. CO2 is essential for life on this planet we call Earth - we and plants&nbsp;take turns using and...

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

## Related Guides

- [RGB Matrix Portal Room CO2 Monitor](https://learn.adafruit.com/matrix-portal-room-co2-monitor.md)
- [No-Code IoT Soil Sensor](https://learn.adafruit.com/soil-node.md)
- [AD8495 Analog Output K-Type Thermocouple Amplifier](https://learn.adafruit.com/ad8495-thermocouple-amplifier.md)
- [Adafruit pIRkey](https://learn.adafruit.com/adafruit-pirkey-python-programmable-infrared-usb-adapter.md)
- [Adafruit Mini I2C STEMMA QT Gamepad with seesaw](https://learn.adafruit.com/gamepad-qt.md)
- [Adafruit Wii Nunchuck Breakout Adapter](https://learn.adafruit.com/adafruit-wii-nunchuck-breakout-adapter.md)
- [Adafruit Feather 32u4 Bluefruit LE](https://learn.adafruit.com/adafruit-feather-32u4-bluefruit-le.md)
- [Getting Started with FLORA](https://learn.adafruit.com/getting-started-with-flora.md)
- [NXP Precision 9DoF Breakout](https://learn.adafruit.com/nxp-precision-9dof-breakout.md)
- [Adafruit SGP40 Air Quality Sensor](https://learn.adafruit.com/adafruit-sgp40.md)
- [Adafruit MOSFET Driver](https://learn.adafruit.com/adafruit-mosfet-driver.md)
- [ANO Directional Navigation and Scroll Wheel Rotary Encoder and Breakout](https://learn.adafruit.com/ano-rotary-encoder.md)
- [Adafruit CP2104 and CP2102N Friend - USB to Serial Converter](https://learn.adafruit.com/adafruit-cp2102n-cp2104-friend-usb-to-serial-converter.md)
- [Adafruit PiTFT - 2.8" Touchscreen Display for Raspberry Pi](https://learn.adafruit.com/adafruit-pitft-28-inch-resistive-touchscreen-display-raspberry-pi.md)
- [NES Emulator for Arcada](https://learn.adafruit.com/nes-emulator-for-arcada.md)
