CO2 sensor with light bar

CO2 sensor with light indicator scale Recently, CO2 sensors are of particular interest because they are also useful in preventing the spread of coronavirus. Since the virus is mainly transmitted by airborne droplets, it is important to ensure good ventilation in the room. A high CO2 concentration in a room indicates that it is time to ventilate the room.
This device uses an SCD30 sensor. The SCD30 is a non-dispersive * infrared (NDIR) sensor. The advantage of this sensor is that it only measures CO2, as opposed to chemical sensors, which are also sensitive to other gases.
The goal of this project was to use a minimum number of components while maintaining enhanced functionality. This device has the following functions:
-easy display of CO2 concentration using LED bar graphs -reading and recording CO2 concentration, relative humidity and temperature data via the Sensirion smartphone app.
* Non-dispersive infrared (NDIR) sensors are simple spectroscopic devices often used for gas analysis.
Tools and materials: -CO2 and RH/T SCD30 sensor;
-ESP32 NodeMCU;
-LED 10-segment module; -10 resistors 0805 from 300 Ohm to 1 kOhm;
-Printing board;
-3D printer; -4 bolts M2 x 20mm; Step one: PCB
The components of the device are mounted on a special printed circuit board developed in CAD. The diagram is shown below. The SCD30 sensor communicates with the ESP32 MCU via the I2C interface. Each segment of the LED bar graph is connected to the MCU's I/O pin through a resistor that limits the current and therefore the brightness of the LEDs. Initially, the master planned to use 150 ohms for all segments, but then increased the value because the segments were shining very brightly. In addition, he used different resistors for LEDs of different colors, since they have different voltages and also different in brightness.
As a result, the master used the following ratings:
blue: 680 Ohm
green: 1 kOhm < br> yellow/red: 330 ohms
PCB files can be found here.
CO2 sensor with light indication scale CO2 sensor with light indication scale CO2 sensor with light indication scale Step two : board mounting
With the exception of resistors, all components are mounted through holes. The LED module should be positioned at the front with the model designation on the side facing down. ESP32 and SCD30 are rear mounted. For SCD30 it is recommended to leave a small distance between the sensor and the board, which can be achieved by placing a coin between the sensor and the PCB as a spacer before soldering.
CO2 sensor with light bar  CO2 sensor with light indication scale Step three: body
The enclosure was designed using the Fusion360 software. The parts were then 3D printed.
Print files can be downloaded here.
CO2 sensor with light indication scale CO2 sensor with light indication scale CO2 sensor with light indication scale Step four: code
The code for uploading to ESP can be downloaded here. Before downloading the code, you need to install the Sensirion BLE and Seeed Studio SCD30 libraries.
The LED array shows the CO2 concentration based on the following parameters:
400 – 1000 ppm: blue/green LEDs (segments 1-5)
1000 – 1600 ppm: yellow LEDs (segments 6-8)
& gt; 1600 ppm: red LEDs (segments 9-10)
When all 10 segments are on, the LEDs will also flash.
If you want to use the data logging function, you also need to download the Sensirion MyAmbience app from the Google Play or Apple app store. When the user is near the sensor, you can connect to it in the application via Bluetooth. The app displays the current values ​​for CO2 concentration, relative humidity and temperature. You can also set the data logging interval. The data will be logged on the device and then can be downloaded to the smartphone.
The code also includes the SCD30 auto-calibration function, but for its operation the sensor needs 7 days of continuous readings and at least 1 hour a day outdoors.
[center ] CO2 sensor with light scale  CO2 sensor with light indication scale [/center


Show More

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button