How to Logging Weather Station Data | Liono Maker

Introduction: How to Logging Weather Station Data | Liono Maker

About: Engineer

Introduction:

Hi, this is #LionoMaker. This is my open source and official YouTube channel.

Here is the link: Liono Maker / YOUTUBE CHANNEL

In this project we will learn how to make "Logging Weather Station Data". this is very interesting project. In this project I'm using Micro SD Card, DS3231 module, DHT 11, GPS module, LDR and Arduino UNO. Weather Station Data means that it will detect humidity, temperature, Light, Date & Time, Longitude and Latitude.

NOTE:

1) In Fritzing Schematics I'm using pin6 & pin7 to communicate GPS Module and pin 4 to communicate DHT11. 2) In Proteus Schematics I'm using pin3 & pin 4 to communicate GPS Module and pin6 to communicate DHT11. 3) Otherwise both connections are correct, just we need to define pins# in Arduino coding according to the Schematics.

//*******************************************************

Step 1:

1_SD-Card:-

SD (Secure Digital) cards can be used for data storage and data logging. Examples include data storage on digital cameras or mobile phones and data logging to record information from sensors. Micro SD cards can store 2GB of data and should be formatted as FAT32 (File Allocation Table) format. The micro SD card operates at 3.3V, so only micro SD card modules with a 5V to 3.3V voltage level shifter chip and a 3.3V voltage regulator can be connected to the Arduino 5V supply. The micro SD module communicates with the Arduino using Serial Peripheral Interface (SPI). The SPI connecting pins on the micro SD module include the MOSI, MISO, SCK pins and the SS pin denoted chip select (CS), which are connected to Arduino pins 11, 12, 13, and 10, respectively.

SD-Card Interfacing with Arduino UNO:

GND ------GND

5volt-------VCC

Pin12--------MISO

Pin11--------MOSI

Pin13-------SCK

Pin10--------SCS

Data is only written to the file on the SD card following the file.close() instruction; therefore, every file.println(data) instruction must be followed by a file.close() instruction and be preceded by an SD.open("filename", FILE_WRITE)instruction. The SD.open() function has default setting of FILE_READ, so the option FILE_WRITEis required to write to a file. The sequence of instructions required every time to write to an SD card is SD.open("filename", FILE_WRITE); file.println(data); file.close();

2)LDR:-

A photo resistor (acronym LDR for Light Decreasing Resistance, or light-dependent resistor, or photo-conductive cell) is a passive component that decreases resistance with respect to receiving luminosity (light) on the component's sensitive surface. The resistance of a photo resistor decreases with increase in incident light intensity; in other words, it exhibits photoconductivity.

LDR Interfacing with Arduino UNO:

Its one terminal is connected with 5volt and second terminal is connected with 1k resistor. The second end of the 1k resistor is grounded. LDR is itself a resistor and this type of configurations are used to measure & voltage, this is voltage divider technique. The common terminal is connected to analog pin# A3 of Arduino UNO.

3)DS3231:-

The date and time of a sensor measurement or of a data record can be included when writing data to an SD card using a real-time clock (RTC) module, such as the DS3231. The real-time clock can provide seconds, minutes, hours, day, date, month, and year information. The DS3231 can be powered with 3.3V or 5V and a CR2032 lithium button-cell battery powers the RTC when not connected to the Arduino. The DS3231 also has an inbuilt temperature sensor. The DS3231 uses I2C communication with the two bidirectional lines:

1) Serial clock (SCL)

&

2) Serial data (SDA).

NOTE:>>>DS3231 connected with Arduino UNO as such;

DS3231: Arduino UNO:

Gnd-----------------------Gnd

VCC---------------------5volt

SDA--------------------pin# A4

SCL--------------------pin#A5

4) DHT11 :-

DHT11 is a low-cost digital sensor for sensing temperature and humidity. This sensor can be easily interfaced with any micro-controller such as Arduino, Raspberry Pi etc… to measure humidity and temperature instantaneously. DHT11 humidity and temperature sensor is available as a sensor and as a module. The difference between this sensor and module is the pull-up resistor and a power-on LED. DHT11 is a relative humidity sensor. To measure the surrounding air this sensor uses a thermostat and a capacitive humidity sensor.

Connecting DHT 11 Sensor with Arduino UNO:

DHT11 Arduino UNO

GND----------------------------GND

VCC-----------------------------5volt

Data (Signal)------------------pin#6

5)GPS Module:-

GPS (Global Positioning System) module and is used for navigation. The module simply checks its location on earth and provides output data which is longitude and latitude of its position.

There are different kind of GPS modules and used to find values of different variables. such as;

//**********************************************************************************************************************

NOTE:- FOR MORE DETAILS YOU CAN CALL THIS FUNCTION;

gps.getDataGPRMC (
time,status, latitud, latitudHemisphere, longitud, longitudMeridiano, speedKnots, trackAngle, date, magneticVariation, magneticVariationOrientation );

Serial.println(time);
Serial.println(status);

Serial.println(latitud);

Serial.println(latitudHemisphere);

Serial.println(longitud);

Serial.println(longitudMeridiano);

Serial.println(speedKnots);

Serial.println(trackAngle);

Serial.println(date);

Serial.println(magneticVariation);

Serial.println(magneticVariationOrientation);

//******************************************************************************************************************

another example is used to create a link for GPS module. such as;

gps.Google(link);

//*******************************************************************************************************************

&&&

NOTE:- IF YOU DO NOT GET MORE DETAILS, YOU CAN CALL THIS FUNCTION;

gps.getDataGPRMC (

latitud,latitudHemisphere,longitud,longitudMeridiano

);
Serial.println(latitud);

Serial.println(latitudHemisphere);

Serial.println(longitud);

Serial.println(longitudMeridiano);

//******************************************************************************************************************

I have used these lines to get LONGITUDEE & LATITUDE.

Longi=(gps.location.lng(),54.01125);
Lati= (gps.location.lat(),1.95949);

//******************************************************************************************************************

note:

you can use above coding to get more information from your GPS Module. I have just used to get Longitude and latitude.

//******************************************************************************************************************

FOLLOWING IS THE WAY TO CONNECT THE GPS MODULE WITH ARDUINO UNO:

GPS Module: Arduino UNO:

Gnd-----------------------------Gnd

Vcc------------------------------5volt

RX-------------------------------pin#3

TX ------------------------------pin#4

//********************************************************************************************************************

Step 2:

HOW TO GET "DATA.CSV" FILE WHILE PROTEUS SIMULATIONS:-

NOTE:

>>Firstly, Make sure your circuit is correct and there is no error.

>> you have uploaded hex file in Arduino UNO.

>>you have uploaded SD Card file on SD- card.

>> start your simulation after pressing the play button on left bottom corner on Proteus.

>>your virtual terminal is opened and your data is recorded after delay(1000);

>>>>>>>>>>Press Esc>>>>>>>>>>>>>>>>>>

you will see memory card contents window, here is data.csv file available. Export it in your computer.

Step 3:

EXCEL Working:-

Open Excel and inject your data.csv file in it. data will shown in columns with name and take a line graphs.

Step 4:

Attachments

Step 5:

Be the First to Share

    Recommendations

    • Space Contest

      Space Contest
    • Lamps and Lighting Contest

      Lamps and Lighting Contest
    • 3D Printed Student Design Challenge

      3D Printed Student Design Challenge

    Comments

    0
    charantejaayan
    charantejaayan

    Question 4 weeks ago on Introduction

    One error coming bro no such file found :- TinyGps++. I added that file but showing error