Go Down

Topic: DHT22 Temperature Sensor (Read 10123 times) previous topic - next topic



I bought a DHT22 sensor (http://www.sparkfun.com/products/10167 ) . I got also a library for reading data from here http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1295252628 . Can anyone explain me why I need a 4.7kOhm resistor? Is itfor data accuracy and not for hardware?

Anyway if I want to use the resistor btw data pin and Vcc do I just need to make a bridge btw them?

see pic


Mar 01, 2011, 02:00 am Last Edit: Mar 01, 2011, 02:02 am by retrolefty Reason: 1
It''s for hardware funtionality. The single data line has to be bidirectional. That means the I/O pins on both ends of the single wire signal have to sometimes be input pins and sometimes output pins. By having a pull-up resistor wired to Vcc, then there will always be a valid logic level on the wire as pins switch modes.

It's the same reqirement needed for the clock and data lines on any I2C device wiring to an arduino.

PS: your example drawing figures 2 and 3 are electrical the same, aren't they? Anyway just wire the resistor between the voltage and the signal wire anywhere along the run or at either end.


something like this? of course the resistor is not the correct one...but it just an example..


Go Up