Difference between revisions of "DHT11 DHT22"
Grovkillen (talk | contribs) m (→Hardware) |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 15: | Line 15: | ||
== Design considerations == | == Design considerations == | ||
Do not use GPIO015 as an input for the DHT11/22. During startup of the ESP8266, this pin must be Low for proper operation. | Do not use GPIO015 as an input for the DHT11/22. During startup of the ESP8266, this pin must be Low for proper operation. | ||
− | It is better to avoid using GPIO00 as an input as well. This pin must be High at startup, unless program mode is required. | + | |
− | The data pin of the DHT11/22 needs a pull-up resistor. A value of 4k7 - 10k proves to be sufficient. | + | It is better to avoid using GPIO00 as an input as well. |
+ | This pin must be High at startup, unless program mode is required. | ||
+ | |||
+ | The data pin of the DHT11/22 needs a pull-up resistor. | ||
+ | A value of 4k7 - 10k proves to be sufficient. | ||
+ | |||
+ | The DHT sensor needs to be connected to a configurable GPIO on the ESP module. | ||
+ | In case you have a simple ESP-01 module, it's best to use the GPIO-2 pin. | ||
+ | |||
+ | == Wemos DHT shield == | ||
+ | When using the Wemos DHT shield, you need to make some small modification to the board as it is using a pin not suitable for the DHT22. | ||
+ | |||
+ | For more information see [https://github.com/letscontrolit/ESPEasy/issues/2569#issuecomment-688901549 this GitHub post] explaining it all. | ||
= Software = | = Software = |
Latest revision as of 16:43, 9 September 2020
Contents
Introduction
The ESP module can read a DHT11 or DHT22 temperature/Humidity sensor using a custom onewire protocol.
The DHT sensor needs to be connected to a configurable GPIO on the ESP module. In case you have a simple ESP-01 module, it's best to use the GPIO-2 pin.
Hardware
The DHT sensor can be connected directly to an ESP module. Datasheet DHT11, datasheet DHT22.
Design considerations
Do not use GPIO015 as an input for the DHT11/22. During startup of the ESP8266, this pin must be Low for proper operation.
It is better to avoid using GPIO00 as an input as well. This pin must be High at startup, unless program mode is required.
The data pin of the DHT11/22 needs a pull-up resistor. A value of 4k7 - 10k proves to be sufficient.
The DHT sensor needs to be connected to a configurable GPIO on the ESP module. In case you have a simple ESP-01 module, it's best to use the GPIO-2 pin.
Wemos DHT shield
When using the Wemos DHT shield, you need to make some small modification to the board as it is using a pin not suitable for the DHT22.
For more information see this GitHub post explaining it all.
Software
Custom Sketch
ESP Easy
Use the device tab on the ESP Easy webinterface and create a new task by editing one of the available tasks. Select "DHT Humidity Sensor" from the dropdown box.
Enter the IDX found in the Domoticz device page. Also select the GPIO pin that you have used to connect the DHT sensor. Finally you should select the type (DHT11 of DHT22). That should be all.
Optional settings
ESP Connexio
Syntax: DHTRead "type", "pin", "var"