Smart Environmental Monitoring System Using AHT20 & BMP280 Sensors with Carenuity C3-Mini and OLED Display via I2C
Monitoring environmental conditions like temperature, humidity, and atmospheric pressure is crucial for various applications, including weather forecasting, indoor climate control, and agricultural monitoring. In this project, we will create a smart environmental monitoring system using the Carenuity C3-Mini, AHT20, and BMP280 sensors, and a 0.96-inch OLED display. This system will display real-time temperature, humidity, and pressure data on the OLED screen.
Components Needed:- Carenuity C3-Mini: A powerful and versatile microcontroller suitable for IoT applications. Buy it
- AHT20&BMP280 Sensor: A digital sensor for measuring temperature, humidity, and barometric pressure.
- 0.96-inch OLED Display: A small display module for showing the sensor data.
- Connecting Wires: To connect the sensors and the display to the microcontroller.
- Breadboard: For prototyping the connections.
Ensure you have all the components listed above. The Carenuity C3-Mini will act as the brain of this project, interfacing with the sensors and the OLED display.
Step 2: Connect the Sensors and DisplayUsing the breadboard and connecting wires, make the following connections:
AHT20&BMP20 Sensor:- VCC to 3.3V
- GND to GND
- SDA to SDA (usually pin 8 on the C3-Mini)
- SCL to SCL (usually pin 10 on the C3-Mini)
- VCC to 3.3V
- GND to GND
- SDA to SDA (shared)
- SCL to SCL (shared)
Ensure you have the following libraries installed in your Arduino IDE:
BMP280_DEV
AHT20
Adafruit_SSD1306
Adafruit_GFX
You can install these libraries using the Library Manager in the Arduino IDE.
Here is the complete code for interfacing the AHT20&BMP280 sensor with the Carenuity C3-Mini and displaying the data on the OLED screen:
MwalaTimothy/AHT20_BMP280_C3-Mini_Oled-display (github.com)
Step 5: Upload and TestUpload the code to your Carenuity C3-Mini using the Arduino IDE.
Remember to select the correct board as Lolin C3-Mini and the correct port
Open the Serial Monitor to view the sensor readings. The OLED display should switch between displaying the AHT20 sensor data (temperature and humidity) and the BMP280 sensor data (temperature, pressure, and altitude) every 5 seconds.
With this project, you have successfully created a smart environmental monitoring system using the Carenuity C3-Mini, AHT20, and BMP280 sensors, and an OLED display. This system provides real-time environmental data, making it useful for various applications, including monitoring indoor air quality and environmental conditions.
Feel free to customize and expand this project to suit your specific needs. Happy hacking!
Don't hesitate to reach out for help, follow for more.
Comments
Please log in or sign up to comment.