QKZee Technologies

How to Build an Arduino-Based Temperature & Humidity Data Logger

 

How to Build an Arduino-Based Temperature & Humidity Data Logger

 

1. Introduction

Have you ever wondered how weather stations record daily temperature and humidity? With an Arduino data logger, you can build your own version right at home. This simple yet powerful project is perfect for students, hobbyists, and engineers in Lahore, Pakistan, looking for affordable final year projects or IoT-based automation systems.

Data logging plays a vital role in industrial automation, agriculture, and smart home projects. By using Arduino Uno, a DHT11 sensor, and an SD card module, you can measure and store environmental data automatically.

2. Understanding the Concept

A data logger is an electronic device that records data over time through sensors. The Arduino reads values from the DHT11 temperature and humidity sensor and stores them on an SD card for later analysis.

This project teaches key concepts in electronics engineering, IoT, and embedded systems, making it one of the best engineering projects for students in Lahore and across Pakistan.

3. Required Components

To make this Arduino temperature and humidity logger, you’ll need:

    • Arduino Uno

    • DHT11 Sensor

    • SD Card Module

    • Breadboard

    • Jumper Wires

    • USB Cable / Power Supply

All of these parts are available at Hall Road electronics market, or you can purchase them from QKZee Technologies or QKZ Tech at the best prices in Lahore.

4. Component Overview

DHT11 Sensor: Measures temperature and humidity using digital output.
Arduino Uno: The main microcontroller that processes and logs data.
SD Card Module: Stores data from Arduino onto a micro SD card.

These components make this project ideal for students projects, DIY electronics, and automation systems.

5. Circuit Diagram and Connections

Connect your components as follows:

    • DHT11 Sensor:

      • VCC → 5V

      • GND → GND

      • DATA → Digital Pin 2

    • SD Card Module:

      • VCC → 5V

      • GND → GND

      • MISO → Pin 12

      • MOSI → Pin 11

      • SCK → Pin 13

      • CS → Pin 10

Ensure that your breadboard connections are firm. Many beginners face issues because of loose wiring.

Arduino Uno with DHT11 and SD card module wiring

6. Arduino Code for Data Logging

The core part of this project is the code that reads sensor data and stores it.

 
#include <DHT.h>
#include <SD.h>
#include <SPI.h>

 

#define DHTPIN 2
#define DHTTYPE DHT11
#define CSPIN 10

DHT dht(DHTPIN, DHTTYPE);
File dataFile;

void setup() {
Serial.begin(9600);
dht.begin();
SD.begin(CSPIN);
}

void loop() {
float temp = dht.readTemperature();
float hum = dht.readHumidity();

dataFile = SD.open("datalog.txt", FILE_WRITE);
if (dataFile) {
dataFile.print("Temp: ");
dataFile.print(temp);
dataFile.print(" C, Humidity: ");
dataFile.println(hum);
dataFile.close();
}
delay(2000);
}

This script logs temperature and humidity data to the SD card every 2 seconds.

7. Testing the Logger

After uploading the code, open the Serial Monitor in Arduino IDE. You’ll see temperature and humidity readings in real-time. Check your SD card on a computer, and you’ll find a file named datalog.txt containing recorded data.

8. Applications of Arduino Data Logger

    • Weather monitoring systems

    • Greenhouse automation

    • Smart agriculture projects

    • Industrial environment monitoring

    • School and university projects

9. Possible Improvements

Want to make it more advanced? Try these upgrades:

    • Add an LCD or OLED to display live data.

    • Send readings to ThingSpeak IoT or Firebase.

    • Use DHT22 or BME280 sensors for higher accuracy.

These improvements turn your project into a professional IoT solution.

10. Benefits for Students

This project is widely recommended for final year projects in electronics engineering. Students can consult Qasim Shahzad and his team at QKZee Technologies Lahore for consultation services and professional project development at the best price in Pakistan.

11. Where to Get Components in Lahore

Head to Hall Road electronics market or visit QKZ Tech for genuine Arduino components, sensors, and SD modules. You’ll find the best price for student projects in Lahore Pakistan, along with technical support for university projects.

12. Price Estimation

Component Price (PKR)
Arduino Uno 2,000
DHT11 Sensor 250
SD Module 350
Breadboard + Wires+ programming 3000
Total 5,000~7,000 PKR

Affordable and effective—ideal for engineering students in Lahore.

13. Tips for Final Year Projects

    • Customize your code and interface for uniqueness.

    • Use proper documentation and circuit diagrams.

    • Add a display or IoT connectivity for extra marks.

14. Conclusion

Building an Arduino-based temperature and humidity data logger helps you understand sensors, microcontrollers, and data management. It’s a simple yet powerful Arduino project that can be expanded into a professional IoT application.

Whether you’re a student in Lahore or anywhere in Pakistan, this project provides hands-on experience in electronics engineering and automation.

Where to Buy Your Electronics Components 

Looking for affordable components for this Arduino project? Check out QKZee Technologies, an online shop in Lahore, Pakistan, offering the best components for students and DIY projects. Whether you’re looking for sensors, modules, or other electronics at a cheap price, they’ve got it all. Visit them at QKZeeTech.

It measures temperature and humidity digitally with fair accuracy.

 

 

Yes, DHT22 provides more accurate readings and a wider range.

 

 

Around 5,000-7,000 PKR depending on where you buy your components.

 

 

Visit QKZee Technologies or Hall Road electronics market Lahore.

 

 

Yes, by adding an ESP8266 or ESP32 module, you can make it IoT-enabled.

visit QKZee Technologies Hall Road Lahore, or contact QKZee Technologies for genuine parts and student-friendly prices,

Hall Road Electronics Market, or order from QKZ Tech and Qkzee Technologies for the best price.

Scroll to Top