{"id":461,"date":"2013-01-29T21:26:42","date_gmt":"2013-01-29T21:26:42","guid":{"rendered":"http:\/\/ava.upuaut.net\/?p=461"},"modified":"2013-01-29T21:26:42","modified_gmt":"2013-01-29T21:26:42","slug":"remote-controlled-power-switch","status":"publish","type":"post","link":"https:\/\/ava.upuaut.net\/?p=461","title":{"rendered":"Remote Controlled Power Switch"},"content":{"rendered":"<p>With <a href=\"http:\/\/blog.radioartisan.com\/yaesu-rotator-computer-serial-interface\/\">K3NG&#8217;s Rotator Control Software<\/a> and <a title=\"Arduino based Yaesu Rotator Controller\" href=\"http:\/\/ava.upuaut.net\/?p=372\">my interface<\/a> I am now able to remotely control my rotator so when there are launches in the day I can track them from work&#8230;.if I remember to turn the rotator control unit on.<\/p>\n<p>This seems to be the sticking point and I was constantly forgetting to power the control unit on before leaving for work. Therefore I decided to make a remote control power switch and link it into the rotator control unit. I ordered a <a href=\"http:\/\/dx.com\/p\/arduino-5v-relay-module-blue-black-121354\">5V Relay Module<\/a> from everyones favourite tat store <a href=\"http:\/\/dx.com\">dx.com<\/a>.<\/p>\n<p>When it arrived a few weeks later I wired this into a butchered 4 way extension :<\/p>\n<p><a href=\"http:\/\/ava.upuaut.net\/wp-content\/uploads\/2013\/01\/IMG_1104.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-462\" alt=\"IMG_1104\" src=\"\/\/ava.upuaut.net\/wp-content\/uploads\/2013\/01\/IMG_1104-1024x768.jpg\" width=\"620\" height=\"465\" srcset=\"https:\/\/ava.upuaut.net\/wp-content\/uploads\/2013\/01\/IMG_1104-1024x768.jpg 1024w, https:\/\/ava.upuaut.net\/wp-content\/uploads\/2013\/01\/IMG_1104-300x225.jpg 300w\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" \/><\/a> <a href=\"http:\/\/ava.upuaut.net\/wp-content\/uploads\/2013\/01\/IMG_1105.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-463\" alt=\"IMG_1105\" src=\"\/\/ava.upuaut.net\/wp-content\/uploads\/2013\/01\/IMG_1105-1024x768.jpg\" width=\"620\" height=\"465\" srcset=\"https:\/\/ava.upuaut.net\/wp-content\/uploads\/2013\/01\/IMG_1105-1024x768.jpg 1024w, https:\/\/ava.upuaut.net\/wp-content\/uploads\/2013\/01\/IMG_1105-300x225.jpg 300w\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" \/><\/a>After replacing the 13A fuses in the plug and 4 way with 3A ones (the relay is a chinese rated 10A), PAT tested it (passed!) I wired it up to a test Arduino to confirm it worked. The lead to the rotator controller was made from a head phone extension cut in two so it can be removed as needed. After soldering it to the Arduino 5V, GND and A4 pins\u00a0I amended K3NG&#8217;s code as follows, changing all the &#8220;button&#8221; references to 0 (I don&#8217;t use the buttons).<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\r\n\r\n#define IDLE_TIMEOUT 1 \/\/ Idle time out in mins\r\n#define POWERSWITCH A4\r\n\r\nunsigned long idle_timer;\r\n\r\nvoid loop() {\r\n\r\ncheck_serial();\r\n if( (millis()-idle_timer) &gt; (60000*IDLE_TIMEOUT) ) {\r\n digitalWrite(POWERSWITCH, LOW);\r\n }\r\n else\r\n {\r\n digitalWrite(POWERSWITCH, HIGH);\r\n }\r\n\r\n\r\n void check_serial(){\r\n\r\nif (Serial.available() &gt; 0) {\r\n if (serial_led) {\r\n digitalWrite(serial_led, HIGH); \/\/ blink the LED just to say we got something\r\n }\r\n incoming_serial_byte = Serial.read();\r\n idle_timer=millis();\r\n\r\n<\/pre>\n<p>Now if there is no serial activity for 1 min the Arduino powers the controller off. Issue any serial command (i.e open PSTRotate) and it powers the controller on, and to boot turns the LCD back light on.<\/p>\n<p>So now even if I do forget to turn the controller on I don&#8217;t have to revert to remote control V0.1 (&#8220;The Lovely Wife&#8221;)<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>With K3NG&#8217;s Rotator Control Software and my interface I am now able to remotely control my rotator so when there are launches in the day I can track them from work&#8230;.if I remember to turn the rotator control unit on. &hellip;<\/p>\n<p class=\"read-more\"><a href=\"https:\/\/ava.upuaut.net\/?p=461\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-461","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/ava.upuaut.net\/index.php?rest_route=\/wp\/v2\/posts\/461","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ava.upuaut.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ava.upuaut.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ava.upuaut.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ava.upuaut.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=461"}],"version-history":[{"count":3,"href":"https:\/\/ava.upuaut.net\/index.php?rest_route=\/wp\/v2\/posts\/461\/revisions"}],"predecessor-version":[{"id":466,"href":"https:\/\/ava.upuaut.net\/index.php?rest_route=\/wp\/v2\/posts\/461\/revisions\/466"}],"wp:attachment":[{"href":"https:\/\/ava.upuaut.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=461"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ava.upuaut.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=461"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ava.upuaut.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=461"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}