Online Weather Station (NodeMCU)

2,016

28

Introduction: Online Weather Station (NodeMCU)

Hey guys! I Hope you already enjoyed my previous instructable "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 instructable:

  1. Making the right hardware selection for your project depending on its functionalities.
  2. Understand the weather station workflow.
  3. Prepare the circuit diagram to connect all the choosen components.
  4. Produce your own PCB design.
  5. Solder the electronic parts to the PCB.
  6. Assemble all the project parts.
  7. Start the first test and validate the project.

Step 1: How the Weather Station Works!

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

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: PCB Making

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.

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

Related download files

You can also download the Gerberfile for this circuit.

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

Step 5: Ingredients

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

Step 6: Software Part

the Arduino IDE library setup

Make sure that your computer is connected to internet in order to have access to the online 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 these three libraries showen through the above photos and you can search them by them names (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.

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.

After creating an account in 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 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 and if you still don’t know how to use NodeMCU boards with Arduino IDE just check the this video to guide you through.

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.

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.

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.

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

Be the First to Share

    Recommendations

    • Pets Challenge

      Pets Challenge
    • Water Speed Challenge

      Water Speed Challenge
    • Fandom Contest

      Fandom Contest

    Comments