{"id":31,"date":"2024-05-21T12:01:28","date_gmt":"2024-05-21T11:01:28","guid":{"rendered":"https:\/\/odonodesign.com\/blog\/?p=31"},"modified":"2026-05-11T17:37:33","modified_gmt":"2026-05-11T16:37:33","slug":"how-to-make-a-temperature-monitor-for-your-home-fridge","status":"publish","type":"post","link":"https:\/\/odonodesign.com\/blog\/2024\/05\/21\/how-to-make-a-temperature-monitor-for-your-home-fridge\/","title":{"rendered":"TINYTherm PIC16F628 Digital Thermometer Firmware + Full Build Package (DS18B20)"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/odonodesign.com\/blog\/2026\/03\/17\/tinytherm-v2-0-pic16f628-digital-thermometer-firmware-full-build-package-ds18b20-assembly-language\/\" target=\"_blank\" rel=\"noreferrer noopener\">Version 2.0 is out now here<\/a>. It displays up to a further 0-99 degrees Celsius and is multiplexed beautifully. But I\u2019ll leave this first 0-9 Celsius version here for free for all that are interested.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"682\" src=\"https:\/\/odonodesign.com\/blog\/wp-content\/uploads\/2024\/05\/image0-1024x682.jpeg\" alt=\"\" class=\"wp-image-685\" srcset=\"https:\/\/odonodesign.com\/blog\/wp-content\/uploads\/2024\/05\/image0-1024x682.jpeg 1024w, https:\/\/odonodesign.com\/blog\/wp-content\/uploads\/2024\/05\/image0-300x200.jpeg 300w, https:\/\/odonodesign.com\/blog\/wp-content\/uploads\/2024\/05\/image0-768x512.jpeg 768w, https:\/\/odonodesign.com\/blog\/wp-content\/uploads\/2024\/05\/image0-1536x1024.jpeg 1536w, https:\/\/odonodesign.com\/blog\/wp-content\/uploads\/2024\/05\/image0.jpeg 1547w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"683\" height=\"1024\" src=\"https:\/\/odonodesign.com\/blog\/wp-content\/uploads\/2025\/10\/0651794a-09a5-4201-8723-784f8f0b70b0-683x1024.png\" alt=\"\" class=\"wp-image-698\" srcset=\"https:\/\/odonodesign.com\/blog\/wp-content\/uploads\/2025\/10\/0651794a-09a5-4201-8723-784f8f0b70b0-683x1024.png 683w, https:\/\/odonodesign.com\/blog\/wp-content\/uploads\/2025\/10\/0651794a-09a5-4201-8723-784f8f0b70b0-200x300.png 200w, https:\/\/odonodesign.com\/blog\/wp-content\/uploads\/2025\/10\/0651794a-09a5-4201-8723-784f8f0b70b0-768x1152.png 768w, https:\/\/odonodesign.com\/blog\/wp-content\/uploads\/2025\/10\/0651794a-09a5-4201-8723-784f8f0b70b0.png 1024w\" sizes=\"auto, (max-width: 683px) 100vw, 683px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">If you\u2019re interested in modifying this project to suit your personal or business needs, why not hire me by emailing me at patrick@odonodesign.com<\/p>\n\n\n\n<p class=\"p1 wp-block-paragraph\">Why Use PIC Assembly Instead of Arduino\/ESP32?<\/p>\n\n\n\n<p class=\"p3 wp-block-paragraph\">Most examples online use high-level microcontrollers.<\/p>\n\n\n\n<p class=\"p3 wp-block-paragraph\">This project is different \u2014 it\u2019s built for speed, reliability and precision.<\/p>\n\n\n\n<p class=\"p3 wp-block-paragraph\">\u2714 No operating system<\/p>\n\n\n\n<p class=\"p3 wp-block-paragraph\">\u2714 No Arduino bloat<\/p>\n\n\n\n<p class=\"p3 wp-block-paragraph\">\u2714 Cycle-perfect timing<\/p>\n\n\n\n<p class=\"p3 wp-block-paragraph\">\u2714 Ultra-low power<\/p>\n\n\n\n<p class=\"p3 wp-block-paragraph\">\u2714 Microsecond-level accuracy<\/p>\n\n\n\n<p class=\"p3 wp-block-paragraph\">\u2714 Starts instantly<\/p>\n\n\n\n<p class=\"p3 wp-block-paragraph\">\u2714 Production-grade reliability<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The schematic and parts list for this project is free below, but for the assembly code to make it all work I do ask for a small fee to <a href=\"https:\/\/odonodesign.com\/blog\/downloads\/hex-code-for-ds18b20-and-pic16f628-project\/\" target=\"_blank\" rel=\"noreferrer noopener\">download it instantly<\/a> here or <a href=\"https:\/\/www.etsy.com\/uk\/listing\/1735614389\/2-digit-digital-thermometer-hex-code?ref=listings_manager_grid\" class=\"broken_link\">here on Etsy<\/a>. This is to help support me and keep the blog running.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>What does this project do?<\/strong> This digital thermistor will display the current temperature between 0-99\u00b0 Celsius (centigrade). The display is beautifully multiplexed using just I\/O pins. All written in assembly language for mplab (mpasm) 8.92 or earlier on windows (the beautiful version when mplab was at its greatest before the launch of the horrid mplab x).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Disclaimer Notice:<\/strong> This is an educational tutorial only and I will not accept any responsibility for damage or harm to property and\/or persons as a result of you following and building this tutorial project. You are responsible for your own safety and performing any safety tests if used commercially. Ideally we recommend this for use only in personal\/hobby projects.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The PIC16F628 is a fantastic versatile chip. It&#8217;s low cost and is tonnes cheaper than Arduino.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use this assembly code to flash the PIC16F628 chip, any programer will do. Then build the circuit per the schematic and parts list below, switch it on and hey presto!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Components needed<\/strong>:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can buy most of these from AliExpress, Amazon or eBay for pennies:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><a href=\"https:\/\/s.click.aliexpress.com\/e\/_DEl17cB\">PIC16F628 04\/P (ensure its the 4 Mhz version, denoted by the 04\/P)<\/a><\/li>\n\n\n\n<li>Dual <a href=\"https:\/\/s.click.aliexpress.com\/e\/_DCa4pzZ\">7 Segment Display (common anode). Not common cathode.<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/s.click.aliexpress.com\/e\/_DnCJUrZ\">DS18B20<\/a> (also on <a href=\"https:\/\/amzn.to\/4gpOVUF\" target=\"_blank\" rel=\"noreferrer noopener\">Amazon<\/a>)<\/li>\n\n\n\n<li><a href=\"https:\/\/s.click.aliexpress.com\/e\/_DdelBxH\">0.1uF ceramic capacitor,<\/a> <a href=\"https:\/\/s.click.aliexpress.com\/e\/_Dkpa5Pz\">2 x 470ohm, 4.7k ohm, and 10k ohm resistors<\/a><\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">And that\u2019s it!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Hardware Schematic<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Just look how lean this hardware is, minimum components used. Here in the schematic but it also can be used as the finished pcb layout if tweaked slightly:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Fig:1<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/odonodesign.com\/blog\/wp-content\/uploads\/2025\/12\/img_5155-1024x768.jpg\" alt=\"\" class=\"wp-image-722\" srcset=\"https:\/\/odonodesign.com\/blog\/wp-content\/uploads\/2025\/12\/img_5155-1024x768.jpg 1024w, https:\/\/odonodesign.com\/blog\/wp-content\/uploads\/2025\/12\/img_5155-300x225.jpg 300w, https:\/\/odonodesign.com\/blog\/wp-content\/uploads\/2025\/12\/img_5155-768x576.jpg 768w, https:\/\/odonodesign.com\/blog\/wp-content\/uploads\/2025\/12\/img_5155-1536x1152.jpg 1536w, https:\/\/odonodesign.com\/blog\/wp-content\/uploads\/2025\/12\/img_5155.jpg 2000w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Fig:2<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/odonodesign.com\/blog\/wp-content\/uploads\/2025\/10\/img_4812-1024x768.jpg\" alt=\"\" class=\"wp-image-695\" srcset=\"https:\/\/odonodesign.com\/blog\/wp-content\/uploads\/2025\/10\/img_4812-1024x768.jpg 1024w, https:\/\/odonodesign.com\/blog\/wp-content\/uploads\/2025\/10\/img_4812-300x225.jpg 300w, https:\/\/odonodesign.com\/blog\/wp-content\/uploads\/2025\/10\/img_4812-768x576.jpg 768w, https:\/\/odonodesign.com\/blog\/wp-content\/uploads\/2025\/10\/img_4812-1536x1152.jpg 1536w, https:\/\/odonodesign.com\/blog\/wp-content\/uploads\/2025\/10\/img_4812.jpg 2000w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Fig 2 shows the schematic laid out on a breadboard. The blue device on the right is simply a power supply of 5 volts but you can use your own.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">3. CODE TIME: Flash this hex file to the PIC16F628:<\/p>\n\n\n\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-4164d1db-9422-4e4c-bb10-ec640297f5cc\" href=\"https:\/\/odonodesign.com\/blog\/wp-content\/uploads\/2024\/05\/0-9.hex_.zip\">0-9.hex<\/a><a href=\"https:\/\/odonodesign.com\/blog\/wp-content\/uploads\/2024\/05\/0-9.hex_.zip\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-4164d1db-9422-4e4c-bb10-ec640297f5cc\">Download<\/a><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">If you want to modify it just follow the comments in code or reach out to me for assistance at patrick@odonodesign.com<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Power up the circuit, and there you go, the project is complete! Place it its final location and watch it monitor the temperature!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Enjoy!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is an educational tutorial only, but if you want to use it commercially, you must ensure you conduct the appropriate safety tests for your market. But as an example, uses for this could include:<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">Industrial systems, consumer products, systems which are sensitive thermally, thermostatic controls, and thermometers, monitor various environments and machinery, power plants, and manufacturing, weather stations and home automation systems, measure temperature in solids, liquids or gases, Laboratories, Diagnostic labs, Dairy Industries, Domestic or industrial refrigerator temperature monitoring, baby thermometer, HVAC, automotive, research and quality control, adult thermometer, room temperature monitoring, outside temperature logger, industrial and consumer goods\/products, wireless temperature monitor, LCD\/LED screen thermometer, temperature logger, farming, agriculture, office, home, manufactured goods, electronics engineering, embedded systems, integrated products, digital products, physical products, projects, end products, consumer goods, pcb design, printed circuit boards, plastic enclosures, remote temperature monitoring, motors, surface plates, home appliances, computers, industrial equipment, warning electrical radiators, exhaust gas monitoring on cars, food production, 3d printed chocolates, alcohol breathalyser, transit, hvac, power and utilities, calibration instrumentation, heat exchangers, heating cooling systems, energy, red sensor, etc thermistor, rtd sensors,<\/p>\n\n\n\n<p class=\"p1 wp-block-paragraph\">PIC16F628 assembly PIC assembly language tutorial PIC microcontroller vs Arduino PIC vs ESP32 DS18B20 PIC code 1-Wire protocol PIC PIC16F628 thermometer project PIC assembly firmware PIC microcontroller efficiency Why use PIC microcontrollers<\/p>\n\n\n\n<p class=\"p1 wp-block-paragraph\">cycle-accurate timing deterministic microcontroller code low-level embedded programming bare-metal programming PIC 1-Wire timing accuracy microcontroller power consumption interrupt-driven temperature reading embedded systems optimisation minimal instruction cycles lightweight firmware design<\/p>\n\n\n\n<p class=\"p1 wp-block-paragraph\">Arduino overhead Arduino timing limitations ESP32 FreeRTOS overhead Arduino digitalWrite speed ESP32 latency issues microcontroller bloatware embedded systems performance comparison<\/p>\n\n\n\n<p class=\"p1 wp-block-paragraph\">\u201cHow to read a DS18B20 temperature sensor using PIC assembly\u201d \u201cWhy PIC assembly is more efficient than Arduino\u201d \u201cPIC16F628 temperature sensor project with code\u201d \u201cBest microcontroller for simple temperature projects\u201d \u201cCycle accurate 1-Wire code for PIC microcontrollers\u201d \u201cHow to bit-bang 1-Wire in PIC assembly\u201d \u201cPIC16F628 DS18B20 wiring and schematic\u201d \u201cMinimalist microcontroller temperature monitor\u201d \u201cBare metal programming vs Arduino libraries\u201d \u201cWhy my Arduino DS18B20 readings are unstable\u201d \u201cOptimised DS18B20 firmware for 20 MHz PIC\u201d \u201cHow to create a reliable digital thermometer without Arduino\u201d \u201cUnderstanding PIC assembly timing for sensors\u201d<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Domestic Purpose, Check the temperature of the water before bathing, to check the temperature of food items for cooking, to measure the temperature of grill stands, ovens, and other heating appliances.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Laboratory Purpose<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To check the temperature of a solution.<br>To check the room temperature or atmospheric temperature to carry out experiments.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Industrial Purpose<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To measure the temperature of the inner and outer surfaces of the walls.<br>Food industries use them to monitor the temperature of food items during various stages of preparation. Especially in the baking and cooking industries, they are very useful. By taking the right temperature, it is possible to achieve the desired temperature where the microorganisms do not multiply.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u00a9 Copywrite ODONO DESIGN 2023<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>DISCLAIMER<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is an untested project. This is for hobby and personal use only. We do not allow commercial use of this tutorial (ie selling it in an end product, but if you are making this for commercial purposes, YOU are responsible for all CE, FCC and safety testing according to your jurisdiction. We will not be held responsible for any fire, damage or injury caused by this project.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>COPYRIGHT AND TERMS OF USAGE (LISCENSE)<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You are free to use this file for personal, hobby or educational purposes only. No commercial use of this project is permitted. None of the content on this webpage (code and hardware designs) may be plagiarised to other websites. Failure to comply will result in legal action. Thank you.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This webpage is Copyright by Patrick O&#8217;Donoghue 2024. Temperature Monitor&nbsp;by Patrick O&#8217;Donoghue&nbsp;is licensed under&nbsp;<a href=\"https:\/\/creativecommons.org\/licenses\/by-nc-nd\/4.0\/?ref=chooser-v1\" target=\"_blank\" rel=\"noreferrer noopener\">CC BY-NC-ND 4.0&nbsp;<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Version 2.0 is out now here. It displays up to a further 0-99 degrees Celsius and is multiplexed beautifully. But I\u2019ll leave this first 0-9 Celsius version here for free for all that are interested. If you\u2019re interested in modifying this project to suit your personal or business needs, why not hire me by emailing [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":"[]"},"categories":[1],"tags":[],"class_list":["post-31","post","type-post","status-publish","format-standard","hentry","category-tutorials"],"_links":{"self":[{"href":"https:\/\/odonodesign.com\/blog\/wp-json\/wp\/v2\/posts\/31","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/odonodesign.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/odonodesign.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/odonodesign.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/odonodesign.com\/blog\/wp-json\/wp\/v2\/comments?post=31"}],"version-history":[{"count":105,"href":"https:\/\/odonodesign.com\/blog\/wp-json\/wp\/v2\/posts\/31\/revisions"}],"predecessor-version":[{"id":856,"href":"https:\/\/odonodesign.com\/blog\/wp-json\/wp\/v2\/posts\/31\/revisions\/856"}],"wp:attachment":[{"href":"https:\/\/odonodesign.com\/blog\/wp-json\/wp\/v2\/media?parent=31"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/odonodesign.com\/blog\/wp-json\/wp\/v2\/categories?post=31"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/odonodesign.com\/blog\/wp-json\/wp\/v2\/tags?post=31"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}