Jump to content
43oh

Trouble with DHT11 Library (MSP430G2553)


Recommended Posts

Hey guys,

I am trying to work with this library: http://forum.43oh.com/topic/2239-solved-dht22-temp-rh-one-wire-sensor-on-energia/?p=19474

 

To my knowledge, everything is configured correctly. I have confirmed that the device does work fine on an Arduino Uno with this resistor, 10k. I have also confirmed that it works with a 4.7k. It also works with both 3.3v and 5v.

 

However, on the MSP430, using the above library (stock) the values I am getting are very wrong, for example:

debug 	bits received 	40
debug 	27, 0, 11, 0, 38 =? 38
debug 	 checksum 	ok
debug 	RH% 	9984
debug 	oC 	4352
RH% 	998.4 %	
oC 	435.2 *C

This is in a room ~62F % 40% RH. If I touch or blow on the sensor the values change as you would imagine, so I know that it is reading something and reporting changes properly. I have looked through the code and nothing glaringly obvious sticks out at me. I know I could measure a few reference values and add in a few calculations to adjust the output, but I would rather fix the root of the issue. I understand the library was written for the DHT22 and I am using the DHT11, but they should be drop-in replacements for one another, the DHT22 just being more sensitive. Again, I have used this unit with a DHT22 library on Arduino.

 

I would greatly appreciate any help! I have researched this for a while but have found nothing - it's possible that I'm just not using the right terms, however.

 

Thank you!

Link to post
Share on other sites

@@fastbiter

 

Hey guys,

I am trying to work with this library: http://forum.43oh.com/topic/2239-solved-dht22-temp-rh-one-wire-sensor-on-energia/?p=19474

 


This is in a room ~62F % 40% RH. If I touch or blow on the sensor the values change as you would imagine, so I know that it is reading something and reporting changes properly. I have looked through the code and nothing glaringly obvious sticks out at me. I know I could measure a few reference values and add in a few calculations to adjust the output, but I would rather fix the root of the issue. I understand the library was written for the DHT22 and I am using the DHT11, but they should be drop-in replacements for one another, the DHT22 just being more sensitive. Again, I have used this unit with a DHT22 library on Arduino.

 

I would greatly appreciate any help! I have researched this for a while but have found nothing - it's possible that I'm just not using the right terms, however.

 

Thank you!

 

According to this, the DHT11 or DHT22 *may* have different formats.

In the Adafruit tutorial, they mention about enabling the DHT11.. did you do this? I have neither, so this is just from reading:

 

 
If you're using a DHT11 sensor, comment out the line that sets the type:
 

//#define DHTTYPE DHT22 // DHT 22 (AM2302)

 

and uncomment the line that says:
 
#define DHTTYPE DHT11 // DHT 11

 

HTH.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...