Pages: [1]   Go Down
Author Topic: AM2302 (DHTT) : Could it really be this easy?  (Read 1272 times)
0 Members and 1 Guest are viewing this topic.
Asnieres sur Seine - France
Offline Offline
Jr. Member
**
Karma: 0
Posts: 53
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I recently received a new AM2302 temperature / humidity sensor. It's a fully-assembled, wired, version of the DHT22. It seems to be almost too simple to implement. There are 4 wires: one for 5v power (connected to a built-in resistor), one for data and one for ground. There's a fourth wire, in between the 2nd and 4th, which is supposedly useless. But I've heard that it works better if that is also plugged in to ground.

I found the DHT library and example code, copied and pasted a few routines in to my basic code. I plugged the 4 wires in to my mini breadboard and then to my Arduino Uno.

In less than a half an hour I had a fully operational temperature / humidity display program running (hardware & software).

It just seems too easy. I must be missing something. I am counting on you experienced Arduino engineers to tell me what I have forgotten or not adjusted for.

My whole project is here:
http://fritzing.org/projects/arduino-am2302-on-a-mini-breadboard/
Logged

Offline Offline
Faraday Member
**
Karma: 62
Posts: 3030
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It should be that simple.  i am not sure what you are worried about.

The only trouble with those,  seems to be the inherently flaky method of measuring the
humidity.
Logged

Asnieres sur Seine - France
Offline Offline
Jr. Member
**
Karma: 0
Posts: 53
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the confirmation michinyon.

Is there any way to work around the "flaky humidity measurements"?

Is there a better, or more precise, humidity sensor?

Thanks.
Logged

Offline Offline
Faraday Member
**
Karma: 62
Posts: 3030
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

As far as I know,  there is no "foolproof" method of detecting humidity in air.

There are four or five methods,  none of them are much good.
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 217
Posts: 13739
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


There is a defined relation between the speed of sound, the temperature and the humidity. [defined != trivial]

I discussed that here - http://arduino.cc/forum/index.php/topic,65205.msg493120.html#msg493120 -

Code:
float sos =  331.45 * sqrt(1 + t/273) *  (100 + RH * 0.11  * power(1.82, ((t-273)/10)));  // t in Kelvin

That means if one measures the speed of sound and one knows the temperature one can derive the humidity.

Code:
RH = (sos / (331.45 * sqrt(1 + t/273)) - 100) / ( 0.11  * power(1.82, ((t-273)/10))));   // TODO check () and formula

Temperature can be measured with a DS18B20 as it has a 0.1 precission.
The speed of sound can be measured with an ultrasound sensors with a defined distance e.g. 50,0000 cm from a wall.

[not build myself but should not be too hard]
Give it a try
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Offline Offline
Faraday Member
**
Karma: 62
Posts: 3030
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

At temperature around 20C,  the variation in the speed of sound over the range 0% to 100% relative humidity,
is less than one part in ten thousand,   which is likely to be beyond the resolution of your ultrasonic device.
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 217
Posts: 13739
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I know the diff is small but I did notinvestigate how small.
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Pages: [1]   Go Up
Jump to: