Skip to content

Temperature Humidity Controller Using Arduino

Temperature Humidity Controller Using Arduino

This temperature humidity controller using Arduino is designed for electronics enthusiasts who want precise control in DIY projects. The temperature humidity controller using Arduino can automatically switch devices like fans, coolers, and humidifiers. With the temperature humidity controller using Arduino, you can maintain stable environmental conditions. This guide explains the working of the temperature humidity controller using Arduino step by step.

Learn how to build your own temperature humidity controller using Arduino for labs, greenhouses, and DIY electronics. The temperature humidity controller using Arduino offers reliability, simplicity, and low cost. Anyone interested in electronics can create this project. Explore the working and setup of the temperature humidity controller using Arduino in detail. Build your temperature humidity controller using Arduino with ease and improve your projects.


Introduction

Maintaining a stable environment is essential for several applications, such as greenhouses, laboratories, storage areas, and even small-scale automation projects. To achieve this, we can build a temperature humidity controller using Arduino.

This project reads real-time temperature and humidity values from a DHT11 sensor and automatically turns connected devices (like fans or humidifiers) on or off through relay modules. The design is simple, low-cost, and very effective for beginners as well as advanced electronics enthusiasts.

In this article, we’ll explore the components required, circuit diagram, step-by-step building guide, and practical uses of this project.


 Materials for the Project

ComponentQuantityDescriptionBuy Link
Arduino Nano1Main microcontroller boardBuy Here
DHT11 Sensor1Temperature & humidity sensorBuy Here
16×2 LCD with I2C Module1Display moduleBuy Here
Relay Module (5V)2To control AC devicesBuy Here
BC547 Transistors2For relay drivingBuy Here
1N4148 Diodes2Flyback diode protectionBuy Here
Resistors (1kΩ)2For transistor baseBuy Here
Push Buttons3For manual control/settingsBuy Here
Two-Pin Terminal Blocks2For relay output connectionsBuy Here
Breadboard / PCB1For circuit assemblyBuy Here
Jumper WiresAs requiredFor circuit connectionsBuy Here
5V Power Supply1To power ArduinoBuy Here

Useful Tools 

ToolQuantityPurpose / NotesClick & Buy
Soldering Iron Kit1For making permanent connectionsClick & Buy
Solder Wire (60/40, 0.8mm)1Electrical solderingClick & Buy
Wire Stripper & Cutter1Stripping jumper wiresClick & Buy
Mini Screwdriver Set1For module and relay terminal screwsClick & Buy
Multimeter1Testing voltages and continuityClick & Buy
Hot Glue Gun (optional)1Securing components in placeClick & Buy
Small Pliers1Holding and bending wiresClick & Buy
Heat Shrink Tubing Set1Insulating exposed wiresClick & Buy

Circuit Diagram Explanation

The circuit of the temperature humidity controller using Arduino consists of several sections:

  1. Arduino Nano (Main Control Unit):

    • Reads temperature and humidity data from the DHT11 sensor.

    • Sends display values to the 16×2 LCD via I2C.

    • Controls relays through BC547 transistors.

  2. DHT11 Sensor:

    • VCC → 5V of Arduino

    • GND → GND of Arduino

    • Data pin → D2 of Arduino

  3. Relay Control Section:

    • Each relay is driven by a BC547 transistor.

    • Arduino digital pins D3 and D4 send signals to control the transistors.

    • 1kΩ resistors are used between Arduino pins and transistor bases.

    • 1N4148 diodes are used across relay coils to protect from back EMF.

    • The relays’ output terminals are connected to appliances (fan, humidifier, heater).

  4. Push Buttons:

    • Three push buttons are connected to D5, D6, and D7 with pull-down to GND.

    • They are used for setting parameters (like threshold temperature and humidity) or manual overrides.

  5. 16×2 LCD (with I2C):

    • VCC → 5V of Arduino

    • GND → GND

    • SDA → A4 of Arduino

    • SCL → A5 of Arduino

    • Displays real-time temperature, humidity, and system status.

This ensures that the Arduino reads sensor values, compares them with set thresholds, and switches relays accordingly.

Download Circuit Diagram

Temperature Humidity Controller Using Arduino Circuit Diagram
9/24/2025

Step-by-Step Guide to Build the Project

Step 1: Connect the Arduino

  • Start by placing the Arduino Nano on a breadboard or project setup area.

  • Power it with a 5V regulated power supply.

Step 2: Connect the DHT11 Sensor

  • Connect 5V pin to the Arduino VCC pin.

  • Connect GND to Arduino ground.

  • Connect the output pin of the DHT11 to pin D2 of Arduino.

Step 3: Build Relay Driver Circuits

  • Take a BC547 transistor and connect its emitter to ground.

  • Connect a 1kΩ resistor between Arduino pin D3 and the transistor’s base.

  • Connect the relay coil between the collector of the transistor and Arduino 5V.

  • Place a 1N4148 diode across the relay coil (cathode to 5V, anode to collector).

  • Repeat the same for the second relay with Arduino pin D4.

Step 4: Add Terminal Blocks for Appliance Connections

  • Connect the relay common (COM) and normally open (NO) terminals to a two-pin terminal block.

  • This allows easy connection of external devices like fans, heaters, or humidifiers.

Step 5: Connect Push Buttons

  • Connect three push buttons for user interaction.

  • First button → D5, second → D6, third → D7 (other side to GND).

  • These can be used for setting thresholds or manual switching.

Step 6: Connect the LCD Module

  • Connect LCD VCC → Arduino 5V.

  • LCD GND → Arduino GND.

  • LCD SDA → Arduino A4.

  • LCD SCL → Arduino A5.

  • This will display the sensor readings and system status.

Step 7: Final Assembly

  • Recheck all connections carefully.

  • Connect the Arduino to your computer or external power.

  • Upload the required sketch (Arduino code).

  • Power ON and observe the LCD showing live temperature and humidity.

  • The relays will switch ON/OFF depending on the threshold values set.

Arduino Code      


How It Works

  • The DHT11 sensor continuously measures the room temperature and humidity.

  • Arduino processes this data and compares it with predefined threshold values.

  • If the temperature exceeds the set value, the Arduino activates the relay connected to a fan or cooler.

  • If the humidity drops below the set value, another relay can activate a humidifier.

  • The LCD module provides live feedback, showing current readings and relay status.

  • The push buttons allow manual control or adjustment of thresholds (depending on the code).


Practical Applications

The temperature humidity controller using Arduino can be used in various fields:

  • Greenhouses  Maintain the right climate for plants.

  • Industrial storage  Protect sensitive equipment from humidity damage.

  • Laboratories  Ensure stable temperature and humidity for experiments.

  • Home automation Automatically switch fans, humidifiers, or heaters.

  • Warehouses  Preserve goods by preventing excessive moisture or dryness.


FAQs

1. What is the purpose of this project?

The project is designed to monitor and control temperature and humidity levels automatically using Arduino, DHT11 sensor, and relays.

2. Can I use another sensor instead of DHT11?

Yes, you can use DHT22 for higher accuracy or SHT31 for professional applications.

3. Is Arduino Nano necessary?

Not strictly. You can use Arduino Nano, Mega, or even ESP32 for Wi-Fi-enabled control.

4. How many devices can I control with this project?

This project is designed for two devices (fan and humidifier), but you can extend it with more relays.

5. Can I power the relays directly from Arduino?

Small relay modules can run on Arduino’s 5V, but for reliability, use an external regulated 5V supply.

6. Can I display data on my phone?

Yes, by using an ESP8266 or ESP32 instead of Arduino Nano, you can send data to mobile apps or cloud platforms.

7. Is this project safe for AC appliances?

Yes, but make sure you use relays rated for your AC load and insulate connections properly.


Conclusion

The temperature humidity controller using Arduino is a highly practical project for anyone looking to automate climate control in small environments. It combines sensors, relays, and Arduino programming to create a reliable system that can manage fans, coolers, or humidifiers based on real-time conditions.

This DIY project is affordable, easy to build, and can be extended with IoT for remote monitoring. Whether for home, labs, or industrial applications, this controller provides a solid foundation for automation enthusiasts.

Leave a Reply

Your email address will not be published. Required fields are marked *