{"id":26354,"date":"2023-01-24T12:09:37","date_gmt":"2023-01-24T05:09:37","guid":{"rendered":"https:\/\/tom.ji42.com\/?p=26354"},"modified":"2023-01-24T12:09:37","modified_gmt":"2023-01-24T05:09:37","slug":"ds18b20-full-waterproof-temperature-sensor-water-temperature-sensor","status":"publish","type":"post","link":"https:\/\/tom.tomwork.net\/?p=26354","title":{"rendered":"DS18B20 Full Waterproof Temperature Sensor Water Temperature Sensor"},"content":{"rendered":"<p>\u0e42\u0e21\u0e14\u0e39\u0e25 DS18B20 \u0e27\u0e31\u0e14\u0e2d\u0e38\u0e13\u0e2b\u0e20\u0e39\u0e21\u0e34\u0e41\u0e1a\u0e1a\u0e01\u0e31\u0e19\u0e19\u0e49\u0e33 \u0e23\u0e31\u0e1a\u0e44\u0e1f\u0e40\u0e25\u0e35\u0e49\u0e22\u0e07 3-5.5V \u0e27\u0e31\u0e14\u0e2d\u0e38\u0e13\u0e2b\u0e20\u0e39\u0e21\u0e34\u0e44\u0e14\u0e49\u0e43\u0e19\u0e0a\u0e48\u0e27\u0e07 -10 \u0e16\u0e36\u0e07 85 \u0e2d\u0e07\u0e28\u0e32 \u0e1e\u0e23\u0e49\u0e2d\u0e21\u0e1a\u0e2d\u0e23\u0e4c\u0e14\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e15\u0e48\u0e2d\u0e01\u0e31\u0e1a Arduino \/ ESP8266 \/ ESP32 \u0e41\u0e25\u0e30\u0e1a\u0e2d\u0e23\u0e4c\u0e14 MCU \u0e23\u0e38\u0e48\u0e19\u0e2d\u0e37\u0e48\u0e19 \u0e46 \u0e2a\u0e32\u0e22\u0e15\u0e48\u0e2d\u0e01\u0e31\u0e1a\u0e40\u0e0b\u0e19\u0e40\u0e0b\u0e2d\u0e23\u0e4c DS18B20 \u0e41\u0e1a\u0e1a terminal \u0e15\u0e48\u0e2d\u0e17\u0e14\u0e25\u0e2d\u0e07\u0e44\u0e14\u0e49\u0e07\u0e48\u0e32\u0e22<br \/><a href=\"https:\/\/tom.tomwork.net\/wp-content\/uploads\/2023\/01\/DS18B20-Sensor-100-DS18B20-Arduino.jpg_Q90.jpg_.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"810\" height=\"810\" title=\"DS18B20-Sensor-100-DS18B20-Arduino.jpg_Q90.jpg_\" style=\"border: 0px currentcolor; border-image: none; display: inline; background-image: none;\" alt=\"DS18B20-Sensor-100-DS18B20-Arduino.jpg_Q90.jpg_\" src=\"https:\/\/tom.tomwork.net\/wp-content\/uploads\/2023\/01\/DS18B20-Sensor-100-DS18B20-Arduino.jpg_Q90.jpg__thumb.jpg\" border=\"0\"><\/a><br \/><strong>\u0e01\u0e32\u0e23\u0e15\u0e48\u0e2d\u0e2a\u0e32\u0e22\u0e17\u0e14\u0e25\u0e2d\u0e07 DS18B20 \u0e01\u0e31\u0e1a Arduino<\/strong><br \/><strong>1. \u0e15\u0e48\u0e2d\u0e27\u0e07\u0e08\u0e23\u0e01\u0e31\u0e1a Arduino \u0e14\u0e31\u0e07\u0e19\u0e35\u0e49<\/strong><br \/>VCC &#8211; 5V<br \/>GND &#8211; GND<br \/>DAT &#8211; 2<!--more--><\/p>\n<p><strong>\u0e15\u0e48\u0e2d\u0e2b\u0e31\u0e27 DS18B20 \u0e01\u0e31\u0e1a\u0e1a\u0e2d\u0e23\u0e4c\u0e14\u0e40\u0e0b\u0e19\u0e40\u0e0b\u0e2d\u0e23\u0e4c<\/strong><\/p>\n<ul>\n<li>\u0e2a\u0e32\u0e22\u0e2a\u0e35\u0e41\u0e14\u0e07 &#8211; VCC\n<li>\u0e2a\u0e32\u0e22\u0e2a\u0e35\u0e14\u0e33 &#8211; GND\n<li>\u0e2a\u0e32\u0e22\u0e2a\u0e35\u0e40\u0e2b\u0e25\u0e37\u0e2d\u0e07 &#8211; DAT<\/li>\n<\/ul>\n<p><strong>\u0e2b\u0e23\u0e37\u0e2d<\/strong><\/p>\n<ul>\n<li>\u0e2a\u0e32\u0e22\u0e2a\u0e35\u0e41\u0e14\u0e07 &#8211; VCC\n<li>\u0e2a\u0e32\u0e22\u0e2a\u0e35\u0e40\u0e2b\u0e25\u0e37\u0e2d\u0e07 &#8211; GND\n<li>\u0e2a\u0e32\u0e22\u0e2a\u0e35\u0e40\u0e02\u0e35\u0e22\u0e27 &#8211; DAT<\/li>\n<\/ul>\n<p><strong>2 \u0e15\u0e34\u0e14\u0e15\u0e31\u0e49\u0e07\u0e44\u0e25\u0e1a\u0e32\u0e23\u0e35 2 \u0e15\u0e31\u0e27\u0e19\u0e35\u0e49<\/strong><br \/>1. OneWire<br \/><img decoding=\"async\" alt=\"\" src=\"https:\/\/i.lnwfile.com\/_\/i\/_webp_max\/4096\/4096\/oi\/7e\/21.webp\"><br \/>2. dallas-temperature-control<br \/><img decoding=\"async\" alt=\"\" src=\"https:\/\/i.lnwfile.com\/_\/i\/_webp_max\/4096\/4096\/eb\/jy\/6i.webp\"><br \/><strong>3 \u0e2d\u0e31\u0e1e\u0e42\u0e2b\u0e25\u0e14\u0e42\u0e04\u0e14\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07 Sensor DS18B20 \u0e2d\u0e38\u0e13\u0e2b\u0e20\u0e39\u0e21\u0e34 \u0e25\u0e07 Arduino uno r3 \u0e41\u0e25\u0e49\u0e27\u0e14\u0e39\u0e1c\u0e25\u0e25\u0e31\u0e1e\u0e18\u0e4c<\/strong><\/p>\n<p>\/\/Example By ArduinoAll<\/p>\n<p>#include &lt;OneWire.h&gt;<\/p>\n<p>#include &lt;DallasTemperature.h&gt;<\/p>\n<p>#define ONE_WIRE_BUS 2 \/\/\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e27\u0e48\u0e32\u0e02\u0e32\u0e02\u0e2d\u0e07\u0e40\u0e0b\u0e19\u0e40\u0e0b\u0e2d\u0e23\u0e4c 18B20 \u0e15\u0e48\u0e2d\u0e01\u0e31\u0e1a\u0e02\u0e32 2<\/p>\n<p>OneWire oneWire(ONE_WIRE_BUS);<\/p>\n<p>DallasTemperature sensors(&amp;oneWire);<\/p>\n<p>void setup(void) {<\/p>\n<p>Serial.begin(9600);<\/p>\n<p>Serial.println(&#8220;ArduinoAll Test Temperature 18B20&#8221;);<\/p>\n<p>sensors.begin();<\/p>\n<p>}<\/p>\n<p>void loop(void) {<\/p>\n<p>sensors.requestTemperatures(); \/\/\u0e2a\u0e31\u0e48\u0e07\u0e2d\u0e48\u0e32\u0e19\u0e04\u0e48\u0e32\u0e2d\u0e38\u0e13\u0e2b\u0e20\u0e39\u0e21\u0e34<\/p>\n<p>Serial.print(sensors.getTempCByIndex(0)); \/\/ \u0e41\u0e2a\u0e14\u0e07\u0e04\u0e48\u0e32\u0e2d\u0e38\u0e13\u0e2b\u0e20\u0e39\u0e21\u0e34<\/p>\n<p>Serial.println(&#8221; *C&#8221;);<\/p>\n<p>delay(1000);<\/p>\n<p>}<\/p>\n<p><a href=\"https:\/\/gist.github.com\/penpencool\/6c37a7eda7fa950d954782f5c21a7cf6\/raw\/5ccbe7533bdd33eea7d4bd2ee2b90eec4b4f6b3c\/all17.ino\">view raw<\/a><a href=\"https:\/\/gist.github.com\/penpencool\/6c37a7eda7fa950d954782f5c21a7cf6#file-all17-ino\">all17.ino<\/a> hosted with \u2764 by <a href=\"https:\/\/github.com\/\">GitHub<\/a><\/p>\n<p>&#8212;<br \/>\u0e40\u0e1b\u0e34\u0e14 Serial Monitor \u0e02\u0e36\u0e49\u0e19\u0e21\u0e32\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e14\u0e39\u0e04\u0e48\u0e32\u0e2d\u0e38\u0e13\u0e2b\u0e20\u0e39\u0e21\u0e34\u0e02\u0e2d\u0e07 Sensor DS18B20 <br \/>\u0e43\u0e0a\u0e49\u0e21\u0e37\u0e2d\u0e08\u0e31\u0e1a\u0e17\u0e35\u0e48 Sensor DS18B20&nbsp; \u0e04\u0e48\u0e32\u0e2d\u0e38\u0e13\u0e2b\u0e20\u0e39\u0e21\u0e34\u0e17\u0e35\u0e48\u0e2d\u0e48\u0e32\u0e19\u0e44\u0e14\u0e49\u0e08\u0e30\u0e21\u0e35\u0e01\u0e32\u0e23\u0e40\u0e1b\u0e25\u0e35\u0e48\u0e22\u0e19\u0e41\u0e1b\u0e25\u0e07<\/p>\n<p><strong><br \/>DS18B20 waterproof temperature sensor<\/strong><\/p>\n<ul>\n<li>Temperature sensor supply voltage: 3.0V ~ 5.5V\n<li>Temperature sensor resolution: 9 to 12-bit adjustable resolution\n<li>Temperature display range is -10 \u00b0 C to +85 \u00b0 C (error \u00b1 0.5 \u00b0 C)\n<li>Operating temperature range: -55 to 125\u00b0C (-67\u00b0F to +257\u00b0F)\n<li>(lead can only withstand a maximum temperature of about 85 degrees)\n<li>Temperature sensor output leads: green (DATA) red (VCC), yellow (GND)\n<li>Adapter cable: 3-wire interface: Divided into type A and type B, please pay attention to your sensor interface before wiring .<\/li>\n<\/ul>\n<p>Type A: red line (VCC), black line (GND), yellow line (DATA)<\/p>\n<p>Type B: red line (VCC), yellow line (GND), green line (DATA)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0e42\u0e21\u0e14\u0e39\u0e25 DS18B20 \u0e27\u0e31\u0e14\u0e2d\u0e38\u0e13\u0e2b\u0e20\u0e39\u0e21\u0e34\u0e41\u0e1a\u0e1a\u0e01\u0e31\u0e19\u0e19\u0e49\u0e33 \u0e23\u0e31\u0e1a\u0e44\u0e1f\u0e40\u0e25\u0e35\u0e49\u0e22\u0e07 3-5.5V \u0e27\u0e31\u0e14\u0e2d\u0e38\u0e13\u0e2b\u0e20\u0e39\u0e21\u0e34\u0e44\u0e14\u0e49\u0e43\u0e19\u0e0a\u0e48\u0e27\u0e07 -10 \u0e16\u0e36\u0e07 85 \u0e2d\u0e07\u0e28\u0e32 \u0e1e\u0e23\u0e49\u0e2d\u0e21\u0e1a\u0e2d\u0e23\u0e4c\u0e14\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e15\u0e48\u0e2d\u0e01\u0e31\u0e1a Arduino \/ ESP8266 \/ ESP32 \u0e41\u0e25\u0e30\u0e1a\u0e2d\u0e23\u0e4c\u0e14 MCU \u0e23\u0e38\u0e48\u0e19\u0e2d\u0e37\u0e48\u0e19 \u0e46 \u0e2a\u0e32\u0e22\u0e15\u0e48\u0e2d\u0e01\u0e31\u0e1a\u0e40\u0e0b\u0e19\u0e40\u0e0b\u0e2d\u0e23\u0e4c DS18B20 \u0e41\u0e1a\u0e1a terminal \u0e15\u0e48\u0e2d\u0e17\u0e14\u0e25\u0e2d\u0e07\u0e44\u0e14\u0e49\u0e07\u0e48\u0e32\u0e22\u0e01\u0e32\u0e23\u0e15\u0e48\u0e2d\u0e2a\u0e32\u0e22\u0e17\u0e14\u0e25\u0e2d\u0e07 DS18B20 \u0e01\u0e31\u0e1a Arduino1. \u0e15\u0e48\u0e2d\u0e27\u0e07\u0e08\u0e23\u0e01\u0e31\u0e1a Arduino \u0e14\u0e31\u0e07\u0e19\u0e35\u0e49VCC &#8211; 5VGND &#8211; GNDDAT &#8211; 2<\/p>\n","protected":false},"author":1,"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":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[13],"tags":[],"class_list":["post-26354","post","type-post","status-publish","format-standard","hentry","category-13"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6cOVM-6R4","_links":{"self":[{"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=\/wp\/v2\/posts\/26354","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=26354"}],"version-history":[{"count":1,"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=\/wp\/v2\/posts\/26354\/revisions"}],"predecessor-version":[{"id":26355,"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=\/wp\/v2\/posts\/26354\/revisions\/26355"}],"wp:attachment":[{"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=26354"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=26354"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=26354"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}