{"id":35,"date":"2024-01-12T16:16:11","date_gmt":"2024-01-12T16:16:11","guid":{"rendered":"http:\/\/stellarjourney.com\/main\/?page_id=35"},"modified":"2024-01-16T15:43:38","modified_gmt":"2024-01-16T15:43:38","slug":"observatory-controller-ocs","status":"publish","type":"page","link":"http:\/\/stellarjourney.com\/main\/observatory-controller-ocs\/","title":{"rendered":"Observatory Controller (OCS)"},"content":{"rendered":"\n<p class=\"has-link-color has-small-font-size wp-elements-f4c4b68e413365f9a8606e9c03cb8525 wp-block-paragraph\"><br><\/p>\n\n\n\n<div class=\"wp-block-group is-nowrap is-layout-flex wp-container-core-group-is-layout-9ba6dbca wp-block-group-is-layout-flex\">\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9ba6dbca wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:55%\">\n<p class=\"has-small-font-size wp-block-paragraph\" style=\"margin-right:var(--wp--preset--spacing--20);margin-left:var(--wp--preset--spacing--20);padding-right:0;padding-left:0\">The <a href=\"https:\/\/github.com\/hjd1964\/OCS\">OnCue OCS (Observatory Control System)<\/a> should be of help to capable DIY&#8217;ers who want to automate small observatories. It&#8217;s based on using an inexpensive and easy to work with Arduino Microcontrollers (Mega2560, Teensy, ESP32) to control some relays and sense switch closures and analog inputs and operate weather sensors which are usually on an I2C bus.<br><br>The OCS hooks up to your wired LAN (router, etc.) and provides a website which can monitor\/control power, heating and cooling systems, lighting, roll-off roof, dome, and also monitor weather conditions.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:45%\">\n<p class=\"has-text-align-left has-background has-small-font-size wp-block-paragraph\" style=\"background-color:#13231d;margin-top:0;margin-right:var(--wp--preset--spacing--20);margin-bottom:0;margin-left:var(--wp--preset--spacing--20);padding-top:var(--wp--preset--spacing--20);padding-right:var(--wp--preset--spacing--30);padding-bottom:var(--wp--preset--spacing--20);padding-left:var(--wp--preset--spacing--30)\"><strong>There are two OCS ASCOM drivers available for a small fee.<\/strong><br><br>ASCOM aware Windows software can then connect to the OCS via. the USB\/Serial interface or IP interfaces.<br><br>These allow monitoring of and response to the safety status, and for operating a roof\/shutter. <br><br><a href=\"http:\/\/stellarjourney.com\/main\/ocs-ascom-driver-purchase\/\" data-type=\"page\" data-id=\"437\">Purchase the OCS ASCOM drivers<\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\"><br><br><\/p>\n\n\n\n<p class=\"has-link-color has-small-font-size wp-elements-f4c4b68e413365f9a8606e9c03cb8525 wp-block-paragraph\"><br><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"has-tertiary-color has-text-color has-link-color has-medium-font-size wp-elements-6b57ddfe1b2ac5b065be73aed11f7855 wp-block-paragraph\"><br><em>Note: This is just an introduction, much more information and help is available by joining the <a href=\"https:\/\/onstep.groups.io\/g\/onstep-ocs\">OCS Group<\/a> at Groups.io.<br><\/em><br>The OnCue OCS can handle the following from an internet accessible web-site.<br><br><\/p>\n\n\n\n<p class=\"has-link-color has-small-font-size wp-elements-705fbc9b5ea42584f51be9d12ec48d5c wp-block-paragraph\">All panels except the &#8220;Status&#8221; panel are optional, and most items on the panels can be disabled if you&#8217;re not using them.<br><br><\/p>\n\n\n\n<p class=\"has-link-color has-small-font-size wp-elements-745f42d7a2246a7048802071c7f37dc8 wp-block-paragraph\"><strong>Status Panel:<\/strong><\/p>\n\n\n\n<p class=\"has-link-color has-small-font-size wp-elements-bf64312ba48d808809bb78832e89aa1c wp-block-paragraph\" style=\"margin-top:0;margin-bottom:0;padding-right:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)\">Date\/Time. NTP support for setting the date\/time from the internet.<br>Up Time. Number of minutes since the controller booted up last.<br>Optionally you can enable the Watchdog timer and the OCS will reboot automatically should it hang for some reason.<br>AC Mains power good (a digital input.) Signals an &#8220;UNSAFE&#8221; condition if mains power fails (running on UPS for example.)<br>AC Mains current (an Analog Input.)<br>AC Mains current Aux (an Analog Input.)<br>Monitor DC telescope voltage (an Analog Input.)<br>Monitor DC telescope current (an Analog Input.)<br>Monitor battery for DC roof motor etc. voltage (an Analog Input.)<br>Monitor battery for DC roof motor etc. current (an Analog Input.)<br><br><\/p>\n\n\n\n<p class=\"has-link-color has-small-font-size wp-elements-c571da34e6a3c5d821e7344faff73516 wp-block-paragraph\"><strong>Weather Panel:<\/strong><\/p>\n\n\n\n<p class=\"has-link-color has-small-font-size wp-elements-7e1586fbd0b8e86c7f3885d9fce861ef wp-block-paragraph\" style=\"padding-right:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)\">Outside Temperature.<br>Barometric Pressure.<br>Relative Humidity.<br>Wind Speed*. Signals an &#8220;UNSAFE&#8221; condition if too high.<br>Rain. Signal an &#8220;UNSAFE&#8221; condition if wet.<br>Sky Quality*. In mag\/sq arc-sec.<br>Sky Conditions (cloud cover.) Signals an &#8220;UNSAFE&#8221; condition if too cloudy.<br>* = Actual routines to read these sensors aren&#8217;t present, just function shells.<br><br><\/p>\n\n\n\n<p class=\"has-link-color has-small-font-size wp-elements-54678d452add82396a70f7bb257d30b4 wp-block-paragraph\"><strong>Power Panel:<\/strong><\/p>\n\n\n\n<p class=\"has-link-color has-small-font-size wp-elements-c1fecf2f410822c4b4e56865bb35ea3b wp-block-paragraph\" style=\"padding-right:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)\">For up to six named relays (AC Outlets, DC Telescope power, etc.)<br>Each relay can have setting memory activated to restore it&#8217;s state across a power cycle.<br><br><\/p>\n\n\n\n<p class=\"has-link-color has-small-font-size wp-elements-cbcb746a6b35204bc2f1ad6b1b1aacf4 wp-block-paragraph\"><strong>Thermostat Panel:<\/strong><\/p>\n\n\n\n<p class=\"has-link-color has-small-font-size wp-elements-78516a40a7b8121361d1df6e9339a989 wp-block-paragraph\" style=\"padding-right:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)\">Shows inside temperature.<br>Shows inside humidity.<br>Allows setting minimum temperature (heat relay control.)<br>Allows setting maximum temperature (cool relay control.)<br><br><\/p>\n\n\n\n<p class=\"has-link-color has-small-font-size wp-elements-8d779c8f349432cc3b9594bdfff652e8 wp-block-paragraph\"><strong>Lighting Panel:<\/strong><\/p>\n\n\n\n<p class=\"has-link-color has-small-font-size wp-elements-1a67406e55393c548b553a0664a45cde wp-block-paragraph\" style=\"padding-right:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)\">Controls for red and white lights.<br>Separate controls for &#8220;observing room&#8221; and &#8220;warm room&#8221;.<br>Controls for timed &#8220;exit&#8221; light.<br><br><\/p>\n\n\n\n<p class=\"has-link-color has-small-font-size wp-elements-626798cceebd9c3abe01a6f9a3008fa5 wp-block-paragraph\"><strong>Roof\/shutter Panel:<\/strong><\/p>\n\n\n\n<p class=\"has-link-color has-small-font-size wp-elements-ee9c87021de4a0504c303f4eff873250 wp-block-paragraph\" style=\"padding-right:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)\">Controls for roof or dome shutter.<br>Controls to open or close the roof\/shutter and to override safety features if necessary.<br>Option to automatically close the roof at 8AM (Standard Time.)<br>Option to automatically close the roof if an &#8220;UNSAFE&#8221; condition is detected.<br>Slow PWM for DC motors. Set frequency (1 to 100Hz.) Set power in 10% intervals (10% to 100%.)<br>Slow PWM soft start for DC motors (ramps up at 5% per second until normal power % is reached.)<br>Direction control via two signals A and B. A=HIGH and B=LOW to open the roof, A=LOW and B=HIGH to close the roof, both are held LOW to stop motion.<br>A pair of SPDT relay&#8217;s can use this to change the direction of a DC motor.<br><br><\/p>\n\n\n\n<p class=\"has-link-color has-small-font-size wp-elements-78fa29e94b98eda07ae7573402caac97 wp-block-paragraph\"><strong>Roof\/shutter Safety:<\/strong><\/p>\n\n\n\n<p class=\"has-link-color has-small-font-size wp-elements-e2ed4ff7ad36d94ceec43dcc73db8215 wp-block-paragraph\" style=\"padding-right:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)\">Timed cut-off (if limit switch fails, etc. motor doesn&#8217;t operate forever.)<br>Where possible detects open and close limit switch failures.<br>On open start, 4 seconds allowed for closed switch to disengage.<br>On close start, 4 seconds allowed for open switch to disengage.<br>Both open and close switches active (should never happen.)<br>Two power switching methods, by direction relay control and by a power control relay (which is actually a MOSFET power transistor for my DC roof motor.)<br><br><\/p>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\"><strong>Dome Panel:<\/strong><\/p>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\" style=\"padding-right:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)\">Dome shutter interlock to disable dome motion unless the shutter is open.<br>Dome motor drive configuration parameters for both Altitude and Azimuth:<\/p>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\" style=\"padding-right:var(--wp--preset--spacing--70);padding-left:var(--wp--preset--spacing--70)\">Support for step\/dir interface drivers and servos (DC motor.)<br>Software rate of motion.<br>Software defined motion limits.<br>Optional home switches.<br>Optional limit switches.<br><br><\/p>\n\n\n\n<p class=\"has-link-color has-small-font-size wp-elements-4c513812fc0fef001f74951f618502b8 wp-block-paragraph\"><strong>The Weather page:<\/strong><\/p>\n\n\n\n<p class=\"has-link-color has-small-font-size wp-elements-e3dcd77099ed68aac88b92e82cb1ff70 wp-block-paragraph\" style=\"padding-right:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)\">The OCS logs weather data at 30s intervals to an Micro SD card log-file, one log-file per day. Logs files consume about 82MB of storage space per year.<br>The logging is optional and the Micro SD card also needs <a href=\"https:\/\/github.com\/chartjs\/Chart.js\/releases\/download\/v2.5.0\/Chart.min.js\">Chart.min.js<\/a> renamed to Chart.js and placed in it&#8217;s root directory.<br><br>A graphic display of the recent log data is then made available:<br><br><\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img decoding=\"async\" src=\"http:\/\/www.stellarjourney.com\/assets\/ocs1.jpg\" alt=\"\" style=\"width:729px;height:358px\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><br><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<p class=\"has-tertiary-color has-text-color has-link-color has-small-font-size wp-elements-0c69c5b9b51d073fd6a7225481f0409e wp-block-paragraph\"><br>OCS hardware:<br><\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"735\" height=\"551\" src=\"http:\/\/stellarjourney.com\/main\/wp-content\/uploads\/2024\/01\/Untitled.png\" alt=\"\" class=\"wp-image-457\" style=\"width:573px;height:429px\" srcset=\"http:\/\/stellarjourney.com\/main\/wp-content\/uploads\/2024\/01\/Untitled.png 735w, http:\/\/stellarjourney.com\/main\/wp-content\/uploads\/2024\/01\/Untitled-300x225.png 300w\" sizes=\"auto, (max-width: 735px) 100vw, 735px\" \/><\/figure>\n\n\n\n<p class=\"has-tertiary-color has-text-color has-link-color has-small-font-size wp-elements-2a43f995705956d6e15a93d5d3b038a7 wp-block-paragraph\"><br>Above is an example of the latest hardware, Teensy4.1 based.  It&#8217;s also possible to build out more minimal designs.<br><br>Again, the <a href=\"https:\/\/onstep.groups.io\/g\/onstep-ocs\">OCS Group<\/a> and its <a href=\"https:\/\/onstep.groups.io\/g\/onstep-ocs\/wiki\">Wiki<\/a> at Groups.io has more information.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The OnCue OCS (Observatory Control System) should be of help to capable DIY&#8217;ers who want to automate small observatories. It&#8217;s based on using an inexpensive and easy to work with Arduino Microcontrollers (Mega2560, Teensy, ESP32) to control some relays and sense switch closures and analog inputs and operate weather sensors which are usually on an [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":345,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"ngg_post_thumbnail":0,"footnotes":""},"class_list":["post-35","page","type-page","status-publish","has-post-thumbnail","hentry"],"_links":{"self":[{"href":"http:\/\/stellarjourney.com\/main\/wp-json\/wp\/v2\/pages\/35","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/stellarjourney.com\/main\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/stellarjourney.com\/main\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/stellarjourney.com\/main\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/stellarjourney.com\/main\/wp-json\/wp\/v2\/comments?post=35"}],"version-history":[{"count":71,"href":"http:\/\/stellarjourney.com\/main\/wp-json\/wp\/v2\/pages\/35\/revisions"}],"predecessor-version":[{"id":1558,"href":"http:\/\/stellarjourney.com\/main\/wp-json\/wp\/v2\/pages\/35\/revisions\/1558"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/stellarjourney.com\/main\/wp-json\/wp\/v2\/media\/345"}],"wp:attachment":[{"href":"http:\/\/stellarjourney.com\/main\/wp-json\/wp\/v2\/media?parent=35"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}