{"id":377,"date":"2014-12-26T19:14:02","date_gmt":"2014-12-26T18:14:02","guid":{"rendered":"http:\/\/queen.run.montefiore.ulg.ac.be\/~barbette\/?p=377"},"modified":"2015-10-08T14:51:26","modified_gmt":"2015-10-08T12:51:26","slug":"pic-domotic-station","status":"publish","type":"post","link":"https:\/\/perso.uclouvain.be\/tom.barbette\/pic-domotic-station\/","title":{"rendered":"PIC Domotic station"},"content":{"rendered":"<p>I use this Microchip&#8217;s PIC program made in C to control my domotic system for quite some time now, and I think it&#8217;s ready to be published.<\/p>\n<p>Below is the readme file, to read the last version, directly go to :<\/p>\n<p>https:\/\/github.com\/tbarbette\/picdomotic<\/p>\n<h1>PIC Domotic station<\/h1>\n<p>&nbsp;<\/p>\n<p>PIC program for a domotic station controlling two temperature sensors, multiple relay, a USB port (for power only) and connected to a PC using UART to receive its instructions.<\/p>\n<p>It uses a PIC18F23K20 but should work on most of them. The PC sends simple commandes through \/dev\/ttyUSB0 like &#8220;A 32&#8221; to enable the device 32, or &#8220;E 32&#8221; to disable it. &#8220;T&#8221; to get temperature, &#8230; See the source code in main.c.<\/p>\n<p>This is MPLAB X IDE project. The only usefull file is in fact main.c, the rest is auto-generated, but I include them if someone would want to directly program the binaries, for example.<\/p>\n<h1><a id=\"user-content-technology-used\" class=\"anchor\" href=\"https:\/\/github.com\/MappaM\/picdomotic#technology-used\"><\/a>Technology used<\/h1>\n<p>If you&#8217;re looking for sample code, you may find here how to :<\/p>\n<ul class=\"task-list\">\n<li>Use the UART to communicate with a PC (UART is connected to a &#8220;uart usb&#8221; module very cheaped that you can find on ebay for example) .<\/li>\n<li>Use the watchdog timer to ensure a device reset if something goes wrong<\/li>\n<li>Use Brown-out to jump to do an interrupt and do &#8220;something&#8221; (blink in my case) if the voltage goes below some threshold<\/li>\n<li>Use the ADC to read the temperature given by two LM35<\/li>\n<li>Read\/write to eeprom<\/li>\n<li>Control a 5V relay board with a 3.3V relay board using NPN Transistors (when I&#8217;ll add the schematic though)<\/li>\n<\/ul>\n<p>The python script used to manage the PIC controller is available at<a href=\"https:\/\/github.com\/tbarbette\/monitoring\/blob\/master\/scripts\/relay.py\">https:\/\/github.com\/tbarbette\/monitoring\/blob\/master\/scripts\/relay.py<\/a> and a small HTTP server allowing you to remotely control it is available at<a href=\"https:\/\/github.com\/tbarbette\/monitoring\/blob\/master\/scripts\/server.py\">https:\/\/github.com\/tbarbette\/monitoring\/blob\/master\/scripts\/server.py<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I use this Microchip&#8217;s PIC program made in C to control my domotic system for quite some time now, and I think it&#8217;s ready to be published. Below is the readme file, to read the last version, directly go to : https:\/\/github.com\/tbarbette\/picdomotic PIC Domotic station &nbsp; PIC program for a domotic station controlling two temperature &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/perso.uclouvain.be\/tom.barbette\/pic-domotic-station\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;PIC Domotic station&#8221;<\/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":[13,14],"tags":[],"class_list":["post-377","post","type-post","status-publish","format-standard","hentry","category-domotic","category-electronic"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>PIC Domotic station - Tom Barbette<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/perso.uclouvain.be\/tom.barbette\/pic-domotic-station\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PIC Domotic station - Tom Barbette\" \/>\n<meta property=\"og:description\" content=\"I use this Microchip&#8217;s PIC program made in C to control my domotic system for quite some time now, and I think it&#8217;s ready to be published. Below is the readme file, to read the last version, directly go to : https:\/\/github.com\/tbarbette\/picdomotic PIC Domotic station &nbsp; PIC program for a domotic station controlling two temperature &hellip; Continue reading &quot;PIC Domotic station&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/perso.uclouvain.be\/tom.barbette\/pic-domotic-station\/\" \/>\n<meta property=\"og:site_name\" content=\"Tom Barbette\" \/>\n<meta property=\"article:published_time\" content=\"2014-12-26T18:14:02+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2015-10-08T12:51:26+00:00\" \/>\n<meta name=\"author\" content=\"Tom Barbette\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@TomBarbette\" \/>\n<meta name=\"twitter:site\" content=\"@TomBarbette\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Tom Barbette\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/pic-domotic-station\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/pic-domotic-station\\\/\"},\"author\":{\"name\":\"Tom Barbette\",\"@id\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/#\\\/schema\\\/person\\\/7f791766092e1207bc7a94a65e74f4fd\"},\"headline\":\"PIC Domotic station\",\"datePublished\":\"2014-12-26T18:14:02+00:00\",\"dateModified\":\"2015-10-08T12:51:26+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/pic-domotic-station\\\/\"},\"wordCount\":315,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/#organization\"},\"articleSection\":[\"Domotic\",\"Electronic\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/pic-domotic-station\\\/\",\"url\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/pic-domotic-station\\\/\",\"name\":\"PIC Domotic station - Tom Barbette\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/#website\"},\"datePublished\":\"2014-12-26T18:14:02+00:00\",\"dateModified\":\"2015-10-08T12:51:26+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/pic-domotic-station\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/pic-domotic-station\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/pic-domotic-station\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PIC Domotic station\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/#website\",\"url\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/\",\"name\":\"Tom Barbette\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/#organization\",\"name\":\"Efficiency of Networked Systems Group\",\"url\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/cropped-logo-uclouvain-2021-barbette.png\",\"contentUrl\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/cropped-logo-uclouvain-2021-barbette.png\",\"width\":512,\"height\":512,\"caption\":\"Efficiency of Networked Systems Group\"},\"image\":{\"@id\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/x.com\\\/TomBarbette\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/tom-barbette\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/#\\\/schema\\\/person\\\/7f791766092e1207bc7a94a65e74f4fd\",\"name\":\"Tom Barbette\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/aecd99cba3b4d91d3775fde3219bfa362cd99acfbe95848ec303b9685f366fcd?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/aecd99cba3b4d91d3775fde3219bfa362cd99acfbe95848ec303b9685f366fcd?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/aecd99cba3b4d91d3775fde3219bfa362cd99acfbe95848ec303b9685f366fcd?s=96&r=g\",\"caption\":\"Tom Barbette\"},\"sameAs\":[\"https:\\\/\\\/www.tombarbette.be\"],\"url\":\"https:\\\/\\\/perso.uclouvain.be\\\/tom.barbette\\\/author\\\/tom\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PIC Domotic station - Tom Barbette","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/perso.uclouvain.be\/tom.barbette\/pic-domotic-station\/","og_locale":"en_US","og_type":"article","og_title":"PIC Domotic station - Tom Barbette","og_description":"I use this Microchip&#8217;s PIC program made in C to control my domotic system for quite some time now, and I think it&#8217;s ready to be published. Below is the readme file, to read the last version, directly go to : https:\/\/github.com\/tbarbette\/picdomotic PIC Domotic station &nbsp; PIC program for a domotic station controlling two temperature &hellip; Continue reading \"PIC Domotic station\"","og_url":"https:\/\/perso.uclouvain.be\/tom.barbette\/pic-domotic-station\/","og_site_name":"Tom Barbette","article_published_time":"2014-12-26T18:14:02+00:00","article_modified_time":"2015-10-08T12:51:26+00:00","author":"Tom Barbette","twitter_card":"summary_large_image","twitter_creator":"@TomBarbette","twitter_site":"@TomBarbette","twitter_misc":{"Written by":"Tom Barbette","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/perso.uclouvain.be\/tom.barbette\/pic-domotic-station\/#article","isPartOf":{"@id":"https:\/\/perso.uclouvain.be\/tom.barbette\/pic-domotic-station\/"},"author":{"name":"Tom Barbette","@id":"https:\/\/perso.uclouvain.be\/tom.barbette\/#\/schema\/person\/7f791766092e1207bc7a94a65e74f4fd"},"headline":"PIC Domotic station","datePublished":"2014-12-26T18:14:02+00:00","dateModified":"2015-10-08T12:51:26+00:00","mainEntityOfPage":{"@id":"https:\/\/perso.uclouvain.be\/tom.barbette\/pic-domotic-station\/"},"wordCount":315,"commentCount":0,"publisher":{"@id":"https:\/\/perso.uclouvain.be\/tom.barbette\/#organization"},"articleSection":["Domotic","Electronic"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/perso.uclouvain.be\/tom.barbette\/pic-domotic-station\/","url":"https:\/\/perso.uclouvain.be\/tom.barbette\/pic-domotic-station\/","name":"PIC Domotic station - Tom Barbette","isPartOf":{"@id":"https:\/\/perso.uclouvain.be\/tom.barbette\/#website"},"datePublished":"2014-12-26T18:14:02+00:00","dateModified":"2015-10-08T12:51:26+00:00","breadcrumb":{"@id":"https:\/\/perso.uclouvain.be\/tom.barbette\/pic-domotic-station\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/perso.uclouvain.be\/tom.barbette\/pic-domotic-station\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/perso.uclouvain.be\/tom.barbette\/pic-domotic-station\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/perso.uclouvain.be\/tom.barbette\/"},{"@type":"ListItem","position":2,"name":"PIC Domotic station"}]},{"@type":"WebSite","@id":"https:\/\/perso.uclouvain.be\/tom.barbette\/#website","url":"https:\/\/perso.uclouvain.be\/tom.barbette\/","name":"Tom Barbette","description":"","publisher":{"@id":"https:\/\/perso.uclouvain.be\/tom.barbette\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/perso.uclouvain.be\/tom.barbette\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/perso.uclouvain.be\/tom.barbette\/#organization","name":"Efficiency of Networked Systems Group","url":"https:\/\/perso.uclouvain.be\/tom.barbette\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/perso.uclouvain.be\/tom.barbette\/#\/schema\/logo\/image\/","url":"https:\/\/perso.uclouvain.be\/tom.barbette\/wp-content\/uploads\/2022\/04\/cropped-logo-uclouvain-2021-barbette.png","contentUrl":"https:\/\/perso.uclouvain.be\/tom.barbette\/wp-content\/uploads\/2022\/04\/cropped-logo-uclouvain-2021-barbette.png","width":512,"height":512,"caption":"Efficiency of Networked Systems Group"},"image":{"@id":"https:\/\/perso.uclouvain.be\/tom.barbette\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/TomBarbette","https:\/\/www.linkedin.com\/in\/tom-barbette"]},{"@type":"Person","@id":"https:\/\/perso.uclouvain.be\/tom.barbette\/#\/schema\/person\/7f791766092e1207bc7a94a65e74f4fd","name":"Tom Barbette","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/aecd99cba3b4d91d3775fde3219bfa362cd99acfbe95848ec303b9685f366fcd?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/aecd99cba3b4d91d3775fde3219bfa362cd99acfbe95848ec303b9685f366fcd?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/aecd99cba3b4d91d3775fde3219bfa362cd99acfbe95848ec303b9685f366fcd?s=96&r=g","caption":"Tom Barbette"},"sameAs":["https:\/\/www.tombarbette.be"],"url":"https:\/\/perso.uclouvain.be\/tom.barbette\/author\/tom\/"}]}},"_links":{"self":[{"href":"https:\/\/perso.uclouvain.be\/tom.barbette\/wp-json\/wp\/v2\/posts\/377","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/perso.uclouvain.be\/tom.barbette\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/perso.uclouvain.be\/tom.barbette\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/perso.uclouvain.be\/tom.barbette\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/perso.uclouvain.be\/tom.barbette\/wp-json\/wp\/v2\/comments?post=377"}],"version-history":[{"count":2,"href":"https:\/\/perso.uclouvain.be\/tom.barbette\/wp-json\/wp\/v2\/posts\/377\/revisions"}],"predecessor-version":[{"id":515,"href":"https:\/\/perso.uclouvain.be\/tom.barbette\/wp-json\/wp\/v2\/posts\/377\/revisions\/515"}],"wp:attachment":[{"href":"https:\/\/perso.uclouvain.be\/tom.barbette\/wp-json\/wp\/v2\/media?parent=377"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/perso.uclouvain.be\/tom.barbette\/wp-json\/wp\/v2\/categories?post=377"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/perso.uclouvain.be\/tom.barbette\/wp-json\/wp\/v2\/tags?post=377"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}