{"id":573,"date":"2021-08-22T22:34:35","date_gmt":"2021-08-23T03:34:35","guid":{"rendered":"http:\/\/10.0.30.44\/?p=573"},"modified":"2025-03-02T22:01:51","modified_gmt":"2025-03-03T03:01:51","slug":"temperature-controlled-switch","status":"publish","type":"post","link":"https:\/\/monokeith.ca\/?p=573","title":{"rendered":"Temperature Controlled Switch"},"content":{"rendered":"\n<p>Can be used for precise temperature control in areas like&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Sous_vide\">sous-vide<\/a>.<\/p>\n\n\n\n<p>This software was tested on Raspberry Pi Pico. Attached with:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>DS18B20 temperature sensor<\/li><li>I2C 128*64 mono-color display<\/li><li>3 LEDs for displaying status<\/li><li>Rotary encoder to set target temperature<\/li><li>Relay to control heating element (for example, a cheap rice-cooker that don&#8217;t have any built-in microcontroller)<\/li><\/ul>\n\n\n\n<p>Connections:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Temperature sensor &#8211; GP16<\/li><li>I2C display: SDA &#8211; GP26, SCL &#8211; GP27<\/li><li>LEDs: GREEN &#8211; GP20, YELLOW &#8211; GP19, RED &#8211; GP18<\/li><li>Rotary encoder (no pullup resistor required): GP12, GP13<\/li><li>Relay: Share pin with RED LED &#8211; GP18.<\/li><\/ul>\n\n\n\n<p>Status:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Green: temperature above target (heating off)<\/li><li>Red: temperature below target (heating on)<\/li><li>Yellow: updating display content<\/li><\/ul>\n\n\n\n<p>Source code: <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/monoKeith\/Temperature-Switch\" target=\"_blank\">https:\/\/github.com\/monoKeith\/Temperature-Switch<\/a><\/p>\n\n\n\n<p>STL files: <a href=\"https:\/\/www.thingiverse.com\/thing:4939284\" data-type=\"URL\" data-id=\"https:\/\/www.thingiverse.com\/thing:4939284\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.thingiverse.com\/thing:4939284<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"http:\/\/10.0.30.44\/wp-content\/uploads\/2021\/08\/IMG_5155-1024x768.jpeg\" alt=\"\" class=\"wp-image-593\" srcset=\"https:\/\/monokeith.ca\/wp-content\/uploads\/2021\/08\/IMG_5155-1024x768.jpeg 1024w, https:\/\/monokeith.ca\/wp-content\/uploads\/2021\/08\/IMG_5155-300x225.jpeg 300w, https:\/\/monokeith.ca\/wp-content\/uploads\/2021\/08\/IMG_5155-768x576.jpeg 768w, https:\/\/monokeith.ca\/wp-content\/uploads\/2021\/08\/IMG_5155-1536x1152.jpeg 1536w, https:\/\/monokeith.ca\/wp-content\/uploads\/2021\/08\/IMG_5155-2048x1536.jpeg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Code &amp; Test<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/10.0.30.44\/wp-content\/uploads\/2021\/08\/IMG_4973-1024x768.jpeg\" alt=\"\" class=\"wp-image-588\"\/><figcaption>Buttons, Display, Encoder<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/10.0.30.44\/wp-content\/uploads\/2021\/08\/IMG_4974-1024x768.jpeg\" alt=\"\" class=\"wp-image-585\"\/><figcaption>Soldered on board<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/10.0.30.44\/wp-content\/uploads\/2021\/08\/IMG_5129-1024x768.jpeg\" alt=\"\" class=\"wp-image-586\"\/><figcaption>3D printed case<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/10.0.30.44\/wp-content\/uploads\/2021\/08\/IMG_5131-1024x768.jpeg\" alt=\"\" class=\"wp-image-584\"\/><figcaption>3D printed case<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/10.0.30.44\/wp-content\/uploads\/2021\/08\/IMG_5160-1024x768.jpeg\" alt=\"\" class=\"wp-image-580\"\/><figcaption>Solder input and output wires to 5V power supply<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/10.0.30.44\/wp-content\/uploads\/2021\/08\/IMG_5161-1024x768.jpeg\" alt=\"\" class=\"wp-image-579\"\/><figcaption>Install power supply in case<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"http:\/\/10.0.30.44\/wp-content\/uploads\/2021\/08\/IMG_5164-1024x768.jpeg\" alt=\"\" class=\"wp-image-583\" srcset=\"https:\/\/monokeith.ca\/wp-content\/uploads\/2021\/08\/IMG_5164-1024x768.jpeg 1024w, https:\/\/monokeith.ca\/wp-content\/uploads\/2021\/08\/IMG_5164-300x225.jpeg 300w, https:\/\/monokeith.ca\/wp-content\/uploads\/2021\/08\/IMG_5164-768x576.jpeg 768w, https:\/\/monokeith.ca\/wp-content\/uploads\/2021\/08\/IMG_5164-1536x1152.jpeg 1536w, https:\/\/monokeith.ca\/wp-content\/uploads\/2021\/08\/IMG_5164-2048x1536.jpeg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Install socket and circuit board<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/10.0.30.44\/wp-content\/uploads\/2021\/08\/IMG_5158-1024x768.jpeg\" alt=\"\" class=\"wp-image-582\"\/><figcaption>3D printed scroll wheel<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/10.0.30.44\/wp-content\/uploads\/2021\/08\/IMG_5159-1024x768.jpeg\" alt=\"\" class=\"wp-image-581\"\/><figcaption>Scroll wheel<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/10.0.30.44\/wp-content\/uploads\/2021\/08\/IMG_5166-1024x768.jpeg\" alt=\"\" class=\"wp-image-578\"\/><figcaption>Solder everything to a RaspberryPi Pico<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/10.0.30.44\/wp-content\/uploads\/2021\/08\/IMG_5169-1024x768.jpeg\" alt=\"\" class=\"wp-image-577\"\/><figcaption>Test boot<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/10.0.30.44\/wp-content\/uploads\/2021\/08\/IMG_5170-1024x768.jpeg\" alt=\"\" class=\"wp-image-576\"\/><figcaption>Hot glue in place<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"http:\/\/10.0.30.44\/wp-content\/uploads\/2021\/08\/IMG_5174-1024x768.jpeg\" alt=\"\" class=\"wp-image-598\" srcset=\"https:\/\/monokeith.ca\/wp-content\/uploads\/2021\/08\/IMG_5174-1024x768.jpeg 1024w, https:\/\/monokeith.ca\/wp-content\/uploads\/2021\/08\/IMG_5174-300x225.jpeg 300w, https:\/\/monokeith.ca\/wp-content\/uploads\/2021\/08\/IMG_5174-768x576.jpeg 768w, https:\/\/monokeith.ca\/wp-content\/uploads\/2021\/08\/IMG_5174-1536x1152.jpeg 1536w, https:\/\/monokeith.ca\/wp-content\/uploads\/2021\/08\/IMG_5174-2048x1536.jpeg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Install backplate<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"http:\/\/10.0.30.44\/wp-content\/uploads\/2021\/08\/IMG_5175-1024x768.jpeg\" alt=\"\" class=\"wp-image-599\" srcset=\"https:\/\/monokeith.ca\/wp-content\/uploads\/2021\/08\/IMG_5175-1024x768.jpeg 1024w, https:\/\/monokeith.ca\/wp-content\/uploads\/2021\/08\/IMG_5175-300x225.jpeg 300w, https:\/\/monokeith.ca\/wp-content\/uploads\/2021\/08\/IMG_5175-768x576.jpeg 768w, https:\/\/monokeith.ca\/wp-content\/uploads\/2021\/08\/IMG_5175-1536x1152.jpeg 1536w, https:\/\/monokeith.ca\/wp-content\/uploads\/2021\/08\/IMG_5175-2048x1536.jpeg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Complete<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"http:\/\/10.0.30.44\/wp-content\/uploads\/2021\/08\/IMG_5173-1024x768.jpeg\" alt=\"\" class=\"wp-image-575\"\/><figcaption>Finish<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Can be used for precise temperature control in areas like&nbsp;sous-vide. This software was tested on Raspberry Pi Pico. Attached with: DS18B20 temperature sensor I2C 128*64 mono-color display 3 LEDs for displaying status Rotary encoder to set target temperature Relay to control heating element (for example, a cheap rice-cooker that don&#8217;t have any built-in microcontroller) Connections: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":599,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-573","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-diy"],"_links":{"self":[{"href":"https:\/\/monokeith.ca\/index.php?rest_route=\/wp\/v2\/posts\/573","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monokeith.ca\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/monokeith.ca\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/monokeith.ca\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/monokeith.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=573"}],"version-history":[{"count":12,"href":"https:\/\/monokeith.ca\/index.php?rest_route=\/wp\/v2\/posts\/573\/revisions"}],"predecessor-version":[{"id":603,"href":"https:\/\/monokeith.ca\/index.php?rest_route=\/wp\/v2\/posts\/573\/revisions\/603"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/monokeith.ca\/index.php?rest_route=\/wp\/v2\/media\/599"}],"wp:attachment":[{"href":"https:\/\/monokeith.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=573"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/monokeith.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=573"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/monokeith.ca\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=573"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}