0% found this document useful (0 votes)
6 views37 pages

Weather

The document presents a project report on a GSM-based weather reporting system developed by a group of students at Debre Tabor University. The system aims to provide real-time weather information, including temperature, humidity, and light intensity, using multiple sensors for accuracy and sending data via SMS. The project includes a detailed methodology, system design, and recommendations for future work in weather monitoring applications.

Uploaded by

Cesc Gebre
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views37 pages

Weather

The document presents a project report on a GSM-based weather reporting system developed by a group of students at Debre Tabor University. The system aims to provide real-time weather information, including temperature, humidity, and light intensity, using multiple sensors for accuracy and sending data via SMS. The project includes a detailed methodology, system design, and recommendations for future work in weather monitoring applications.

Uploaded by

Cesc Gebre
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 37

GSM BASED WEATHER REPORTING SYSTEM

A Project report Submitted to


Debre Tabor University, Debre Tabor
In partial fulfillment of the
Requirements for the award of the degree
Of
BACHELOR OF SCEIENCE
IN CONTROL STREAM
Submitted By

GROUP MEMBERS: ID Number


1 SEYFE H/MARIAM……………………………………………… ENG®0827/07
2 JEMIL FEKADU………………………………………………….. ENG®1269/07
3 WORKU TADESSE………………………………………………. ENG®0640/07
4 HILINA YALEW…………………………………………………. ENG®1289/07
5 AMSALU BEWKET……………………………………………….ENG®0268/07
6 ABEBA MISGAN………………………………………………….ENG®1108/07

Department of
ELECTRICAL AND COMPUTER ENGINEERING
FACULTY OF TECHNOLOGY
DEBRE TABOR UNIVERSITY
DEBRE TABOR
2010 E.C
List of figures
figure 3. 1 Circuit Diagram of LM35......................................................................................... 8
figure 3. 2 Arduino Uno microcontroller pin ........................................................................... 10
figure 3. 3 Block diagram of the system .................................................................................. 15

figure 4. 1 Overall circuit diagram snapshotted from proteus 8 .............................................. 17


figure 4. 2 Flow chart ............................................................................................................... 19
figure 4. 3 Out put on virtual terminal .................................................................................... 20
figure 4. 4 Results Displayed on LCD ..................................................................................... 21

i
Table Of Content
DECLARATION ..............................................................................................iv
CERTIFICATE .................................................................................................v
ACKNOWLEDGEMENT ................................................................................vi
ABSTRACT......................................................................................................vii
ACRONYMS ....................................................................................................viii
CHAPTER ONE ...............................................................................................1
1.1 Introduction ................................................................................................1
1.2 Statement of the problem ...........................................................................2
1.3 Objectives of the project.............................................................................2
1.3.1 General objective .................................................................................2
1.3.2 Specific objective .................................................................................2
1.4 Scope ..........................................................................................................2
CHAPTER TWO ..............................................................................................3
2.1 Literature Review .......................................................................................3
CHAPTER THREE ..........................................................................................6
3.1 System block diagram and methodology....................................................6
3.2 Methodology ...............................................................................................6
3.3 System components and operation .............................................................6
3.3.1 Temperature Sensor (LM35) ...................................................................6
3.3.3 Working principle of LM35: ...................................................................7
3.3.4 Humidity Sensor (HCH-1000).................................................................8
3.3.5 Features of HCH-1000:............................................................................8
3.3.6 Working Principle of HCH-1000: ...........................................................9
3.3.7 Light Sensor (TSL251RD) ......................................................................9
3.3.8 Features of TSL251RD ............................................................................9
3.3.9 Arduino Uno ............................................................................................10
3.3.10 GSM MODEM (SIM900D) ...................................................................12
3.3.11 Liquid Crystal Display (LCD) ...............................................................13
3.4 Software requirement an programing language .........................................14
3.5 Overall Working Principle ..........................................................................16

ii
CHAPTER FOUR.............................................................................................17
4.1 System design and result ............................................................................17
4.2 Result ..........................................................................................................20
4.3 Discussion: ..................................................................................................21
CHAPTER FIVE ..............................................................................................22
5.1 Conclusion and Recommendations for Future Work .................................22
5.2 Conclusion ..................................................................................................22
5.3 Recommendations for Future Work ...........................................................22
References .........................................................................................................23
Appendix ...........................................................................................................24

iii
DECLARATION
We are here by certify that the Project Report entitled GSM based weather reporting
system under the guidance of Mr. Misganaw is submitted in partial fulfillment of the
requirements for the Award of the Degree of BACHELOR OF SCIENCE (Industrial Control
Engineering stream) in ELECTRICAL & COMPUTER ENGINEERING At the
present time, we are studying our Bachelor’s degree in Electrical Engineering department,
Industrial Control Engineering stream, in Debre Tabor university Faculty of Technology
(DTU). We are in our fourth year and we had to do our semester project. We have been doing
our project on GSM based weather reporting. We have prepared this paper which describes
our project. We have used many references to prepare this paper listed in the reference
section.

Project associates
0827/07
0640/07
1269/07
1108/07
1289/07
0268/07
Date:22/09/2010 E.C Department of Electrical and Computer Engineering

Faculty of Technology
Debre Tabor University

iv
DEBRE TABOR UNIVERSITY
FACULTY OF TECHNOLOGY
DEBRE TABOR

DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING


CERTIFICATE

This is to certify that the project report entitled GSM based weather reporting system being
submitted by following students
Name of the Students ID No’s
(1 ) SEYFE H/MARIAM……………………………………………… ENG®0827/07
(2) WORKU TADESSE………………………………………………... ENG®0640/07
(3) JEMIL FEKADU…………………………………………………. ENG®1269/07
(4) HILINA YALEW…………………………………………………. ENG®1289/07
(5) AMSALU BEWKET…………………………………………………ENG®0268/07
(6) ABEBA MISGAN…………………………………………………. ENG®1108/07

Advisor Head of the Department


Mr. Misganaw Mr. Juhar Muhammed

v
ACKNOWLEDGEMENT
We write this acknowledgement with great honor, pride and pleasure to pay our respects
to all who enabled us either directly or indirectly in reaching this stage. We indebted forever
to our guide Mr. Misganaw, Lecturer in Electrical and Computer Engineering Department for
his suggestions, guidance and inspiration in carrying out this project work We express our
profound thanks to Mr. Juhar Muhammed Alyu, Head of Electrical and Computer
Engineering Department for unflinching devotion, which lead us to complete this project. The
support and encouragement given by him motivated us to complete this project.We wish to
extend our sincere thanks to our parents and others, for their understanding and co-operation
during the course of our project work. We take this opportunity to convey our sincere thanks
to all our classmates who have Directly and indirectly contributed for the successful
completion of this work.

vi
ABSTRACT
Nowadays, weather information monitoring and reporting systems have been widely
used as the need arises from different users. The purpose of this project focuses on a location
based reliable wireless weather reporting system for specific needs. The device that will be
designed will give real time information regarding humidity, temperature, and light intensity
of specific location. The idea of the project is to build a hardware platform that has the ability
to collect information and send information over our mobile phone as SMS. To increase the
accuracy of the sensors we use two sensors of one type and take the average of them if their
output values difference is not higher. If the difference is higher, one’s sensor value is taken
and reported. A program is built in ready-made software called Arduino IDE, Integrated
Environment Development, and the hex file is loaded to the board of the Arduino Uno
microprocessor, for simulation purpose, to collect all the information’s from the sensors and
transmit the collected information by using the GSM module. Liquid crystal display is also
used to display the sensors value continuously for local weather monitoring system and to
check the received SMS is correct or not. For the physical device of the system the code is
directly uploaded to the physical board of Arduino using USB cable.

vii
ACRONYMS
°C-------------------------------Degree Centigrade
AC------------------------------Alternating Current
ADC----------------------------Analogue to Digital Converter
AREF---------------------------Analog Reference
ASCII --------------------------American Standard Code for Information Interchange
DC-------------------------------Direct Current
GPRS----------------------------General Packet Radio Service
GSM-----------------------------Global System for Mobile Communication
IC---------------------------------Integrated Circuit
IDE ------------------------------Integrated Development Environment
LCD -----------------------------Liquid Crystal Display
LED -----------------------------Light Emitting Diode
MODEM------------------------Modulator Demodulator
NTC-----------------------------Negative Temperature Coefficient
PWM----------------------------Pulse Width Modulation
SMS -----------------------------Short Message Service
SPI--------------------------------Serial Peripheral Interface
TTL-------------------------------Transistor-Transistor Logic
USB ------------------------------Universal Serial Bus
WIFI-------------------------------Wireless Fidelity

viii
CHAPTER ONE
1.1 Introduction
Weather reporting would help in keeping track of different climatic behaviors including
temperature, humidity and light intensity. Weather reporting System can be either wired or
wireless one. In the case of wireless communication, the connectivity will be more convenient
and user friendly and weather monitoring would not require physical presence of the person at
the location. Wireless communication is the transfer of information over a distance without the
use of wires. The distances involved may be short (a few meters as in television remote control)
or long (thousands or millions of kilometers for radio communications).GSM technology is the
cheapest and the most convenient technology now being used for wireless communication. We
use a LM35, TSL251RD and HCH-1000 sensors to get the temperature, light and humidity
values of a specific place respectively. As you know instead of using only a single sensor it is
better to use two or more sensors and take the average of them if the outputs difference is not
higher to get more accurate and reliable information. If the difference is higher it may give
wrong information as one of the same type sensors fail. To overcome this problem the Arduino
Uno microprocessor must take the difference of the same type sensors and if it is higher the
Arduino Uno microprocessor will decide which is better and take to further processing purpose.
We have used Arduino Uno microprocessor board which contains ATmega328 microcontroller
which works at 16-MHz frequency as a main component of the project. A program is built in a
ready-made software called Arduino IED, Integrated Environment Development, and loaded to
the physical board of the Arduino Uno microprocessor Now a Arduino Uno microprocessor has
become a main component of many of the electronic circuits. Also Liquid Crystal Display (LCD)
and LED are used on major basis for the display. This project consists of two basic modules.
First is “Data monitoring” & other is “Data Sending”. A display unit will show the value of
parameters. This will help for the person to know the values, for this purpose we are going to use
sensors, which will be connected to ADC pins of the Arduino Uno microprocessor. The other
module is named as parameter sending. It can be used to send the parameters value to a remote
location. We are going to use a GSM modem. These values can later be seen using a mobile
SMS inbox. This system is useful because many times, It’s difficult to measure the parameter
values manually. This project can prove to be tremendously useful in various areas of application
such as in outdoor/climatic monitoring and for wildlife habitat monitoring in forests. It can be

1
used in aquatic environments like river temperature monitoring, Fish farming etc. In indoor
condition it can be used for recording environmental conditions to comply with Health and
Safety regulations, monitoring the effects of different types of building materials, e.g. loft or wall
insulation, Validating heating, air conditioning or climate control systems and so on.
1.2 Statement of the problem
Now a day, weather condition of specific geographical area is reporting through
Televisions and magazines. This report is taken an average of weather parameters of the day and
also in industries monitoring weather condition of the plant is done locally. We need to report
continuously when unwanted weather condition is detected and get information by our mobile
phones as SMS. Secondly the current weather reporting systems use a single sensor to sense one
parameter and this leads to minimum efficiency. We use two sensors to sense one parameter to
increase the reliability of the system.
1.3 Objectives of the project
1.3.1 General objective
The main objective of this project is to design a reliable wireless weather reporting system when
undesired weather condition is happened
1.3.2 Specific objective
To design a reliable wireless weather reporting system in which an Arduino is interfaced
with sensors (temperature, humidity and light) specifically for industries and agriculture. The
sensors values are displayed on LCD for local monitoring purpose and forwards to GSM module
to transmit these data to remote area over the GSM network.
1.4 Scope
The equipment specifications and modeling of the system is done.

2
CHAPTER TWO
2.1 Literature Review
Karthik Krishnamurthi, Suraj Thapa, Lokesh Kothari, and Arun Prakash: Has given a
paper was only Arduino based weather monitoring. This project is designed to monitor both
locally and remotely. Monitoring remotely is done by getting information about the weather
condition as SMS through our mobile phone. There is a design done by a group of 13 students of
Florida University. The idea of the project was to build a hardware platform that has the ability
to collect information and send information over Wi-Fi network. As we Know Wi-Fi network in
our country is available in some area and we are going to do our project collecting information
and send the information over a GSM network to our Mobile Phone as SMS. Adnan Shaoutet
presented an embedded design of a low cost weather station. Three weather parameters; wind
speed, wind directions and temperature are measured. The measured parameters are used to
measure the wind chill temperature and dressing index through calculation and a build-in
intelligent system. Only basic type sensors were used so that the cost of this design is reduced. A
small scale neural network was planted into the microcontroller for the post-processing. Taking
the three measured data as inputs, the system gave out the dressing index as an output. All of the
data were displayed on the LCD and also sent to computer from the serial port. This paper
represents a design of a small-scale embedded intelligent weather station which can deliver real
time weather conditions of surrounding environment. Three basic factors; wind speed; wind
direction and temperature and two post processed elements; real feel temperature and dressing
index would be shown on LCD and also could be sent to serial port of a personal computer. The
whole system was built using free scale Dragonl2-Plus2 board from HCS12 microcontroller
family with MC9S12DG256 inside which uses 5V power supply. The wind speed and wind
direction sensors were designed, tested and built in this paper which can get power supply from
the board easily. These sensors cost much lower than the products on the market with respect to
both the cost and power supply aspects. Most of the existing wind speed and wind direction
sensors in the market are medium or large scale with external power supply, obviously not
suitable for a small-scale embedded system with limited power supply. Besides the basic weather
parameters, the built-in intelligent system can process these data further. A small scale 978-1-

3
4799-5241-0114/$3100 ©20 14 IEEE neural network was implemented in the system to
calculate the dressing index according to the real time temperature, wind speed and wind
direction.
R. Lajaraet al. in the paper “Ultra Low Power Wireless Weather Station” proposed a design
of a tiny and low cost Wireless Weather Station to measure accurate temperature, relative
humidity, light intensity and atmospheric pressure. These direct climatic variables and others
indirectly attainable, like the dew-point, wind chill are readable through a web page. The chosen
sensors are factory calibrated and have a digital interface. The Weather Sensor Nodes are able to
achieve ultra-low power consumption, allowing a single super capacitor to power them for 52
days. A really small and autonomous wireless node transmits accurate information about several
parameters of weather. These are temperature, relative humidity, atmospheric pressure and light
intensity. A constantly powered base station collects the data and retransmits them through cable
to a host computer. The host stores the data and creates several files which can be acceded
through a web server.
MirceaPopa et al. developed “Embedded Weather Station with Remote Wireless Control”.
Weather monitoring is of great importance in many domains such as: agriculture, military,
entertainment etc. There are several solutions for monitoring the weather. The classical solution
present in static weather stations. Another solution is based on wireless sensor networks (WSNs).
The third solution uses low dimensions weather stations. This paper presents a weather station
made of temperature, humidity, pressure and luminosity sensors, embedded in a microcontroller
based board. The station is remotely controlled by the user through SMS commands. The remote
control can be implemented through wires, on Internet, or wirelessly by using different
communication technologies. The system uses the SEN-08311 USB Weather Board, which
includes the temperature and humidity sensor, pressure sensor and the TEMT6000 luminosity
sensor. The software is written in the Python language. It is divided in three parts: I) the main
program for initializations, establishing the connection to the GSM network, receiving the data
from the WSB Weather Board and processing the sensed values so that the user commands can
be achieved, II) the SIM library: the functions set the PIN value, prepares the SIM card, verifies
the strength of the signal for using the GSM network, III) the SMS library: the functions are
responsible with sending, receiving and erasing, after being processed, the messages.

4
OndrejKrejcar, developed “Low Cost Weather Station with Remote Control”. Proposed
work describes use a PC to control home weather station and visualization measuring data via
applications written in programming language C# with communications via USB or RS232.
Weather station is capable of measure temperature up to five temperature sensors DS18B20,
wind speed via measuring turbine with optical encoder, the intensity of illumination via light
sensitive element and finally is able to detect an approaching thunderstorm by measuring
atmospheric charge. The station also disposing eight galvanic separation switch outputs, whose
function in the supplied software set to customer requirements.
ArpitaGhosh et al. proposed a model which acts as a weather station and a rain detector and
is solely solar powered. The model is designed in such a way that it can be used remotely and the
readings are displayed on a user friendly LCD display and are displayed as digital numeric
values. The weather station includes a remote station for monitoring the weather powered by a
solar panel, and a base station to display data. The remote station includes sensors to measure
temperature, relative humidity, rain and solar radiation level. The goal in system design is
optimizing cost and power. The main intention of the proposed model was to make a weather
station which is powered by renewable sources of energy. Hence we built a solar powered
weather station which can capture the various environmental factors and send the reading back to
the LCD for monitoring.

5
CHAPTER THREE
3.1 System block diagram and methodology
3.2 Methodology
The methods and steps that we had followed throughout our project are as follows;

. Literature review: we have referred to books, websites and other references to get
enough information’s about GSM based weather reporting system.

. Design specifications: All the required performances of the system are listed and we
found all the circuit components

. System modeling: Formulating the relationship between the different system parts and
components and also a computer code had written to relate the components.

. Designing: The circuit is designed on proteus 8 professional simulation software.


The final report paper is prepared.
3.3 System components and operation
3.3.1 Temperature Sensor (LM35)
The LM35 series are precision integrated-circuit temperature sensors. Its output voltage is
linearly proportional to the Celsius temperature for a large range of temperature values. The
LM35 has an upper hand over linear temperature sensors calibrated in ° Kelvin, as the user is not
required to subtract a large constant voltage from its output to obtain convenient ° C scaling. The
LM35 need not use any external calibration or trimming to provide usual accuracies of ±1⁄4
degree centigrade at room temperature and ±3⁄4 degree centigrade over a full -55 to +150 ° C
temperaturerange.
3.3.2 Features of LM35:
a. Calibrated directly in ° Celsius (Centigrade)
b. Linear + 10.0 mV/ ° Celsius scale factor
c. 0.5°C accuracy guarantee (at +25°C)
d. Rated for full -55° to +150°C range
e. Suitable for remote applications
f. Low cost due to wafer-level trimming
g. Operates from 4 to 30 volts
h. Less than 60 μA current drain

6
i. Low self-heating, 0.08°C in still air
j. Nonlinearity only ±1⁄4°C typical
k. Low impedance output, 0.1 W for 1 mA load.

3.3.3 Working principle of LM35:


There are two transistors in the center of the drawing as shown in figure 3.1. One has ten times
the emitter area of the other. This means it has one tenth of the current density, since the same
current is going through both transistors. This causes a voltage across the resistor R1 that is
proportional to the absolute temperature, and is almost linear across the range we care about.
"almost" part is taken care of by a special circuit that straightens out the slightly curved graph of
voltage versus temperature. The amplifier at the top ensures that the voltage at the base of the left
transistor (Q1) is proportional to absolute temperature (PTAT) by comparing the output of the
two transistors. The amplifier at the right converts absolute temperature (measured in Kelvin)
into either Fahrenheit or Celsius, depending on the part (LM34 or LM35). The little circle with
the "i" in it is a constant current source circuit. The two resistors are calibrated in the factory to
produce a highly accurate temperature sensor. The integrated circuit has many transistors in it --
two in the middle, some in each amplifier, some in the constant current source, and some in the
curvature compensation circuit. All of that is fit into the tiny package with three leads.

7
figure 3. 1 Circuit Diagram of LM35
3.3.4 Humidity Sensor (HCH-1000)
The HCH-1000 series humidity sensor is a capacitive polymer sensor designed for
relative humidity measurement. The sensor converts humidity value into capacitance, which can
be measured electronically. Polyimide is used as a humidity sensing material because of its
inherent IC (Integrated Circuit) processing compatibility, reduced temperature dependence and
enhanced resistance against contamination. The HCH-1000-Series is manufactured using
semiconductor technology. The sensor consists of a grid top electrode, a polyimide layer, and a
bottom electrode. The grid top electrode on the bottom electrode provides enhanced sensitivity
when compared to that of a standard structure. A cased version, for dust protection, and an
uncased version are available.
3.3.5 Features of HCH-1000:
a. Polymer sensing offers enhanced resistance against contamination
b. Reduced temperature dependence
c. Semiconductor fabrication technology

8
d. Uses glass wafer as substrate
e. Enhanced sensitivity and accuracy provides fast response
f. Low hysteresis and long-term stability.

3.3.6 Working Principle of HCH-1000:


For measuring humidity they use the humidity sensing component which has two
electrodes with moisture holding substrate between them. As the humidity changes, the
conductivity of the substrate changes or the resistance between these electrodes changes. This
change in resistance is measured and processed by the IC which makes it ready to be read by a
microcontroller. On the other hand, for measuring temperature these sensors use a NTC
temperature sensor or a thermistor. A thermistor is actually a variable resistor that changes its
resistance with change of the temperature. These sensors are made by sintering of semi
conductive materials such as ceramics or polymers in order to provide larger changes in the
resistance with just small changes in temperature. The term “NTC” means “Negative
Temperature Coefficient”, which means that the resistance decreases with increase of the
temperature.

3.3.7 Light Sensor (TSL251RD)


The TSL251RD is light-to-voltage optical sensors; it combines a photodiode and a trans
impedance amplifier on a single monolithic IC. The TSL251RD have an equivalent feedback
resistance of 8 MΩ and a photodiode measuring 0.5 square mm. Output voltage is directly
proportional to the light intensity (irradiance) on the photodiode. These devices have improved
amplifier offset-voltage stability and low power consumption. It enables extremely fast response
to change and fast response to visible light in range of 400nm to 700nm wavelengths. It also
provides for high sensitivity to detect a small change in light and reduces board space
requirements while simplifying designs.
3.3.8 Features of TSL251RD
a. Single photo-diode and trans impedance architecture
b. 70µs output rise-time response
c. High Irradiance Responsively 16mV/(µW/cm2) @ λp = 640nm
d. 5mm x 6.2mm SOIC (D) package.

9
3.3.9 Arduino Uno
Arduino is an open source device, a prototyping board consisting of ATmega328
microcontroller providing a five volt output voltage. It takes input voltage from either connecting
USB to your computer or either using a coaxial cable using a portable power supply. On the
Arduino you can upload sketches using Arduino IDE. Arduino comes in various flavors and
according to needs like Uno, Mega, Yun etc. In this project we used Arduino uno board. It is
cheap and feasible. It has fourteen digital input/output pins, six analog inputs and a reset button.
It needs input voltage in between seven to twelve volt.

4 3

figure 3. 2 Arduino Uno microcontroller pin 7

1. Digital I / O
The Arduino UNO board has 14 digital I/O pins (15) (of which 6 provide PWM (Pulse Width
Modulation) output. These pins can be configured to work as input digital pins to read logic

10
values (0 or 1) or as digital output pins to drive different modules like LEDs, relays, etc. The
pins labeled “~” can be used to generate PWM.
2. AREF
AREF stands for Analog Reference. It is sometimes, used to set an external reference voltage
(between 0 and 5 Volts) as the upper limit for the analog input pins.
3. power supply
Arduino board can be powered by using the USB cable from your computer. All you need to do
is connect the USB cable to the USB connection.
4. Power (barrel jack)
Arduino boards can be powered directly from the AC mains power supply by connecting it to the
Barrel Jack.
5,8 ARDUINO RESET
You can reset your Arduino board, i.e., start your programs from the beginning. You can reset
the UNO board in two ways. The first is by using the reset button (8) on the board and the
second by connecting an external reset button to the Arduino pin labeled RESET (5),
6 Analog pins
The Arduino UNO board has six analog input pins A0 through A5. These pins can read the
signal from an analog sensor like the humidity sensor or temperature sensor and convert it into a
digital value that can be read by the microprocessor.
7 Main microcontrollers
Each Arduino board has its own microcontroller (7). You can assume it as the brain of your
board. The main IC (integrated circuit) on the Arduino is slightly different from board to board.
The microcontrollers are usually of the ATMEL Company. You must know what IC your board
has before loading up a new program from the Arduino IDE. This information is available on the
top of the IC. For more details about the IC construction and functions, you can refer to the data
sheet
Technical Specifications of Arduino Uno:
• Microcontroller ATmega328
• Operating Voltage 5V
• Supply Voltage (recommended) 7-12V
• Maximum supply voltage (not recommended) 20V

11
• Digital I/O Pins 14 (of which 6 provide PWM output)
• Analog Input Pins 6
• DC Current per I/O Pin 40 mA
• DC Current for 3.3V Pin 50 mA
• Flash Memory 32 KB (ATmega328) of which 0.5 KB used by boot loader
• SRAM 2 KB (ATmega328)
• EEPROM 1 KB (ATmega328)
• Clock Speed 16 MHz
3.3.10 GSM MODEM (SIM900D)
This is a GSM/GPRS-compatible Quad-band cell phone, which works on a frequency of
850/900/1800/1900MHz and which can be used not only to access the Internet, but also for oral
communication (provided that it is connected to a microphone and a small loud speaker) and for
SMSs. Externally, it looks like a big package (0.94 inches x 0.94 inches x 0.12 inches) with L
shaped contacts on four sides so that they can be soldered both on the side and at the bottom.
Internally, the module is managed by an AMR926EJ-S processor, which controls phone
communication, data communication (through an integrated TCP/IP stack), and (through an
UART and a TTL serial interface) the communication with the circuit interfaced with the cell
phone itself. The processor is also in charge of a SIM card (3 or 1.8 V) which needs to be
attached to the outer wall of the module. The TTL serial interface is in charge not only of
communicating all the data relative to the SMS already received and those that come in during
TCP/IP sessions in GPRS (the data-rate is determined by GPRS class 10: max. 85,6 kbps), but
also of receiving the circuit commands (in our case, coming from the PIC governing the remote
control) that can be either AT standard or AT-enhanced SIM Com type. The module is supplied
with continuous energy (between 3.4 and 4.5 V) and absorbs a maximum of 0.8A during
transmission.
AT commands for GSM Module
AT commands are instructions used to control a modem. AT is the abbreviation of
Attention. Every command line starts with “AT”. That is why modem commands are called AT
commands. Many of the commands that are used to control wired dial-up modems, such as ATD
(Dial), ATA (answer), ATH (hook control). They are also supported by GSM/GPRS modems
and mobile phones. Besides this AT command set, GSM/GPRS modems and mobile phones

12
support an AT command set that is specific to the GSM technology, which includes SMS-related
commands like AT+CMGS, send SMS message, AT+CMSS (Send SMS message from storage),
AT+CMGL (list SMS messages) and AT+CMGR (read SMS messages).
Features of SIM900:
• Single supply voltage of 3.4V – 4.5V
• Typical power consumption in SLEEP mode to 2.5mA
• Normal operation in temperature range of -20°C to +55°C
• External Antenna is connected via 50 Ohm antenna connector or antenna pad
• It has two serial interfaces.
• Stores SMS in SIM card
• Timer function is programmable via AT commands.
3.3.11 Liquid Crystal Display (LCD)
LCD (Liquid Crystal Display) screen is an electronic display module and find a wide
range of applications. These modules are preferred over seven segment LEDs because it have no
limitation of displaying special and even custom characters, animation and so on. A 20x4 LCD
means it can display sixteen characters per line and there are two such lines. In this LCD each
character is displayed in 5x7 pixel matrix. This LCD has two registers, namely, command and
data. The command register stores the command instructions given to the LCD. A command is
an instruction given to LCD to do a predefined task like initializing it, clearing its screen, setting
the cursor position, controlling display etc. The data register stores the data to be displayed on
the LCD. The data is the ASCII value of the character to be displayed on the LCD. Liquid crystal
does not emit light directly. The working of LCD depends on two sheets of polarizing material
with a liquid crystal solution in between them. When an electric current is passed through the
liquid, it causes the crystals to align so that it blocks out light and does not allow it to pass. Each
crystal behaves like a shutter, it either allows light to pass through or blocks the light. It can
function properly in the temperature range of -10℃ to 60℃ and has operating lifetime of longer
than 50000 hours (at room temperature without direct irradiation of sunlight).

13
Features of LCD:
• Display Mode………………………TN/STN
• Number of data line…………………8-bit parallel
• Display type…………………………. Positive Transflective
• Backlight……………………………LED(B/5.0V)
• Viewing direction…………………..6 o’clock
• Operating Temperature……………...Indoor
• Driving Voltage……………………. Single power
• Type………………………………...COB (Chip On Board)
• Connector……………………… …..Pin
• Driving method……………………..1/16 duty,1/5 bias

3.4 Software requirement an programing language

The program is written in a ready-made software called Arduino IDE, with C++
programing language. Integrated Environment Development, and verified, The HEX file is
dumped into the ATmega32 microcontroller.

14
System block diagram

LM35 LCD

(Temperature sensor)

ARDUINO
HCH-1000 LED
Microcontroller
(Humidity sensor)

TSL251RD
GSM MODULE
(Light sensor)

Power supply

figure 3. 3 Block diagram of the system

The block diagram has mainly acquiring analog values from the sensors, converting
analog values to digital data in the Arduino Uno microprocessor and displayed on LCD screen
and LED then transmits to GSM module.
System Model
Our wireless weather reporting System is an automated version of manually
measuringtemperature, light, humidity and sending the information to a distant wirelessly via
SMS. Our system has got almost all things automated so that we get an advantage of this concept
the real time direct measurement of the parameters through GSM. Maintaining backup of sent
data is easy and can be done within a few seconds. The system model is shown in Figure 3.3

15
which says about the connectivity of all mentioned devices. LCD is attached to ATMEGA32 to
simultaneously display the measured temperature, through which we can experimentally check
whether the data that is being sent is correct
3.5 Overall Working Principle
Analog output from the LM35, TSL251RD and HCH-1000 is fed to Atmega32 at pin
number and initialize the ADC and the converted value is stored in ADCH. The LCD is
interfaced with the microcontroller to display the output temperature. LCD is connected in 4 bit
mode, it requires 4 data pins (DB4…DB7, only the upper nibble) and 3 control pins (RS, R/W,
EN). SIM900 is connected through TTL interface with microcontroller; it requires 2 data pins
(PD0-Tx & PD1-Rx). AT commands are used to send SMS. An LED is also used for warning
purpose.

Action plane

Description April May june

Collecting work
information
Study of robotic
car
Selecting
required material
Simulation of
software
Progress report
Documentation
Final report

16
CHAPTER FOUR
4.1 System design and result

figure 4. 1 Overall circuit diagram snapshotted from proteus 8


As shown in figure 3.4 the sensors are connected to the analog to digital converter of the
Arduino Uno microprocessor. The microprocessor fetches the outputs of the sensors. After
fetching it display the values to the liquid crystal display continuously and if the sensors values is
outside the range of suitable weather condition the processor gives AT command
("AT+CMGF=1") to set the GSM module into text mode and the GSM module starts to transmit
these values till the sensors output backs to in range of suitable weather condition. LED is also
starts to blink when the parameters are outside the suitable range. We use two sensors to sense
temperature and similarly for light intensity and humidity to increase the reliability of the
system. The microprocessor takes the difference of the two temperature sensors and if the

17
difference is not higher than some threshold value the average value of the sensors is taken for
further processing (displaying and transmitting) but when the difference is outside the range of
the given threshold value the processor decides to take the higher value. Similarly
microprocessor takes the procedure for humidity and light sensors.

18
start

Initialize variables

Display on LCD

receive
No
if Char”>”

10<=temp<=50

Yes Or
Yes
80<=ligh<=120
Send msg
Or
“temp
30<=hum<=70
Ligh

Hum”

No

Set AT +cmgf=1 end

Receive No
Char=”ok”

yes

Set

AT +CMGS=”phone no”

figure 4. 2 Flow chart


19
4.2 Result
The commands and the parameters reached to the TRX pins of the GSM module is shown
by using a virtual terminal at proteus simulation software and shown below.

figure 4. 3 Out put on virtual terminal

20
figure 4. 4 Results Displayed on LCD
4.3 Discussion:
The main goal of this project was to develop and implement a simple reliable wireless
weather reporting that get the weather conditions at the remote station and transmit the data to a
mobile phone as SMS. As we have seen from the simulation result the designed wireless weather
monitoring system was successful. Therefore, the designed system can be done using a
microcontroller practically. In the simulation the sensors are connected to ATMEGA32
microcontroller and the results are sent to GSM modem and simultaneously displayed on LCD.

21
CHAPTER FIVE
5.1 Conclusion and Recommendations for Future Work
5.2 Conclusion
The weather has always been a subject of universal interest, and the recent atmosphere change
issue, in particular, has driven the requirement to produce accurate, robust and reliable sensors
that are capable of predicting change of weather conditions over a specific period of time.
Nowadays, the need for having reliable information about a weather condition of a specific
location both locally and remotely rises extremely.
Based on the simulation result we observed that the temperature, light and humidity
values can be monitored in an isolated place using LM35 (temperature sensors) and can be sent
via SMS to a distant user mobile. Generally, we can conclude that the designed system can report
temperature, light and humidity values of a specific location for remote user and for local user it
displays on the liquid crystal display and this is useful for farmers whose livelihood depends on
the weather to produce better quality crops, doctors and nurses to monitor patients temperatures
remotely, industries, transportations systems…. etc.
5.3 Recommendations for Future Work
At the end of this report, a number of recommendations were appointed for future
enhancement and potential modifications.
1. Different other sensors such as pressure sensor, wind sensors, gas sensors can also be
interfaced with the Arduino Uno microprocessor to fetch various information about an
industries, agriculture or other locations
2. Automatic irrigation control can also be implemented using moisture sensor to fetch data
regarding water presence in the farm and do turn on or turn off water pump accordingly
3. Automatic cooling system by using servo motor when the temperature value rise from a
given threshold temperature
4. Not available for many people simultaneously

22
References
[1]. William C. Dunn “Introduction to Instrumentation, Sensors, and Process Control”,
2005
[2]. LM35 precision centigrade temperature sensors datasheet, National Semiconductors,
November 2000.
[3]. TSL251RD light sensors datasheet, National Semiconductors, November 2000.
[4]. HTH-1000 sensors datasheet, National Semiconductors, November 2000.

23
Appendix
#include <GSM.h>
#include <LiquidCrystal.h>
GSM gsmAccess;
GSM_SMS sms;
int led = 13;
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
int temp0, temp1, temp, temperature;
int humid0, humid1, humid, humidity;
int light0, light1, ligh,light;
int temp0Pin=A0;
int temp1Pin=A1;
int humid0Pin=A2;
int humid1Pin=A3;
int light0Pin=A4;
int light1Pin=A5;
float temperature_func();
float humidity_func();
float light_func();
void setup()
{
Serial.begin(9600);
lcd.begin(20,4);
pinMode(led, OUTPUT);
while (!Serial)
{;}
Serial.println("Temperature, Humidity and Light Sensor Values");
boolean notConnected=true;
while(notConnected)
{
notConnected=false;

24
{
Serial.println("not connected");
}}
Serial.println("GSM initialized");
}
void loop()
{
lcd.print('light');
temperature=temperature_func();//calling function
Serial.println(temperature);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Temperature=");
lcd.print(temperature);
lcd.println("*c");
delay(100);
light=light_func();
Serial.println(light);
lcd.setCursor(0,1);
lcd.print("Light=");
lcd.print(light);
lcd.println("Lumens");
delay(100);
humidity=humidity_func();
Serial.println(humidity);
lcd.setCursor(0,2);
lcd.print("Humidity=");
lcd.print(humidity);
lcd.println("RH%");
delay (100);
Serial.println((char)26);

25
if(temperature<=10||temperature>=30||humidity<=40||humidity>=80||light<=100||light>=120)
{
Serial.println("AT+CMGF=1");//set SMS system into text mode.
delay(100);
Serial.println("AT+CMGS=\"+251923930045\r");
delay(100);
Serial.println("Temperature,humidity and light values are:");
Serial.print(temperature);
Serial.print(" *c,");
Serial.print(humidity);
Serial.print(" %RH &");
Serial.print(light);
Serial.print(" lumens");
Serial.println((char)26);
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
delay(100);
}}
float temperature_func()
{
temp0=analogRead(temp0Pin);
delay(100);
temp1=analogRead(temp1Pin);
temp0=temp0*0.48828125;
temp1=temp1*0.48828125;
temp=temp0-temp1;
if(-5<=temp<=5)
{
temperature=(temp0+temp1)/2;
}
if(temp>5)
{

26
temperature=temp0;
}
if(temp<-5)
{
temperature=temp1;
}
delay(100);
return temperature;
}
float humidity_func()
{
delay(150);
humid0=analogRead(humid0Pin);
delay(100);
humid1=analogRead(humid1Pin);
humid0=humid0*0.10438413;
humid1=humid1*0.10438413;
humid=humid0-humid1;
if(-5<=humid<=5)
{
humidity=(humid0+humid1)/2;
}
if(humid>5)
{
humidity=humid0;
}
if(humid<-5)
{
humidity=humid1;
}
return humidity;

27
}
float light_func()
{
light0=analogRead(light0Pin);
light1=analogRead(light1Pin);
light0=light0*0.32352941;
light1=light1*0.32352941;
ligh=light0-light1;
if(-5<=ligh<=5)
{
light=(light0+light1)/2;
}
if(ligh>5)
{
light=light0;
}
if(ligh<5)
{
light=light1;
}
return light;
}

28

You might also like