Want to monitor your environment without the hassle of wiring? This project creates a smart environmental monitor using the Carenuity C3-Mini, AHT20 temperature and humidity sensor, and a 0.96-inch SSD1306 OLED display, all connected via a Carenuity Triple Adapter for plug-and-play simplicity. Sourced from Chipglobe Shop, these components make it easy to measure temperature, humidity, heat index, and dew point, displaying the results on a crisp OLED screen.
The Carenuity C3-Mini, powered by the ESP32-C3, offers Wi-Fi and Bluetooth LE for future IoT expansions, while the Triple Adapter ensures hassle-free connections.
This project is ideal for makers, educators, or anyone interested in monitoring indoor air quality, comfort, or environmental conditions in homes, offices, or greenhouses.
Project Highlights✅ Plug-and-play with the Carenuity Triple Adapter—no wiring required!✅ Accurate sensing with the AHT20 (±0.3°C, ±2% RH)✅ Real-time OLED display (128x64) with clear, formatted data✅ Calculates heat index & dew point for deeper environmental insights✅ Wi-Fi-ready for future cloud logging (Home Assistant, MQTT, etc.)
Hardware ComponentsAll components are available at Chipglobe Shop:
- Carenuity C3-Mini v2.2.1– Compact ESP32-C3-based IoT board with Wi-Fi, Bluetooth LE, and 4MB flash.
- Carenuity Triple Adapter– Plug-and-play connector for C3-Mini, AHT20, and OLED.
- AHT20 Temperature and Humidity Sensor – I2C sensor with ±0.3°C temperature and ±2% RH accuracy.
- SSD1306 0.96-inch OLED Display (128x64)– I2C display for clear data visualization.
- USB-C Cable– This is for powering and programming the C3-Mini.
All components are available at Chipglobe Shop.
Software
- Arduino IDE – For programming the C3-Mini.
- Libraries:✅AHT20.h (Adafruit AHTX0) – For AHT20 sensor communication.✅Adafruit_GFX.h – Graphics library for the OLED.✅Adafruit_SSD1306.h – Driver for the SSD1306 display.✅Wire.h – For I2C communication (included with Arduino IDE).✅Fonts/FreeSans9pt7b.h – Custom font for readable OLED text (included with Adafruit_GFX).
............................................................................................................................................................
Environmental monitoring is essential for comfort, health, and efficiency. Temperature and humidity affect how we feel, while heat index indicates perceived warmth, and dew point signals condensation risks. This project was inspired by the need for a simple, no-fuss device to track these metrics in real time.
The Carenuity C3-Mini and Triple Adapter from Chipglobe Shop made it possible to create a plug-and-play solution, perfect for beginners and pros alike.
The result is a compact, user-friendly monitor that displays four key metrics on a clear OLED screen, ideal for smart homes, classrooms, or IoT experiments. With the C3-Mini’s Wi-Fi capabilities, you could extend this project to cloud-based monitoring!
----------Importance of Environmental Monitoring Parameters----------------
Understanding the metrics measured by this project is crucial for environmental monitoring:
Temperature: Affects human comfort, equipment performance, and energy efficiency. Ideal indoor temperatures range from 20–25°C.
Humidity: Influences air quality and comfort. High humidity (>60%) can promote mold growth, while low humidity (<30%) causes dryness. Optimal range: 40–60% RH.
Heat Index: Combines temperature and humidity to estimate how hot it feels. A heat index above 25°C may cause discomfort, and values above 32°C increase heat stress risks. Monitoring helps prevent heat-related health issues, especially in warm climates or unventilated spaces.
Dew Point: The temperature at which air becomes saturated, leading to condensation. A high dew point (close to the actual temperature) indicates muggy conditions, while a low dew point feels crisp. It’s critical for HVAC systems, greenhouses, and preventing moisture damage.
These parameters provide actionable insights for optimizing indoor environments, improving health, and enhancing energy efficiency.
Schematics
The Carenuity Triple Adapter simplifies connections by allowing you to plug the C3-Mini, AHT20, and SSD1306 OLED directly into its ports, no wiring or soldering needed.
- Carenuity C3-Mini: Plugs into the Triple Adapter’s microcontroller slot.
- AHT20 Sensor: Connects to the Triple Adapter’s sensor port (I2C: SDA on GPIO4, SCL on GPIO5).
- SSD1306 OLED: Connects to the Triple Adapter’s display port (I2C, same bus as AHT20).
- Power: USB-C cable connected to the C3-Mini powers the entire setup.
Notes:
The Triple Adapter handles I2C communication (AHT20 at 0x38, SSD1306 at 0x3C). Verify addresses if issues arise.
Ensure all components are securely plugged into the Triple Adapter’s ports.
Code Explanation
The code runs on the Carenuity C3-Mini, reading temperature and humidity from the AHT20, calculating heat index and dew point, and displaying all four metrics on the SSD1306 OLED every 5 seconds. It also prints data to the Serial Monitor for debugging.
The code is tailored for the Carenuity C3-Mini, leveraging the AHT20 sensor and SSD1306 OLED.
- Initialization:Configures I2C on GPIO4 (SDA) and GPIO5 (SCL) for the C3-Mini.Initializes the OLED (address 0x3C) and AHT20.Halts if either device fails to initialize, printing errors to Serial.
- Main Loop:Reads temperature and humidity every 5 seconds.Calculates heat index and dew point if readings are valid (non-NaN).Updates the OLED with all four metrics and prints data to Serial.
Dew Point Calculation:
cpp
float calculateDewPoint(float tempC, float humidity) {
const float a = 17.625;
const float b = 243.04;
float alpha = (a * tempC) / (b + tempC) + log(humidity / 100.0);
return (b * alpha) / (a - alpha);
}
Uses the Magnus-Tetens approximation to compute the dew point (°C), indicating the temperature at which condensation begins. It relies “‘AHT20 Sensor Monitor’ with Dew Point and Heat Index Calculations” on temperature (tempC) and relative humidity (humidity).
Heat Index Calculation:
cpp
float calculateHeatIndex(float tempC, float humidity) {
float tempF = (tempC * 9.0 / 5.0) + 32.0;
float hiF;
if (tempF >= 80.0 && humidity >= 40.0) {
hiF = -42.379 + 2.04901523 * tempF + 10.14333127 * humidity
- 0.22475541 * tempF * humidity - 0.00683783 * tempF * tempF
- 0.05481717 * humidity * humidity + 0.00122874 * tempF * tempF * humidity
+ 0.00085282 * tempF * humidity * humidity - 0.00000199 * tempF * tempF * humidity * humidity;
} else {
hiF = tempF;
}
return (hiF - 32.0) * 5.0 / 9.0;
}
Implements the U.S. National Weather Service formula, converting temperature to °F for calculation and back to °C. Returns the perceived temperature, approximating actual temperature if outside valid conditions (T ≥ 26.7°C, RH ≥ 40%).
Display:
Uses FreeSans9pt7b font to show temperature, humidity, heat index, and dew point at 1 decimal place, fitting the 128x64 OLED.
Updates every 5 seconds for real-time monitoring.
Instructions
Step 1: Purchase Components
Order the following from Chipglobe Shop:
- Carenuity C3-Mini v2.2.1
- Carenuity Triple Adapter
- AHT20 sensor
Note: You receive a piggyback PCB once you order these components on Chipglobe shop.
- SSD1306 0.96-inch OLED (128x64)
- USB-C cable
Step 2: Install Software
Download the Arduino IDE.
- Download the Arduino IDE.
Add ESP32 board support:
Go to File > Preferences, add https://raw.githubusercontent.com/espressif/arduino-esp32/master/package/package_esp32_index.json to Additional Boards Manager URLs.
In Tools > Board > Boards Manager, search for “esp32” and install “esp32 by Espressif Systems.”
- Install libraries via Library Manager (Sketch > Include Library > Manage Libraries):Adafruit AHTX0Adafruit GFX LibraryAdafruit SSD1306
Restart the Arduino IDE.
Step 3: Upload the Code
Copy the code into the Arduino IDE.
- Connect the device to your Computer using the Data cable.
- Select the board: Tools > Board > ESP32 Arduino > Lolin C3 Mini.
- Select the port (Tools > Port).
- Upload the code (Sketch > Upload).
- Open the Serial Monitor (Tools > Serial Monitor, 115200 baud) to check initialization.
Note: To flash the C3-Mini, hold the BOOT button, press and release the RST button, then start uploading while holding BOOT. Release BOOT once uploading begins.
Step 4: Test the Monitor
Serial Monitor: Verify “AHT20 acknowledged” and data like:
Temperature: 25.50 C Humidity: 60.00 % RH Heat Index: 26.80 C Dew Point: 18.20 C
OLED Display: Confirm all four metrics (Temp, Hum, HI, Dew) update every 5 seconds. (Insert a photo of the OLED displaying data.)
............................................Customizations...................................
- Smaller Font: Use FreeSans6pt7b to add a “C3-Mini Monitor” title.
- Wi-Fi Integration: Leverage the C3-Mini’s Wi-Fi to send data to Home Assistant or Carenuity’s cloud.
- Data Logging: Add a microSD shield to store readings.
- Visual Alerts: Add a buzzer for high heat index or humidity warnings.
....................................................................................................................................
Conclusion
You’ve created a plug-and-play environmental monitor with the Carenuity C3-Mini, AHT20, and OLED, powered by the Triple Adapter from Chipglobe Shop. This device tracks temperature, humidity, heat index, and dew point, displaying real-time data on a clear OLED screen. Use it to optimize comfort, monitor air quality, or explore IoT applications!
🔹 Get the components at Chipglobe Shop!🔹 Explore 3D enclosures: Carenuity Thingiverse
Happy building! 🚀
Comments