VOCs (Volatile Organic Compounds) are responsible for the odor of scents, perfumes, and contaminants. Anthropogenic VOCs are legally restricted, particularly indoors, where concentrations are highest. Though most VOCs are not acutely hazardous, some of them may be harmful to human health or the environment and thereby cause long-term health consequences.
Main sources of volatile organic compounds:
Outdoor: mainly from the industrial waste gas, automobile exhaust gas, and photochemical pollution generated by fuel combustion and transportation;
Indoor: mainly comes from burning products such as coal and natural gas, smoking, heating and cooking, building and decoration materials, furniture, household appliances, cleaners, and emissions from the human body. In the interior decoration process, volatile organic compounds mainly come from paint, coat, and adhesives.
As a result, it is essential to detect and monitor the VOC concentration in the house to maintain a safe living environment. By utilizing the Seeed Studio Wio Terminal and the Grove - VOC and eCO2 Gas Sensor (SGP30) to build a simple VOC detecting device, and connecting with Microsoft Azure IoT Central as the data management platform, we could build a simple indoor VOC detection and alarm system on our own.
This project requires no code.
Microsoft Azure IoT Central Set UpMicrosoft Azure IoT Central is a fully managed global IoT SaaS (software as a service) solution that makes it easy to connect, monitor, and manage your IoT assets at scale. It offers centralized management to reconfigure and update your devices.
To get started, you need to go to Microsoft Azure IoT Central, sign in using your Microsoft account or register a new account, and then build a new application for your project.
1. Create a New Application in Azure IoT Central
After you sign in, click Build from the navigation menu, and click Create app.
Fill in the Application name and choose your pricing plan. The application URL will be created automatically when you fill in the application name.
2. Create a Device Template
After the application is made, you can start generating the device template for the device you’re going to integrate with IoT Central. Click the “+New” button above the page and follows the procedure: Create new device template -> Select the “Wio Terminal” -> Next: Review -> Create. When you finish, you can see the template you’ve just made as “Seeed Wio Terminal”.
3. Create a New Device
Click on Devices -> Seeed Wio Terminal -> +New. Edit the Device Name, and Device ID based on your preference, and then click Create.
Once created the device, you can see that the device we have just created is shown under the device list. Tap into the device name and click on the Connect button at the top. You shall see the ID scope, Device ID, and Primary Key on this page. These three factors are essential for the device to connect with IoT Central, we need to record them for later use.
Prepare the hardware: Wio terminal and the Grove - VOC and eCO2 Gas Sensor (SGP30). Make sure the sensor is connected to the right port below the Wio Terminal.
SenseCraft is an open-source software platform to build smart sensors with no-code experience. It is compatible with Wio Terminal and the firmware released can support integration with Azure IoT Central in an easy way.
Under the Latest Release, click on “SenseCraft-vx.x.uf2” to download the .uf2 file, which is the firmware we are about to use.
Then we shall upload the file we just downloaded to the Wio Terminal. Connect the Wio Terminal to the PC and turn it on, Enter Bootloader Mode by sliding down the power switch further away from the "ON" position, release, slide again and release.
Open File Explorer on the PC and we will see a new external drive, named Arduino, drag the.uf2 file into this Arduino drive and this finishes the firmware uploading.
After the firmware is loaded, a USB stick appears as soon as the Wio Terminal is connected to the computer. At this point, there will be a config.txt file inside the USB stick. Please open it and add the required configuration to it. Save the file and restart the Wio Terminal.
Please note that we are going to connect the IoT Central through WiFi, so SSID refers to the WiFi name and PASSWORD refers to the WiFi password.
When everything above is finished, the set-up procedure is considered done.
Visualize Sensor Data on the IoT CentralOnce the Wio Terminal is restarted, the SenseCraft firmware is loaded. We need to press the third button on the top of the Wio Terminal to switch to the “Uplink” function.
After choosing the “WiFi” configuration method, the device will start connecting to the local WiFi you configured in the config.txt file. If the connection is successful, the screen will show as follows:
Now we are close. Next thing to do is to parse the data on IoT Central.
Click on the device template we created and modify the template. We need to set up the display name and other parameters to adapt the data type of SenseCraft and achieve a suitable data presentation. For VOC and CO2, just fill in as below. Once finished, click save.
To enable the data diagram, we need to modify the overview as well. Click Overview-> Start with devices -> Select a telemetry. Choose the VOC and then click Add tile. In this way, the data collected by the sensor, which is the VOC concentration can be displayed as a diagram. Click Save and Back, and click Publish to assign this template to the device we created.
Head back to Device, and click through the device name we created, then we are able to see the visualized data. We can also view the raw data to see all the telemetry data.
To enable ourselves to be noted of the VOCs concentration in our home or any indoor environment, we can create a rule on IoT Central to specify a numerical threshold and make an exception prompt to our cellphones or any end devices.
Click the Rule on the left menu and set up the threshold based on your need.
Then define the action needed to take whenever the data has reached the threshold. Here I used email for receiving alarms. In the end, the email alert could be sent to the mailbox we appointed.
This is the end of setting up a simple indoor VOCs detection and alarm system. Hope it could be found useful in your daily life.
Comments