|
|
RP2040 ZeroWaveshare
|
x 1 | |
|
|
SHT31-D |
x 1 | |
|
|
SGP30 |
x 1 | |
|
|
SSD1306 OLED |
x 1 |
|
fritzing |
|
|
|
FreeCADFree Software Foundation, Inc.
|
Air Quality Monitor (for CO2, TVOC, Temperature and Humidity) With RP2040
Idea
I used RP2040-Zero micro-controller to gather data from
- SHT31 humidity and temperature sensor
- SGP30 air quality sensor (CO2 and TVOC)
The results are shown on SSD1306 oled screen.
You can download all the code from my Github
Supplies
- RP2040-Zero
This is a mini version of RP Pico. It fits small project better because you don't need to use all the GPIO anyway. You will have a compact design using this. More important is the price, this one is cheaper that the original Pico.
- SGP30
This is Multi-gas (VOC and CO₂eq) sensor.
- SHT31
This Humidity and Temperature sensor is popular thanks to the accuracy and repeatablity. It is much better than DHT11 or DHT22 which are usually come with beginner kit.
- Oled Screen SSD1306
In this versio I used the 2-colors yellow and blue, you should update the address of the screen in the ssd1306.py (line 105) to 0x3D instead of 0x3C
You will need some tool and material for soldering
- Wires and female headers for the circuit.
- Soldering iron
- Cutter
Circuit

There are two I2C buses in the RP2040. According to my test, the SGP30 works well with the I2C1 so the other I2C0 can be used to connect the SHT31 and the oled screen.
It is not a complicated circuit so I decided the soldering it with prototype board. You can have a look at the temporary design there. If you would like to redesign, I recommend to put the two sensors as far as possible to each other. The SGP30 will be heated when it works and that could have affect on the SHT31.
Code
In the python code, you will need to add the libraries for the sensors we used as well as the oled screen (lines 17,18, 19)

Then we have to assign the I2C buses to those components. As I said before, SGP30 only works well with the I2C1 (lines 36, 39) so the I2C0 will be used for both SHT31 and the SSD1306 oled screen (lines 29, 32, 33)
The measured data can be acquired using the build-in functions of the imported libraries (lines 81, 82)

You can use any program to add the code on RP2040-Zero (I used Thorny)
Case
I designed a case for this device. I planned to add magnet so I can mount it where I need it. This step is optional if you don't have access to 3D printers. In case you do, it will need spacers and some M2 screws to attach them together.

For your information, the case may increase the temparature of the SHT31 and you will have 1, 2 degrees higher and the surrouding environment. You can check on my video for more details.
Happy making!
Air Quality Monitor (for CO2, TVOC, Temperature and Humidity) With RP2040
*PCBWay community is a sharing platform. We are not responsible for any design issues and parameter issues (board thickness, surface finish, etc.) you choose.
Raspberry Pi 5 7 Inch Touch Screen IPS 1024x600 HD LCD HDMI-compatible Display for RPI 4B 3B+ OPI 5 AIDA64 PC Secondary Screen(Without Speaker)
BUY NOW- Comments(0)
- Likes(1)
-
Engineer
Feb 14,2025
- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by gubutek :)
-
Air Quality Monitor (for CO2, TVOC, Temperature and Humidity) With RP2040
IdeaI used RP2040-Zero micro-controller to gather data fromSHT31 humidity and temperature sensorSGP3...
-
ESP32 S2 mini developed board for IoT
ESP32 S2 Mini Wemos expansion boardThis is a breakout board for the ESP32 S2 mini of Wemos. The orig...
-
Tiny Game Console with Raspberry Pi Zero
This is the DIY pocket-sized game console that you can take with you anywhere you go. It is cheap an...
-
Christmas decoration: A winter village inside a rotatable Xmas tree
In this project you will build a lamp in the shape of a Christmas tree. The inside of the tree is a ...
-
-
ARPS-2 – Arduino-Compatible Robot Project Shield for Arduino UNO
1533 0 5 -
-
A Compact Charging Breakout Board For Waveshare ESP32-C3
2043 3 7 -
AI-driven LoRa & LLM-enabled Kiosk & Food Delivery System
2079 2 0 -
-
-
-
ESP32-C3 BLE Keyboard - Battery Powered with USB-C Charging
2238 0 1 -







