Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 12

GSM-SMS based Water Level Controller

Unexpected shortage of water supply is common phenomena especially in dense population such as
in hostels. Water supply at the students’ hostels is usually drawn from tank at the roof top of the
building. Apparently there is no early warning system to monitor the tank water level when it has
reached the critical level. The situation worsened when there is no personnel or technician in-charge
to do the maintenance at the time it is needed. It becomes worst especially at the weekends and
public holidays. Students have to wait for couples of days for the water supply to resume. This projects
presents the development of water level monitoring and controlling system with an integration of GSM
module to alert the person-in-charge through Short Message Service (SMS). The water level is
monitored and its data sent through SMS to the intended technician mobile’s phone upon reaching the
critical level. The prototype was tested and functioned properly as a mean to reduce the risk of
unexpected shortage of water supply.

These GSM Water Level cum Controller is GSM based Water and Liquid Level Controller design to
operate pumps and know Level Status on mobile phone. GSM Water Level cum Pump Controller is
very useful device to know level status and On/Off pump via Mobile Phone from anywhere. This
device is also very useful for Apartments and Flats where On/Off pump is very tedious task.

Specifications, Features, & Advantages:

 Four Level Sensor for Upper tank and Lower tank


 Status of each sensor with LED Indication
 Tri-band GSM Interfacing to send and received SMS
 Can be operated from anywhere, no distance limit;
 Based on GSM Network, applied to many applications.
 Internal Buzzer for alarm
 Relay based switching output for external Pump Light ETC
 Relay Controlled (on / off) by SMS
 Send SMS to mobile phones automatically while Overflow or empty tank.
 Get inquiry status of tank, and relay output by SMS
 Operating voltage – 12 to 15V DC
 Operating current – 500ma (Aprox)
 Power on LED Indication
 Relay on / off LED Indication
 New SMS Receiving LED Indication
 Easy Messages to control and monitoring.
 Communicate from any other mobile phone (GSM or CDMA)
 Relay output - 5A rated changeover contacts
 Diode protection for reverse polarity connection of DC supply to the PCB
 Onboard regulator for regulated supply to the kit
 Extremely easy to install
 Microcontroller based design for greater flexibility

The GSM - SMS Based Water Level Controller for below applications:
Automatic monitoring system;
Pumping Stations, Tanks, Oil or Water levels;
Buildings and Real Estate;
Weather Stations;
River Monitoring and Flood Control;
Oil and gas pipelines;
Valve controls

[1]
GSM Technology
GSM (Global System for Mobile Communications, originally Group Special Mobile), is a standard set
developed by the European Telecommunications Standards Institute (ETSI) to describe technologies
for second generation (2G) digital cellular networks. Developed as a replacement for first generation
(1G) analog cellular networks, the GSM standard originally described a digital, circuit switched network
optimized for full duplex voice telephony. The standard was expanded over time to include first circuit
switched data transport, then packet data transport via GPRS (General Packet Radio services).
Packet data transmission speeds were later increased via EDGE (Enhanced Data rates for GSM
Evolution). The GSM standard is more improved after the development of third generation (3G) UMTS
standard developed by the 3GPP. GSM networks will evolve further as they begin to incorporate fourth
generation (4G) LTE Advanced standards. "GSM" is a trademark owned by the GSM Association.

The GSM Association estimates that technologies defined in the GSM standard serve 80% of the
world's population, encompassing more than 6 billion people across more than 212 countries and
territories, making GSM the most ubiquitous of the many standards for cellular networks.

About SMS (Short Message Service)


Short Message Service (SMS) is a text messaging service component of phone, web, or mobile
communication systems, using standardized communications protocols that allow the exchange of
short text messages between fixed line or mobile phone devices. SMS text messaging is the most
widely used data application

SMS as used on modern handsets was originated from radio telegraphy in radio memo pagers using
standardized phone protocols and later defined as part of the Global System for Mobile
Communications (GSM) as a means of sending messages of up to 160 characters, to and from GSM
mobile handsets. Since then, support for the service has expanded to include other mobile
technologies such as ANSI CDMA networks and Digital AMPS, as well as satellite and landline
networks. Most SMS messages are mobile-to-mobile text messages though the standard supports.

Circuit explanation
See the block diagram of unite. Is based on AT89Sxx (40 Pin) Micro controller. The complete projects
divided in different interfacing Part

1. Main micro controller unite, use as CPU


2. digital Sensor inputs
3. RS232 GSM Interfacing
4. LED indicator
5. Buzzer and Relay Output Section
6. Regulated power supply

Microcontroller (AT89Sxx)
This is the CPU (central processing unit) of our project. We are going to use a microcontroller of 8051
family. The various functions of microcontroller are like I. Reading the digital input from sensors,
sending and receiving SMS via GSM modem, Controlled the relay and buzzer, store mobile number
from receiving SMS and display the all sensor status on LED indicators.

MCU Cock
Clock signal for the micro controller provided by crystal Y1 (11.0592 MHZ) and two 33PF (C2, C3)
capacitors hanging off it ensure correct loading for the crystal, so that it starts reliably. The frequency
of the oscillator is internally divided and to get the operating frequency. This high frequency clock
source is used to control the sequencing of CPU instruction.

[2]
MCU Reset
Power on reset is provided by R5 and C1. The 89xxx micro controller has an active high reset signal

Water level sensing


The actual circuit of the level sensor is extremely simple. The circuit around N1 forms an oscillator.
If the two sensors are immersed in a conductive solution. C4 will be charged up via the AC coupling
capacitors (C2 and C3) and the diodes. So that after a short time, the output of N2 is taken low and
the MCU port is pulled in. The MCU port can be used to display water level on LCD and control a
pump,

GSM Module INTERFACE (RS232)

The RS232, also more commonly known as the serial, specifications specifies that logic '1' is
represented by +12.5V and a logic '0' is represented by -12.5V. This obviously presents many
problems for micro controller that are running at +5V. That is where the level converter comes into
play; it converter -12.5V to 0V and +12.5V into 5V, standard TLL logic levels. This makes interfacing
with the micro controller extremely easy.
The schematic shows the simplicity of the design by using one of IC’s level converters. It includes a
Charge Pump, which generates +10V and -10V from a single 5v supply. This IC. Also includes two
receivers and two transmitters in the same package. This is handy in many cases when you only want
to use the Transmit and Receive data Lines. You don't need to use two chips, one for the receive line
and one for the,

Pin Signal Pin Signal


1 Data Carrier Detect 6 Data Set Ready
2 Received Data 7 Request To Send
3 Transmitted Data 8 Clear To Send
4 Data Terminal Reedy 9 Ring Indicator
5 Signal Ground

The communication between the micro controller and the GSM Module requires an RS-232 interface
which serves to convert the CMOS TTL output voltage of the micro controller (0-5 volt) into a voltage
of+/- 12 volt. The converter uses the MAX232 (U5) converter IC. The connection of MAX232 to the
GSM uses the RS232 data cable.

LED INTERFACE

[3]
Four LEDs (L1 to L8) indicate the status of the sensor input’s, SMS received, ETC. When the external
sensor has been detected / activated, the LED (L1 to L8) of the sensor that caused on for 5 to 10
seconds. LED L1 to L8 Connected to, MCU Port pin P1.0 to P1.7 via, 220E current limiting resistor.

BUZZER
A 12V buzzer is connected to port P1.5 (pin 6) of the micro controller through a driver transistor (Q2).
The buzzer requires 12 volts at a current of around 100 MA, which cannot provide by the micro
controller. So the driver transistor is added. The buzzer is used to addible alarm indication. Normally
the buzzer remains off. As soon as pin of the micro controller goes high, the buzzer operates.

RELAY INTERFACE
A single pole dabble throw (SPDT) relay is connected to port P1.4 (pin 5) of the micro controller
through a driver transistor (Q1). The relay requires 12 volts at a current of around 100 ma, which
cannot provided by the micro controller. So the driver transistor is added. The relay is used to operate
the external Water pump, solenoid valve or any other electrical device ETC. Normally the relay
remains off. As soon as pin of the micro controller goes high, the relay operates. Diode D1 is the
standard diode on a mechanical relay to prevent back EMF from damaging Q1 when the relay
releases. LED L1 indicates relay is operated. LED has a current limiting resistor in series. The LED /
resistor combination is simply in parallel with the relay

HOW to Connect Load with Relay?


The output of the projects is controlled by a relay, allowing any load until 230V AC / 3 Amp. as
maximum consumption. The relay has 3 output terminals the normally open at quiescent (NO), the
normally closed at quiescent (NC) and the common. The operating of this mechanism is the same as a
switch with two (2) terminals NO and common, if you wish that the output will be activated during the
timer, or between the NC and the common to obtain the reverse operating. In the drawing, you could
appreciate the typical connection for a devices operating at 12 VDC and to operate at 230 VAC.

When the project is working and according to its load, it could happen an incorrect operating of the
output. If it is the case, you have to install a circuit between 2 relay's contacts used for the connection.
See the drawing map.

[4]
Power supply
The power supply circuit. It’s based on 3 terminal voltage regulators, which provide the required
regulated +5V and unregulated +12V.
Power is deliver initially from standard 12V AC/DC adapter or 12V_500ma Transformer. This is fed to
bridge rectifier (D2, 3, 4, 5) the output of which is then filtered using 1000uf electrolytic capacitor and
fed to U4 (voltage regulator). U4 +5V output powers the micro controller and other logic circuitry. LED
L6 and its associate 1K current limiting resistors provide power indication. The unregulated voltage of
approximately 12V is required for GSM Modem and relay, buzzer driving circuit

PART EXPLANATION

Micro controller AT89S51 / 52


The AT89xxx is a low-power, high-performance CMOS 8-bit microcomputer with 4K / 8K bytes of
Flash programmable and erasable read only memory (PEROM). The device is manufactured using
Atmel’s high-density nonvolatile memory technology and is compatible with the industry-standard
MCS-51 instruction set and pin out. The on-chip Flash allows the program memory to be
reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a
versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89xxx is a powerful microcomputer
which provides a highly-flexible and cost-effective solution to many embedded control applications

Features
 Compatible with MCS-51™ Products
 4K / 8K Bytes of In-System Reprogram able Flash Memory
 Fully Static Operation: 0 Hz to 24 MHz
 Three-level Program Memory Lock
 128 x 8-bit Internal RAM
 32 Programmable I/O Lines
 Two 16-bit Timer/Counters
 Six Interrupt Sources
 Programmable Serial Channel
 Low-power Idle and Power-down Modes
 8-bit

[5]
Light emitting Diode (LED)
A light-emitting diode (LED), is an electronic light source. Luminescence from an electrically stimulated
crystal had been observed as early as 1907. The LED was introduced as a practical electronic
component in 1962. All early devices emitted low-intensity red light, but modern LEDs are available
across the visible, ultraviolet and infra red wavelengths, with very high brightness.
LEDs are based on the semiconductor diode. When the diode is forward biased (switched on),
electrons are able to recombine with holes and energy is released in the form of light. This effect is
called electroluminescence and the color of the light is determined by the energy gap of the
semiconductor. The LED is usually small in area (less than 1 mm2) with integrated optical components
to shape its radiation pattern and assist in reflection.

LEDs present many advantages over traditional light sources including lower energy consumption,
longer lifetime, improved robustness, smaller size and faster switching. However, they are relatively
expensive and require more precise current and heat management than traditional light sources.

Applications of LEDs are diverse. They are used as low-energy indicators but also for replacements
for traditional light sources in general lighting, automotive lighting and traffic signals. The compact size

[6]
of LEDs has allowed new text and video displays and sensors to be developed, while their high
switching rates are useful in communications technology.

Crystal oscillator
A crystal oscillator is an electronic circuit that uses the mechanical resonance of a vibrating crystal of
piezoelectric material to create an electrical signal with a very precise frequency. This frequency is
commonly used to keep track of time (as in quartz wristwatches), to provide a stable clock signal for
digital integrated circuits, and to stabilize frequencies for radio transmitters/receivers.

Piezo buzzer
Piezo buzzer is an electronic device commonly used to produce sound. Light weight, simple
construction and low price make it usable in various applications like car/truck reversing indicator,
computers, call bells etc. Piezo buzzer is based on the inverse principle of piezo electricity discovered
in 1880 by Jacques and Pierre Curie. It is the phenomena of generating electricity when mechanical
pressure is applied to certain materials and the vice versa is also true. Such materials are called piezo
electric materials. Piezo electric materials are either naturally available or manmade. Piezoceramic is
class of manmade material, which poses piezo electric effect and is widely used to make disc, the
heart of piezo buzzer. When subjected to an alternating electric field they stretch or compress, in
accordance with the frequency of the signal thereby producing sound.

GSM Modem

[7]
This GSM Modem can accept any GSM network operator SIM card and act just like a mobile phone
with its own unique phone number. Advantage of using this modem will be that you can use its RS232
port to communicate and develop embedded applications. Applications like SMS Control, data
transfer, remote control and logging can be developed easily.

The modem can either be connected to PC serial port directly or to any microcontroller. It can be used
to send and receive SMS or make/receive voice calls. It can also be used in GPRS mode to connect to
internet and do many applications for data logging and control. In GPRS mode you can also connect
to any remote FTP server and upload files for data logging. This GSM modem is a highly flexible plug
and play quad band GSM modem for direct and easy integration to RS232 applications. Supports
features like Voice, SMS, Data/Fax, GPRS and integrated TCP/IP stack.

LM7805 (3 TERMINAL VOLTAGE REGULATER)


This is used to make the stable voltage of +5V for circuits. The LM7805 is three terminal positive
regulators are available in the TO-220 - package and with several fixed output voltages, making them
useful in a wide range of applications. Each type employs internal current limiting, thermal shut down
and safe operating area protection, making it essentially indestructible. If adequate heat sinking is
provided, they can deliver over 1A output current. Although designed primarily as fixed voltage
regulators, More information please refer Data sheet 0f LM7805

MAX232
The MAX232 is an integrated circuit that converts signals from an RS-232 serial port to signals
suitable for use in TTL compatible digital logic circuits. The MAX232 is a dual driver/receiver and
typically converts the RX, TX, CTS and RTS signals. The drivers provide RS-232 voltage level outputs
(approx. ± 7.5 V) from a single + 5 V supply via on-chip charge pumps and external capacitors.

[8]
SPDT RELAY – 12V
It closes the voltage less point of contact while the remote control works to control the equipment
outside. The relay takes advantage of the fact that when electricity flows through a coil, it becomes an
electromagnet. The electromagnetic coil attracts a steel plate, which is attached to a switch. So the
switch's motion (ON and OFF) is controlled by the current flowing to the coil, or not, respectively. A
very useful feature of a relay is that it can be used to electrically isolate different parts of a circuit. It will
allow a low voltage circuit (e.g. 5VDC) to switch the power in a high voltage circuit (e.g. 230 VAC or
more). The relay operates mechanically, so it cannot operate at high speed.

Assembly
Use the component overlay on the PCB to place the components starting with the lowest height
components first. Make sure that the diode, LED and electrolytic capacitors are inserted the right way
around.

First check the components supplied in the Kit against the Component listing. Identify all the
components. It is generally best to solder the lowest height components first: the IC SOCKETS,

[9]
resistors, & diodes. The IC socket should be installed first. Begin solders the pin of the socket. The
entire resistor should be installed next. In order to find their values you have to check the color code.
All the diode should be installed next. Make sure to get the diodes the correct way around. Match up
the bar on the diodes with the bar on the overlay. Afterwards solder the capacitors, transistors, LED
display & other remaining components. Especially care should be taken in order to find the polarity of
the electrolytic capacitors.

Use the component overlay on the PCB to place the components in the following order

1] Resistors and diodes


2] IC sockets
3] Ceramic capacitors and Preset.
4] LM7805 regulators. Use needle nosed pliers to bend the leads of the regulator. It does not
require a heat sink. Screw down onto to PCB.
5] Crystal, LED’s, and transistors
6] Electrolytic capacitors. Make sure you insert them the correct way around. Mount C6
(1000uf) Capacitor Horizontal
7] Terminal blocks. Note the terminal blocks do NOT slide together. Also make sure the wire
entry side faces out from the PCB.
8] Relay and buzzer
9] Interface the GSM module using 3 pin Wire with RS232 connector (For wire connection
please check the Projects CD)

REFERENCES
www.atmel.com
For a datasheet on the AT89Sxx micro controller
www.national.com
For a datasheet on the LM7805
www.ti.com
For a datasheet on the MAX232

PART (COMPONENTS) LIST

C1, 8, 9, 10, 11 - 10UF / 25V Electrolytic (5 NOS) 10/-


C2, 3 - 33PF DISC (2 NOS) 5/-

C4 - 1000UF / 16V Electrolytic 15/-


C5 - 47UF / 16V Electrolytic 10/-
C6, 7 - 0.1UF DISC (104 / 100nf) (2 NOS) 5/-
X1 - 11.0592MHZ Crystal 20/-

D1 ~ 5 - 1N4007 DIODE (5 NOS) 5/-


L1 ~ 5 - 3mm OR 5mm Red LED (5 NOS) 3/-
L6 - 3mm OR 5mm Green LED 3/-
Q1, 2 - BC547 / BC548 NPN TRANSISTOR (2 NOS) 5/-

U1 - AT89S51 / S52 / AT89xxx Micro controller (Pre Programmed MCU) 65/-


U5 - MAX232 / ICL232 – RS232 Level Converter 45/-
U4 - LM7805 – +5V 3 Terminal Voltage Regulator 20/-
U5,6 - CD4093 15/-

[10]
RL1 - 12V SPDT RELAY (PCB MOUNT) 25/-
BZ1 - 12V DC BUZZER 30/-

1nos - 40 Pin IC Socket For U1 10/-


1nos - 16 Pin IC Socket for U5 10/-
1nos - 9 PIN “D” Connector for GSM interfacing 30/-
1nos - TRI-Band GSM Module 1250/-

[11]
[12]

You might also like