Sale!

DHT22 AM2302 Digital Temperature and Humidity Sensor Module with Wires

Original price was: 9,80 €.Current price is: 7,34 €. Excluding VAT

DHT22 AM2302 temperature and humidity sensor module. Ideal for Arduino projects.

1 in stock (can be backordered)

Domande su questo prodotto? Scrivi a Lana su WhatsApp

🎬 The product on video

Description

Tutorial: How to Use DHT22 AM2302 Module

The DHT22 module is a digital sensor for measuring temperature and humidity. It is ideal for environmental monitoring projects, such as rust prevention alarm systems or weather condition controls.

What you need

  • Arduino
  • USB Cable
  • Breadboard (optional)
  • 10kΩ Resistor
  • Power and Data Pins

Steps

  1. Connect the DHT22 module to the breadboard or directly to the Arduino.
  2. Connect the VCC pin of the sensor to the Arduino’s power supply (5V or 3.3V).
  3. Connect the GND pin of the sensor to the ground of the Arduino.
  4. Connect a 10kΩ resistor between the data pin of the DHT22 and a digital pin of the Arduino, then connect the other end of the resistor to the data pin of the Arduino.
  5. Install the Adafruit_DHT library in the Arduino software.
  6. Write a sketch that reads the temperature and humidity values from the DHT22 sensor.
  7. Upload the sketch to the microcontroller.
  8. Monitor the Arduino serial I/O to view sensor measurements.

Example code

// Includi la libreria
#include <DHT.h>
// Definisci il tipo di sensore e il pin di connessione
#define DHTPIN 2 // Pin digitale dove è collegato il DHT22
#define DHTTYPE DHT22   // Tipo del 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 sul datasheet se i valori sono validi
  if (isnan(humidity) || isnan(temperature)) {
    Serial.println("Errore durante la lettura del sensore.");
    return;
  }

  Serial.print("Umidità: ");
  Serial.print(humidity);
  Serial.print(" %, Temperatura: ");
  Serial.print(temperature);
  Serial.println(" °C");
}

Mini project

Create a rust alarm system that sends a notification when humidity exceeds 60%.

Common mistakes

  • Connect the sensor without the pull-up resistor
  • Incorrectly install the Adafruit_DHT library
  • Use an unsuitable power supply pin
  • Read data from the sensor before initialization

Recommended accessories

  • 10kΩ resistor
  • LCD module to display measurements directly on the project
  • Buzzer or LED for alarm
  • Arduino Uno R3

Frequently asked questions

How can I check the accuracy of the sensor?
Verify data readings by comparing values with a thermometer and hygrometer next to the sensor.

My sensor is not working. What should I do?
Check all connections and ensure the sensor is properly powered.

Reviews

There are no reviews yet.

Be the first to review “DHT22 AM2302 Digital Temperature and Humidity Sensor Module with Wires”

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