Sale!

TH02 Temperature and Humidity Sensor Module

Original price was: 13,52 €.Current price is: 9,79 €. Excluding VAT

The TH02 Sensor Module for Arduiner accurately measures temperature and humidity. Perfect for electronics projects and environmental monitoring.

Available on back-order

Domande su questo prodotto? Scrivi a Lana su WhatsApp

🎬 The product on video

Description

Tutorial: How to Use TH02 Sensor Module

The TH02 sensor module is perfect for monitoring temperature and humidity in domestic or industrial environments. Ideal for both beginners and expert makers.

What you need

  • Arduino Uno
  • USB A-Micro B Cable
  • Power Supply 3-5VDC

Steps

  1. Connect the TH02 module to the Arduino using the VCC, GND, SDA, and SCL connectors of the Arduino.
  2. Install the Adafruit_Sensor library through the Arduino IDE Library Manager.
  3. Install the DHT Sensor Library (https://github.com/adafruit/DHT-sensor-library).
  4. Open a new sketch in Arduino IDE and include the libraries you just installed.
  5. Define the TH02 sensor type as DHT11 or DHT22 in the code.
  6. Configure the SDA and SCL pins of the module with those of the Arduino.
  7. Write a loop that reads the temperature and humidity from the sensor every second.
  8. Display the data on the Arduino serial console.

Example code

// Includi le librerie
#include "DHT.h"
// Definisci il tipo di sensore e i pin
#define DHTPIN 2     // Pin dove è collegato il sensore
#define DHTTYPE DHT11   // Tipo di sensore (DHT11 o DHT22)
DHT dht(DHTPIN, DHTTYPE);
void setup() {
  Serial.begin(9600);
  dht.begin();
}
void loop() {
  float humidity = dht.readHumidity();
  float temperature = dht.readTemperature();
  // Verifica i dati sul datasheet
  if (isnan(humidity) || isnan(temperature)) {
    Serial.println("Errore lettura sensore");
    return;
  }
  Serial.print("Umidità: ");
  Serial.print(humidity);
  Serial.print(" %, Temperatura: ");
  Serial.print(temperature);
  Serial.println(" °C");
  delay(1000);
}

Mini project

Create an excessive humidity alarm system that sends an SMS notification when humidity exceeds 70%. Use a GSM module or similar.

Common mistakes

  • Do not install the necessary libraries.
  • Use the wrong voltage (check the datasheet).
  • Connect the SDA and SCL pins incorrectly.
  • Ignore the sensor read error in the code.

Recommended accessories

  • 16×2 LCD module to display data locally
  • ESP8266 Wi-Fi module to send data online
  • USB to battery power supply for portability
  • RS232/USB serial cable for advanced monitoring

Frequently asked questions

How can I connect the TH02 without Arduino?
Use a compatible microcontroller like ESP8266 or Raspberry Pi.

The sensor does not read data correctly.
Check the power supply voltage and pin SDA/SCL connections.

Reviews

There are no reviews yet.

Be the first to review “TH02 Temperature and Humidity Sensor Module”

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