Hello. I've got a question about DHT11 sensor. Why should pullup resistor be connected as on the image below: enter image description here
while as far as I know, pullup resistor should be placed between Arduino 5V pin and Vcc of sensor as shown here: enter image description here
PS: I know that there is a wrong icon of DHT11, but I couldn't find a correct one.
-
I don't know why but the datasheet says dataline must be connected to 4.7K pullup robocraft.ru/files/datasheet/DHT11.pdfLefteris E– Lefteris E2021年07月03日 10:32:27 +00:00Commented Jul 3, 2021 at 10:32
-
Then it wouldn't be a pull-up resistor; Vcc already is 5V. Signals are what need to be pulled high or kow.Dave Newton– Dave Newton2021年07月03日 10:33:23 +00:00Commented Jul 3, 2021 at 10:33
-
@Dave Newton but it seems to me, that when the resistor is connected as shown in the first image, it's in parallel to Vcc-OUT in sensor therefore resistance between 5V and OUT is 0.Maciaz99– Maciaz992021年07月03日 10:56:45 +00:00Commented Jul 3, 2021 at 10:56
-
If you draw a proper schematic, you will see that, in the first drawing, the resistor is between Vcc and Out (also called "data"). It "pulls up" the data/Out pin to a high logic level when there’s no internal or external signal driving it.StarCat– StarCat2021年07月05日 18:39:26 +00:00Commented Jul 5, 2021 at 18:39
1 Answer 1
You require a pullup resistor between the data wire and VCC because the DHT11 uses a bidirectional communication system on a single wire. When neither end is communicating both ends of the link will be in "high impedance" mode - i.e., input mode. In that case the signal will be "floating" and needs the pullup to keep it in a known state.
When actively communicating the outputs switch to "open drain" mode to allow then to pull the signal low against the pull of the pullup resistor.
A resistor in series with the Arduino's 5V and the VCC of the DHT11 is not a pullup resistor. It is not an arrangement that you would ever want, since it would make the voltage to the DHT11 unstable.
-
Note that the pullup is typically not required when using one of the common breakout boards for DHT11 (from Adafruit or similar), because they already include it.PMF– PMF2021年07月04日 06:23:14 +00:00Commented Jul 4, 2021 at 6:23