Project showcase
Weather Station v.1.0

Weather Station v.1.0 © CC0

First version of basic Home Weather Station.

  • 10,388 views
  • 3 comments
  • 36 respects

Components and supplies

Necessary tools and machines

09507 01
Soldering iron (generic)

Apps and online services

About this project

I started this project becuase I'm very curious about weather forecasting. This first version (1.0) is reading temperature, humidity and barometric pressure and shows them on a basic LCD screen 16x2. The user can turn on or off light of the LCD with a button and control contrast level with a potentiometer.

Next version (2.0) is already in development and includes an Arduino Mini, a solar panel and and RF transmitter/receiver. The idea is to have a sensor outside powered by solar cell and an Arduino inside with RF receiver and a new advanced graphic display for showing information regarding outside weather conditions.

Version 3.0 will also include an anemometer, rain sensor and WiFi shield for transmitting information to open weather web services.

Code

WeatherBase1.0Arduino
/* ------------------------------------------------------------------------------- */
// Weather Station v1.0
// Andrea Martignoni
// martignoni.a@gmail.com

#include <LiquidCrystal.h> //Liquid Cristal Mgt Lib
#include <Wire.h> //Management of wire connections
#include "cactus_io_BME280_I2C.h" //Manage BME280 temp, humidity, pressure sensor


// Connections for LCD:
// rs (LCD pin 4) to Arduino pin 12
// rw (LCD pin 5) to Arduino pin 11
// enable (LCD pin 6) to Arduino pin 10
// LCD pin 15 to Arduino pin 13
// LCD pins d4, d5, d6, d7 to Arduino pins 5, 4, 3, 2
LiquidCrystal lcd(12, 11, 10, 5, 4, 3, 2); //Define PINs LCD
// Create the BME280 object
//BME280_I2C bme;              // I2C using default 0x77 
BME280_I2C bme(0x76);  // I2C using address 0x76

int backLight = 13;    // pin 13 will control the backlight managed by button


void setup()
{
  pinMode(backLight, OUTPUT); //Define output mode
  Serial.begin(9600); //Serial communication 9600

  digitalWrite(backLight, HIGH); // turn backlight on. Replace 'HIGH' with 'LOW' to turn it off.
  lcd.begin(16,2);              // columns, rows.  16X2LCD
  lcd.clear();                  // start with a blank screen
  lcd.setCursor(0,0);           // set cursor to column 0, row 0 (the first row)
  lcd.print("Temperatura Sensore");    //Starting text row 1
  lcd.setCursor(0,1);           // set cursor to column 0, row 1
  lcd.print("XY Celsius");      //starting text row 2
  

  if (!bme.begin()) {           //Check if BME280 is connected and working
    Serial.println("Could not find a valid BME280 sensor, check wiring!");
    while (1);
  }

  bme.setTempCal(-1);           //Claibrate BME280 sensor
 
  
}


void loop()                     //Main looping code
{
 
  lcd.clear();                                                            //Clear LCD
  bme.readSensor();                                                       //Read Sensor
  lcd.setCursor(0,0);                                                     //Position on row 1
  lcd.print("P:"); lcd.print(bme.getPressure_MB());                       //Send to LCD row 1 Pressure in millibars
  lcd.print(" H:"); lcd.print(bme.getHumidity());                         //Send to LCD row 1 Humidity in millipascals
  lcd.setCursor(0,1);                                                     //Position on row 1
  lcd.print("T:"); lcd.print(bme.getTemperature_C()); lcd.print("C");     //Send to LCD row 2 Temperature in C
  lcd.print(" T:"); lcd.print(bme.getTemperature_F()); lcd.println("F");  //Send to LCD row 2 Temperature in F
 
  delay(1000);                                                            //just here to slow down the output so it is easier to read
}


/* ------------------------------------------------------------------------------- */

Schematics

WeatherStation1.0
Schematic and code
WeatherStationBase.fzz

Comments

Similar projects you might like

Weather Station v1.3 with RF Transmission

Project showcase by derapados

  • 5,325 views
  • 1 comment
  • 22 respects

Personal Weather Station (Arduino+ ESP8266 + Thingspeak)

Project tutorial by Jayraj Desai

  • 51,517 views
  • 32 comments
  • 107 respects

Wireless weather station (Arduino + ESP8266 + Thingspeak)

Project tutorial by Alin-Constantin Paun

  • 8,862 views
  • 2 comments
  • 11 respects

Weather Station with Thingspeak

Project showcase by Tittiamo

  • 3,011 views
  • 2 comments
  • 6 respects

Smartphone Controlled Atomic Weather Station

Project tutorial by Daniel Martin

  • 1,355 views
  • 0 comments
  • 2 respects

Arduino MKR1000 Weather Station

Project tutorial by Tadeas Dvoracek

  • 8,298 views
  • 4 comments
  • 22 respects
Add projectSign up / Login