Pages: [1]   Go Down
Author Topic: DHT22 Temperature Sensor  (Read 3717 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 1
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

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


* simpledia.jpg (607.26 KB, 413x334 - viewed 318 times.)
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 362
Posts: 17307
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Lefty

« Last Edit: February 28, 2011, 08:02:47 pm by retrolefty » Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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


* image201103010001.jpg (41.58 KB, 79x317 - viewed 236 times.)
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 362
Posts: 17307
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Should work fine.
Logged

Pages: [1]   Go Up
Jump to: