{"id":836,"date":"2016-07-18T23:57:29","date_gmt":"2016-07-19T03:57:29","guid":{"rendered":"http:\/\/www.rfdm.com\/blog\/?p=836"},"modified":"2016-07-19T00:09:06","modified_gmt":"2016-07-19T04:09:06","slug":"raspberry-pi-garage-door-opener-part-2","status":"publish","type":"post","link":"https:\/\/www.rfdm.com\/blog\/?p=836","title":{"rendered":"Raspberry Pi garage door opener: part 2"},"content":{"rendered":"<p>I have a fully functioning software suite now for my garage door opener.  I have been using a small simulator program on the Raspberry Pi to pull the pins up and down (using the pullup and pulldown resistors).  Tonight I plugged in one of the actual rotary encoders, and it works fine.  And now that I think about it, I don&#8217;t really need the optocouplers on the inputs, since I&#8217;m using encoders with NPN open collector outputs.  All I need to do is enable the pull-up resistors.  This is also true for the garage door closed switches.  Hence I am going to draw up a second board with a lot fewer components.  The component cost wasn&#8217;t significant for the board I have now, but it&#8217;ll save on my effort to populate the board.  By dropping the optocouplers, I will eliminate 15 components.  And technically I could probably eliminate the filtering capacitors too since the encoder cable is shielded.  That would eliminate 4 more components.<\/p>\n<p>I hate the amount of board space required for the relays, but I need them.  I considered using MOSFETs or Darlingtons, but I decided it was just a bad idea to tie the Raspberry Pi ground to my garage door opener&#8217;s ground pin.  It&#8217;d be a recipe for ground loop disasters.  The relays keep the Raspberry Pi isolated.  I am using relay drivers to drive the relays, which just saves on component count and board space.<\/p>\n<p>I have a decent web interface now, which runs on my web server and communicates with the Raspberry Pi (encrypted).  I have yet to implement the separate up\/down logic, but since the web interface shows the movement of the door, it&#8217;s not strictly necessary.  Door activation works, and I can see whether the door is opening or closing.<\/p>\n<p>My code on the Raspberry Pi will learn the door travel from a full open\/close cycle, so the graphic in the web interface is very representative of the amount the door is open.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have a fully functioning software suite now for my garage door opener. I have been using a small simulator program on the Raspberry Pi to pull the pins up and down (using the pullup and pulldown resistors). Tonight I plugged in one of the actual rotary encoders, and it works fine. And now that &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.rfdm.com\/blog\/?p=836\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Raspberry Pi garage door opener: part 2&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[80,29,12,13],"tags":[],"class_list":["post-836","post","type-post","status-publish","format-standard","hentry","category-embedded","category-freebsd","category-software-development","category-web-development"],"_links":{"self":[{"href":"https:\/\/www.rfdm.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/836","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rfdm.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rfdm.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rfdm.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rfdm.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=836"}],"version-history":[{"count":4,"href":"https:\/\/www.rfdm.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/836\/revisions"}],"predecessor-version":[{"id":840,"href":"https:\/\/www.rfdm.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/836\/revisions\/840"}],"wp:attachment":[{"href":"https:\/\/www.rfdm.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=836"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rfdm.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=836"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rfdm.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=836"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}