{"id":65,"date":"2010-01-03T21:28:09","date_gmt":"2010-01-03T19:28:09","guid":{"rendered":"http:\/\/lisas.de\/~hauser\/wp\/?p=65"},"modified":"2010-01-03T21:28:09","modified_gmt":"2010-01-03T19:28:09","slug":"saving-the-planet","status":"publish","type":"post","link":"https:\/\/lisas.de\/~hauser\/wp\/?p=65","title":{"rendered":"Saving the planet"},"content":{"rendered":"<p>I&#8217;ve moved my printer to another room. Now it&#8217;s connected to my continuously running computer. But it&#8217;s constantly connected to power and is not really switching off. So I was searching for a solution to switch it of automatically. Using a \u00b5C would be nice, but the idea a the moment is to use a USB->serial converter and us the status pin RTS to switch a solid state relay. Today I&#8217;ve successfully tested the setup. First I tried with python, which in general is able to set the status of that pin, but unfortunately python is too &#8220;high&#8221;. During initialization and termination RTS is touched. And I don&#8217;t want to &#8220;shock&#8221; my printer with short switching pulses. But I&#8217;ve found <a href=\"http:\/\/www.embeddedlinuxinterfacing.com\/chapters\/06\/setSerialSignal.c\">this<\/a> C-code. This allows to keep the state of the pin after termination of the program. This little piece of code exactly does what I need. I&#8217;ve added a diode before connecting RTS to the solid state relay to make sure that the relay does not see a negative voltage. I can not yet post a picture of that because my prototype is highly dangerous and I don&#8217;t want to provide any examples of dangerous 230V wiring on the net.<\/p>\n<p>The next step will be to set up a cups backend that switches on and off the relay. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve moved my printer to another room. Now it&#8217;s connected to my continuously running computer. But it&#8217;s constantly connected to power and is not really switching off. So I was searching for a solution to switch it of automatically. Using a \u00b5C would be nice, but the idea a the moment is to use a &hellip; <a href=\"https:\/\/lisas.de\/~hauser\/wp\/?p=65\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Saving the planet<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[26,25],"class_list":["post-65","post","type-post","status-publish","format-standard","hentry","category-hardware","tag-co2","tag-printer"],"_links":{"self":[{"href":"https:\/\/lisas.de\/~hauser\/wp\/index.php?rest_route=\/wp\/v2\/posts\/65","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lisas.de\/~hauser\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lisas.de\/~hauser\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lisas.de\/~hauser\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/lisas.de\/~hauser\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=65"}],"version-history":[{"count":2,"href":"https:\/\/lisas.de\/~hauser\/wp\/index.php?rest_route=\/wp\/v2\/posts\/65\/revisions"}],"predecessor-version":[{"id":67,"href":"https:\/\/lisas.de\/~hauser\/wp\/index.php?rest_route=\/wp\/v2\/posts\/65\/revisions\/67"}],"wp:attachment":[{"href":"https:\/\/lisas.de\/~hauser\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=65"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lisas.de\/~hauser\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=65"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lisas.de\/~hauser\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=65"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}