Project showcase

Weather Station v.1.0 © CC0

First version of basic Home Weather Station.

  • 9,463 views
  • 3 comments
  • 33 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

Arduino Bluetooth Basic Tutorial

by Mayoogh Girish

  • 454,665 views
  • 42 comments
  • 236 respects

Home Automation Using Raspberry Pi 2 And Windows 10 IoT

Project tutorial by Anurag S. Vasanwala

  • 285,505 views
  • 95 comments
  • 671 respects

Security Access Using RFID Reader

by Aritro Mukherjee

  • 229,397 views
  • 38 comments
  • 236 respects

OpenCat

Project in progress by Team Petoi

  • 196,004 views
  • 154 comments
  • 1,363 respects
Add projectSign up / Login