INTRODUCTION
Weather conditions are the most important parameters in Agriculture, Solar power
generation, and many other fields of generation. Sun is the major contributor to the
continuously changing climatic conditions. In our Solar System, energy from the sun
creates so many imbalances in the temperature of flowing winds, which move from
place to place creating wet, stormy or even sunny weather. The sea plays a major role
in the regulating effect on the climate, due to which there is an enormous difference in
the temperature and even pressure between the regions of the country and the also
coastal regions. Weather is also affected by the natural dimensions of the earth and its
rotator motion. The renewable energy (Wind and Solar) allows decentralized
distribution of energy, particularly for meeting rural energy needs and empowering
people at the grass root level. In India, where alternative forms of energy are of the
need of the hour, due to ever increasing pollution, industries and population,
identifying places or locations which can generate renewable energy is very much
important. The present existing model used by the Indian Meteorological Department
involves a floating weather monitoring device in a hydrogen balloon at every four
hour intervals. This model is expensive and requires frequent manual efforts and is not
practical for many places in India. Design is remotely operated model with sensors
1
which gathers the weather parameters and transmits the measured values to the control
station.
However weather analysis in local regions has to be done in places within these
states, at which power generation capacity can be LOW or HIGH. We designed and
implemented a low cost and reliable instrumentation system for remote wireless
measurement of weather parameters with the help of various sensors. Based on the
parameter various necessary actions can implemented such that the damage caused
will be low and the productivity increases.
Our project is solution to above two problems. Our project consist weather
monitoring system on a rover. This is a low cost weather monitoring system handy for
types of organizations.
We propose a system, which can predict whether a particular place is suitable for
establishing the solar power plant and/or wind power plant, various types of crops. We
designed and implemented a low cost and reliable instrumentation system for remote
wireless measurements of weather, with the help of various sensors. The device is
made as a standalone data acquisition unit, from which data is sent via GSM based
communication to the ground station. A number of power saving mechanisms are
implemented to give maximum battery life for the sensor module.
The objective of this project is to design a wireless weather monitoring rover in which
a microcontroller is interfaced with sensors and GSM module to transmit sensed data
wirelessly.
Analog data from BMP180 is to be fetched and fed to Micro Controller.
Send the measured temperature to user with the help of GSM module (SIM 900) Via
Shot Message Service.
Chapter 2
HARDWARE and SOFTWARE
HARDWARE
2.1 Arduino:
5
A microcontroller can be considered a self-contained system with a processor,
memory and peripherals and can be used as an embedded system. The majority of
microcontrollers in use today are embedded in other machinery, such as automobiles,
telephones, appliances, and peripherals for computer systems.
2.1.2.1 Microcontroller:
1. Microcontroller having inbuilt RAM or ROM and inbuilt timer.
2. Input and output ports are available.
3. Inbuilt serial port.
4. Separate memory to store program and data.
5. Many functions pins on the IC.
6. Boolean operation directly possible.
7. It take few instructions to read and write data from external memory.
2.1.2.2 Microprocessor:
1. Do not have inbuilt RAM or ROM and timer.
2. Input and output ports are not available, requires extra device like 8155
3. Do not have inbuilt serial port, requires 8250 device.
4. Program and data are stored in same memory.
5. Less multifunction pins on IC.
6. Boolean operation is not possible directly.
7. It take many instruction to read and write data from external memory.
Why Arduino?
6
Inexpensive - Arduino boards are relatively inexpensive compared to other
microcontroller platforms. The least expensive version of the Arduino module can be
assembled by hand, and even the pre-assembled Arduino modules cost less than 1000
Open source and extensible software - The Arduino software is published as open
source tools, available for extension by experienced programmers. The language can
be expanded through C++ libraries, and people wanting to understand the technical
details can make the leap from Arduino to the AVR C programming language on
which it's based. Similarly, you can add AVR-C code directly into your Arduino
programs if you want to.
Open source and extensible hardware - The plans of the Arduino boards are
published under a Creative Commons license, so experienced circuit designers can
make their own version of the module, extending it and improving it. Even relatively
inexperienced users can build the breadboard version of the module in order to
understand how it works and save money.
2.1.3 Power
The Uno board can be powered via the USB connection or with an external power
supply. The power source is selected automatically.
External (non-USB) power can come either from an AC-to-DC adapter (wall-wart)
or battery. The adapter can be connected by plugging a 2.1mm center-positive plug
into the board's power jack. Leads from a battery can be inserted in the GND and Vin
pin headers of the POWER connector.
7
The board can operate on an external supply from 6 to 20 volts. If supplied with
less than 7V, however, the 5V pin may supply less than five volts and the board may
become unstable. If using more than 12V, the voltage regulator may overheat and
damage the board. The recommended range is 7 to 12 volts.
Vin-The input voltage to the Uno board when it's using an external power source (as
opposed to 5 volts from the USB connection or other regulated power source). You
can supply voltage through this pin, or, if supplying voltage via the power jack, access
it through this pin.
5V-This pin outputs a regulated 5V from the regulator on the board. The board can be
supplied with power either from the DC power jack (7 - 12V), the USB connector
(5V), or the VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V pins
bypasses the regulator, and can damage your board. We don't advise it.
3V3- A 3.3 volt supply generated by the on-board regulator. Maximum current draw is
50 mA.
2.1.4 Memory
The ATmega328 has 32 KB (with 0.5 KB occupied by the boot loader). It also has
2 KB of SRAM and 1 KB of EEPROM (which can be read and written with
the EEPROM library).
8
Each of the 14 digital pins on the Uno can be used as an input or output,
using pinMode(),digitalWrite(), and digitalRead() functions. They operate at 5 volts.
Each pin can provide or receive 20mA as recommended operating condition and has
an internal pull-up resistor (disconnected by default) of 20-50k ohm. A maximum of
40mA is the value that must not be exceeded on any I/O pin to avoid permanent
damage to the microcontroller.
Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data.
These pins are connected to the corresponding pins of the ATmega8U2 USB-to-TTL
Serial chip.
External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt on a
low value, a rising or falling edge, or a change in value. See the attachInterrupt()
function for details.
PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analogWrite()
function.
LED: 13. There is a built-in LED driven by digital pin 13. When the pin is HIGH
value, the LED is on, when the pin is LOW, it's off.
TWI: A4 or SDA pin and A5 or SCL pin. Support TWI communication using the
Wire library.
The Uno has 6 analog inputs, labeled A0 through A5, each of which provide 10 bits of
resolution (i.e. 1024 different values). By default they measure from ground to 5 volts,
though is it possible to change the upper end of their range using the AREF pin and the
analogReference() function.
There are a couple of other pins on the board
AREF. Reference voltage for the analog inputs. Used with analogReference().
9
Reset. Bring this line LOW to reset the microcontroller. Typically used to add a reset
button to shields which block the one on the board.
2.1.6 Communication
The Uno has a number of facilities for communicating with a computer, another
Uno board, or other microcontrollers. The ATmega328 provides UART TTL (5V)
serial communication, which is available on digital pins 0 (RX) and 1 (TX). An
ATmega16U2 on the board channels this serial communication over USB and appears
as a virtual com port to software on the computer. The 16U2 firmware uses the
standard USB COM drivers, and no external driver is needed. However, on Windows,
a .inf file is required. The Arduino Software (IDE) includes a serial monitor which
allows simple textual data to be sent to and from the board. The RX and TX LEDs on
the board will flash when data is being transmitted via the USB-to-serial chip and
USB connection to the computer (but not for serial communication on pins 0 and 1).
A Software Serial library allows serial communication on any of the Uno's digital
pins.
The ATmega328 also supports I2C (TWI) and SPI communication. The Arduino
Software (IDE) includes a Wire library to simplify use of the I2C bus; see
the documentation for details. For SPI communication, use the SPI library.
10
technologies (TDMA, GSM, and CDMA). GSM digitizes and compresses data, then
sends it down a channel with two other streams of user data, each in its own time slot.
It operates at either the 900 MHz or 1,800 MHz frequency band. It supports voice calls
and data transfer speeds of up to 9.6 kbit/s, together with the transmission of SMS
(Short Message Service).
GSM-900 uses 890915 MHz to send information from the mobile station to the
base station (uplink) and 935960 MHz for the other direction (downlink), providing
124 RF channels (channel numbers 1 to 124) spaced at 200 kHz. Duplex spacing of 45
MHz is used. In some countries the GSM-900 band has been extended to cover a
larger frequency range. This 'extended GSM', E-GSM, uses 880915 MHz (uplink)
and 925960 MHz (downlink), adding 50 channels (channel numbers 975 to 1023 and
0) to the original GSM-900 band.
11
band is also used for GSM and 3G in Australia, Canada and many South American
countries. By having harmonized spectrum across most of the globe, GSMs
international roaming capability allows users to access the same services when
travelling abroad as at home. This gives consumers seamless and same number
connectivity in more than 118 countries.
Terrestrial GSM networks now cover more than 80% of the worlds population.
GSM satellite roaming has also extended service access to where terrestrial coverage
is not available.
In a GSM network, the user terminal is called a mobile station. A mobile station is
made up of a SIM (Subscriber Identity Module) card allowing the user to be uniquely
identified and a mobile terminal. The terminals (devices) are identified by a unique
15-digit identification number called IMEI (International Mobile Equipment Identity).
Each SIM card also has a unique (and secret) identification number called
IMSI (International Mobile Subscriber Identity). This code can be protected using a 4-
digit key called a PIN code.
The SIM card therefore allows each user to be identified independently of the
terminal used during communication with a base station. Communications occur
through a radio link (air interface) between a mobile station and a base station.
12
Figure 2.2.1 GSM architecture
All the base stations of a cellular network are connected to a base station
controller (BSC) which is responsible for managing distribution of the resources. The
system consisting of the base station controller and its connected base stations is called
the Base Station Subsystem (BSS).
13
The Home Location Register (HLR) is a database containing information
(geographic position, administrative information etc.) of the subscribers registered in
the area of the switch (MSC).
The Visitor Location Register (VLR) is a database containing information of users
other than the local subscribers.
The VLR retrieves the data of a new user from the HLR of the user's subscriber zone.
The data is maintained as long as the user is in the zone and is deleted when the user
leaves or after a long period of inactivity (terminal off).
The Equipment Identify Register (EIR) is a database listing the mobile terminals.
The Authentication Centre (AUC) is responsible for verifying user identities.
The cellular network formed in this way is designed to support mobility via
management of handovers (movements from one cell to another).
Finally, GSM networks support the concept of roaming i.e., movement from one
operator network to another.
A GSM modem is a wireless modem that works with a GSM wireless network. A
wireless modem behaves like a dial-up modem. The main difference between them is
that a dial-up modem sends and receives data through a fixed telephone line while a
wireless modem sends and receives data through radio waves.
14
Figure 2.2.2 GSM Modem
Authentication key
15
Computers use AT commands to control modems. Both GSM modems and dial-up
modems support a common set of standard AT commands. In addition to the standard
AT commands, GSM modems support an extended set of AT commands. These
extended AT commands are defined in the GSM standards. With the extended AT
commands, the following operations can be performed:
The number of SMS messages that can be processed by a GSM modem per minute
is very low i.e., about 6 to 10 SMS messages per minute.
Besides this common AT command set, GSM modems and mobile phones 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).
16
It should be noted that the starting "AT" is the prefix that informs the modem about
the start of a command line. It is not part of the AT command name. For example, D is
the actual AT command name in ATD and +CMGS is the actual AT command name in
AT+CMGS.
Some of the tasks that can be done using AT commands with a GSM modem or
mobile phone are listed below:
Get basic information about the mobile phone or GSM modem. For example, name of
manufacturer (AT+CGMI), model number (AT+CGMM), IMEI number (International
Mobile Equipment Identity) (AT+CGSN) and software version (AT+CGMR).
Get basic information about the subscriber. For example, MSISDN (AT+CNUM) and
IMSI number (International Mobile Subscriber Identity) (AT+CIMI).
Get the current status of the mobile phone or GSM/GPRS modem. For example,
mobile phone activity status (AT+CPAS), mobile network registration status
(AT+CREG), radio signal strength (AT+CSQ), battery charge level and battery
charging status (AT+CBC).
Establish a data connection or voice connection to a remote modem (ATD, ATA, etc).
17
SIM card is associated with the mobile phone. To use other SIM cards with the mobile
phone, a password must be entered.])
Get or change the configurations of the mobile phone or GSM/GPRS modem. For
example, change the GSM network (AT+COPS), bearer service type (AT+CBST),
radio link protocol parameters (AT+CRLP), SMS center address (AT+CSCA) and
storage of SMS messages (AT+CPMS).
Save and restore configurations of the mobile phone or GSM/GPRS modem. For
example, save (AT+CSAS) and restore (AT+CRES) settings related to SMS messaging
such as the SMS center address.
It should be noted that the mobile phone manufacturers usually do not implement
all AT commands, command parameters and parameter values in their mobile phones.
Also, the behavior of the implemented AT commands may be different from that
defined in the standard. In general, GSM modems, designed for wireless applications,
have better support of AT commands than ordinary mobile phones.
18
The US began the GPS project in 1973 to overcome the limitations of previous
navigation systems,[2] integrating ideas from several predecessors, including a number
of classified engineering design studies from the 1960s. The U.S. Department of
Defense (DoD) developed the system, which originally used 24 satellites. It became
fully operational in 1995. Roger L. Easton, Ivan A. Getting and Bradford Parkinson are
credited with inventing it.
Advances in technology and new demands on the existing system have now led to
efforts to modernize the GPS and implement the next generation of GPS Block IIIA
satellites and Next Generation Operational Control System (OCX).[3] Announcements
from Vice President Al Gore and the White House in 1998 initiated these changes. In
2000, the U.S. Congress authorized the modernization effort, GPS III. India's NAVIC
Indian Regional Navigation Satellite System was completed in 2016. In addition to
GPS, other systems are in use or under development. The Russian Global Navigation
Satellite System (GLONASS) was developed contemporaneously with GPS, but
suffered from incomplete coverage of the globe until the mid-2000s.[4] There are also
the planned European Union Galileo positioning system, China's BeiDou Navigation
Satellite System and the Japanese Quasi-Zenith Satellite System.
AGRICULTURE
MILITARY
MARITIME
AUTOMOTIVE
SURVEYING
AVIATION
FORESTRY
ENVIRONMENTAL
19
PUBLIC SAFETY
Mapping Software
HIKING
HUNTING
NATURE STUDY
FISHING
GEOCACHING etc.
Overview
The NEO-6 module series is a family of stand-alone GPS receivers featuring the
high performance u-blox 6 positioning engine. These flexible and cost effective
receivers offer numerous connectivity options in a miniature 16 x 12.2 x 2.4 mm
20
package. Their compact architecture and power and memory options make NEO-6
modules ideal for battery operated mobile devices with very strict cost and space
constraints. The 50-channel u-blox 6 positioning engine boasts a Time-To-First-Fix
(TTFF) of under 1 second. The dedicated acquisition engine, with 2 million correlators,
is capable of massive parallel time/frequency space searches, enabling it to find
satellites instantly. Innovative design and technology suppresses jamming sources and
mitigates multipath effects, giving NEO-6 GPS receivers excellent navigation
performance even in the most challenging environments.
RX P13 UART0_TX
TX P14 UART0_RX
21
2.4.1 Description
BH1750FVI is an digital Ambient Light Sensor IC for I2C bus interface. This IC is
the most suitable to obtain the ambient light data for adjusting LCD and Keypad
backlight power of Mobile phone. It is possible to detect wide range at High
resolution.( 1 - 65535 lx ).
2.4.2 Features
22
2.4.3 Absolute Maximum ratings
23
Figure 2.4.2 BH1750 Block diagram
Ambient Light Calculation and I2C BUS Interface. It is including below register.
Data Register This is for registration of Ambient Light Data. Initial Value is
"0000_0000_0000_0000".
24
Figure 2.4.3 BH750 measurement procedure
2.5.1 Description:
The BMP180 is the new digital barometric pressure sensor of Bosch Sensortec,
with a very high performance, which enables applications in advanced mobile devices,
such as smart phones, tablet PCs and sports devices. It follows the BMP085 and brings
many improvements, like the smaller size and the expansion of digital interfaces.
2.5.3 Operation
26
2.5.5 General function and application schematics
For all calculations presented here an ANSI C code is available from Bosch
Sensortec (BMP180 _API). The microcontroller sends a start sequence to start a
pressure or temperature measurement. After converting time, the result value (UP or
UT, respectively) can be read via the I2C interface. For calculating temperature in C
and pressure in hPa, the calibration data has to be used. These constants can be read
out from the BMP180 E2PROM via the I2C interface at software initialization. The
sampling rate can be increased up to 128 samples per second (standard mode) for
dynamic measurement. In this case, it is sufficient to measure the temperature only
once per second and to use this value for all pressure measurements during the same
period.
27
Figure 2.5.2 Measurement flow BMP180
2.6.1 Introduction
28
This DHT11 Temperature & Humidity Sensor features a temperature & humidity
sensor complex with a calibrated digital signal output. By using the exclusive digital-
signal-acquisition technique and temperature & humidity sensing technology, it
ensures high reliability and excellent long-term stability. This sensor includes a
resistive-type humidity measurement component and an NTC temperature
measurement component, and connects to a high performance 8-bit microcontroller,
offering excellent quality, fast response, anti-interference ability and cost-
effectiveness.
Each DHT11 element is strictly calibrated in the laboratory that is extremely accurate
on humidity calibration. The calibration coefficients are stored as programmes in the
OTP memory, which are used by the sensors internal signal detecting process. The
single-wire serial interface makes system integration quick and easy. Its small size,
low power consumption and up-to-20 meter signal transmission making it the best
choice for various applications, including those most demanding ones. The component
is 4-pin single row pin package. It is convenient to connect and special packages can
be provided according to users request.
2.6.2 Overview:
29
Table 2.6.1 Overview
2.6.3 Interfacing
30
Table 2.6.2 DHT Technical specifications
DHT11s power supply is 3-5.5V DC. When power is supplied to the sensor, do not
send any instruction to the sensor in within one second in order to pass the unstable
status. One capacitor valued 100nF can be added between VDD and GND for power
filtering.
31
2.6.6 Communication Process: Serial Interface (Single-Wire Two-Way)
Data consists of decimal and integral parts. A complete data transmission is 40bit,
and the sensor sends higher data bit first.
Data format: 8bit integral RH data + 8bit decimal RH data + 8bit integral T data +
8bit decimal T data + 8bit check sum. If the data transmission is right, the check-sum
should be the last 8bit of "8bit integral RH data + 8bit decimal RH data + 8bit integral
T data + 8bit decimal T data".
When MCU sends a start signal, DHT11 changes from the low-power-consumption
mode to the running-mode, waiting for MCU completing the start signal. Once it is
completed, DHT11 sends a response signal of 40-bit data that include the relative
humidity and temperature information to MCU. Users can choose to collect (read)
some data. Without the start signal from MCU, DHT11 will not give the response
signal to MCU. Once data is collected, DHT11 will change to the lowpower-
consumption mode until it receives a start signal from MCU again.
Data Single-bus free status is at high voltage level. When the communication
between MCU and DHT11 begins, the programme of MCU will set Data Single-bus
voltage level from high to low and this process must take at least 18ms to ensure
DHTs detection of MCU's signal, then MCU will pull up voltage and wait 20-40us
for DHTs response.
32
2.6.9 DHT Responses to MCU
Once DHT detects the start signal, it will send out a low-voltage-level response
signal, which lasts 80us. Then the programme of DHT sets Data Single-bus voltage
level from low to high and keeps it for 80us for DHTs preparation for sending data.
When DATA Single-Bus is at the low voltage level, this means that DHT is sending
the response signal. Once DHT sent out the response signal, it pulls up voltage and
keeps it for 80us and prepares for data transmission.
When DHT is sending data to MCU, every bit of data begins with the 50us low-
voltage-level and the length of the following high-voltage-level signal determines
whether data bit is "0" or "1"
Operating conditions
33
Applying the DHT11 sensor beyond its working range stated in this datasheet can
result in 3%RH signal shift/discrepancy. The DHT11 sensor can recover to the
calibrated status gradually when it gets back to the normal operating condition and
works within its range. Please refer to (3) of this section to accelerate its recovery.
Please be aware that operating the DHT11 sensor in the non-normal working
conditions will accelerate sensors aging process.
Attention to chemical materials
Vapour from chemical materials may interfere with DHTs sensitive-elements and
debase its sensitivity. A high degree of chemical contamination can permanently
damage the sensor.
Temperature Affect
Relative humidity largely depends on temperature. Although temperature
compensation technology is used to ensure accurate measurement of RH, it is still
strongly advised to keep the humidity and temperature sensors working under the
same temperature. DHT11 should be mounted at the place as far as possible from parts
that may generate heat. Long time exposure to strong sunlight and ultraviolet may
debase DHTs performance.
2.8.1 Description
The term ultrasonic applied to sound refers to anything above the frequencies of
audible sound, and nominally includes anything over 20,000 Hz.
2.8.2Working:
Ultrasonic sensors are based on the measurement of the properties of acoustic waves
with frequencies above the human audible range, often at roughly 40 kHz 1). They
typically operate by generating a high-frequency pulse of sound, and then receiving
and evaluating the properties of the echo pulse.
Three different properties of the received echo pulse may be evaluated, for different
sensing purposes. They are:
35
2.8.2 Modes of Operation:
r = c * t2)
Very often, separate transmitting and receiving transducers are placed immediately
next to each other, housed as a single unit. (The PING))) Range Finder, Omega
flowmeter and Migatron high-accuracy sensor below are all designed this way.) In
these cases,the distance calculated will be twice the distance from the sensor to the
target.
Using proper coordination, a single transducer can be used for both emitting the pulse
and receiving the echo. Note that it takes time for the transducer to change modes,
presenting a challenge to short-distance measurement.
In this mode of operation the transmitter and receiver are two separate units that move
relative to each other. For example, the receiver can be fixed to a target that moves
relative to a stationary transmitter, or vice-versa. Multiple transmitters can be used to
increase the directionality of the transmitted pulse.placed multiple ultrasonic
transmitters on a performer, whose signals were received by multiple receivers in the
performance space, enabling a computer program to triangulate the performer
position.
When a wave reflects off of a moving object, its frequency is shifted by an amount
proportional to the velocity of the object. This fact can be exploited in ultrasonic
sensing by having the receiver measure not the time of flight but the frequency of the
36
returning echo pulse. Knowing fe and fr, the frequency of the emitted and received
pulse, respectively, the velocity v of the target may be calculated:
fe - fr = 2 fe (v / c) cos(A)
where A is the angle between the target's and the pulse's lines of motion.
Ultrasonic sound attenuates much faster than audible sound when propagating through
air. By measuring the intensity of the returning pulse, an estimate of the distance
travelled can be made using the following equation:
I = I0e-ax
where I and I0 are the received and the original intensities, respectively, and where
a is the attenuation coefficient (a property of the medium) and x is the distance
travelled by the wave. Attenuation may also be caused by an increased angle between
the target and receiver, which may even deflect the echo somewhere else and not be
heard at all.
In our project we used time of flight reflection type of ultrasonic sensors. When the
triggered signal is given to the ultrasonic transmitter, it transmits a burst of sound
waves of 40KHz frequency and waits for the signal to come back after hitting an
37
obstacle. It estimates the time taken for the signal to come back and from that the
distance of the obstacle from the sensor can be estimated.
2.8.3 Specifications
Working Voltage DC 5 V
Max Range 4m
MeasuringAngle 15 degree
Connect the trigger and the echo pins to any two digital pins of the arduino uno board.
38
Figure 2.8.3 Ultrasonic interfacing
2.9.1 Description
A servo motor is an electrical device which can push or rotate an object with great
precision. If you want to rotate and object at some specific angles or distance, then you use
servo motor. It is just made up of simple motor which run through servo mechanism. If
motor is used is DC powered then it is called DC servo motor, and if it is AC powered motor
then it is called AC servo motor. We can get a very high torque servo motor in a small and
light weight packages. Doe to these features they are being used in many applications like
toy car, RC helicopters and planes, Robotics, Machine etc
2.9.2 Features
39
Holds any position between 0 and 180 degrees
PWM-capable device
makes for smooth operation with no backlash Weighs only 1.55 oz (44g)
Maximum current draw is 140 +/- 50 mA at 6 VDC when operating in no load conditions,
15 mA when in static state Communication:
Dimensions approx 2.2 x 0.8 x 1.6 in (5.58 x 1.9 x 40.6 cm) excluding servo horn
40
2.9.5 Operating temperature range: 14 to 122 F (-10 to +50 C)
*Power Requirement Notes The manufacturer specifies 4-6 VDC for this servo.
However, we find that this servo is tolerant of a 9 V battery for very brief periods of time
when there is no load, as used in some activities in the Stamps in Class series of tutorials.
(Slight jittering may be observed when batteries are fresh; this does not cause damage). Do
not use this servo with an unregulated wall-mount supply, or a regulated wall mount supply
exceeding 6 VDC. Servo current draw can spike while under load. Be sure that your
application's power supply and voltage regulator is prepared to supply adequate current for
all servos used. Do not try to power this servo directly from a BASIC Stamp module's or
any microcontrollers Vdd or Vin pins; do not connect the servo's Vss line directly to the
BASIC Stamp module's or any microcontrollers Vss pin.
2.9.6 Specifications
3 Vss Ground 0 V
Power Precautions
41
Do not use this servo with an unregulated wall-mount supply. Such power supplies may
deliver variable voltage far above the stated voltage. Do not power this servo through the
BASIC Stamp Module's Vdd pin. Servo current draw can spike while under peak load; be
sure your application's regulator is prepared to supply adequate current for all servos used
in combination. Some Stamps in Class tutorials, such as What's a Microcontroller? instruct
the user to briefly power these servos with a 9 V battery when using a HomeWork Board
and no load; this does not cause damage.
Communication Protocol The Parallax Standard Servo is controlled through pulse width
modulation, where the position of the servo shaft is dependent on the duration of the pulse.
In order to hold its position, the servo needs to receive a pulse every 20 ms. Below is a
sample timing diagram for the center position of the Parallax Standard Servo.
2.10 DC Motor:
A DC motor is any of a class of electrical machines that converts direct current electrical
power into mechanical power. The most common types rely on the forces produced by
magnetic fields. Nearly all types of DC motors have some internal mechanism, either
electromechanical or electronic, to periodically change the direction of current flow in part
of the motor. Most types produce rotary motion; a linear motor directly produces force and
motion in a straight line.
DC motors were the first type widely used, since they could be powered from existing
direct-current lighting power distribution systems. A DC motor's speed can be controlled
over a wide range, using either a variable supply voltage or by changing the strength of
current in its field windings. Small DC motors are used in tools, toys, and appliances.
The universal motor can operate on direct current but is a lightweight motor used for
portable power tools and appliances. Larger DC motors are used in propulsion of electric
vehicles, elevator and hoists, or in drives for steel rolling mills. The advent of power
electronics has made replacement of DC motors with AC motors possible in many
applications.
42
Figure 2.10.1 DC motor
2.11.1 Description
43
Figure 2.11.1 Relay
When an electric current is passed through the coil it generates a magnetic field that
activates the armature and the consequent movement of the movable contact either
makes or breaks (depending upon construction) a connection with a fixed contact. If
the set of contacts was closed when the relay was de-energized, then the movement
opens the contacts and breaks the connection, and vice versa if the contacts were open.
When the current to the coil is switched off, the armature is returned by a force,
approximately half as strong as the magnetic force, to its relaxed position. Usually this
force is provided by a spring.
44
2.12 ULN2003:
2.12.1 Description:
ULN2003 is a high voltage and high current Darlington array IC. It contains seven
open collector darlington pairs with common emitters. A darlington pair is an
arrangement of two bipolar transistors.
Each channel or darling ton pair in ULN2003 is rated at 500mA and can
withstand peak current of 600mA. The inputs and outputs are provided opposite to
each other in the pin layout. Each driver also contains a suppression diode to dissipate
voltage spikes while driving inductive loads.
2.12.3 Advantages:
2.13 IC 7805
2.13.1 Description
2.14.1 Description
As dual regulated power supply is not portable, we generally use D.C. batteries. In
our project we used twelve volts battery. The most common form of twelve-volt
battery is commonly called the transistor battery which was introduced for the early
transistor radios. Lead Acid batteries have changed little since the 1880's although
improvements in materials and manufacturing methods continue to bring
improvements in energy density, life and reliability. All lead acid batteries consist of
flat lead plates immersed in a pool of electrolyte. Regular water addition is required
for most types of lead acid batteries although low-maintenance types come with
excess electrolyte calculated to compensate for water loss during a normal lifetime.
Eventually processes were developed that would plate copper onto the walls of the drilled
holes. That allowed circuits on both sides of the board to be connected electrically. Copper
had replaced brass as the metal of choice because of its ability to carry electrical current,
relatively low cost and ease of manufacturing. In 1956 the US Patent Office issued a patent
for the "Process of Assembling Electrical Circuits" that was sought by a small group of
47
scientists represented by the US Army. The patented process involved using a base material
like melamine to which a layer of copper foil had been securely laminated. A drawing was
made of the wiring pattern and then photographed onto a zinc plate. The plate was used to
create a printing plate for an offset printing press. An acid resistant ink was printed onto the
copper foil side of the board that was etched to remove the exposed copper leaving the
"printed wire" behind. Other methods like using stencils, screening, hand printing and rubber
stamping were also proposed to deposit the ink pattern. Holes were then punched in patterns
using dies to match the position of the component wire leads or terminals. The leads were
inserted through the non-plated holes in the laminate material and then the card was dipped
or floated on a bath of molten solder. The solder would coat the traces as well as connecting
the leads of the components to the traces.
They also used tinned eyelets, rivets and washers to attach various types of components to
the board. Their patent even has a drawing showing two single sided boards stacked on top
of each other with a standoff holding them apart. There are components on the top side of
each board and one component shown with its leads extending through the top board into
holes on the bottom board, connecting them together, a rough attempt at making the first
multi-layer.
Much has changed since then. With the advent of plating processes that allowed hole
walls to be plated came the first double sided boards. Surface mount pad technology,
something we associate with the 1980's was actually being explored twenty years earlier in
the 60's. Solder masks were being applied as early as 1950 to help reduce the corrosion that
was occurring to traces and components. Epoxy compounds were spread over the surface of
the assembled boards similar to what we know now as conformal coating. Eventually the
inks were being screen printed onto the panels before assembling the boards. Areas that were
meant to be soldered were blocked out on the screens. It helped keep the boards clean,
reduce corrosion and oxidation but the tin/lead coating used to coat the traces would melt
during the soldering process causing the mask to flake off. Because of the wide spacing of
the traces it was seen more as a cosmetic problem than a functional issue. By the 1970's
circuitry and spacing was becoming smaller and smaller and the tin/lead coating that was
still being used to coat the traces on the boards began fusing traces together during the
soldering process.
48
Hot air soldering methods began in the late 70's allowing the tin/lead to be stripped after
etching eliminating the problem. Solder mask could then be applied over the bare copper
circuits and leave only the plated holes and pads free to be coated with solder. As holes
continued to get smaller and trace work became more densely packed solder mask bleed and
registration issues brought on dry film masks. They were primarily used in the US while the
first photo-imageable masks were being developed in Europe and Japan. In Europe the
solvent based "Probimer" ink was applied by curtain coating the entire panel. The Japanese
centered on screen processes using various aqueous developed LPIs. All of three of these
mask types used standard UV exposure units and photo tools to define the pattern on the
panel. By the mid 1990's the aqueous developed liquid photo-imageable masks were
dominating the industry with specialized equipment designed specifically for their
application.
The increased complexities and densities that were driving the evolution of solder mask
were also forcing the development of layers of copper traces laminated between layers of
dielectric materials. products. Aerospace equipment, flight instrumentation, computers and
telecommunication products as well as defense systems and weapons all began to take
advantage of the space saving that a multi-layer circuit board provided. Surface mount
devices were being designed that wers wilenth the size and weight of the comparable
through hole components. Followed by the invention of integrated circuits the circuit board
has continued to shrink in almost every way. Rigid boards and cable applications have given
way to flexible circuit boards or combinations of rigid and flexible PCBs. These and other
advancements will keep the manufacture of printed circuit boards a dynamic field for many
years.
Step 1: Prepare a layout of the circuit on any commonly used PCB designing software. A
layout is a design which interconnects the components according to the schematic diagram
(circuit diagram). Take a mirror image print of the layout on the OHP sheet using a laser
printer. Make sure that the design is correct with proper placement of the components.
49
Step 2: Cut the copper board according to the size of layout. A copper board is the base of a
PCB, it can be single layer, double layer or multi layer board.
Single layer copper board has copper on one side of the PCB, they are used to make single
layer PCBs, it is widely used by hobbyist or in the small circuits. A double layer copper
board consists of copper on both the sides of the PCB. These boards are generally used by
the industries. A multilayer board has multiple layers of copper; they are quite costly and
mainly used for complex circuitries like mother board of PC.
50
Step 3: Rub the copper side of PCB using steel wool. This removes the top oxide layer of
copper as well as the photo resists layer if any.
Step 4: Place the OHP sheet (wax paper) which has the printed layout on the PCB sheet.
Make sure that the printed/mirror side should be placed on the copper side of PCB.
51
Step 5: Put a white paper on the OHP sheet and start ironing. The heat applied by the electric
iron causes the ink of the traces on the OHP sheet to stick on the copper plate exactly in the
same way it is printed on the OHP sheet. This means that the copper sheet will now have the
layout of the PCB printed on it. Allow the PCB plate to cool down and slowly remove the
OHP sheet. Since it is manual process it may happen that the layout doesnt comes properly
on PCB or some of the tracks are broken in between. Use the permanent marker and
complete the tracks properly.
Step 6: Now the layout is printed on PCB. The area covered by ink is known as the masked
area and the unwanted copper, not covered by the ink is known as unmasked area. Now
make a solution of ferric chloride. Take a plastic box and fill it up with some water. Dissolve
2-3 tea spoon of ferric chloride power in the water. Dip the PCB into the Etching solution
(Ferric chloride solution, Fecl3) for approximately 30 mins. The Fecl 3 reacts with the
unmasked copper and removes the unwanted copper from the PCB. This process is called as
Etching. Use pliers to take out the PCB and check if the entire unmasked area has been
etched or not. In case it is not etched leave it for some more time in the solution.
52
Step 7: Take out the PCB wash it in cold water and remove the ink by rubbing it with steel
wool. The remaining area which has not been etched is the conductive copper tracks which
connect the components as per the circuit diagram.
53
Step 8: Now carefully drill the PCB using a drilling machine on the pads.
Step 9: Put the components in the correct holes and solder them.
This completes your PCB fabrication now put the components on mounting side and solder
them. Make sure that you properly dispose of the FeCl3 solution, clean your tools and wash
your hands after this exercise. You can also store the solution in a plastic box for future use
but not for too long.
54
SOFTWARE
2.16.1 Description
Arduino IDE is a software company, project, and user community that designs and
manufactures computer open-source hardware, open-source software,
and microcontroller-based kits for building digital devices and interactive objects that
can sense and control physical devices.
The first Arduino was introduced in 2005, aiming to provide a low cost, easy way
for novices and professionals to create devices that interact with their environment
using sensors and actuators. Common examples of such devices intended for beginner
hobbyists include simple robots, thermostats, and motion detectors.
Rather than requiring a physical press of the reset button before an upload, the Uno
board is designed in a way that allows it to be reset by software running on a
connected computer. One of the hardware flow control lines (DTR) of the
ATmega8U2/16U2 is connected to the reset line of the ATmega328 via a 100
55
nanofarad capacitor. When this line is asserted (taken low), the reset line drops long
enough to reset the chip. The Arduino Software (IDE) uses this capability to allow you
to upload code by simply pressing the upload button in the interface toolbar. This
means that the bootloader can have a shorter timeout, as the lowering of DTR can be
well-coordinated with the start of the upload.
This setup has other implications. When the Uno is connected to either a computer
running Mac OS X or Linux, it resets each time a connection is made to it from
software (via USB). For the following half-second or so, the bootloader is running on
the Uno. While it is programmed to ignore malformed data (i.e. anything besides an
upload of new code), it will intercept the first few bytes of data sent to the board after
a connection is opened. If a sketch running on the board receives one-time
configuration or other data when it first starts, make sure that the software with which
it communicates waits a second after opening the connection and before sending this
data.
The Uno board contains a trace that can be cut to disable the auto-reset. The pads
on either side of the trace can be soldered together to re-enable it. It's labeled "RESET-
EN". You may also be able to disable the auto-reset by connecting a 110 ohm resistor
from 5V to the reset line.
The ATmega328 on the Uno comes preprogrammed with a boot loader that allows
you to upload new code to it without the use of an external hardware programmer. It
communicates using the original STK500 protocol. We can also bypass the boot loader
and program the microcontroller through the ICSP (In-Circuit Serial Programming)
header using Arduino ISP or similar.
56
2.17 Eagle CADSOFT
2.17.1 Description
EAGLE stands for, Easily Applicable Graphical Layout Editorin English and
Einfach anzuwendender grafischer Layout-Editor in German. It is designed and
developed by CadSoft Computer GmbH and is a flexible, expandable and
scriptable, electronic design automation (EDA) application with schematic capture
editor, printed circuit board (PCB) layout editor, auto-router and computer-aided
manufacturing (CAM) and bill of materials (BOM) tools. Premier Farnell bought
EAGLE in 2008
EAGLE was developed in 1988 as a 16-bit application for Microsoft DOS, with support
for OS/2 and Windows added later on. Starting with version 4.0, EAGLE was converted
to 32-bit. EAGLE version 4.0 also dropped support for DOS and OS/2, but was among
the first professional electronic CAD tools available for Linux. A 32-bit DPM version of
EAGLE 4.0 running under DOS was available on special request in order to help
support existing customers, but was not released commercially.
Starting with version 4.13, EAGLE became available for Mac OS X, with versions
before 5.0.0 still requiring X11. Version 5.0.0 officially dropped support for Windows
9x and Windows NT 3.x/4.x. EAGLE 6.0.0 no longer supports Mac OS X
Chapter 3
57
THEORITICAL ANALYSIS
3.1 ALGORITHM
Start
Step4: If there is any obstacle then avoid it and enter the predefined path
Step6: Send the calibrated data in the form of text message to the registered number.
Step7: Meanwhile if there is message from the registered number then calibrate the
parameters send data in the form of text message.
Step8: Also send a message to the registered number if in case any parameter exceeds the
threshold level
End
58
Initialize all serial
ports
If any
NO YES
obstacle
is
detected
Reach halt point
calibrate the weather
parameters Avoid and re-enter
Pre-defined path
Send the calibrated data
as text message to the
registered number
NO If Yes
predefined
path is
completed
STOP
GSM
HUMIDITY MODEM
ARDUINO
MOISTURE
LIGHT
PRESSURE RADAR
INTENSITY
60
Figure 3.4.1 Schematic diagram
61
Figure 3.4.3 Layout of Motor Driver
Chapter 4
62
RESULTS
63
4.2 Rover
64
Chapter 5
5.1 CONCLUSION
The project deals with designing a simple and low cost weather monitoring system using
BH1750, BMP180, DHT11, MOISTURE SENSOR, GPS, SIM900, ULTRASONIC
SENSOR, SERVO and ATMEGA328 MICROCONTROLLER in ARDUINO IDE.
To monitor weather conditions of the desired location and transmit it to a mobile phone at
distant location through SMS.
The entire field will be traversed and the parameters at regular intervals will be sent to the
user either on request from the user or in case of any breach of the pre-defined threshold
levels.
The designed product module is at prelim stage and designed only for temperature, light
intensity, pressure, humidity, moisture and altitude.
Different other sensors as wind sensor, rain sensor and gas sensor can also be included in
the weather board.
The rover can be made self balancing using accelerometers and gyroscopes.
For more accurate and stable readings of the parameters, we can use more no. of sensors and
take the average of them as the final reading.
Robust outer covering can be used to use the module in tough climatic conditions
Offline maps can be created for our field of inspection and can be interfaced to a mobile
application in order to make this more interactive with the users.
CHAPTER 6
REFERENCES
65
https://www.arduino.cc/
http://www.cadsoftusa.com/
http://www.propox.com/download/docs/SIM900.pdf
http://www.arcelect.com/GSM%20Developer%20Guide%20
%20GSM%20AT%20Commands%20-%20Rev%20%20A.pdf
http://rohmfs.rohm.com/en/products/databook/datasheet/ic/sensor/light/bh1750fv
i-e.pdf
http://skylab.com.cn/uploadfile/Download/201507071152007386.pdf
https://cdn-shop.adafruit.com/datasheets/BST-BMP180-DS000-09.pdf
https://processing.org/
http://www.micro4you.com/files/sensor/DHT11.pdf
http://www.jameco.com/Jameco/workshop/howitworks/how-servo-motors-
work.html
http://www.futurlec.com/TR40-16OA00.shtml
APPENDICES
Appendix A:
66
Arduino Code: unsigned int
sensorValue,percentValue;
#include<SoftwareSerial.h> float h;
#include<Wire.h> int hum,h_threshold=30;
#include <math.h> int mois,m_threshold=50;
#include <DHT.h> int temp,t_threshold=50;
#include <Servo.h> int distance,dist[100];
#include <TimerOne.h> long duration;
#define DHTPIN 2 int Icnt,icnt;
#define BMP180_ADDRESS 0x77
#define BH1750_ADDRESS 0x23 void dht11(int a)
#define DHTTYPE DHT11 {
Servo myServo; dht.begin();
h = dht.readHumidity();
DHT dht(DHTPIN, DHTTYPE); float t = dht.readTemperature();
float f = dht.readTemperature(true);
SoftwareSerial mygsm(9,10); if (isnan(h) || isnan(t) || isnan(f))
SoftwareSerial mygps(5,6); {
Serial.println("Failed to read
char c,data[150]; from DHT sensor!");
int return;
i,j,k,l,m,n,o,ac1,ac2,ac3,b1,b2,mb,m }
c,md; float hif = dht.computeHeatIndex(f,
String gps_data; h);
float s1,s2; float hic = dht.computeHeatIndex(t,
int d1,m1,d2,m2,cnt; h, false);
unsigned int ac4; if(a==1)
unsigned int ac5; {
unsigned int ac6; if(h>h_threshold&&hum==1)
long b5; {
//define variables for pressure and hum=0;
temperature calculation mygsm.println("AT+CMGF=1");
long x1,x2; delay(1000);
//define variables for pressure // Delay of 1000 milli seconds or 1
calculation second
long x3,b3,b6,p; mygsm.println("AT+CMGS=\"+919
unsigned long b4,b7; 966961383\"\r");; // Replace x with
//define variables for temperature mobile number
and pressure reading delay(1000);
mygsm.print("ALERT:HUMIDITY
short temperature; OVER THRESHOLD");
long pressure; mygsm.println((char)26);
// instr count }
const unsigned char OSS = 0; // }
Oversampling Setting else if(h<h_threshold)
byte buff[2]; hum=1;
uint16_t val; Serial.print("Humidity: ");
Serial.println(h);
67
} }
for(int i=0;i<=50;i++) }
{
myServo.write(i); void left()
delay(10); {
digitalWrite(7,HIGH);
Serial.println("."); digitalWrite(4,LOW);
digitalWrite(8,HIGH);//left
} digitalWrite(13,LOW);
}
for(int i=50;i>=0;i--) void right()
{ {
myServo.write(i); digitalWrite(4,HIGH);
delay(10); digitalWrite(7,LOW);//right
} digitalWrite(13,HIGH);
digitalWrite(8,LOW);
for(int i=0;i<51;i++) }
{
if(dist[i]>=50) void halt()
cnt++; {
} digitalWrite(4,LOW);
} digitalWrite(7,LOW);//right
digitalWrite(13,LOW);
int calculateDistance(){ digitalWrite(8,LOW);
digitalWrite(12, LOW); }
delayMicroseconds(2);
// Sets the trigPin on HIGH state void cleardata()
for 10 micro seconds {
digitalWrite(12, HIGH); for(i=0;i<100;i++)
delayMicroseconds(10); data[i]='\0';
digitalWrite(12, LOW); i=0;
}
72
void callback() }
{ if(mygsm.available()>0)
icnt=1; {
Timer1.detachInterrupt(); Serial.println("b");
halt(); while(mygsm.available()>0)
} {
data[i]=char(mygsm.read());
void setup() Serial.print(data[i]);
{ i++;
Wire.begin(); }
mygsm.begin(9600); if(strstr(data,"9966961383"))
Serial.begin(9600); {
delay(100); if(strstr(data,"How is it out there?"))
Serial.println("started"); {
k=0; //gps();
Icnt=0; Serial.println("hello");
icnt=0;
rover(); bh1750();
}
bmp180(0);
void loop() moisture(0);
{
cleardata(); dht11(0);
while(mygsm.available()<0 &&
icnt!=1) SendMessage();
{ }
Serial.println("a");
if(cnt==50) }
forward();
else }
{
if(icnt==1)
left();
delay(100); {
do
{ Serial.println("c");
forward();
rover(); //gps();
Icnt++; bh1750();
}while(cnt==50 && Icnt<2);
right(); bmp180(1);
delay(100);
Icnt=0; moisture(1);
}
rover(); dht11(1);
APPENDIX B
73
Processing code:
74
noFill(); width*0.505)*sin(radians(iAngle)));
strokeWeight(2); }
stroke(98,245,31); popMatrix();}
// draws the arc lines void drawLine() {
arc(0,0,(width-width*0.0625), pushMatrix();
(width-width*0.0625),PI,TWO_PI); strokeWeight(9);
arc(0,0,(width-width*0.27),(width- stroke(30,250,60);
width*0.27),PI,TWO_PI); translate(width/2,height-
arc(0,0,(width-width*0.479), height*0.074); // moves the starting
(width-width*0.479),PI,TWO_PI); coordinats to new location
arc(0,0,(width-width*0.687), line(0,0,(height-
(width-width*0.687),PI,TWO_PI); height*0.12)*cos(radians(iAngle)),-
// draws the angle lines (height-
line(-width/2,0,width/2,0); height*0.12)*sin(radians(iAngle)));
line(0,0,(- // draws the line according to the
width/2)*cos(radians(30)),(- angle
width/2)*sin(radians(30))); popMatrix();
line(0,0,(- }
width/2)*cos(radians(60)),(- void drawText() { // draws the texts
line(0,0,(- on the screen
width/2)*cos(radians(150)),(- pushMatrix();
width/2)*sin(radians(150))); if(iDistance>40) {
line((- noObject = "Out of Range";}
width/2)*cos(radians(30)),0,width/2 else {
,0); noObject = "In Range"}
popMatrix(); fill(0,0,0);
} noStroke();
void drawObject() { rect(0, height-height*0.0648,
pushMatrix(); width, height);
translate(width/2,height- fill(98,245,31);
height*0.074); // moves the starting textSize(25);
coordinats to new location
strokeWeight(9); text("10cm",width-
stroke(255,10,10); // red color width*0.3854,height-
pixsDistance = iDistance*((height- height*0.0833);
height*0.1666)*0.025); // covers the text("20cm",width-
distance from the sensor from cm to width*0.281,height-height*0.0833);
pixels text("30cm",width-
// limiting the range to 40 cms width*0.177,height-height*0.0833);
if(iDistance<40){ text("40cm",width-
// draws the object according to width*0.0729,height-
the angle and the distance height*0.0833);
line(pixsDistance*cos(radians(iAng textSize(40);
le)),- text("Object: " + noObject, width-
pixsDistance*sin(radians(iAngle)), width*0.875, height-
(width- height*0.0277);
width*0.505)*cos(radians(iAngle)),
-(width-
75
text("Angle: " + iAngle +" ",
width-width*0.48, height-
height*0.0277);
text("Distance: ", width-
width*0.26, height-height*0.0277);
if(iDistance<40) {
text(" " + iDistance +" cm",
width-width*0.225, height-
height*0.0277);
}
textSize(25);
fill(98,245,60);
translate((width-
width*0.4994)+width/2*cos(radians
(30)),(height-height*0.0907)-
width/2*sin(radians(30)));
rotate(-radians(-60));
text("30",0,0);
resetMatrix();
translate((width-
width*0.503)+width/2*cos(radians(
60)),(height-height*0.0888)-
width/2*sin(radians(60)));
rotate(-radians(-30));
text("60",0,0);
resetMatrix();
translate((width-
width*0.507)+width/2*cos(radians(
90)),(height-height*0.0833)-
width/2*sin(radians(90)));
rotate(radians(0));
text("90",0,0);
resetMatrix();
translate(width-
width*0.513+width/2*cos(radians(1
20)),(height-height*0.07129)-
width/2*sin(radians(120)));
rotate(radians(-30));
text("120",0,0);
resetMatrix();
translate((width-
width*0.5104)+width/2*cos(radians
(150)),(height-height*0.0574)-
width/2*sin(radians(150)));
rotate(radians(-60));
text("150",0,0);
popMatrix();
}
76