{"id":66,"date":"2018-04-03T21:41:01","date_gmt":"2018-04-03T21:41:01","guid":{"rendered":"http:\/\/bvm.stjohncable.com\/?page_id=66"},"modified":"2024-09-27T11:36:30","modified_gmt":"2024-09-27T18:36:30","slug":"weather-station","status":"publish","type":"page","link":"https:\/\/unixwizardry.com\/index.php\/weather-station\/","title":{"rendered":"Weather Station"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"66\" class=\"elementor elementor-66\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-12d6adb6 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"12d6adb6\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-6a8817b5\" data-id=\"6a8817b5\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-cc645af elementor-widget elementor-widget-text-editor\" data-id=\"cc645af\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"text-align: center;\"><span style=\"font-size: 18pt; color: #0000ff; font-family: arial, helvetica, sans-serif;\"><strong>Some History of This Project<\/strong><\/span><\/p><p>Ever since I was a kid, I&#8217;ve been fascinated by the weather.\u00a0 For a LONG time now, I&#8217;ve been working on a weather station to be able to measure weather data.\u00a0 \u00a0After pricing the various commercial weather stations, e,g. <span style=\"font-family: verdana, geneva, sans-serif;\">Davis,<\/span> I found they were pretty much beyond my means for home and hobby use.\u00a0 Fortunately, many moons ago, I acquired a weather station made by MetOne Instruments that was going to be tossed (!).\u00a0 \u00a0The equipment is now somewhat obsolete, but it&#8217;s has been a great vehicle for learning programming using different languages: originally learning about 8051 assembly language, and now C++.\u00a0 I thought developing weather station software based this chip in assembly language would be a fun learning project.\u00a0 Yeah, I know I could have bought one and had it over with, but this was a challenge.\u00a0 I did get the 8051 to bit-bang an I\/O pin to get the 1-wire search algorithm to work for finding 1-wire devices on the 1-wire m<em>icroLAN<\/em>, but doing all the other stuff in assembly would be pretty much insane!\u00a0 So, I gave up on basing it on assembly language.\u00a0 Sun Microsystems (now Oracle) <strong>Java Micro Edition<\/strong>, on a Raspberry Pi looked very cool, but since many of the J2ME evangelists left Oracle, there basically was no support except for searching forums and such.\u00a0 When I DID find info it was pretty old or not really pertinent.\u00a0 \u00a0So, I gave up on using Java Micro Edition.\u00a0 &lt;sigh&gt; But I learned a LOT about Object Oriented Programming!<\/p><p>So it&#8217;s been interesting&#8230;\u00a0 I might have been able to get this project done sooner except now I had to find a new way to obtain the wind direction since, for whatever reason, the &#8220;precision&#8221; potentiometer reads <strong>OPEN!\u00a0\u00a0<\/strong>Fortunately, I found an <em>Instructables<\/em> article about using a Melexis angle sensor that uses a neodymium rare earth diametrically magnetized magnet for the wind direction.\u00a0\u00a0<\/p><p><img fetchpriority=\"high\" decoding=\"async\" class=\"size-medium wp-image-236 alignleft\" style=\"background-color: transparent; color: #333333; float: left; font-family: Georgia,' times new roman','bitstream charter',times,serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; height: 225px; letter-spacing: normal; max-width: 796.91px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; margin: 8px 16px 8px 0px;\" src=\"http:\/\/bvm.stjohncable.com\/wp-content\/uploads\/2018\/05\/102_0285-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"https:\/\/unixwizardry.com\/wp-content\/uploads\/2018\/05\/102_0285-300x225.jpg 300w, https:\/\/unixwizardry.com\/wp-content\/uploads\/2018\/05\/102_0285.jpg 640w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><img decoding=\"async\" class=\"alignnone size-medium wp-image-238\" src=\"http:\/\/bvm.stjohncable.com\/wp-content\/uploads\/2018\/05\/rainga_innards-225x300.jpg\" alt=\"\" width=\"225\" height=\"300\" srcset=\"https:\/\/unixwizardry.com\/wp-content\/uploads\/2018\/05\/rainga_innards-225x300.jpg 225w, https:\/\/unixwizardry.com\/wp-content\/uploads\/2018\/05\/rainga_innards.jpg 768w\" sizes=\"(max-width: 225px) 100vw, 225px\" \/> <img decoding=\"async\" class=\"alignnone size-medium wp-image-237\" src=\"http:\/\/bvm.stjohncable.com\/wp-content\/uploads\/2018\/05\/raingauge-225x300.jpg\" alt=\"\" width=\"225\" height=\"300\" srcset=\"https:\/\/unixwizardry.com\/wp-content\/uploads\/2018\/05\/raingauge-225x300.jpg 225w, https:\/\/unixwizardry.com\/wp-content\/uploads\/2018\/05\/raingauge.jpg 768w\" sizes=\"(max-width: 225px) 100vw, 225px\" \/><\/p><p><strong><span style=\"font-size: 18pt; font-family: arial, helvetica, sans-serif; color: #0000ff;\">Currently&#8230;<\/span><\/strong><\/p><p>Now I&#8217;m using <strong>Visual Studio Code<\/strong> (aka <strong>VSCode<\/strong>) with the <strong>PlatformIO<\/strong> extension to write firmware for the ultra-cheap ESP8266\/8255\/ESP32 chips.\u00a0 So now I have Node-Red 2.2 and Mosquito MQTT broker (from the Debian repository) working on a Raspberry Pi accepting JSON data from the station using an Arduino <a href=\"https:\/\/github.com\/knolleary\/pubsubclient\">PubSubClient<\/a> and <a href=\"https:\/\/arduinojson.org\/\">ArduinoJSON<\/a>.\u00a0 Have to say the Node-RED dashboard so far looks pretty nice.\u00a0 \u00a0I modified existing code for the DS2482 1-Wire master (the original versions had a couple issues) on GitHub and released my own <a href=\"https:\/\/github.com\/seattlebiker\/DS248X-1Wire-Master-Library\">version<\/a>.\u00a0 So far, I have the Model 370 rain gauge counting bucket tips (using the DS2482 1-Wire master and DS2423 1-Wire counter\/memory chip), the anemometer, and humidity\/temperature from the 083B sensors.\u00a0 \u00a0<\/p><p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 18pt; color: #0000ff;\"><em><strong>UPDATE: <\/strong><\/em><\/span><\/p><p>The wind vane was another issue: the 360 degree precision potentiometer for some reason read OPEN!\u00a0 I got the Melexis MLX90316 angle sensor working as a replacement from this<em>\u00a0<\/em><a href=\"https:\/\/www.instructables.com\/Accurate-Wireless-Weather-Vane\/\">Instructables article<\/a>.\u00a0 \u00a0So now, besides putting all the modules together, I&#8217;m learning KiCAD to build PCBs for the wind vane retrofit and the <a href=\"https:\/\/unixwizardry.com\/index.php\/2024\/01\/06\/another-jlcpcb-order-sent-off-today\/\">DS2423 counter mod<\/a> for the 370 rain gauge.\u00a0 \u00a0Thanks to the KiCAD forum, I have a replacement <a href=\"https:\/\/unixwizardry.com\/index.php\/2023\/10\/19\/metone-windvane-my-first-pcb-with-jlcpcb\/\">PCB for the wind vane based on this article.<\/a> \u00a0<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Some History of This Project Ever since I was a kid, I&#8217;ve been fascinated by the weather.\u00a0 For a LONG time now, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-66","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/unixwizardry.com\/index.php\/wp-json\/wp\/v2\/pages\/66","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unixwizardry.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/unixwizardry.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/unixwizardry.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unixwizardry.com\/index.php\/wp-json\/wp\/v2\/comments?post=66"}],"version-history":[{"count":74,"href":"https:\/\/unixwizardry.com\/index.php\/wp-json\/wp\/v2\/pages\/66\/revisions"}],"predecessor-version":[{"id":1873,"href":"https:\/\/unixwizardry.com\/index.php\/wp-json\/wp\/v2\/pages\/66\/revisions\/1873"}],"wp:attachment":[{"href":"https:\/\/unixwizardry.com\/index.php\/wp-json\/wp\/v2\/media?parent=66"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}