Do you want to create your own weather station? This guide will show you how to build a stunning device with NodeMCU.

Hey guys! I hope you enjoyed my previous project Arduino Robot 4WR and you are ready for a new one. As usual, I made this tutorial to guide you step by step while you make your own electronic project.

During the making of this project, we tried to make sure that this instructable will be the best guide to assist you while you chose to make your own electronic-based project, so we hope that this instructable contains the needed documents.

This project is so handy to make specially after getting the customized PCB that we’ve ordered from JLCPCB to improve the appearance of our electronic device and also there is enough documents and codes in this guide to allow you create your beautiful weather station.

We've made this project in just 2 days only, just one days to get all the needed parts and finish the hardware making and the assemble, then one day to prepare the code to suit our project and hen we have started the testing and the adjustments.

What You Will Learn From This Project

  • Making the right hardware selection for your project depending on its functionalities.
  • Understand the weather station workflow.
  • Prepare the circuit diagram to connect all the chosen components.
  • Produce your own PCB design.
  • Solder the electronic parts to the PCB.
  • Assemble all the project parts.
  • Start the first test and validate the project.

Step 1: How the Weather Station Works

Diapositive3.PNG

As always I start my project with this short description, our project is based on a NodeMCU dev board which already includes a WiFi modul to connect to the internet in order to receive the weather forecast updates and display it on the OLED screen, which is connected to the NodeMCU through the I²C communication port.

In order to make all this happening without problems, some libraries should be included in source code. These libraries are available in open source and you can add them directly from your Arduino IDE.

The weather station will also get the Time and Date data from the internet and to do such feature we need to provide the NodeMCU the websites from where it will upload the Weather forcasts and the time date data. All of this will be explained in the Software section of this presentation.

Step 2: Circuit Diagram

Schematic_NodeMCU-weather-station_NodeMCU-weather-station_20190618012919.png

This project is so basic one, no complexity in it, I used easyEDA online platform to prepare this circuit diagram that has all the necessary components for this project and some additional parts like a buzzer for some alarms and some LED outputs you can have the PDF format of the schematic or the PNG format from the download section below.

Step 3: Making the PCB

NodeMCU 2.JPG

After preparing the circuit ,I transformed this circuit diagram into a customized PCB design with a cloud shape to suit our project theme, all what we need now is producing this circuit design so I moved to JLCPCB the best and cheapest PCB producers to get the best PCB manufacturing service, JLC is a professional PCB manufacturer featured of large scale, well equipment, strict management and superior quality. as always all what you need is simply some clicks to upload the GERBER files of the PCB design and set some manufacturing parameters, than I wait just for three days to receive my order.

IMG_20200314_104954.jpg

As you see through the photos, the PCBs are very well produced and this cloud shape will add a better appearance to our project

Step 4: Enclosure Design

I used than Solidworks software to design this enclosure where we will place the electronic components, and then I produced the designed parts through a CNC laser cutting machine.

You can download the DXF files for the enclosure parts.

IMG_20200308_101005.jpg

Step 5: Project Components

IMG_20200308_105552.jpg

Let’s review now the full components list of this project so we will need :

★☆★ The necessary components (Amazon links) ★☆★

  • The PCB that we have ordered from JLCPCB
  • NodeMCU dev board 
  • One OLED display screen 
  • Some SIL connectors 
  • Mini USB connector
  • Two white LEDs (5mm)
  • 100 Ohms resistor
  • A 5V DC power adaptor
  • And the enclosure parts

Step 6: Weather Station Software 

weather station2.JPG

The Arduino IDE Library Setup

Make sure that your computer is connected to the internet in order to have access to the online Arduino libraries. 

Once you run the Arduino IDE, move to sketch >>include library>> manage libraries. A new window will appear to show the installed libraries that you have and other libraries that you can download. Make sure that you have downloaded all three libraries shown through the above photos and you can search for them by name (download the same version as mine).

  • The first library is the OLED display which will facilitate the control of the display screen using the NodeMCU board.
  • The second library will help you have the NodeMCU source code.
  • The Third library is the online streaming library, since internet data is a bit large data for the MCU to interpret them so this library will help to split the internet large data into some small frames.
weather station1.JPG

After having the appropriate libraries, you move to the IDE examples and run the weather station demo. As you see in the above photo all the downloaded libraries included in this program, the next step that we need to perform is inserting the WiFi ID and password, next we move to the openweathermap website from where the NodeMCU will get the forecast updates.

weather station3.JPG

After creating an account on this website you will have your unique API key so just copy and paste it in the code demo.

What you need next is the location ID, so go back to the openweathermap website and select your country and in the website address toolbar you will find the desired location id so just copy and past it in your code, the last step now is to upload the code to your NodeMCU.

Step 7: Hardware Assembly & Demonstration

Now everything is ready so let’s start soldering our electronic components to the PCB and to do so we need a soldering iron and a solder core wire.

IMG_20200308_173027.jpg

As you can see, using this PCB is so easy due to its very high quality making and without forgetting the labels that will guide you guys while soldering each component because you will find on the top silk layer a label of each component indicating its placement on the board and this way you will be 100% sure that you will not make any soldering mistakes.

I’ve soldered each component to its placement, about this PCB it is a two layer PCB this means that you can use both sides of it to solder your electronic components.

IMG_20200309_220507.jpg

Now we have finished the hardware assembly and once we plugin the power supply adaptor, the gadget starts to display the weather forecasts.

This project is so easy to make and an amazing one and we recommend it for any maker how try to create his own gadgets but still some other improvements to perform in our project in order to make it much more butter, that’s why I will be waiting for your comments to improve it.

IMG_20200315_125736.jpg

One last thing, make sure that you are doing electronics every day!

MEGA DAS
MEGA Development of Automated System is a free community responsible for creating electronic projects and automated systems standing on robotics