Head office, Rana Pratap Bagh, Delhi011 2721 1512+91 97116 99511

Science project idea

Room comfort meter with DHT11 and an OLED display

A DHT11 measures temperature and relative humidity, an Arduino calculates a heat index, and a small OLED screen shows the readings with a comfort message. The project shows how a digital sensor sends numbers over one wire.

What it shows

A DHT11 measures temperature and relative humidity, an Arduino calculates a heat index, and a small OLED screen shows the readings with a comfort message. The project shows how a digital sensor sends numbers over one wire.

The science

The DHT11 has a capacitive humidity element and a thermistor, with a tiny chip that converts both to numbers and sends them as a timed train of pulses on one data line. The Arduino library decodes the pulses. The heat index formula combines temperature and humidity to estimate how hot the air feels, because sweat evaporates slowly in humid air. The OLED uses the I2C bus (SDA on A4, SCL on A5 on an Uno), so only two wires carry all the drawing commands.

Materials

Cost: under Rs 500. Many items come from home or from waste; spare parts such as LEDs, motors and wire are in the store.

  • An Arduino Nano or Uno clone and USB cable
  • A DHT11 temperature and humidity module
  • A 0.96 inch I2C OLED display (SSD1306)
  • Jumper wires and a breadboard
  • A 9 V battery and clip or a power bank for the stand

Safety

For this project: USB or battery power only. Keep the OLED glass away from bending.

Never use mains electricity: power models with cells, batteries or a low-voltage adapter. Sharp and hot tools, flames and lab chemicals need an adult or your teacher beside you. Keep magnets, button cells and small parts away from young children, and wash your hands after making.

All the safety rules

Step by step

9 steps. Do them in order, and test each part before you go on to the next. Write what you notice in a notebook as you go.

  1. Install the DHT sensor library and the Adafruit SSD1306 and GFX libraries from the library manager.

  2. Wire the DHT11: VCC to 5 V, GND to GND, DATA to pin 2. Add a 10 kΩ pull-up resistor from DATA to 5 V if your module does not already have one.

  3. Wire the OLED: VCC to 5 V (or 3.3 V if the board says so), GND to GND, SDA to A4, SCL to A5.

  4. Run the I2C scanner sketch from the ebook to find the OLED address, usually 0x3C.

  5. Write a sketch that reads temperature and humidity every two seconds (the DHT11 cannot go faster) and prints them to the serial monitor.

  6. Add the OLED code: clear the display, print the two values in large text, then display().

  7. Calculate the heat index with the library function and show a message: Comfortable, Warm, Hot or Humid.

  8. Breathe gently on the sensor and watch humidity jump, then watch it slowly return.

  9. Fit the parts into a small box with a window cut for the display.

What you should see

The screen shows live temperature to 1 degree and humidity to 1 percent, updating every two seconds, with a comfort message that changes when the room conditions change.

Viva questions

A teacher or a judge will ask how it works. Try to answer each question before you open it, then compare.

1Why can the DHT11 only be read every two seconds?

The sensor needs time to take a fresh measurement; reading faster returns the old value or an error.

2What does relative humidity mean?

The amount of water vapour in the air as a percentage of the maximum the air can hold at that temperature.

3What is I2C?

A two-wire bus, data and clock, where each device has an address so many devices can share the same two pins.

4How accurate is the DHT11?

About plus or minus 2 degrees and 5 percent humidity, good enough for a comfort meter, not for a laboratory.

Free ebook: Viva Questions for Science Projects

Take it further

Swap the DHT11 for a DHT22 and compare readings, or log readings to the serial plotter over a whole day.

Change one thing, measure what happens, and add a table or chart of your readings: that is what turns a model into your own investigation.

Free ebooks for this project

WhatsApp us