Super simple Arduino Weather station containing only two components.

Share on facebook
Share on twitter
Share on linkedin
Share on pinterest
Share on whatsapp

If you buy something from a this link, myelectricsparks Media may earn a commission. See our Read More.

Arduino weather Station

What is Arduino Weather Station?

We’ll build the weather station to measure temperatures, air pressure and rainfall drop, air humidity, and soil moisture with Arduino for this particular project. We will then store the data for later data collection!¬†

Making a mobile Arduino weather station can have many applications. It will give you more accurate weather data from your home and remote locations around the globe. Because they’re so easy to operate, you may be able to modify them as you wish.¬†

It is possible to have temperature and humidity sensors and an actual time clock and even add the WIFI shield for using it wirelessly. It’s a cost-effective way to store information. Another option is to expand it internationally and put up several weather stations within remote regions that do not have precise weather data that can be of significant usage. These stations could also be the possibility of learning for students keen to learn how to program and build weather stations, which will eventually benefit the planet You can easily find the best Arduino kits and Their buying Guide.

I’ll demonstrate how to build an accessible household weather station this time. The data is displayed on an 8×32 dots LED display made up of four 8×8 LED matrices controlled by the MAX7219 chip and linked together via a single PCB.

Build Your Own Arduino Weather Station:

The module is sold at a low price of around $4. Recently, it has been discovered that, apart from the standard red colour, it is possible to select a model with blue or green LEDs.

The basic code for this device is taken from the Anas¬†Kuzechie blog. I just made some minimal modifications so that now, between the push of a button, the scrolling text “T * H * P” does not appear, which has no function and spoils the visual impression. It is also worth noting that I was greeted with an error message that said the sketch was using more than the program’s storage space when trying to build this program. To solve this, we must complete the drawing using Arduino IDE version 1.8.10 or a later version.

The code is the line:

” pres = bme.seaLevelForAltitude(195, bme.readPressure())/100; “

Instead of 195, you need to change the altitude to 195 from your location to show Relative Atmospheric pressure instead of 195.

Steps Required

  • Step 1: Order desired parts needed for weather station
  • Step 2: Code and wire the Arduino, and connect to a computer with Arduino software
  • Step 3: Once successfully coded, test to see if accurately reading data
  • Step 4: Assemble weather station
  • Step 5: Once completed, start to gather data outside in various climates and areas
  • Step 6: Repeat step 5 to gather more data for more accurate reading

Components Required:

The device is extremely simple to make and contains only a few components:

Arduino Nano R3
SparkFun Atmospheric Sensor Breakout – BME280
Resistor 10k ohm
MAX7219 Led matrix 8×32
Pushbutton Switch, Momentary

A scrolling text with “BME 280 sensor” is on the screen when it is turned on. After that, the screen goes off and remains unresponsive until we press one or all of its buttons. Depending on the button you press, the values of Temperature, Humidity, or Atmospheric Pressure will appear on the screen. 

The information is displayed in the display for 10 seconds and is transparent enough to be read, after which it is erased, and the screen becomes empty till the following button has been hit. So, we can access the information only when we need it and avoid the constant flashing and flickering of the screen, which can be highly unpleasant, particularly during the night.
The device is constructed into small boxes made from PVC material that has 5 millimeters thickness and is covered with self-adhesive colors wallpaper.

Code For Arduino Weather Station

				
					//==========================================
//MAX72xx Dot Matrix Display & BME280 Sensor
//==========================================
#include <Wire.h>
#include <MD_MAX72xx.h>
#include <MD_Parola.h>
#include <SPI.h>
#include <Adafruit_BME280.h>
//------------------------------------------------------------
MD_Parola disp = MD_Parola(MD_MAX72XX::FC16_HW, 10, 4);
Adafruit_BME280 bme;
//------------------------------------------------------------
int temp, hum, pres; String tempString, humString, presString;
//==================================================================================
void setup()
{
  pinMode(2,INPUT); pinMode(3,INPUT); pinMode(4,INPUT);
  disp.begin(); bme.begin(0x76, &Wire);

  disp.displayText("BME280 Sensor", PA_LEFT, 40, 40, PA_SCROLL_LEFT,PA_SCROLL_LEFT);
}
//==================================================================================
void loop()
{
//  while(!disp.displayAnimate());
//  disp.displayText("T * H * P", PA_LEFT, 20, 20, PA_SCROLL_LEFT,PA_SCROLL_LEFT);
  while(!disp.displayAnimate());
  
  if(digitalRead(2) == HIGH) dispTemp();
  if(digitalRead(3) == HIGH) dispHum();
  if(digitalRead(4) == HIGH) dispPres();
  
  disp.displayClear();
}
//==================================================================================
void dispTemp()
{
  disp.displayClear();
  disp.displayText("Temperature", PA_LEFT, 30, 30, PA_SCROLL_LEFT,PA_SCROLL_LEFT);
  while(!disp.displayAnimate());
  delay(500);
  for(int i=1; i<=7; i++)
  {
    temp  = bme.readTemperature();
    tempString  = "  " + String(temp) + " C";
    disp.print(tempString);
    delay(1000);
  }
}
//==================================================================================
void dispHum()
{
  disp.displayClear();
  disp.displayText("Humidity", PA_LEFT, 30, 30, PA_SCROLL_LEFT,PA_SCROLL_LEFT);
  while(!disp.displayAnimate());
  delay(500);
  for(int i=1; i<=7; i++)
  {
    hum  = bme.readHumidity();
    humString  = "  " + String(hum) + " %";
    disp.print(humString);
    delay(1000);
  }
}
//==================================================================================
void dispPres()
{
  disp.displayClear();
  disp.displayText("Pressure", PA_LEFT, 30, 30, PA_SCROLL_LEFT,PA_SCROLL_LEFT);
  while(!disp.displayAnimate());
  delay(500);
  for(int i=1; i<=7; i++)
  {
    pres  = bme.seaLevelForAltitude(705, bme.readPressure())/100;
    presString  = "" + String(pres) + " H";
    disp.print(presString);
    delay(1000);
  }
}
				
			

Circuit Diagram

Circuit diagram for Arduino weather station