RHT03 Humidity and Temperature Sensor with Arduino

Last Updated on March 16, 2024

humidity temperature arduino

Digital Relative Humidity & Temperature sensor RHT03 is small size, low power consumption and cheap to afford sensor for measuring temperature and humidity.




This article describes about how to connect with Arduino? and getting data from RHT03 sensor through Arduino and serial monitor of Arduino IDE. The sensor can read 0 – 100% RH humidity and -40° to 80° Celsius temperature.

Pinout of RHT03

rht03 pinout

Technical Specification

Model                                          RHT03
Power supply                             3.3-6V DC
Output signal                             digital signal via MaxDetect 1-wire bus
Sensing element                        Polymer humidity capacitor
Operating range                         humidity 0-100%RH; temperature -40~80Celsius
Accuracy                                      humidity +-2%RH(Max +-5%RH); temperature +-0.5Celsius
Resolution or sensitivity          humidity 0.1%RH; temperature 0.1Celsius
Repeatability                              humidity +-1%RH; temperature +-0.2Celsius                                                               Humidity hysteresis                 +-0.3%RH
Long-term Stability                  +-0.5%RH/year
Interchangeability                     fully interchangeable

Alternative Names

The DHT sensors are also available under other names.

  • DHT11 = RHT01 = …
  • DHT21 = RHT02= AM2301 = HM2301
  • DHT22 = RHT03= AM2302
  • DHT33 = RHT04 = AM2303
  • DHT44 = RHT05

To use this sensor with Arduino / Genuino boards you need to have DHT library file, you can get here.

RHT 03 Arduino Schematic

rht03 arduino schematic

Arduino RHT03 Hookup

rht03 arduino hookup

Connect the sensor (RHT03) pins as mentioned in the schematic, then upload the following code.

Arduino Code For RHT03 sensor

 

 

#include "DHT.h"

#define DHTPIN 2     // what digital pin we're connected to

// Uncomment whatever type you're using!
//#define DHTTYPE DHT11   // DHT 11
#define DHTTYPE DHT22   // DHT 22  (AM2302), AM2321
//#define DHTTYPE DHT21   // DHT 21 (AM2301)

DHT dht(DHTPIN, DHTTYPE);

void setup() {
  Serial.begin(9600);
  Serial.println("DHTxx test!");

  dht.begin();
}

void loop() {
  // Wait a few seconds between measurements.
  delay(2000);

  // Reading temperature or humidity takes about 250 milliseconds!
  // Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
  float h = dht.readHumidity();
  // Read temperature as Celsius (the default)
  float t = dht.readTemperature();
  // Read temperature as Fahrenheit (isFahrenheit = true)
  float f = dht.readTemperature(true);

  // Check if any reads failed and exit early (to try again).
  if (isnan(h) || isnan(t) || isnan(f)) {
    Serial.println("Failed to read from DHT sensor!");
    return;
  }

  // Compute heat index in Fahrenheit (the default)
  float hif = dht.computeHeatIndex(f, h);
  // Compute heat index in Celsius (isFahreheit = false)
  float hic = dht.computeHeatIndex(t, h, false);

  Serial.print("Humidity: ");
  Serial.print(h);
  Serial.print(" %\t");
  Serial.print("Temperature: ");
  Serial.print(t);
  Serial.print(" *C ");
  Serial.print(f);
  Serial.print(" *F\t");
  Serial.print("Heat index: ");
  Serial.print(hic);
  Serial.print(" *C ");
  Serial.print(hif);
  Serial.println(" *F");
}

 



Leave a Reply

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