{"id":47,"date":"2010-01-03T19:28:09","date_gmt":"2010-01-03T19:28:09","guid":{"rendered":"http:\/\/lisas.de\/~hauser\/wp\/?p=65"},"modified":"2018-09-20T11:40:48","modified_gmt":"2018-09-20T09:40:48","slug":"saving-the-planet","status":"publish","type":"post","link":"https:\/\/lisas.de\/luges\/index.php\/2010\/01\/03\/saving-the-planet\/","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-&gt;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;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-47","post","type-post","status-publish","format-standard","hentry","category-luges"],"_links":{"self":[{"href":"https:\/\/lisas.de\/luges\/index.php\/wp-json\/wp\/v2\/posts\/47","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lisas.de\/luges\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lisas.de\/luges\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lisas.de\/luges\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lisas.de\/luges\/index.php\/wp-json\/wp\/v2\/comments?post=47"}],"version-history":[{"count":1,"href":"https:\/\/lisas.de\/luges\/index.php\/wp-json\/wp\/v2\/posts\/47\/revisions"}],"predecessor-version":[{"id":513,"href":"https:\/\/lisas.de\/luges\/index.php\/wp-json\/wp\/v2\/posts\/47\/revisions\/513"}],"wp:attachment":[{"href":"https:\/\/lisas.de\/luges\/index.php\/wp-json\/wp\/v2\/media?parent=47"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lisas.de\/luges\/index.php\/wp-json\/wp\/v2\/categories?post=47"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lisas.de\/luges\/index.php\/wp-json\/wp\/v2\/tags?post=47"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}