{"id":863,"date":"2026-04-15T10:31:17","date_gmt":"2026-04-15T08:31:17","guid":{"rendered":"https:\/\/avlos.gr\/wpress\/?p=863"},"modified":"2026-04-15T11:09:03","modified_gmt":"2026-04-15T09:09:03","slug":"esp32-web-server-upgrade-weather-station","status":"publish","type":"post","link":"https:\/\/avlos.gr\/wpress\/en\/esp32-web-server-upgrade-weather-station\/","title":{"rendered":"ESP32 Web Server &#8211; Weather Station Upgrade"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">In this article we attempt to upgrade the ESP32 Web Server that we developed <a href=\"https:\/\/avlos.gr\/wpress\/en\/esp32-web-server-2\/\">in our previous article.<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The upgrade concerns two functions of the station. The first has to do with the power supply of the device and the second with the process by which the station connects to the wifi network we want.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the images below we see the ESP32 Web Server (Weather Station) as well as its interior after the upgrade.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"646\" height=\"1024\" src=\"https:\/\/avlos.gr\/wpress\/wp-content\/uploads\/2026\/04\/station-646x1024.jpg\" alt=\"Meteorological Station\" class=\"wp-image-854\" style=\"aspect-ratio:0.6308604275193103;width:186px;height:auto\" srcset=\"https:\/\/avlos.gr\/wpress\/wp-content\/uploads\/2026\/04\/station-646x1024.jpg 646w, https:\/\/avlos.gr\/wpress\/wp-content\/uploads\/2026\/04\/station-189x300.jpg 189w, https:\/\/avlos.gr\/wpress\/wp-content\/uploads\/2026\/04\/station-768x1218.jpg 768w, https:\/\/avlos.gr\/wpress\/wp-content\/uploads\/2026\/04\/station-969x1536.jpg 969w, https:\/\/avlos.gr\/wpress\/wp-content\/uploads\/2026\/04\/station-1292x2048.jpg 1292w, https:\/\/avlos.gr\/wpress\/wp-content\/uploads\/2026\/04\/station-scaled.jpg 1615w\" sizes=\"auto, (max-width: 646px) 100vw, 646px\" \/><figcaption class=\"wp-element-caption\">Meteorological Station<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"962\" src=\"https:\/\/avlos.gr\/wpress\/wp-content\/uploads\/2026\/04\/station_2a-1024x962.jpg\" alt=\"Interior of the Meteorological Station\" class=\"wp-image-853\" style=\"aspect-ratio:1.064485826380063;width:242px;height:auto\" srcset=\"https:\/\/avlos.gr\/wpress\/wp-content\/uploads\/2026\/04\/station_2a-1024x962.jpg 1024w, https:\/\/avlos.gr\/wpress\/wp-content\/uploads\/2026\/04\/station_2a-300x282.jpg 300w, https:\/\/avlos.gr\/wpress\/wp-content\/uploads\/2026\/04\/station_2a-768x722.jpg 768w, https:\/\/avlos.gr\/wpress\/wp-content\/uploads\/2026\/04\/station_2a-1536x1443.jpg 1536w, https:\/\/avlos.gr\/wpress\/wp-content\/uploads\/2026\/04\/station_2a-2048x1924.jpg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Interior of the Meteorological Station<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Looking at the interior of the station we can see the battery that we have added, the connection to the usb-c socket for charging the battery, the TP4056 charger, the DC-DC Step-Up Converter MT3608 for powering the circuit and the On-Off switch that turns the device on.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>A. Power supply.<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">By adding the power supply circuit, we ensure the autonomous operation of the station for more than 24 hours. We add to the construction a rechargeable 18650 Lithium 3000mAh battery, a charging circuit and a battery power supply circuit.<br>The materials needed for construction are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>18650 Li-ion 3000mAh battery<\/li>\n\n\n\n<li>A lithium battery charger TP4056<\/li>\n\n\n\n<li>A DC-DC Step-Up Converter 5-28V 1.5A MT3608<\/li>\n\n\n\n<li>An On-Off switch<\/li>\n\n\n\n<li>A USB C connector for connecting to a mobile phone charger<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">In the figure below we see the TP4056 lithium battery charger that we used.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"530\" height=\"446\" src=\"https:\/\/avlos.gr\/wpress\/wp-content\/uploads\/2026\/04\/1A_USB_C_TP4056.jpg\" alt=\"TP4056 charger\" class=\"wp-image-868\" style=\"aspect-ratio:1.1884376143432125;width:236px;height:auto\" srcset=\"https:\/\/avlos.gr\/wpress\/wp-content\/uploads\/2026\/04\/1A_USB_C_TP4056.jpg 530w, https:\/\/avlos.gr\/wpress\/wp-content\/uploads\/2026\/04\/1A_USB_C_TP4056-300x252.jpg 300w\" sizes=\"auto, (max-width: 530px) 100vw, 530px\" \/><figcaption class=\"wp-element-caption\">TP4056 charger<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Here we also see the MT3608 DC-DC Step-Up Converter that gives us the voltage of 5v. Caution, set the MT3608 DC-DC Step-Up Converter to have output 5v  before connecting it to the ESP32.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"433\" height=\"273\" src=\"https:\/\/avlos.gr\/wpress\/wp-content\/uploads\/2026\/04\/DC_DC_Step_Up_MT3608.jpg\" alt=\"MT3608 DC-DC Step-Up Converter\" class=\"wp-image-856\" style=\"width:230px;height:auto\" srcset=\"https:\/\/avlos.gr\/wpress\/wp-content\/uploads\/2026\/04\/DC_DC_Step_Up_MT3608.jpg 433w, https:\/\/avlos.gr\/wpress\/wp-content\/uploads\/2026\/04\/DC_DC_Step_Up_MT3608-300x189.jpg 300w\" sizes=\"auto, (max-width: 433px) 100vw, 433px\" \/><figcaption class=\"wp-element-caption\">MT3608 DC-DC Step-Up Converter<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The schematic diagram of the connection of the materials is shown below<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">  USB-c<br>    |<br>  TP4056<br> B+    B- <br> |     | <br> Li-Ion 3.7V<br>    |<br> Step-Up 5V<br>    |<br> ESP32 5V pin<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Great care is needed at the output of the Step-Up, set it to give a 5v output before connecting it to the ESP32. The connection is made to the 5v pin of the ESP32.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><br><strong>B. Connecting to a wifi network<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To develop the Weather Station application, we used Microsoft&#8217;s Visual Studio Code (VS code) development tool. Here you will find the <a href=\"https:\/\/avlos.gr\/wpress\/download\/weather-station\/\">complete main.cpp file<\/a> of the application.<br>In this upgrade, we use the ability of the ESP32 to create a wifi network in two ways,<br>a. <strong>Access Point (AP)<\/strong> where it functions as a<strong> Wi-Fi hotspot (router)<\/strong> and<br>b. <strong>Station Mode (STA)<\/strong> where it functions<strong> as a client.<\/strong><br>This upgrade is done by modifying the application setup. If the ESP32 does not recognize a wifi network during setup to connect to, it will create an Access Point with a default address of <strong>192.168.4.1<\/strong> and will request information about the wifi network. That is, it will detect the existing networks and wait for us to indicate one of them. It will then request an access password for this network and will automatically connect to the network we indicated.<br>In order for the computer or mobile phone browser to connect to the address <strong>192.168.4.1<\/strong>, the ESP32 hotspot must have been previously selected from the computer \/ mobile wifi. In our application, the name we used for the <strong>hotspot<\/strong> is \u201c<strong>ESP32_Setup<\/strong>\u201d and the password we gave is \u201c<strong>12345678<\/strong>\u201d<br>You will find the function described above in detail in the relevant article <a href=\"https:\/\/avlos.gr\/wpress\/en\/esp32-webserver-with-automatic-wi-fi-setup\/\">\u201cESP32 WebServer with automatic Wi-Fi Setup\u201d<\/a><br>This article will help you a lot to understand the upgrade we are making to the Weather Station software.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article we attempt to upgrade the ESP32 Web Server that we developed in our previous article. The upgrade concerns two functions of the station. The first has to do with the power supply of the device and the&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29,199],"tags":[],"class_list":["post-863","post","type-post","status-publish","format-standard","hentry","category-home","category-iot"],"_links":{"self":[{"href":"https:\/\/avlos.gr\/wpress\/wp-json\/wp\/v2\/posts\/863","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/avlos.gr\/wpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/avlos.gr\/wpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/avlos.gr\/wpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/avlos.gr\/wpress\/wp-json\/wp\/v2\/comments?post=863"}],"version-history":[{"count":14,"href":"https:\/\/avlos.gr\/wpress\/wp-json\/wp\/v2\/posts\/863\/revisions"}],"predecessor-version":[{"id":880,"href":"https:\/\/avlos.gr\/wpress\/wp-json\/wp\/v2\/posts\/863\/revisions\/880"}],"wp:attachment":[{"href":"https:\/\/avlos.gr\/wpress\/wp-json\/wp\/v2\/media?parent=863"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/avlos.gr\/wpress\/wp-json\/wp\/v2\/categories?post=863"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/avlos.gr\/wpress\/wp-json\/wp\/v2\/tags?post=863"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}