Introduction: Mini Weather Station With Arduino

This is my first instructable and first full fledged Arduino project. Though you may find similar project , I learns a lot from this project.

Step 1: Purpose of Weather Station

This simple weather station will take Temperature and Humidity reading from sensor and will display it over a LCD Display . Any error in signal from sensor will also displayed.

Step 2: Parts and Tools Used

1. Arduino UNO R3 : The heart of the project.

2. DHT 22 : Temperature and Humidity sensor ( You can use inexpensive DHT 11 also).

3. 20x4 LCD : For display the data . ( You can use 16x2 LCD also)

4. I2c Shield : PCF 8584 based

5. 10K Resistance

6. Few Male-Male jumper

7. Bread board.

Step 3: Hardware Connection

Step : 1 : Connecting Ic2 Shield with LCD : It's fairly simple. Both of them have 16 Pin and simply align Pin No-16 of LCD to the "Square" marked Pin of I2c Shield . You can directly solder them or solder a female header on LCD Panel and snub fit it with shield. I do the later , as it would be possible for use LCD for any further project.

Step : 2: Connecting I2c Shield with Arduino :

I2c Shield Arduino

SCL A5

SDA A4

GND GND

VCC +5V

Step : 3: Connecting DHT 22 :

DHT Pin Configuration is started from front left as 1 .

Pin 1 : VCC : Connected to +5V

Pin 2 : Data : Connect to Digital Pin 2 of Arduino. Also a 10K Ohm Resistance is connected between Pin 1 and Pin 2.

Pin 3: No connection

Pin 4: GND : Connected to GND.

Step 4: Software and Code

Now its time to programe the Arduino . I use Arduino IDE 1.6.7 , which can be downloaded from https://www.arduino.cc/en/Main/Software .

Step 1 : Installation of I2c Library : Arduino has a built in library called " LiquidCrystal" but it is for normal LCD and will not be valid for I2c driven LCD. So i download widely used F Malpartida developed LCD Library " NewLiquidCrystal" from https://bitbucket.org/fmalpartida/new-liquidcryst... and save it as the zip file in download section. You first either rename or remove existing "LiquidCrystal" library from Arduino IDE and then add the newly downloaded library by Sketch->Add Library--> Include .zip library. Close and restart IDE. You will see " NewLiquidCrystal" library under Contributed Library.

Step 2 : Finding address of I2c Shield : I use a I2c scanner to find the address as 0x27. Its available in Arduino forum.

Step 3: Installation of DHT library : It is downloaded from https://github.com/adafruit/DHT-sensor-library. Save it same as depicted in step-1 except no need to rename or remove any existing library. It has a DHT tester , which can be used to test DHT 22 (or DHT11) on serial monitor of IDE.

Step 5: Final Code

Once all library are downloaded and connection are done , its fairly easy to write the code. It is self explanatory and i did not go in detailed . Just for hardware variations :

1. If DHT 11 is used instead of DHT 22 : Change the code to #define DHTTYPE DHT11

2. If I2C address is changed : Change code to #define I2C_ADDR (your_address)

3. If a 16x2 LCD is used : Change code to lcd.begin (16,2); and change cursor positioning in lcd.setCursor (0,0); command.

I shall be delighted if you comments on my project. Any improvement or add on in this project is also highly solicited.