{"id":249,"date":"2014-07-08T22:13:39","date_gmt":"2014-07-08T19:13:39","guid":{"rendered":"http:\/\/www.bashpi.org\/?page_id=249"},"modified":"2020-12-03T17:33:34","modified_gmt":"2020-12-03T15:33:34","slug":"temperature-data-collection","status":"publish","type":"page","link":"https:\/\/www.bashpi.org\/?page_id=249","title":{"rendered":"Temperature data collection"},"content":{"rendered":"<p>As there are really many solutions for temperature data collection I decided to limit results with few extra requirements:<\/p>\n<ul>\n<li>Must have USB interface for connection to Raspberry Pi, PC etc. to keep it universal.<\/li>\n<li>Sensor price must be cheap as I may need about 10 sensors.<\/li>\n<li>Wired sensors &#8211; I am not going to change batteries in 10 wireless sensors.<\/li>\n<li>Supported distance at least 50m which is approximate cabling distance from my basement to attic with all the loops and bends.<\/li>\n<li>Temperature range from -40 to +40 degrees Celsius which covers my needs in Estonia.<\/li>\n<li>Supported\/working in Linux, on Debian Wheezy to be exact.<\/li>\n<\/ul>\n<p>I will just list few cons what I found on some products before moving on to what I selected, exactly as I did with <a title=\"Relays\" href=\"http:\/\/www.bashpi.org\/?page_id=26\">relays<\/a>.<\/p>\n<ul>\n<li>Small number of sensors per USB socket<\/li>\n<li>Expensive (some about 12EUR per sensor)<\/li>\n<li>Temperature range too small (minimum -20 Celsius)<\/li>\n<\/ul>\n<p>I decided to go on with 1-WIRE based technology: <a title=\"DS9490, DS9490B, DS9490R USB to 1-Wire\/iButton Adapter\" href=\"http:\/\/www.maximintegrated.com\/datasheet\/index.mvp\/id\/3834\">DS9490R USB-to-1-wire adapter<\/a> and <a title=\"DS18B20 Programmable Resolution 1-Wire Digital Thermometer\" href=\"http:\/\/www.maximintegrated.com\/datasheet\/index.mvp\/id\/2812\">DS18B20 sensors<\/a>. Why? Because temperature sensor price is only about 1 EUR and even less if ordered from China. 1-wire technology supports <a title=\"Guidelines for Reliable Long Line 1-Wire Networks\" href=\"http:\/\/www.maximintegrated.com\/app-notes\/index.mvp\/id\/148\">big range: 200-500m<\/a>. There are available also other f.e. humidity sensors what can be plugged to the same bus. I don&#8217;t know how negative it is but this selection requires some cabling\/soldering and preferably externally powered connection hub to take the load off from the adapter and USB socket.<\/p>\n<div id=\"attachment_256\" style=\"width: 371px\" class=\"wp-caption alignleft\"><a href=\"http:\/\/www.bashpi.org\/wp-content\/uploads\/2014\/07\/DS9490R.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-256\" class=\"wp-image-256 size-full\" src=\"http:\/\/www.bashpi.org\/wp-content\/uploads\/2014\/07\/DS9490R.jpg\" alt=\"DS9490R image from http:\/\/datasheets.maximintegrated.com\/en\/ds\/DS9490-DS9490R.pdf \" width=\"361\" height=\"192\" srcset=\"https:\/\/www.bashpi.org\/wp-content\/uploads\/2014\/07\/DS9490R.jpg 361w, https:\/\/www.bashpi.org\/wp-content\/uploads\/2014\/07\/DS9490R-300x159.jpg 300w\" sizes=\"auto, (max-width: 361px) 100vw, 361px\" \/><\/a><p id=\"caption-attachment-256\" class=\"wp-caption-text\">DS9490R image from http:\/\/datasheets.maximintegrated.com\/en\/ds\/DS9490-DS9490R.pdf<\/p><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignright wp-image-257 size-full\" src=\"http:\/\/www.bashpi.org\/wp-content\/uploads\/2014\/07\/DS18B20.jpg\" alt=\"DS18B20\" width=\"141\" height=\"346\" srcset=\"https:\/\/www.bashpi.org\/wp-content\/uploads\/2014\/07\/DS18B20.jpg 141w, https:\/\/www.bashpi.org\/wp-content\/uploads\/2014\/07\/DS18B20-122x300.jpg 122w\" sizes=\"auto, (max-width: 141px) 100vw, 141px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Sensors are available in original (<a href=\"http:\/\/en.wikipedia.org\/wiki\/TO-92\">TO-92<\/a>) form as shown on image in the right and also as a ready-made probes with attached cable (claimed to be waterproof). Search DS18B20 from Ebay and you will see. If the cable length is enough you can save a lot of soldering. I used original TO-92 form sensors, cut ordinary RJ12 phone cables in half, soldered sensor to one end and connected other end (with RJ12) plug to the home made 1-wire hub which had RJ12 sockets but this is already story for next how-to.<\/p>\n<p>If you found this useful, say thanks, click on some banners or <a href=\"http:\/\/www.bashpi.org\/?page_id=105\">donate<\/a>, I can always use some beer money.<\/p>\n<p><strong>Next -&gt;<\/strong> <a title=\"How to connect DS9490R adapter and DS18B20 sensors\" href=\"http:\/\/www.bashpi.org\/?page_id=262\">How to connect DS9490R adapter and DS18B20 sensors<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>As there are really many solutions for temperature data collection I decided to limit results with few extra requirements: Must have USB interface for connection to Raspberry Pi, PC etc. to keep it universal. Sensor price must be cheap as I may need about 10 sensors. Wired sensors &#8211; I am not going to change [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-249","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.bashpi.org\/index.php?rest_route=\/wp\/v2\/pages\/249","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bashpi.org\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.bashpi.org\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.bashpi.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bashpi.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=249"}],"version-history":[{"count":13,"href":"https:\/\/www.bashpi.org\/index.php?rest_route=\/wp\/v2\/pages\/249\/revisions"}],"predecessor-version":[{"id":769,"href":"https:\/\/www.bashpi.org\/index.php?rest_route=\/wp\/v2\/pages\/249\/revisions\/769"}],"wp:attachment":[{"href":"https:\/\/www.bashpi.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=249"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}