Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

DHT11 and oshonsoft PIC code

Status
Not open for further replies.

ivsto

New Member
Hi everybody,
do You have some experience with DHT-11 ?

Thank you in advance!!

Ivan
 
Hi
I've just (as in today) managed to get a dht22 to work. Not having a mobile phone, I can't get a Yahoo account to check the link above. I used Oshonsoft AVR IDE with Attiny44. Unlike some ppl I wasn't aware of any errors in the datasheet. Most problems were down to me, although some of the restrictions of Oshonsoft Basic caused me a few headaches. I have 2 versions now, one to lcd showing RH, temp and dew point. The other to 8 x 7 segment led via max7219 showing temp and dew point. Negative dew point could be handled better, I haven't got this quite right.
If anyone is interested in my method just ask.

The rest of this thread has been moved, if you want code for DHT22 for Oshonsoft IDE AVR/PIC
see post #7 on the link below.

https://www.electro-tech-online.com/threads/dht11-and-pic-code.145245/#post-1227059

Real World Feedback 16/9/2015
Now that the nights are getting darker I've started preparing for some astrophotography.
The 1st night was about 15C and I thought the dew point shown was a bit low @ about -7C
2nd night it started of OK about 17C dp 8C then as the temperature dropped it suddenly became -7C.
Checked the code today the problem lies in the adjustment for negative dew point with a positive air temperature. I got the values for these from an online calculator which must use a different formula to the one I used.
I put the formula used in code into a spread sheet and sure enough the same errors occurred.

The following fixed it.
If humin > 50 And tempin < 10 Then hsign = 0x01
If humin > 60 And tempin < 7 Then hsign = 0x01
If humin > 70 And tempin < 5 Then hsign = 0x01
If humin > 80 And tempin < 3 Then hsign = 0x01
If humin > 90 And tempin < 1 Then hsign = 0x01

If you want more accuracy than this, put the formula Td = T - ((100 - RH)/5.) into a spread sheet then alter the temperature (t) and Humidity (RH) to find the negative dew point for
humidity/temp combinations.
 
Last edited:
Status
Not open for further replies.

Latest threads

Back
Top