element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Sensors
  • Technologies
  • More
Sensors
Sensor Forum Temperature sensor accuracy
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Sensors to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 38 replies
  • Subscribers 338 subscribers
  • Views 5294 views
  • Users 0 members are here
  • temperature
  • temperature sensor
Related

Temperature sensor accuracy

ntewinkel
ntewinkel over 1 year ago

Hi all,

I have two temperature sensors near each other, outside. In the winter I was using one to keep track of the nectar temperature in a hummingbird feeder, but I just left it hanging there for the summer.

Here is the typical result:

image

The top line is a dht11 or could be 12. It includes pressure and humidity. The bottom line is a ds18b20 in a metal tube.

Both are digital, but one is nearly always about 1 or 2 degrees higher than the other. Generally it’s fine to give me a close enough idea of what’s going on, but I think I should be more accurate when looking at the freezing point.

Do I need to calibrate them? How would I go about doing that? Ie, what can I trust as a proper baseline? I don’t have access to any really guaranteed kind of thermometer, I think. Thinking 

Thanks in advance for any wisdom you can send my way!

-Nico

  • Sign in to reply
  • Cancel

Top Replies

  • dougw
    dougw over 1 year ago +5 verified
    If they are waterproof you can stick them in a slush of ice and water to get a zero degrees reference. If they aren't waterproof you can put them in a plastic bag in the ice/water mix. If they can take…
  • beacon_dave
    beacon_dave over 1 year ago +5 verified
    Comparing data sheets it looks like the accuracy of the DHT11 is ±2°C whereas the DS18B20 is ±0.5°C It will be interesting to see what your testing shows.
  • wolfgangfriedrich
    wolfgangfriedrich over 1 year ago in reply to dougw +4 verified
    During the ice-water test, you have to be careful not to touch the ice-cubes. They are still colder than zero degC. I learnt this during a thermocouple roadtest.
  • DAB
    0 DAB over 1 year ago in reply to kmikemoo

    Yes, the genes are not necessarily your friend.

    Luckily on my mom's side, the men make it into their 90's, so my wife is hoping I take after that side of the family.

    Still there are extenuating circumstances, my grandfather died at 55, but he lost a leg in WWI and was diabetic but would not eat right.

    My father smoked for 60 years and then wondered why he had stomach cancer.

    My older brother was exposed to agent orange in Vietnam, plus he was in numerous motorcycle accidents. I was very surprised he lived as long as he did.

    So far I am trying to do the right things, keep my weight down, no nasty habits, and other than the heart attack, I am doing ok. I could probably do more, but I am a big believer in the quality of life, so I am not giving up my deserts or scotch any time soon.

    • Cancel
    • Vote Up +4 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • ntewinkel
    0 ntewinkel 11 months ago

    I think shabaz  was onto something... it looks like the other sensor was maybe getting warmed up? Possibly because the Wemos D1 Mini is right next to it in the enclosure, even though it does have a separation.

    And I was wrong - the other sensor is a BME280, not the DHT I thought I was using in there. Funny, I guess it's been up there long enough for my short memory to keep up with it Laughing

    imageimage

    I tried an ice bath, but it didn't work well. It dipped down close to zero and then I think the bag started floating.

    imageimage

    BUT... once I removed it from the enclosure, the BME280 (light blue line, previously always on top) was recording predictably about a degree lower than the DS18b20 probe.

    I had it in the container of water overnight (with the bag clipped down better), and then removed it this morning with the two sensors being side by side in the air afterwards. This is the resulting graph:

    image

    So it looks like the BME280 is probably the accurate one (based on it hitting 0 in the ice bath), with the DS18b20 always recording a degree higher.

    I'll try the ice bath again, this time with more insulation all around, and I'm going to have to print a new enclosure that keeps the BME280 away from the Wemos D1 Mini. After that, if the ice bath result is stable, I'll update the code to just do a simple +/- adjustment.

    • Cancel
    • Vote Up +4 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • battlecoder
    0 battlecoder 11 months ago in reply to ntewinkel

    It looks like the gap is a tad narrower at lower temperatures, but it still seem to remain around a degree almost consistently across the board, so it's probably enough to just subtract that 1 degree difference from the DS18B20, as you said. Fancier math is not going to give you a lot more accuracy considering what we are seeing in those graphs.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • ntewinkel
    0 ntewinkel 11 months ago in reply to battlecoder
    battlecoder said:
    Fancier math is not going to give you a lot more accuracy

    That’s what I’m thinking too. 80-20 rule.

    Looks like I have a good zero degree bath set up now. I used an insulated cooler with ice packs and a yogurt container with ice and water in the centre.

    image

    Now to add the fine tuning adjustments…

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • battlecoder
    0 battlecoder 11 months ago in reply to ntewinkel

    There's definitely a difference at lower temps but that's still a lot better than the initial readings. Whether that's a good fit or not will depend on the accuracy you need, and in this case, how often it's going to be close to freezing in their actual real locations :D

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • ntewinkel
    0 ntewinkel 11 months ago in reply to battlecoder
    battlecoder said:
    There's definitely a difference at lower temps

    Yes, it went from a one degree difference in the 10 to 20C range to nearly 2 degrees at freezing.

    It’s only for my specific use case for the hummingbird feeder, and freezing is the key thing I’m interested in. Our area might go down to -15C and up to maybe +35C, and those are interesting but not critical.

    I might get more fancy later, but this should do the trick for now.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • ntewinkel
    0 ntewinkel 11 months ago

    Here’s my ice bath setup. I’m using an insulated little lunch box type cooler, with a yogurt tub in it that holds the ice water. Under it and on both sides are ice pack, and I tossed in a frozen bottle of water.

    image
    closed up it holds the temperature really well.

    image
    image
    I adjusted the sensor readings on the server side (node red). It’s a bit of a cheat but it’s specific to that sensor and that sensor only reports to the one server. And, at least at the zero mark, they are both reliably reporting the same zero temperature for hours.

    • image
      Not sure what will happen as the temperature goes up, but that is close enough. Next I’ll have to print a separate enclosure for the bme280 so the warmth of the chip won’t affect it.
    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • battlecoder
    0 battlecoder 11 months ago in reply to ntewinkel

    That's great!

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
<
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube