{"id":378,"date":"2016-05-23T21:32:18","date_gmt":"2016-05-23T20:32:18","guid":{"rendered":"https:\/\/www.kolkataonweb.com\/code-bank\/?p=378"},"modified":"2016-07-18T21:19:33","modified_gmt":"2016-07-18T20:19:33","slug":"lm35-precision-cheap-temperature-sensor","status":"publish","type":"post","link":"https:\/\/www.kolkataonweb.com\/code-bank\/arduino\/lm35-precision-cheap-temperature-sensor\/","title":{"rendered":"LM35 Precision Cheap Temperature Sensor"},"content":{"rendered":"<p>The LM35 from Texas Instruments is a cheap but very good temperature sensor. It is available in various packages. Please refer to the <a href=\"https:\/\/www.kolkataonweb.com\/code-bank\/wp-content\/uploads\/2016\/05\/lm35.pdf\">LM35 Temperature Sensor<\/a> for package and other details.<\/p>\n<p>It can be powered directly from the 5v supply of Arduino.<\/p>\n<p>The chip outputs \u00a010.0 mV per \u00b0C. Below is a small snippet of code that can be used to convert the output voltage into temperature.<\/p>\n<pre class='wp-code-highlight prettyprint'>val = analogRead(tempPin);\r\nmv = ( val\/1024.0)*5000;\u00a0 \/\/ mv = (val\/1024) * (voltage * 1000) The 1024 is derived from\u00a0 the fact that the Atmega ADC has 10 bit resolution, returning integers from 0 to 1023.\r\ncel = mv\/10; \/\/ cel = mv \/ 10.0 milli volt per \u00b0C\r\nfarh = (cel*9)\/5 + 32;<\/pre>\n<p>Please refer the <a href=\"https:\/\/www.kolkataonweb.com\/code-bank\/wp-content\/uploads\/2016\/05\/lm35.pdf\">Datasheet<\/a> for Pin Configuration.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The LM35 from Texas Instruments is a cheap but very good temperature sensor. It is available in various packages. Please refer to the LM35 Temperature Sensor for package and other details. It can be powered directly from the 5v supply of Arduino. The chip outputs \u00a010.0 mV per \u00b0C. Below is a small snippet of&hellip; <a class=\"more-link\" href=\"https:\/\/www.kolkataonweb.com\/code-bank\/arduino\/lm35-precision-cheap-temperature-sensor\/\">Continue reading <span class=\"screen-reader-text\">LM35 Precision Cheap Temperature Sensor<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[54,55,56,52,53],"class_list":["post-378","post","type-post","status-publish","format-standard","hentry","category-arduino","tag-arduino-thermometer","tag-arduino-weather","tag-lm-35","tag-lm35","tag-temperature-sensor","entry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/posts\/378","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/comments?post=378"}],"version-history":[{"count":3,"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/posts\/378\/revisions"}],"predecessor-version":[{"id":442,"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/posts\/378\/revisions\/442"}],"wp:attachment":[{"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/media?parent=378"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/categories?post=378"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/tags?post=378"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}