SCD30 CO2 driver

Introduction

The SCD 30 CO2 driver is used to detect the CO2 levels in PPM (parts per million) of the sensor’s surroundings. The SCD 30 can also detect changes in temperature and humidity. To measure CO2 concentrations the SCD30 employs the use of NDIR measurement technology, and can detect concentrations between 0 and 40,000 ppm with ±(30ppm + 3%) accuracy in the 400 to 10,000ppm range. The SCD30 measures humidity via a variably resistant moisture absorbing substrate. The SCD30 can also measure temperature through the use of a thermistor. Humidity, temperature, and CO2 measurements can be taken in tandem with each other. The SCD30 uses the I2C protocol to send data to the builder base.


Driver Parameters

The SCD30 CO2 driver has two parameters that need to be configured:

I2C Address

This is the address the device is being referenced by on the I2C bus. The SCD30 has only one possible address which is 0x61.

Resolution(PPM)

The resolution determines how big of a change needs to occur for the Builder Base to notify the Central Core. This range goes from 100 PPM (Parts Per Million) to 10000 PPM with the default value being 1000 PPM. For example, if the last value read was 1500ppm and 500ppm is selected for the resolution, the builder base will not notify the central core unless the new value change has exceeded ±500. So either at a reading of <1000 or >2000.


Wiring

The pinout for the SCD30 can be found below:

Example

The GND and Power pins on the SCD30 are connected to the GND and 3.3V pins on the Builder Base. The SCL and SDA pins on the SCD30 are then connected respectively to the SCL and SDA pins found on the Builder Base.

Breadboard

Schematic

Used Pins

Used Pins

Description

Used Pins

Description

 3V3

The voltage level for the assembly

GND

The ground potential for the assembly

SDA

The I2C Data Line

SCL

The I2C Clock Line


How to write an App

Navigate to the App Builder and create a new application. You can find the “CO2” code object under the “Hardware” Tab in the object drop down menu on the left, or you can also use the search bar.

 

 

 

Drag the “CO2” Object onto the canvas.

 

 

 

Next, locate the “Text” Object under the Interface tab and drag it onto the canvas.

 

 

 

 

Finally, connect the “State” port from the CO2 Object block to the “In” port on the text block and save your application.


How to create a firmware

Navigate to the Firmware Builder and create a new firmware file.

Click the “+ Add Hardware” button which will open a modal window. Scroll down in the list to find the “sensor” section and select “CO2”.

Give your device a name, and click “Add Device”

 

 

 

Next, select the “SCD30” driver under the driver dropdown menu.

For this example we select:

  • I2C: 0x61

  • Resolution: 1000

 

 

 

 

You may now save your firmware file and upload it to one of your clients.

 

 

 


Supported Hardware

  • SCD30


Downloads

Apps

Firmware

 

Assets