{"id":10415,"date":"2015-06-12T19:59:34","date_gmt":"2015-06-12T23:59:34","guid":{"rendered":"http:\/\/embedded-lab.com\/blog\/?p=10415"},"modified":"2015-06-12T19:59:34","modified_gmt":"2015-06-12T23:59:34","slug":"usb-temperature-logger-using-minimal-components","status":"publish","type":"post","link":"https:\/\/embedded-lab.com\/blog\/usb-temperature-logger-using-minimal-components\/","title":{"rendered":"USB temperature logger using minimal components"},"content":{"rendered":"<p>This <a href=\"https:\/\/hackaday.io\/project\/6258-two-component-usb-temperature-data-logger\" target=\"_blank\"><strong>PIC16F1455-based USB temperature logger<\/strong><\/a> is one of the simplest designs I have ever seen and uses only 2-components, the PIC microcontroller itself and\u00a0an USB connector. It uses PIC&#8217;s internal temperature indicator module for sensing the ambient temperature.<\/p>\n<div id=\"attachment_10417\" style=\"width: 595px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2015\/06\/PIClogger.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-10417\" class=\"size-full wp-image-10417\" alt=\"Simplest USB temperature logger\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2015\/06\/PIClogger.jpg\" width=\"585\" height=\"393\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2015\/06\/PIClogger.jpg 585w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2015\/06\/PIClogger-580x389.jpg 580w\" sizes=\"auto, (max-width: 585px) 100vw, 585px\" \/><\/a><p id=\"caption-attachment-10417\" class=\"wp-caption-text\">Simplest USB temperature logger<\/p><\/div>\n<blockquote><p>The PIC16F1455 is a relatively new microcontroller that can do USB without an external crystal. It also has internal pull-up resistors for the USB data lines. These things mean no extra hardware is necessary for USB communication.<\/p>\n<p>I needed something useful to send over USB and I noticed that the PIC16F1455 has a Temperature Indicator Module. This peripheral will let you read the operating temperature of the silicon die over the ADC. It&#8217;s not terribly accurate, but the silicon die temperature will be about equal to the outside temperature.<\/p>\n<p>I carefully soldered a male USB Type A connector to the PIC16F1455&#8217;s Vdd, Vss, D+, and D- pins. Then, using the M-Stack USB Stack from Signal 11, I wrote a program to enumerate the PIC16F1455 as a USB CDC serial device and send the temperature in ADC counts as an ASCII string at 1 Hz.<\/p>\n<p>From the computer side, it&#8217;s easy to connect to the USB temperature data logger like any other serial device, parse the incoming strings, and save the data to a file with a timestamp.<\/p>\n<p>The last step is to map the ADC counts to a temperature scale. Microchip has an application note AN1333 with some equations. However, for a constant Vdd, the scale is pretty linear so it&#8217;s easiest to record the ADC count at two known temperatures and interpolate between them.<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>This PIC16F1455-based USB temperature logger is one of the simplest designs I have ever seen and uses only 2-components, the PIC microcontroller itself and\u00a0an USB connector. It uses PIC&#8217;s internal temperature indicator module for sensing the ambient temperature. The PIC16F1455 is a relatively new microcontroller that can do USB without an external crystal. It also has internal pull-up resistors for the USB data lines. These things mean no extra hardware is necessary for USB communication. I needed something useful to send over USB and I noticed that the PIC16F1455 has a Temperature Indicator Module. This peripheral will let you read<\/p>\n","protected":false},"author":1,"featured_media":10417,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[1204,1203],"class_list":["post-10415","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-pic-projects","tag-pic16f1455","tag-usb-temperature-logger"],"_links":{"self":[{"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/posts\/10415","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/comments?post=10415"}],"version-history":[{"count":2,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/posts\/10415\/revisions"}],"predecessor-version":[{"id":10418,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/posts\/10415\/revisions\/10418"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/media\/10417"}],"wp:attachment":[{"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/media?parent=10415"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/categories?post=10415"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/tags?post=10415"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}