{"id":1566,"date":"2013-04-14T19:39:55","date_gmt":"2013-04-14T17:39:55","guid":{"rendered":"http:\/\/sickel.net\/blogg\/?p=1566"},"modified":"2013-05-08T15:29:49","modified_gmt":"2013-05-08T13:29:49","slug":"sensor-testing","status":"publish","type":"post","link":"https:\/\/sickel.net\/blogg\/?p=1566","title":{"rendered":"Sensor testing"},"content":{"rendered":"<p>After a DHT22 arrived a couple of days ago, I have had quite a few sensors running on my desktop:<\/p>\n<ul>\n<li>\nDHT11 humidity and temperature sensor<\/li>\n<li>\nDHT22 humidity and temperature sensor<\/li>\n<li>\nBMP085 air pressure and temperature sensor<\/li>\n<li>\nDS18B20 temperature sensor<\/li>\n<\/ul>\n<div id=\"attachment_1567\" style=\"width: 2010px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/sickel.net\/blogg\/wp-content\/2013\/04\/IMGP0002.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1567\" data-attachment-id=\"1567\" data-permalink=\"https:\/\/sickel.net\/blogg\/?attachment_id=1567\" data-orig-file=\"https:\/\/sickel.net\/blogg\/wp-content\/2013\/04\/IMGP0002.jpg\" data-orig-size=\"2000,1396\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;4&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;PENTAX K20D&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1365963789&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;26.25&quot;,&quot;iso&quot;:&quot;800&quot;,&quot;shutter_speed&quot;:&quot;0.022222222222222&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"Sensor test bench\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;DS18B20 in foreground. DHT11 (blue) at the back, DHT22 (white) in the middle and BMP085 (red PCB at the right)&lt;\/p&gt;\n\" data-large-file=\"https:\/\/sickel.net\/blogg\/wp-content\/2013\/04\/IMGP0002-1024x714.jpg\" src=\"http:\/\/sickel.net\/blogg\/wp-content\/2013\/04\/IMGP0002.jpg\" alt=\"All the sensors are situated close together.\" width=\"2000\" height=\"1396\" class=\"size-full wp-image-1567\" srcset=\"https:\/\/sickel.net\/blogg\/wp-content\/2013\/04\/IMGP0002.jpg 2000w, https:\/\/sickel.net\/blogg\/wp-content\/2013\/04\/IMGP0002-300x209.jpg 300w, https:\/\/sickel.net\/blogg\/wp-content\/2013\/04\/IMGP0002-1024x714.jpg 1024w\" sizes=\"auto, (max-width: 2000px) 100vw, 2000px\" \/><\/a><p id=\"caption-attachment-1567\" class=\"wp-caption-text\">DS18B20 in foreground. DHT11 (blue) at the back, DHT22 (white) in the middle and BMP085 (red PCB) at the right.<\/p><\/div>\n<p>All the sensors are sampled at approximately 15 minutes intervals. The DHT11, DHT22 and BMP085 are all connected to the same controller and are sampled at the same cycle, The DS18B20 is connected to another system which may be sampling at other moments, although at the same frequency. (more information on the hard- and software for sampling can be found <a href=\"http:\/\/sickel.net\/blogg\/?page_id=1538\">here<\/a>)<\/p>\n<p><strong>Temperature<\/strong><br \/>\nThe DS18B20 is set up to 0.5 degree resolution. According to the documentation, this is consistent with the accuracy, although it may report values with a much higher resolution. The DHT11 is reporting temperatures with a 1 degree resolution the BMP085 and DHT22 both returns temperatures with a 0.1 &deg;C resolultion. The temperatures from the last approx 36 hours seems to fit reasonably well.<\/p>\n<div id=\"attachment_1570\" style=\"width: 490px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/sickel.net\/blogg\/wp-content\/2013\/04\/temps1.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1570\" data-attachment-id=\"1570\" data-permalink=\"https:\/\/sickel.net\/blogg\/?attachment_id=1570\" data-orig-file=\"https:\/\/sickel.net\/blogg\/wp-content\/2013\/04\/temps.png\" data-orig-size=\"480,480\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"Temperatures measured with different sensors\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;Temperatures measured with different sensors&lt;\/p&gt;\n\" data-large-file=\"https:\/\/sickel.net\/blogg\/wp-content\/2013\/04\/temps.png\" src=\"http:\/\/sickel.net\/blogg\/wp-content\/2013\/04\/temps1.png\" alt=\"The temperature curves fits reasonably well\" width=\"480\" height=\"480\" class=\"size-full wp-image-1570\" \/><\/a><p id=\"caption-attachment-1570\" class=\"wp-caption-text\">Temperatures measured with different sensors<\/p><\/div>\n<p><strong>Relative humidity<\/strong><br \/>\nWhen it comes to relative humidity, only the DHT22 and DHT11 can be compared. The DHT11 is reporting humitities with a 1% resolution and the DHT22 with a 0.1% resolution, so some differences are expected. But it turns out that the DHT11 seems to be a much poorer detector than the DHT22. It kind of gets the right humidity, but is really inaccurate.<br \/>\n<div id=\"attachment_1572\" style=\"width: 490px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/sickel.net\/blogg\/wp-content\/2013\/04\/hums1.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1572\" data-attachment-id=\"1572\" data-permalink=\"https:\/\/sickel.net\/blogg\/?attachment_id=1572\" data-orig-file=\"https:\/\/sickel.net\/blogg\/wp-content\/2013\/04\/hums.png\" data-orig-size=\"480,480\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"Relative humidity logged with a DHT11 and a DHT22.\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;Relative humidity logged with a DHT11 and a DHT22.&lt;\/p&gt;\n\" data-large-file=\"https:\/\/sickel.net\/blogg\/wp-content\/2013\/04\/hums.png\" src=\"http:\/\/sickel.net\/blogg\/wp-content\/2013\/04\/hums1.png\" alt=\"The DHT11 shows a nearly straight line, varying between 35 and 36%, with a few jumps down to 34% at the start. The DHT22 shows a much larger span.\" width=\"480\" height=\"480\" class=\"size-full wp-image-1572\" \/><\/a><p id=\"caption-attachment-1572\" class=\"wp-caption-text\">Relative humidity logged with a DHT11 and a DHT22.<\/p><\/div><\/p>\n<p>Using just one detector of each kind, it is of cource difficult to give any general conclusions. By breathing on it, I can get the DHT11 to show a much higher relative humidity. It may be that one of my detectors is defective- but so far, it seems really to be worth it to shell out the extra to get a DHT22 rather than the DHT11.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Comparing measurements of temperature and humidity using DHT11, DHT22, BMP085 and DS18B20. <a href=\"https:\/\/sickel.net\/blogg\/?p=1566\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[33],"tags":[],"class_list":["post-1566","post","type-post","status-publish","format-standard","hentry","category-arduino"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pnVtD-pg","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/sickel.net\/blogg\/index.php?rest_route=\/wp\/v2\/posts\/1566","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sickel.net\/blogg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sickel.net\/blogg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sickel.net\/blogg\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sickel.net\/blogg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1566"}],"version-history":[{"count":11,"href":"https:\/\/sickel.net\/blogg\/index.php?rest_route=\/wp\/v2\/posts\/1566\/revisions"}],"predecessor-version":[{"id":1608,"href":"https:\/\/sickel.net\/blogg\/index.php?rest_route=\/wp\/v2\/posts\/1566\/revisions\/1608"}],"wp:attachment":[{"href":"https:\/\/sickel.net\/blogg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1566"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sickel.net\/blogg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1566"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sickel.net\/blogg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1566"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}