Notifications
Clear all

Sensors: DHT11, DHT22, & others doing the same thing. What is BEST?

14 Posts
5 Users
2 Likes
5,282 Views
JoeLyddon
(@joelyddon)
Member
Joined: 5 years ago
Posts: 157
Topic starter  

I am very new here, so if I goof up, please don't be too hard on me...  OK?

I want to make a simple Weather Station with a OUTSIDE station which just reads Temp. and Humidity and send the readings to Inside station.

I have been looking at all kinds of videos...  I see DHT11, DHT22, and others that gets this information...  I have a DHT11, in a Super Starter Kit UNO R3 Project.  I want to use the most reliable, accurate, etc.  Which one is BEST for the job?

I would also like to get the Temp. in "F" and "C", easily selectable for either or both readings.  Possible to do?  If so, HOW do I code to get "F" temp...  and "C" temp?

Thank you very much...  I searched for DHT11 and only found one result that didn't answer my question.

Joe

 

This topic was modified 5 years ago by JoeLyddon

Have Fun,
Joe Lyddon

www.woodworkstuff.net


   
Quote
(@dronebot-workshop)
Workshop Guru Admin
Joined: 5 years ago
Posts: 1081
 

Hi Joe

Welcome to the forum!

The DHT22 is more accurate than the DHT11, it also has a wider temperature range.

I've done a couple of DHT22 designs that you could follow:

  • Using LCD Displays with Arduino - In this tutorial, I show you how to build a temp-humidity meter with a DHT22 and an LCD display.
  • Arduino Visual Programming – Getting Started with XOD - In this tutorial, I show how to build the same temp-humid meter with an LCD display, I also add a switch to toggle between Fahrenheit and Celcius. You program the Arduino using XOD, a graphical programming language.
  • Using Inexpensive 433MHz Transmit and Receive Modules with Arduino - Here I show you how to make a remote wireless temp-humidity sensor, using the DHT22 and some cheap RF modules.
  • Arduino UV Index Meter – Measuring UV Light - This one is a bit different, instead of the DHT22 it uses the AM2320  temp-humidity sensor. This sensor has identical specs to the DHT22 but uses the I2C bus to connect. It also uses a SI1145 UV/IR sensor to give you the UV Index as well.

Hope that helps!

?

Bill

"Never trust a computer you can’t throw out a window." — Steve Wozniak


   
ReplyQuote
codecage
(@codecage)
Member Admin
Joined: 5 years ago
Posts: 1037
 

@joelyddon

Hi Joe, I'd like to welcome you to the Dronebot Workshop too.  I was reading your post about you starting to put together a weather station after reading, as you put it, your "wordy" introduce yourself post when I saw Bill's post pop up.  Again, welcome!

And have you ever come to the right place.  We have several hams on board and at least one individual that is now considering becoming a ham after investigating using RF to send data from a remote sensor to a receiver at another location.  Just exactly what you want to do with you temp/humidity sensor.

I myself am a ham, N4TTY, and have implemented the temp/humid remote sensor you are looking to build.  I have a DHT22 (if all you have at the moment is a DHT11, it can be used to at least show you how all of this works) in my home's crawl space that uses one of the cheap 433MHz transmitters that Bill mentions in his 3rd post above to transmit to a receiver and LCD display that is located in my master bedroom (just a short distance above the transmitter in the crawl space).  It works very well and I have the LCD displaying humidity and temperature.  I'll dig out some of my Arduino code and put it in a separate post.  Today has gotten away from me, so it might even be tomorrow before I can post it, or maybe I can try to get to it later today.

By the way there is a thread called "For the Hams On-board" on this forum as well.

SteveG


   
ReplyQuote
(@pugwash)
Sorcerers' Apprentice
Joined: 5 years ago
Posts: 923
 

@JoeLyddon

I think there are some much better sensors on the market than the DHT11 andDHT22, go to eBay and research air pressure sensors. There are quite a few that combines temperature, humidity and air pressure, possibly even UV index!

The DHT series is good place to start, but for a serious weather station, I would look for other parts.


   
ReplyQuote
codecage
(@codecage)
Member Admin
Joined: 5 years ago
Posts: 1037
 

@pugwash

What makes the ones you mention so much better?  Are they more accurate?  I guess for a real weather station those extra features might be good to have, but my crawl space has no UV to worry about.  I guess I could use it as a remote sensor that a tornado has blown my house away if all of a sudden I had a UV reading that had gone way up! ? 

Do you have a model number we could do some research on?

SteveG


   
ReplyQuote
codecage
(@codecage)
Member Admin
Joined: 5 years ago
Posts: 1037
 

@joejyddon

After reviewing the videos (1 and 3 in Bill's post) I think you will find just about everything you will need to get started.  My RX code does use an I2C LCD screen though, so is just a little different.

SteveG


   
ReplyQuote
byron
(@byron)
No Title
Joined: 5 years ago
Posts: 1122
 

Both the DHT11 and DHT22 sensors are nice and cheap and good for a first experiment when one may wire things in error and provoke an early component demise.  However I did not find them to be reliably accurate.

A year or so back I was looking to hook up a temperature sensor to use for my first weather station project  My first experiment was with a TMP-36 temperature sensor but the readings I was getting were way off the real temperature in my office room (real temp about 23C but temp recorded was 28+C) 

I made sure the sensor was away from the board (a wemos) as this can add a degree or so to the recorded temperature, but the reading was way out.  So I experimented by hooking up several temperature sensors and taking readings of them all simultaneously.

The test included a TMP-36, MCP9808, SHT31-d, a waterproof DS18B20, several DHT11's and DHT22's, the temp sensor of my multimeter and a room thermostat.

The TMP-36 continued to show a reading that was too high by several degrees.

The MCP9808 and  SHT31-d whilst initially showed over a degree of difference between them but after an hour or so they settled to a consistent and correct reading.

The DS18B20 was between half  and one degree adrift at various times.

I had four DHT11 sensors on the test and all showed different readings, three were + or - about a degree, on one varied by more than +or- up to 2 degrees difference.

The two DHT22 sensors were both + or - about one degree of the correct temperature and one DHT22 always showed a different temperature than the other.

If you read the spec sheets on all these temperature sensors then I would not expect the difference to be more than 0.2% different.  What I took from this was not to expect too much from the really cheap sensors and to go with the likes of the MCP9808 if one is looking for a relatively accurate temperature reading.


   
JoeLyddon reacted
ReplyQuote
(@pugwash)
Sorcerers' Apprentice
Joined: 5 years ago
Posts: 923
 
Posted by: @codecage

@pugwash

What makes the ones you mention so much better?  Are they more accurate?  I guess for a real weather station those extra features might be good to have, but my crawl space has no UV to worry about.  I guess I could use it as a remote sensor that a tornado has blown my house away if all of a sudden I had a UV reading that had gone way up! ? 

Do you have a model number we could do some research on?

I only meant that they have more features than just temperature and humidity. I just happened to stumble over some, what I thought to be useful sensors while researching something else on eBay and AliExpress.

If I find them again I will list the IDs on the forum.

In my case, the UV sensors are useful as my XYL, suffers from skin cancer, luckily not the nasty sort. But she does need to know when she has to wear a hat to protect her forehead, even if it is cloudy!


   
JoeLyddon reacted
ReplyQuote
JoeLyddon
(@joelyddon)
Member
Joined: 5 years ago
Posts: 157
Topic starter  

@byron

Byron, I spent a long time Replying...  when it came to Submit it, I got a Message "Sorry there was a problem, etc. etc.".

That really POPPED my Balloon!

The MCP9808 is at the top of my list for Temperature, not caring about Humidity & Pressure...

I will Reply again later...  Right now, I DO NOT FEEL LIKE retyping my original Reply.  I thought I was logged-in...  I was told to Sign-in...  If I was NOT signed-in, it should have denied me from Entering the Reply process...  Yes?

Later...  🙂

 

Have Fun,
Joe Lyddon

www.woodworkstuff.net


   
ReplyQuote
JoeLyddon
(@joelyddon)
Member
Joined: 5 years ago
Posts: 157
Topic starter  

@codecage

Hi...

I don't like the LCD and have decided to use a OLED display, which also a veery LOW power demand making it very Battery friendly...  I thought the LCD would be good... Not as good as I expected...   IMHO OLED is the ONLY way to go...  🙂

Thank you.

 

 

Have Fun,
Joe Lyddon

www.woodworkstuff.net


   
ReplyQuote
JoeLyddon
(@joelyddon)
Member
Joined: 5 years ago
Posts: 157
Topic starter  

@codecage

I am WB6UFX...  from the mid 1960's...

Hardly ever use it anymore...  When I was working and spending many hours on the Freeways, in the Los Angeles area, I had 2m in car, 5/8 whip Mag-mounted on top, and had a BALL...  Then, I started working from home, working ONLINE saving lots of gas & time... That's when my Ham time slowed down...  I finally retired...  and I had lost a little interest in getting on the radio...

Look at www.woodworkstuff.net and read about me on the subjects in Left Margin...  About me...  and how I got back into woodworking...  🙂

 

Have Fun,
Joe Lyddon

www.woodworkstuff.net


   
ReplyQuote
JoeLyddon
(@joelyddon)
Member
Joined: 5 years ago
Posts: 157
Topic starter  

@dronebot-workshop

Hi Bill,

In your video titled "Power for your electrical projects", the S9V11F5 caught my eye; looks like a super good little unit.

I have been looking & LOOKING for it...  some close & not...  frustrating...

Then I found this on AliExpress:

https://www.aliexpress.com/item/4000036391365.html?spm=a2g0o.productlist.0.0.672a25ceR21PoK&algo_pvid=e3d1c9ed-ed18-464b-accd-71f09c489d86&algo_expid=e3d1c9ed-ed18-464b-accd-71f09c489d86-7&btsid=17229201-a591-4c2f-92a8-7c1e97f61acd&ws_ab_test=searchweb0_0,searchweb201602_8,searchweb201603_52

Looks very close but...   What do you think?  Is this it?   Where did you get yours?

I was wondering, if using a battery (all the time) with this & using it with a UNO and Adafruit MCP9808 High Accuracy I2C Temperature Sensor, etc. for an outdoor project to report only the Temperature, wirelessly once in awhile, would it drag down the battery very quickly?

This was the easiest way to contact you that I could think of...  I hope it does NOT upset you.

Thank you very much for your help!

Joe

 

Have Fun,
Joe Lyddon

www.woodworkstuff.net


   
ReplyQuote
(@pugwash)
Sorcerers' Apprentice
Joined: 5 years ago
Posts: 923
 

@codecage

I have been testing the BME280 as an alternative to DHT11 & DHT22 and quite satisfied with results I am getting including the extra functionality of air pressure readings.

 ? That extra functionality would give you a warning of an impending tornado, rather than a UV sensor telling you that your roof had already blown away! ? 

But on a more serious note.

This is the information I am getting from my local weather station via an API call with Javascript.

weather1

And this is what I am getting from the BME module:

weather2

The temperature discrepancy is due to the BME module being too near the house brick wall, but my 40-year-old weather station is also showing about 6°C and this is also having a slight effect on the relative humidity reading.

But all in all, am quite pleased with the BME280 performance.

And if you are interested I have a thread going on the subject of remote sensing using an nrf24l01 as an alternative to the 433MHz modules at

https://forum.dronebotworkshop.com/arduino/structures-serialisation-xor-checksums-etc/#post-5937


   
ReplyQuote
JoeLyddon
(@joelyddon)
Member
Joined: 5 years ago
Posts: 157
Topic starter  

@pugwash

Thank you for the write-up on a New sensor BME280... 

Looks like it has NICE little extras...  even Altitude! (mine does not change very much...  🙂  LOL  )

That Pressure looks interesting... would that rally be worth much, like in Calif. where we don't much Tornado activity; just earthquakes...  When will we have  sensor that will help us avoiding damage / injury BEFORE an earthquake is about to happen?

Thanks again!

 

 

Have Fun,
Joe Lyddon

www.woodworkstuff.net


   
ReplyQuote