{"id":9958,"date":"2019-01-21T15:07:48","date_gmt":"2019-01-21T15:07:48","guid":{"rendered":"http:\/\/a2baker.com\/magnoliablog\/?p=9958"},"modified":"2019-01-21T15:07:48","modified_gmt":"2019-01-21T15:07:48","slug":"2019-01-21-solar-panel-sensor-board","status":"publish","type":"post","link":"http:\/\/a2baker.com\/magnoliablog\/?p=9958","title":{"rendered":"2019-01-21 &#8212; Solar Panel Sensor Board"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Promise this is the last tech article  for a while. I just need to get these caught up. We have been busy so I have lots to catch up from since Vero!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This all started with the purchase of a RaspberryPi and I installed Signal-K. I added Whilhelm SK (<a href=\"https:\/\/www.wilhelmsk.com\/\">https:\/\/www.wilhelmsk.com\/<\/a>) to an available Apple Ipad and said &#8220;this is cool.&#8221; I do not have easy access to display data from my solar panel output so the next step was a no brainier. If I could get current and voltage data onto the Whilhelm SK display, now that would be REALLY COOL.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"http:\/\/a2baker.com\/magnoliablog\/wp-content\/uploads\/2019\/01\/a-1-1024x576.jpg\" alt=\"\" class=\"wp-image-9961\" srcset=\"http:\/\/a2baker.com\/magnoliablog\/wp-content\/uploads\/2019\/01\/a-1-1024x576.jpg 1024w, http:\/\/a2baker.com\/magnoliablog\/wp-content\/uploads\/2019\/01\/a-1-300x169.jpg 300w, http:\/\/a2baker.com\/magnoliablog\/wp-content\/uploads\/2019\/01\/a-1-768x432.jpg 768w, http:\/\/a2baker.com\/magnoliablog\/wp-content\/uploads\/2019\/01\/a-1-1200x675.jpg 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"http:\/\/a2baker.com\/magnoliablog\/wp-content\/uploads\/2019\/01\/b-1-1024x576.jpg\" alt=\"\" class=\"wp-image-9964\" srcset=\"http:\/\/a2baker.com\/magnoliablog\/wp-content\/uploads\/2019\/01\/b-1-1024x576.jpg 1024w, http:\/\/a2baker.com\/magnoliablog\/wp-content\/uploads\/2019\/01\/b-1-300x169.jpg 300w, http:\/\/a2baker.com\/magnoliablog\/wp-content\/uploads\/2019\/01\/b-1-768x432.jpg 768w, http:\/\/a2baker.com\/magnoliablog\/wp-content\/uploads\/2019\/01\/b-1-1200x675.jpg 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Goals<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1) The collection electronics would be\ncontained in a weather &#8220;resistant&#8221; container located in the\nfly-bridge area.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">2) Data collection system must have a\nwireless connection to the Raspberry Pi (RPi) and the Signal K Server\n(After last years overhaul, I am done pulling cable)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">3) Must provide current collection for\neach of the 6 solar &#8220;banks&#8221; we have installed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">4) Temperature and humidity data inside\nthe weather &#8220;resistant&#8221; container must be reported. (Make\nsure we don&#8217;t have moisture intrusion)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">5) Voltage of the power source powering\nthe data collection system must be reported. (This happens to be my\ndinghy hoist battery which is charged by a separate solar panel.)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I quickly decided the collection system\nwould be centered around an Arduino Mega board. After some research\nthe following shopping list was made. All the following components\nwere ordered from Amazon.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A) 24V to 12V 5V DC Converter, DROK\nLM2596 Buck Power Converter 5-32V to 0-30V Step Down Adjustable\nOutput Voltage Regulator Board Power Supply Module with LED Display\nVoltmeter Screw &amp; Heatsink &#8212; $15.83 &#8211;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">B) SunFounder Mega 2560 R3\nATmega2560-16AU Board Compatible with Arduino &#8211; $14.99&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">C) 20A range Current Sensor ACS712\nModule &#8211; $4.60 each (one for each monitored panel\/bank is required)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">D) WINGONEER 5PCS Max 25V Voltage\nDetector Range 3 Terminal Sensor Module for Arduino &#8211; $6.99 for 5\n(Only two are required in this implentation \u2013 5 was just the number\nin this offer)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">E) Gowoops 2 PCS DHT22 Temperature\nHumidity Sensor Module Digital Measurement for Arduino Raspberry Pi 2\n3 &#8212; $9.99 (Only one is required in this implentation \u2013 2 was just\nthe number in this offer)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">F) Aideepen ESP8266 Serial Wi-Fi\nWireless ESP-01 Adapter Module 3.3V 5V Compatible for Arduino &#8211; $6.99\n&#8211;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">G) HiLetgo FT232RL FTDI Mini USB to TTL\nSerial Converter Adapter Module 3.3V 5.5V FT232R Breakout FT232RL USB\nto Serial Mini USB to TTL Adapter Board for Arduino &#8212; $5.99 &#8211;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">H) SMAKN\u00c2 DC 3.3V 1A Switching Power Supply Adapter 100-240 AC &#8212; $5.99<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I) DIYmall ESP8266 ESP-01 with Breakout\nBoard breadboard Adapter PCB for Serial Wifi Transceiver Network &#8211;\n$7.99<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">J) Male Barrel Plug 6-Inch Wire 5.5mm x\n2.1mm for LED Strip Light, CCTV Security Camera, DVR, and Other Low\nVoltage Applications &#8211; Used to connect Buck-Converter to the Arduino\nfor power. &#8211; $3.49<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">K) Elegoo EL-CK-002 Electronic Fun Kit\nBundle with breadboard Cable Resistor, Capacitor, LED, Potentiometer\n(235 Items) &#8211; $12.86<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"794\" src=\"http:\/\/a2baker.com\/magnoliablog\/wp-content\/uploads\/2019\/01\/c-1024x794.png\" alt=\"\" class=\"wp-image-9963\" srcset=\"http:\/\/a2baker.com\/magnoliablog\/wp-content\/uploads\/2019\/01\/c-1024x794.png 1024w, http:\/\/a2baker.com\/magnoliablog\/wp-content\/uploads\/2019\/01\/c-300x233.png 300w, http:\/\/a2baker.com\/magnoliablog\/wp-content\/uploads\/2019\/01\/c-768x596.png 768w, http:\/\/a2baker.com\/magnoliablog\/wp-content\/uploads\/2019\/01\/c.png 1169w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The first step was to get the WIFI\nadapter working with the Arduino. I accomplished this task using the\nYouTube tutorial: &#8220;Arduino Mega 2560 with ESP8266 (ESP-01) Wifi,\nAT Commands and Blynk&#8221;\n&#8211;<a href=\"https:\/\/www.youtube.com\/watch?v=YLKEZtLhfZo\">https:\/\/www.youtube.com\/watch?v=YLKEZtLhfZo<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Assemble the circuit according to the\ndiagram below. Note the buck converter is set to output 10.8 volts.\nSee Buck Volt regulator is Handy Gadget for under $10, Step Down LED\nDriver product review: (<a href=\"https:\/\/www.youtube.com\/watch?v=l7DVyas-lkw\">https:\/\/www.youtube.com\/watch?v=l7DVyas-lkw<\/a>).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The wire connection list is as follows:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1) Buck Converter Input \u2013 requires a\nfused (10amp) 12volt input \u2013 DO NOT forget the fuse! The Buck\nConverter provides a regulated voltage to the Arduino and sensors.\nOutput is set to 10.8 to ensure sufficient voltage is available for\nsensors.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">2) Mega 2560 Input \u2013 Connect the\noutput from the Buck Converter to the appropriate connetions on the\nMale Barrel Plug, and plug into the Mega 2560<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">3a) Mega 2560 Output \u2013 Connect the\nnegative pin (pin closest to Pin 52) to the negative bus of a\nBreadboard<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">3b) Mega 2560 Output  &#8211; Connect the\npositive 5v pin (pin closest to Pin 22) to the positive bus of the\nBreadboard<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">3c) Breadboard \u2013 DHT11 sensor into\nthe breadboard as shown.Connect the negative and positive pins to the\nnegative and positive bus. Connect the data pin to the Mega 2560 Pin\nA8.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">3d) Breadboard \u2013  Insert ESP8266\nESP-01 with Breakout Board Breadboard Adapter with the mounted\nESP8266 Serial Wi-Fi Wireless ESP-01 Adapter Module.  Connect the\nnegative and positive pins to the negative and positive bus. \n<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\t&#8211; Connect the Mega 2560 Serial Tx1 Pin\n18 to the Rx Pin on the Breakout Board Breadboard Adapter<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\t&#8211; Connect the Mega 2560 Serial Rx1 Pin\n19 to the Tx Pin on the Breakout Board Breadboard Adapter<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Note: The Transmit and Receive pins\nneed to be connected to their opposites (Tx-Rx and Rx-Tx) between the\nMega and ESP8266<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">3e) PCB Board \u2013  Insert a Red and\nGreen Led into the PCB along with a 220 ohm resistor in serial.\nConnect the positive side of the Red LED to PWM Pin 12 and the Green\nLED to PWM Pin 13.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">3f) There are two voltage sensors. The\nSolar Array (panel) voltage sensor us used to measure the voltage\noutput by the solar panels. To determine the actual energy\n(power=watts) being produced by the array requires both the\nvoltage(V) x Current (I) = Watts (W). \n<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The second voltage sensor measures the\nsupply voltage being provided to the Buck Converter input.  I use a\nbattery and seperate small wattage solar panel to power the sensor\nboard.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">3g) Connecting the solar panels is\npretty straight forward. First thing all the solar panel negatives\nare connected together and tied to the negative connection to the\ncharge controller. I used a standard block for this. The individual\nsolar panel positive connections are then connected to the input side\nterminal blocks before installing the individual fuses. (Size fuse to\nsize of solar panel\/bank)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I used the WhilhelmSK to build the\nbelow display screen for the solar panel application. As you can see\nright off the bat I uncovered a couple of issues with my system which\nI will be going to investigate!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The setup is not perfect. I am still\nworking to improve the accuracy of the current sensors. I have not\ndecided exactly what I am going to do. There is an opprotunity to\nsolder an additional capacitor but not sure my skills are that could.\nThere is certainly more tweaking in software to do. \n<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Speaking of software, the code and this\ndocument will be available on GitHub.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/github.com\/awwbaker\/Solar-Sensor-Board\">https:\/\/github.com\/awwbaker\/Solar-Sensor-Board<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"http:\/\/a2baker.com\/magnoliablog\/wp-content\/uploads\/2019\/01\/d-1024x768.jpg\" alt=\"\" class=\"wp-image-9966\" srcset=\"http:\/\/a2baker.com\/magnoliablog\/wp-content\/uploads\/2019\/01\/d-1024x768.jpg 1024w, http:\/\/a2baker.com\/magnoliablog\/wp-content\/uploads\/2019\/01\/d-300x225.jpg 300w, http:\/\/a2baker.com\/magnoliablog\/wp-content\/uploads\/2019\/01\/d-768x576.jpg 768w, http:\/\/a2baker.com\/magnoliablog\/wp-content\/uploads\/2019\/01\/d-1200x900.jpg 1200w, http:\/\/a2baker.com\/magnoliablog\/wp-content\/uploads\/2019\/01\/d.jpg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Promise this is the last tech article for a while. I just need to get these caught up. We have been busy so I have lots to catch up from since Vero! This all started with the purchase of a &hellip; <a href=\"http:\/\/a2baker.com\/magnoliablog\/?p=9958\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-9958","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/a2baker.com\/magnoliablog\/index.php?rest_route=\/wp\/v2\/posts\/9958","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/a2baker.com\/magnoliablog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/a2baker.com\/magnoliablog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/a2baker.com\/magnoliablog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/a2baker.com\/magnoliablog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9958"}],"version-history":[{"count":1,"href":"http:\/\/a2baker.com\/magnoliablog\/index.php?rest_route=\/wp\/v2\/posts\/9958\/revisions"}],"predecessor-version":[{"id":9967,"href":"http:\/\/a2baker.com\/magnoliablog\/index.php?rest_route=\/wp\/v2\/posts\/9958\/revisions\/9967"}],"wp:attachment":[{"href":"http:\/\/a2baker.com\/magnoliablog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9958"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/a2baker.com\/magnoliablog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9958"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/a2baker.com\/magnoliablog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9958"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}