Breadboard Based Weather Station


hey everybody,

i show setup basic yet functional weather station on breadboard. great project beginnners (as myself).

it uses arduino uno, bmp085 temperature/pressure sensor on gy-65 breakout board, tinyrtc (ds1307 chip), photoresistor , hd44780 16x2 lcd display. (i going put dht 22 humidity sensor in unused space in middle of breadboard.)

it shows temperature, atmospheric pressure, time, date , brightness on lcd.



this code, please feel free use , modify it:

code: [select]


/*
breadboard weather station
roman bock
amberg, germany
june 2014
*/

#include <wire.h>
#include <liquidcrystal.h>
#include <adafruit_bmp085.h>
#include <rtclib.h>

liquidcrystal lcd(7, 8, 9, 10, 11, 12);

adafruit_bmp085 bmp;
rtc_ds1307 rtc;
 
void setup() {
  wire.begin();
  lcd.begin(16, 2);
  bmp.begin();
  rtc.begin();
  //rtc.adjust(datetime(__date__, __time__)); 
//uncomment above line set rtc, upload sketch, re-comment , upload sketch again
  delay(10);
  }
 
void loop()
{
    lcd.print("temperature:");
    lcd.setcursor(0, 1);
    lcd.print(bmp.readtemperature());
    lcd.print(" ");
    lcd.print((char)223);
    lcd.print("c");   
    delay(2000);
    lcd.clear();
   
    lcd.print("brightness:");
    lcd.setcursor(0, 1);
    lcd.print(analogread(a0));
    lcd.print("/1023");   
    delay(2000);
    lcd.clear();
   
    lcd.print("atm. pressure:");
    lcd.setcursor(0, 1);
    lcd.print(((bmp.readpressure() + 4050)/100.0),1); // replace 4050 number gives accurate results.
    lcd.print(" hpa");
    delay(2000);
    lcd.clear();

    datetime = rtc.now();
   
    lcd.print("date:");
    lcd.setcursor(0, 1);
    lcd.print(now.year(), dec);
    lcd.print('/');
    lcd.print(now.month(), dec);
    lcd.print('/');
    lcd.print(now.day(), dec);
    delay(2000);
    lcd.clear();
   
    lcd.print("time:");
    lcd.setcursor(0, 1);
    lcd.print(now.hour(), dec);
    lcd.print(':');
    lcd.print(now.minute(), dec);
    lcd.print(':');
    lcd.print(now.second(), dec);
    delay(2000);
    lcd.clear();
}




however, project still has flaws:

-the pressure readings not adjusted according temperature. makes them rather inaccurate.
-time shown snapshot, seconds not count on on display while shows time.
-date , time shown without initial zeros (7:8:9 instead of 07:08:09).
-brightness shown in fractions of 1023 instead of lux.
-most important, show sunrise , sunset times, far have not figured out how this.

any suggestions, on sunrise/sunset part, appreciated!

sadly, not have time describe project in detail, schematics, resistor values etc. please refer picture. if there questions left, please feel free ask!



Arduino Forum > Using Arduino > Project Guidance > Breadboard Based Weather Station


arduino

Comments

Popular posts from this blog

opencv3, tbb and rasp pi 2 - Raspberry Pi Forums

small ethernet problem - Raspberry Pi Forums

Multithumb configuration params not working? - Joomla! Forum - community, help and support