Temperature & Humidity Sensor With DHT11 Sensor and OLED Display
by gurnoork in Circuits > Arduino
66 Views, 1 Favorites, 0 Comments
Temperature & Humidity Sensor With DHT11 Sensor and OLED Display
This project showcases the steps to build a temperature and humidity monitoring system using a DHT sensor, Arduino Uno, and an OLED display. It displays temperature in Celsius and Fahrenheit as well as the humidity percentage. Additionally, an LED is connected to the circuit which turns on when the humidity is below or equal to a certain percentage and turns off when it is above or equal to another percentage number. Practically, this LED plays the role of an automated sprinkler system for irrigation, which turns on when the humidity is too low and turns off when the soil is well moist.
Downloads
Supplies
Arduino Uno
Breadboard
DHT sensor
OLED (128x64)
LED
Resistor (220 Ω)
Wires
Assemble the Circuit
- Connect the DHT11 Sensor:
- Connect the VCC pin to the 5V pin on the Arduino.
- Connect the GND pin to the GND pin on the Arduino.
- Connect the middle pin to digital pin7 on the Arduino.
- Connect the OLED:
- Connect SDA to SDA on the Arduino..
- Connect SCL to SCL on the Arduino.
- Connect the respective VCC & GND pins to the 5V & GND pins on the Arduino.
- Connect the LED:
- Attach one leg of the LED to a 220KΩ resistor and connect the resistor to pin 9.
- Connect the other leg of the LED to GND.
Upload the Code
Install the following libraries in Arduino IDE:
- Adafruit_Sensor
- Adafruit_GFX
- Adafruit_SSD1306
- DHT
Write or paste the code into the Arduino IDE.
Code -
Test the Device
Test the setup with different humidity conditions and adjust thresholds for LED activation if needed.