DHT11 Sensor
The DHT11 is a basic, ultra low-cost digital temperature and humidity sensor. It uses a capacitive humidity sensor and a thermistor to measure the surrounding air and spits out a digital signal on the data pin (no analog input pins needed). Its fairly simple to use, but requires careful timing to grab data. The only real downside of this sensor is you can only get new data from it once every 2 seconds, the sensor readings can be up to 2 seconds old.
Compared to the DHT22, this sensor is less precise, less accurate, and works in a smaller range of temperature/humidity, but it is smaller and less expensive.
Technical Details
- Low cost
- 3 to 5V power and I/O
- 2.5mA max current use during conversion (while requesting data)
- Good for 20-80% humidity readings with 5% accuracy
- Good for 0-50°C temperature readings ±2°C accuracy
- No more than 1 Hz sampling rate (once every second)
- Body size 15.5mm x 12mm x 5.5mm
- 4 pins with 0.1" spacing
- VCC - red wire Connect to 3.3 - 5V power. Sometime 3.3V power isn't enough in which case try 5V power.
- Data out - white or yellow wire
- Not connected
- Ground - black wire
Circuit Diagram
Programming Arduino
You should have the Arduino IDEsoftware running at this time. Next, it’s necessary to install the DHT Sensor library, which can be done through the Arduino Library Manager:
Sketch→Include Library→Manage Libraries…
Enter “dht” in the search field and look through the list for the “DHT sensor library by Adafruit.” Click the “Install” button, or “Update” from an earlier version.
IMPORTANT: As of version 1.3.0 of the DHT library you will also need to install the Adafruit_Sensor library, which is also available in the Arduino Library Manager.
Now load up the Examples→DHT→DHTtester sketch.
Comments
Post a Comment