TempUino a Temperature/Humidity Controller Arduino Based




Introduction: TempUino a Temperature/Humidity Controller Arduino Based

This is a very simple project to build a temperature humidity controller with 2 relays to control a hot source and a humidifier. In this project i used an Arduino Uno and a DHT11 sensor combined with a lcd, potentiometer, button and relays. The button used have only the function to turn on the backlight of lcd while pressing it.

The potentiometer, regolate the setting of temperature (in Celsius degrees) and humidity (in percentage) from 0 to 99.

When the temperature or humidity reaches the set value the associated relay close the contact and turn off the associated device.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: The Supplies

To make this project we need:

- 1x Arduino Uno rev3

- 1x DHT11 sensor

- 1x LCD 16x2

- 2x 2.2KOhm Resistor

- 1x 10KOhm Resistor

- 2x 22pF Ceramic Condensator

- 1x 220uF Electrolitic Condensator
- 2x 100nF Poliester Condensator

- 1x 47uF Electrolitic Condensator

- 2x BC337 Transistor

- 3x 1N4007 Diode

- 1x 16Mhz Oscillator

- 3x 10KOhm Potentiometer

- 1x TL7805C Voltage Regolator

- 2x G5V2 Omron or Axicom Relay

-2x 3 PIN Terminal blocks

-1x 2 PIN Terminal blocks

- 2x 3 PinHead

- 1x Panel Switch

- 1x Panel momentary Button or PCB momentary Button

- 1x 100x75 mm Copper Clad Board Single Layer for PCB

- 1x A4 Glossy paper sheet

- Laser Printer

- Ferric Chloride

- 1x Plywood sheet 420x210x4mm Or a 3D Printer for the box

- Hot glue

- Wire

- Solder Iron

- Acrylic Trasparent (or your favourite color) spray paint

- 4x M4x20mm Bolt with nut

- 2x M4x15mm Bolt with nut

Step 2: The Code

Let's star from the code.

This is the simple code i used in this project.

You need the specific library of the sensor to use with Arduino. In my case i used those librarys from adafruit:

Adafruit Sensor Library

DHT Sensor Libray

#include <DHT.h>
#include <LyquidCrystal.h>
#define DHTPIN 8 // 8 Pin sensor
#define DHTTYPE DHT11 // dht11 type of sensor used
// initialize the library by associating any needed LCD interface pin
// with the arduino pin number it is connected to
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
const int tempP = A2;
const int umidP = A3;
const int releT = A0;
const int releU = A1;
// costant
int PMin = 0;
int PMax = 1023;
int statotsu = 0;
int statotgiu = 0;
int statohsu = 0;
int statohgiu = 0;
int tempimpostata = 0;
int umidimpostata = 0;void setup() {
//LCD initialize
  lcd.begin(16, 2);
  lcd.setCursor(9, 0);
  lcd.setCursor(1, 1);
  lcd.setCursor(10, 1);
//Out Pin
  pinMode(releT, OUTPUT);
  pinMode(releU, OUTPUT);
void loop() {
  statotsu = analogRead (tempP); //Read potentiometer value
  tempimpostata = map(statotsu, PMin, PMax, 0, 99); //Set the value from 0 to 99 based on potentiometer value
  statohsu = analogRead (umidP);//Read potentiometer value
  umidimpostata = map(statohsu, PMin, PMax, 0, 99);//Set the value from 0 to 99 based on potentiometer value
  int t = dht.readTemperature() - 2; //read and adjust the temperature value in Celsius from sensor
  int h = dht.readHumidity(); //read the humidity from sensor
  //Print the temperature value on the LCD
  lcd.setCursor(5, 0);
  //Print the temperature value setted by potentiometer
  lcd.setCursor(5, 1);
  if (tempimpostata < 10) {
  } else {
  //Print the humidity value on the LCD
  lcd.setCursor(14, 0);
  //Print the humidity value setted by potentiometer
  lcd.setCursor(14, 1);
  if (umidimpostata < 10) {
  } else {
  //Turn On or Off the Temperature Relay
  if ( t < tempimpostata ) {
    digitalWrite ( releT, HIGH );
  } else {
    digitalWrite (releT, LOW);
  //Turn On or Off the Humidity Relay
  if ( h < umidimpostata ) {
    digitalWrite ( releU, HIGH );
  } else {
    digitalWrite (releU, LOW);

Step 3: The PCB

It's time to make the pcb.

First we need a circuit draw.

I made with Eagle and retouched with Illustrator

Next step is to make the pcb.

I used the toner transfer method to make a pcb. You can find a lot of this metod here

With this metod you don't need a UV Lamp and a photoresist. This metod it's simple and fast and i have good results with a not very thin lines.

Step 4: The Box

I designed the box with SolidWorks and printed the shape to cut and assemble.

I transfered the shape to the playwood, cut it and glued.

Next I painted the various parts in black and printed the front panel

here the pdf for plywood cut and for the 3D printer

Step 5: The Circuit Assembly

Now we can solder the componet to the pcb and place in to the box.

This is the fun part for me.

At the and of soldering. i Spryed the back souface of the pcb with the acrylic trasparent paint to protect the circuit from the oxidation, next i glued the pcb on the back panel

Step 6: Boxing and Testing

When i finished to soldering and positioning the component, I've closed the box and tuned on using a 12V DC 1A power supply.

Now let's connect the hot source and the humidifier, set the value of temperature (in celsius degrees) and Humidity (in percentage) and go.

Be the First to Share


    • Backyard Contest

      Backyard Contest
    • Silly Hats Speed Challenge

      Silly Hats Speed Challenge
    • Finish It Already Speed Challenge

      Finish It Already Speed Challenge

    4 Discussions


    6 weeks ago

    Good project sir. How much can you quote as a price for a client who needs a similar product?


    Reply 6 weeks ago

    Hi, do you want to know the cost of all the components used or the cost of the finished project?


    2 years ago

    I'd love to put something like that in our greenhouse :)


    Reply 2 years ago

    This project it's simple. You can try and put everything in a plastic case IP67 so you have a waterproof case ;)