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

AGRICULTURE FIELD MOTOR CONTROL SYSTEM USING GSM

ABSTRACT
This project is aimed to design a system to control the agriculture field motor by using a
wireless technology called GSM technology. 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 micro controller. Villages are the backbone of our nation. The farmers strive
hard day and night to yield very good results in their farm. They know the entire process how to
produce a farm, when to provide water to the farms etc. When it is the time to water the farms,
they just stop their current works then and there and rush to the farms to start the pump sets to
water the farms. This project provides an excellent solution to this process. The farmer need not
go to the farm to water his field. He can sit at his present place and start the motor on to water his
field. No cabling or hardware connections are required to do this. Everything will be carried in a
wireless fashion and this system is entirely an automated product. This project is designed in
such a way that a GSM modem is interfaced to the controller through serial port along with a
motor. The GSM modem performs the task of receiving the message from the mobile and
sending the messages to the mobile from the controlling unit. If the farmer wishes to water his
field, he needs to switch on the motor. Thus, he has to send a predefined message to the modem
from his mobile. The GSM modem receives this message and intimates the same to the micro
controller. Now it is the job of the controller to switch ON/OFF the motor in accordance with the
received message. This project uses regulated 5V, 500mA power supply. 7805 three terminal
voltage regulator is used for voltage regulation. Bridge type full wave rectifier is used to rectify
the ac output of secondary of 230/12V step down transformer.
1. INTRODUCTION

India is basically an agricultural country, and all its resources depend on the agricultural
output. With the rapid development of agriculture in India, many automatic technologies have
been introduced into agricultural productions. The total rainfall in a particular area may be either
insufficient, or ill-timed. In order to get the maximum yield, it is essential to supply the optimum
quantity of water, and maintain correct timing of water. This is possible only through a
systematic irrigation system-by collecting water during the periods of excess rainfall and
releasing it to the crop as and when it is needed. Irrigation is the science of planning and
designing an efficient, low-cost, economic irrigation system tailored to fit natural conditions. By
the construction of proper distribution system, the yield of crop may be increased because of
controlled water supply. The different methods of supplying water to the fields are Surface
irrigation, Sub-surface irrigation and Sprinkler irrigation. The stored or diverted water is
conveyed to the agricultural fields through some suitable distribution system. Hence, there are
now pressing needs for intelligent irrigation system.

1.1 Introduction of Embedded System:

An Embedded System is a combination of computer hardware and software, and perhaps


additional mechanical or other parts, designed to perform a specific function. A good example is
the microwave oven. Almost every household has one, and tens of millions of them are used
every day, but very few people realize that a processor and software are involved in the
preparation of their lunch or dinner.

This is in direct contrast to the personal computer in the family room. It too is comprised
of computer hardware and software and mechanical components (disk drives, for example).
However, a personal computer is not designed to perform a specific function rather; it is able to
do many different things. Many people use the term general-purpose computer to make this
distinction clear. As shipped, a general-purpose computer is a blank slate; the manufacturer does
not know what the customer will do wish it. One customer may use it for a network file server
another may use it exclusively for playing games, and a third may use it to write the next great
American novel.

Frequently, an embedded system is a component within some larger system. For


example, modern cars and trucks contain many embedded systems. One embedded system
controls the anti-lock brakes, other monitors and controls the vehicle's emissions, and a third
displays information on the dashboard. In some cases, these embedded systems are connected by
some sort of a communication network, but that is certainly not a requirement.

At the possible risk of confusing you, it is important to point out that a general-purpose
computer is itself made up of numerous embedded systems. For example, my computer consists
of a keyboard, mouse, video card, modem, hard drive, floppy drive, and sound card-each of
Which is an embedded system? Each of these devices contains a processor and software and is
designed to perform a specific function. For example, the modem is designed to send and receive
digital data over analog telephone line. That's it and all of the other devices can be summarized
in a single sentence as well.

If an embedded system is designed well, the existence of the processor and software
could be completely unnoticed by the user of the device. Such is the case for a microwave oven,
VCR, or alarm clock. In some cases, it would even be possible to build an equivalent device that
does not contain the processor and software. This could be done by replacing the combination
with a custom integrated circuit that performs the same functions in hardware. However, a lot of
flexibility is lost when a design is hard-cooled in this way. It is mush easier, and cheaper, to
change a few lines of software than to redesign a piece of custom hardware.

1.2 History and Future:

Given the definition of embedded systems earlier is this chapter; the first such systems
could not possibly have appeared before 1971. That was the year Intel introduced the world's
first microprocessor. This chip, the 4004, was designed for use in a line of business calculators
produced by the Japanese Company Busicom. In 1969, Busicom asked Intel to design a set of
custom integrated circuits-one for each of their new calculator models. The 4004 was Intel's
response rather than design custom hardware for each calculator, Intel proposed a general-
purpose circuit that could be used throughout the entire line of calculators. Intel's idea was that
the software would give each calculator its unique set of features.

The microcontroller was an overnight success, and its use increased steadily over the
next decade. Early embedded applications included unmanned space probes, computerized traffic
lights, and aircraft flight control systems. In the 1980s, embedded systems quietly rode the
waves of the microcomputer age and brought microprocessors into every part of our kitchens
(bread machines, food processors, and microwave ovens), living rooms (televisions, stereos, and
remote controls), and workplaces (fax machines, pagers, laser printers, cash registers, and credit
card readers).

It seems inevitable hat the number of embedded systems will continue to increase
rapidly. Already there are promising new embedded devices that have enormous market
potential; light switches and thermostats that can be central computer, intelligent air-bag systems
that don't inflate when children or small adults are present, pal-sized electronic organizers and
personal digital assistants (PDAs), digital cameras, and dashboard navigation systems. Clearly,
individuals who possess the skills and desire to design the next generation of embedded systems
will be in demand for quite some time.

1.3 Real Time Systems:

One subclass of embedded is worthy of an introduction at this point. As commonly


defined, a real-time system is a computer system that has timing constraints. In other words, a
real-time system is partly specified in terms of its ability to make certain calculations or
decisions in a timely manner. These important calculations are said to have deadlines for
completion. And, for all practical purposes, a missed deadline is just as bad as a wrong answer.

The issue of what if a deadline is missed is a crucial one. For example, if the real-time
system is part of an airplane's flight control system, it is possible for the lives of the passengers
and crew to be endangered by a single missed deadline. However, if instead the system is
involved in satellite communication, the damage could be limited to a single corrupt data packet.
The more severe the consequences, the more likely it will be said that the deadline is "hard" and
thus, the system is a hard real-time system. Real-time systems at the other end of this discussion
are said to have "soft" deadlines.

All of the topics and examples presented in this book are applicable to the designers of
real-time system who is more delight in his work. He must guarantee reliable operation of the
software and hardware under all the possible conditions and to the degree that human lives
depend upon three system's proper execution, engineering calculations and descriptive
paperwork.

Application Areas :Nearly 99 per cent of the processors manufactured end up in embedded
systems. The embedded system market is one of the highest growth areas as these systems are
used in very market segment- consumer electronics, office automation, industrial automation,
biomedical engineering, wireless communication,Data communication, telecommunications,
transportation, military and so on.

Consumer appliances: At home we use a number of embedded systems which include digital
camera, digital diary, DVD player, electronic toys, microwave oven, remote controls for TV and
air-conditioner, VCO player, video game consoles, video recorders etc. Today’s high-tech car
has about 20 embedded systems for transmission control, engine spark control, air-conditioning,
navigation etc. Even wristwatches are now becoming embedded systems. The palmtops are
powerful embedded systems using which we can carry out many general-purpose tasks such as
playing games and word processing.

Office automation: The office automation products using em embedded systems are copying
machine, fax machine, key telephone, modem, printer, scanner etc.

Industrial automation: Today a lot of industries use embedded systems for process control.
These include pharmaceutical, cement, sugar, oil exploration, nuclear energy, electricity
generation and transmission. The embedded systems for industrial use are designed to carry out
specific tasks such as monitoring the temperature, pressure, humidity, voltage, current etc., and
then take appropriate action based on the monitored levels to control other devices or to send
information to a centralized monitoring station. In hazardous industrial environment, where
human presence has to be avoided, robots are used, which are programmed to do specific jobs.
The robots are now becoming very powerful and carry out many interesting and complicated
tasks such as hardware assembly.

Medical electronics: Almost every medical equipment in the hospital is an embedded system.
These equipments include diagnostic aids such as ECG, EEG, blood pressure measuring devices,
X-ray scanners; equipment used in blood analysis, radiation, colonoscopy, endoscopy etc.
Developments in medical electronics have paved way for more accurate diagnosis of diseases.

Computer networking: Computer networking products such as bridges, routers, Integrated


Services Digital Networks (ISDN), Asynchronous Transfer Mode (ATM), X.25 and frame relay
switches are embedded systems which implement the necessary data communication protocols.
For example, a router interconnects two networks. The two networks may be running different
protocol stacks. The router’s function is to obtain the data packets from incoming pores, analyze
the packets and send them towards the destination after doing necessary protocol conversion.
Most networking equipments, other than the end systems (desktop computers) we use to access
the networks, are embedded systems.

Telecommunications: In the field of telecommunications, the embedded systems can be


categorized as subscriber terminals and network equipment. The subscriber terminals such as key
telephones, ISDN phones, terminal adapters, web cameras are embedded systems. The network
equipment includes multiplexers, multiple access systems, Packet Assemblers Dissemblers
(PADs), sate11ite modems etc. IP phone, IP gateway, IP gatekeeper etc. are the latest embedded
systems that provide very low-cost voice communication over the Internet.

Wireless technologies: Advances in mobile communications are paving way for many
interesting applications using embedded systems. The mobile phone is one of the marvels of the
last decade of the 20’h century. It is a very powerful embedded system that provides voice
communication while we are on the move. The Personal Digital Assistants and the palmtops can
now be used to access multimedia services over the Internet. Mobile communication
infrastructure such as base station controllers, mobile switching centers are also powerful
embedded systems.
Insemination:Testing and measurement are the fundamental requirements in all scientific and
engineering activities. The measuring equipment we use in laboratories to measure parameters
such as weight, temperature, pressure, humidity, voltage, current etc. are all embedded systems.
Test equipment such as oscilloscope, spectrum analyzer, logic analyzer, protocol analyzer, radio
communication test set etc. are embedded systems built around powerful processors. Thank to
miniaturization, the test and measuring equipment are now becoming portable facilitating easy
testing and measurement in the field by field-personnel.

Security: Security of persons and information has always been a major issue. We need to protect
our homes and offices; and also the information we transmit and store. Developing embedded
systems for security applications is one of the most lucrative businesses nowadays. Security
devices at homes, offices, airports etc. for authentication and verification are embedded systems.
Encryption devices are nearly 99 per cent of the processors that are manufactured end up in~
embedded systems. Embedded systems find applications in. every industrial segment- consumer
electronics, transportation, avionics, biomedical engineering, manufacturing, process control and
industrial automation, data communication, telecommunication, defense, security etc. Used to
encrypt the data/voice being transmitted on communication links such as telephone
lines.Biometric systems using fingerprint and face recognition are now being extensively used
for user authentication in banking applications as well as for access control in high security
buildings.

Finance: Financial dealing through cash and cheques are now slowly paving way for
transactions using smart cards and ATM (Automatic Teller Machine, also expanded as Any Time
Money) machines. Smart card, of the size of a credit card, has a small micro-controller and
memory; and it interacts with the smart card reader! ATM machine and acts as an electronic
wallet. Smart card technology has the capability of ushering in a cashless society. Well, the list
goes on. It is no exaggeration to say that eyes wherever you go, you can see, or at least feel, the
work of an embedded system.

1.4 Overview of Embedded System Architecture

Every embedded system consists of custom-built hardware built around a Central


Processing Unit (CPU). This hardware also contains memory chips onto which the software is
loaded. The software residing on the memory chip is also called the ‘firmware’. The embedded
system architecture can be represented as a layered architecture as shown in Fig.

The operating system runs above the hardware, and the application software runs above
the operating system. The same architecture is applicable to any computer including a desktop
computer. However, there are significant differences. It is not compulsory to have an operating
system in every embedded system.

For small appliances such as remote control units, air conditioners, toys etc., there is no
need for an operating system and you can write only the software specific to that application. For
applications involving complex processing, it is advisable to have an operating system. In such a
case, you need to integrate the application software with the operating system and then transfer
the entire software on to the memory chip. Once the software is transferred to the memory chip,
the software will continue to run fora long time you don’t need to reload new software.

Now, let us see the details of the various building blocks of the hardware of an embedded
system. As shown in Fig. the building blocks are:

 Central Processing Unit (CPU)


 Memory (Read-only Memory and Random Access Memory)
 Input Devices
 Output devices
 Communication interfaces
 Application-specific circuitry
Fig 1.1 Blocks of hardware embedded system

Central Processing Unit (CPU):

The Central Processing Unit (processor, in short) can be any of the following:
microcontroller, microprocessor or Digital Signal Processor (DSP). A micro-controller is a low-
cost processor. Its main attraction is that on the chip itself, there will be many other components
such as memory, serial communication interface, analog-to digital converter etc. So, for small
applications, a micro-controller is the best choice as the number of external components required
will be very less. On the other hand, microprocessors are more powerful, but you need to use
many external components with them. D5P is used mainly for applications in which signal
processing is involved such as audio and video processing.

Memory:

The memory is categorized as Random Access 11emory (RAM) and Read Only Memory
(ROM). The contents of the RAM will be erased if power is switched off to the chip, whereas
ROM retains the contents even if the power is switched off. So, the firmware is stored in the
ROM. When power is switched on, the processor reads the ROM; the program is program is
executed.

Input devices:

Unlike the desktops, the input devices to an embedded system have very limited
capability. There will be no keyboard or a mouse, and hence interacting with the embedded
system is no easy task. Many embedded systems will have a small keypad-you press one key to
give a specific command. A keypad may be used to input only the digits. Many embedded
systems used in process control do not have any input device foruser interaction; they take inputs
fromsensors or transducers 1’fnd produce electrical signals that are in turn fed to other systems.

Output devices:

The output devices of the embedded systems also have very limited capability. Some
embedded systems will have a few Light Emitting Diodes (LEDs) to indicate the health status of
the system modules, or for visual indication of alarms. A small Liquid Crystal Display (LCD)
may also be used to display some important parameters.

Communication interfaces:

The embedded systems may need to, interact with other embedded systems at they may
have to transmit data to a desktop. To facilitate this, the embedded systems are provided with one
or a few communication interfaces such as RS232, RS422, RS485, Universal Serial Bus (USB),
IEEE 1394, Ethernet etc.

Application-specific circuitry:

Sensors, transducers, special processing and control circuitry may be required fat an
embedded system, depending on its application. This circuitry interacts with the processor to
carry out the necessary work. The entire hardware has to be given power supply either through
the 230 volts main supply or through a battery. The hardware has to design in such a way that the
power consumption is minimized.
LITERATURE REVIEW
Many farmers use induction motor pumps to irrigate their farms from wells, rivers and nearby
streams. However, shortage of electric power in many states has resulted in unplanned load
shedding of long durations in rural areas. Moreover, in villages, single-phasing connections
have been implemented. The electricity companies allocate lower priority to 3-phase power
supply to rural areas due to unpaid electricity bills running into millions of rupees. Most of
farmers use sprinkler based or surface based irrigation. Three phase induction motors with
direct-on-line or star-delta starters are used. For sprinkle based irrigation, farmer first arranges
set of pipes with nozzles in the region of distribution of water and then switches on the pump.
He waits for specific duration to ensure that water is distributed in sufficient quantity and then
shifts the set of pipes to other dry regions and repeats the process. In many cases, the distance
between location of pump (water source) and the region of distribution of water (farm) might
extend to few kilometers. In case of power failure, farmer has to go back to pump region and
wait for power restoration. For surface based irrigation, water is discharged through pipe at
ground surface and gradient is created to distribute the water through the various regions. There
are frequent instances of burning of motor due to unequal phase voltages and dry running of
motor. Repairing cost of pump and non-distribution of water during motor failure period cause
substantial reduction in yield of crop. Conventional remote monitoring systems using cellular
network use dedicated GSM modem for AT command interface. This modem sends the working
condition of the motor to the user cell phone as messages. This helps the users to control the
motor using missed calls.
2. BLOCK DIAGRAM OF PROJECT AND FUNCTIONING
BLOCK DIAGRAM:

POWER SUPPLY BLOCKDIAGRAM:


Step down Transformer
Bridge Rectifier Filter Regulator Output
3. DESCRPTION OF COMPONENTS
3.1 MICROCONTROLLERS:

Microprocessors and microcontrollers are widely used in embedded systems products.


Microcontroller is a programmable device. A microcontroller has a CPU in addition to a fixed
amount of RAM, ROM, I/O ports and a timer embedded all on a single chip. The fixed amount
of on-chip ROM, RAM and number of I/O ports in microcontrollers makes them ideal for many
applications in which cost and space are critical.

The Intel 8051 is Harvard architecture, single chip microcontroller (µC) which was
developed by Intel in 1980 for use in embedded systems. It was popular in the 1980s and early
1990s, but today it has largely been superseded by a vast range of enhanced devices with 8051-
compatible processor cores that are manufactured by more than 20 independent manufacturers
including Atmel, Infineon Technologies and Maxim Integrated Products.

8051 is an 8-bit processor, meaning that the CPU can work on only 8 bits of data at a
time. Data larger than 8 bits has to be broken into 8-bit pieces to be processed by the CPU. 8051
is available in different memory types such as UV-EPROM, Flash and NV-RAM.

The present project is implemented on KeilUvision. In order to program the device,


proload tool has been used to burn the program onto the microcontroller.

The features, pin description of the microcontroller and the software tools used are
discussed in the following sections.

2.1.1FEATURES OF AT89C51:

 4K Bytes of Re-programmable Flash Memory.

 RAM is 128 bytes.

 2.7V to 6V Operating Range.


 Fully Static Operation: 0 Hz to 24 MHz.

 Two-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 UART Channel.

 Low-power Idle and Power-down Modes.

2.1.2Description:

The AT89C51 is a low-voltage, high-performance CMOS 8-bit microcomputer with 4K


bytes of Flash programmable memory. The device is manufactured using Atmel’s high-density
nonvolatile memory technology and is compatible with the industry-standard MCS-51
instruction set. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel
AT89C51 is a powerful microcomputer, which provides a highly flexible and cost-effective
solution to many embedded control applications.

In addition, the AT89C51 is designed with static logic for operation down to zero
frequency and supports two software selectable power saving modes. The Idle Mode stops the
CPU while allowing the RAM, timer/counters, serial port and interrupt system to continue
functioning. The power-down mode saves the RAM contents but freezes the oscillator disabling
all other chip functions until the next hardware reset.
Pin diagram:

Fig 3.1.Pin diagram of 8052


Fig 3.2.Internal Architecture of 8052

Pin Description:

Vcc: Pin 40 provides supply voltage to the chip. The voltage source is +5V.

GND: Pin 20 is the ground.

Port 0
Port 0 is an 8-bit open drain bidirectional I/O port. As an output port, each pin can sink eight TTL inputs.
When 1s are written to port 0 pins, the pins can be used as high impedance inputs. Port 0 can also be configured to
be the multiplexed low-order address/data bus during accesses to external program and data memory. In this mode,
P0 has internal pull-ups. Port 0 also receives the code bytes during Flash programming and outputs the code bytes
during Program verification. External pull-ups are required during program verification.

Port 1

Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 1 output buffers can sink/source
four TTL inputs. When 1s are written to Port 1 pins, they are pulled high by the internal pull-ups and can be used as
inputs. As inputs, Port 1 pins that are externally being pulled low will source current (IIL) because of the internal
pull-ups. In addition, P1.0 and P1.1 can be configured to be the timer/counter 2 external count input (P1.0/T2) and
the timer/counter 2 trigger input (P1.1/T2EX), respectively, as shown in the following table. Port 1 also receives the
low-order address bytes during Flash programming and verification.

Table 3.1.Alternate Functions of Port 1

Port 2

Port 2 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 2 output buffers
can sink/source four TTL inputs. When 1s are written to Port 2 pins, they are pulled high by the
internal pull-ups and can be used as inputs. As inputs, Port 2 pins that are externally being pulled
low will source current (IIL) because of the internal pull-ups.

Port 2 emits the high-order address byte during fetches from external program memory
and during accesses to external data memory that uses 16-bit addresses (MOVX @ DPTR). In
this application, Port 2 uses strong internal pull-ups when emitting 1s. During accesses to
external data memory that uses 8-bit addresses (MOVX @ RI), Port 2 emits the contents of the
P2 Special Function Register. The port also receives the high-order address bits and some control
signals during Flash programming and verification.
Port 3

Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 3 output buffers can sink/source
four TTL inputs. When 1s are written to Port 3 pins, they are pulled high by the internal pull-ups and can be used as
inputs. As inputs, Port 3 pins that are externally being pulled low will source current (IIL) because of the pull-ups.
Port 3 receives some control signals for Flash programming and verification. Port 3 also serves the functions of
various special features of the AT89S52, as shown in the following table.

Table 3.2 Alternate Functions of Port 3

RESET

Pin9 is the reset pin. It is an input and is active high. Upon applying a high pulse to this pin, the
microcontroller will reset and terminate all the activities. This is often referred to as a power-on
reset.

EA (External access)

Pin 31 is EA. It is an active low signal. It is an input pin and must be connected to either Vcc or
GND but it cannot be left unconnected.

The 8051 family members all come with on-chip ROM to store programs. In such cases,
the EA pin is connected to Vcc. If the code is stored on an external ROM, the EA pin must be
connected to GND to indicate that the code is stored externally.
PSEN (Program store enable)

This is an output pin.

ALE (Address latch enable)

This is an output pin and is active high.

XTAL1: Input to the inverting oscillator amplifier and input to the internal clock operating circuit.

XTAL2: Output from the inverting oscillator amplifier.

Fig 3.3 Oscillator Connections

Fig 3.4 External Clock Drive Configuration

XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier that can be configured
for use as an on-chip oscillator. Either a quartz crystal or ceramic resonator may be used. To drive the device from
an external clock source, XTAL2 should be left unconnected while XTAL1 is driven. There are no requirements on
the duty cycle of the external clock signal, since the input to the internal clocking circuitry is through a divide-by-
two flip-flop, but minimum and maximum voltage high and low time specifications must be observed.
3.2 POWER SUPPLY
The input to the circuit is applied from the regulated power supply. The a.c. input i.e., 230V
from the mains supply is step down by the transformer to 12V and is fed to a rectifier. The
output obtained from the rectifier is a pulsating d.c voltage. So in order to get a pure d.c voltage,
the output voltage from the rectifier is fed to a filter to remove any a.c components present even
after rectification. Now, this voltage is given to a voltage regulator to obtain a pure constant dc
voltage.

Fig 3.5 Block Diagram of Power supply


Fig 3.6 Circuit Diagram of Power supply

3.2.1 Step down Transformer:


Usually, DC voltages are required to operate various electronic equipment and these
voltages are 5V, 9V or 12V. But these voltages cannot be obtained directly. Thus the a.c input
available at the mains supply i.e., 230V is to be brought down to the required voltage level. This
is done by a transformer. Thus, a step down transformer is employed to decrease the voltage to
a required level.

3.2.2 Rectifier:
The output from the transformer is fed to the rectifier. It converts A.C. into pulsating D.C. The
rectifier may be a half wave or a full wave rectifier. In this project, a bridge rectifier is used
because of its merits like good stability and full wave rectification.
3.2.3 Filter:
Capacitive filter is used in this project. It removes the ripples from the output of rectifier and
smoothens the D.C. Output received from this filter is constant until the mains voltage and
load is maintained constant. However, if either of the two is varied, D.C. voltage received at this
point changes. Therefore a regulator is applied at the output stage.

3.2.4 Voltage Regulator:


As the name itself implies, it regulates the input applied to it. A voltage regulator is an electrical
regulator designed to automatically maintain a constant voltage level. In this project, power
supply of 5V and 12V are required. In order to obtain these voltage levels, 7805 and 7812
voltage regulators are to be used. The first number 78 represents positive supply and the
numbers 05, 12 represent the required output voltage levels.
Features:

• Output Current up to 1A.

• Output Voltages of 5, 6, 8, 9, 10, 12, 15, 18, 24V.

• Thermal Overload Protection. • Short Circuit Protection.


• Output Transistor Safe Operating Area Protection.

3.3 LCD
Liquid Crystal Display also called as LCD is very helpful in providing user interface as well as
for debugging purpose. The most commonly used Character based LCDs are based on Hitachi's
HD44780 controller or other which are compatible with HD44580. The most commonly used
LCDs found in the market today are 1 Line, 2 Line or 4 Line LCDs which have only 1
controller and support at most of 80 characters, whereas LCDs supporting more than 80
characters make use of 2 HD44780 controllers

Pin Description:

Fig 3.13 Pin Diagram of LCD

Pin No. Name Description

1 VSS Power supply (GND)

2 VCC Power supply (+5V)

3 VEE Contrast adjust

0 = Instruction input
4 RS
1 = Data input

0 = Write to LCD module


5 R/W
1 = Read from LCD module

6 EN Enable signal

7 D0 Data bus line 0 (LSB)


8 D1 Data bus line 1

9 D2 Data bus line 2

10 D3 Data bus line 3

11 D4 Data bus line 4

12 D5 Data bus line 5

13 D6 Data bus line 6

14 D7 Data bus line 7 (MSB)

15 LED+ Back Light VCC

16 LED- Back Light GND


Table 3.5 Pin Description of LCD

Table3.6 Command Operation of LCD

Although looking at the table you can make your own commands and test them. Below is a brief
list of useful commands which are used frequently while working on the LCD.
No. Instruction Hex Decimal

1 Function Set: 8-bit, 1 Line, 5x7 Dots 0x30 48

2 Function Set: 8-bit, 2 Line, 5x7 Dots 0x38 56

3 Function Set: 4-bit, 1 Line, 5x7 Dots 0x20 32

4 Function Set: 4-bit, 2 Line, 5x7 Dots 0x28 40

5 Entry Mode 0x06 6

Display off Cursor off


6 (clearing display without clearing DDRAM 0x08 8
content)

7 Display on Cursor on 0x0E 14

8 Display on Cursor off 0x0C 12

9 Display on Cursor blinking 0x0F 15

10 Shift entire display left 0x18 24

12 Shift entire display right 0x1C 30

13 Move cursor left by one character 0x10 16

14 Move cursor right by one character 0x14 20

15 Clear Display (also clear DDRAM content) 0x01 1

Set DDRAM address or cursor position on


16 0x80+add 128+add
display

Set CGRAM address or set pointer to


17 0x40+add 64+add
CGRAM location

Table 3.7 Command List of LCD

Sending Commands to LCD

To send commands we simply need to select the command register. Everything is same as we
have done in the initialization routine. But we will summarize the common steps and put them
in a single subroutine. Following are the steps:
 move data to LCD port
 select command register
 select write operation
 send enable signal
 wait for LCD to process the command
 Sending Data to LCD
 To send data move data to LCD port
 select data register
 select write operation.

3.4 MOTORS

DEFINITION

Motor is a device that creates motion, not an engine; it usually refers to either an electrical motor
or an internal combustion engine.

It may also refer to:

 Electric motor, a machine that converts electricity into a mechanical motion


o AC motor, an electric motor that is driven by alternating current
 Synchronous motor, an alternating current motor distinguished by a rotor
spinning with coils passing magnets at the same rate as the alternating
current and resulting magnetic field which drives it
 Induction motor, also called a squirrel-cage motor, a type of asynchronous
alternating current motor where power is supplied to the rotating device by
means of electromagnetic induction
o DC motor, an electric motor that runs on direct current electricity
 Brushed DC electric motor, an internally commutated electric motor
designed to be run from a direct current power source
 Brushless DC motor, a synchronous electric motor which is powered by
direct current electricity and has an electronically controlled commutation
system, instead of a mechanical commutation system based on brushes
o Electrostatic motor, a type of electric motor based on the attraction and repulsion
of electric charge
o Servo motor, an electric motor that operates a servo, commonly used in robotics
o Internal fan-cooled electric motor, an electric motor that is self-cooled by a fan,
typically used for motors with a high energy density

TYPES OF MOTORS

Industrial motors come in a variety of basic types. These variations are suitable for many
different applications. Naturally, some types of motors are more suited for certain applications
than other motor types are. This document will hopefully give some guidance in selecting these
motors.

AC Motors

The most common and simple industrial motor is the three phase AC induction motor,
sometimes known as the "squirrel cage" motor. Substantial information can be found about any
motor by checking its (nameplate).
Advantages

 Simple Design
 Low Cost
 Reliable Operation
 Easily Found Replacements
 Variety of Mounting Styles
 Many Different Environmental Enclosures

Simple Design

The simple design of the AC motor -- simply a series of three windings in the exterior (stator)
section with a simple rotating section (rotor). The changing field caused by the 50 or 60 Hertz
AC line voltage causes the rotor to rotate around the axis of the motor.

The speed of the AC motor depends only on three variables:


1. The fixed number of winding sets (known as poles) built into the motor, which
determines the motor's base speed.
2. The frequency of the AC line voltage. Variable speed drives change this frequency to
change the speed of the motor.
3. The amount of torque loading on the motor, which causes slip.

Low Cost

The AC motor has the advantage of being the lowest cost motor for applications requiring more
than about 1/2 hp (325 watts) of power. This is due to the simple design of the motor. For this
reason, AC motors are overwhelmingly preferred for fixed speed applications in industrial
applications and for commercial and domestic applications where AC line power can be easily
attached. Over 90% of all motors are AC induction motors. They are found in air conditioners,
washers, dryers, industrial machinery, fans, blowers, vacuum cleaners, and many, many other
applications.

Reliable Operation

The simple design of the AC motor results in extremely reliable, low maintenance operation.
Unlike the DC motor, there are no brushes to replace. If run in the appropriate environment for
its enclosure, the AC motor can expect to need new bearings after several years of operation. If
the application is well designed, an AC motor may not need new bearings for more than a
decade.

Easily Found Replacements

The wide use of the AC motor has resulted in easily found replacements. Many manufacturers
adhere to either European (metric) or American (NEMA) standards. (For Replacement Motors)

Variety of Mounting Styles

AC Motors are available in many different mounting styles such as:

Foot Mount
C-Face
Large Flange
Vertical
Specialty

DC Motors

The brushed DC motor is one of the earliest motor designs. Today, it is the motor of choice in
the majority of variable speed and torque control applications.

Advantages

 Easy to understand design


 Easy to control speed
 Easy to control torque
 Simple, cheap drive design

Easy to understand design

The design of the brushed DC motor is quite simple. A permanent magnetic field is created in the
stator by either of two means:

 Permanent magnets
 Electro-magnetic windings

If the field is created by permanent magnets, the motor is said to be a "permanent magnet DC
motor" (PMDC). If created by electromagnetic windings, the motor is often said to be a "shunt
wound DC motor" (SWDC). Today, because of cost-effectiveness and reliability, the PMDC
motor is the motor of choice for applications involving fractional horsepower DC motors, as well
as most applications up to about three horsepower.

At five horsepower and greater, various forms of the shunt wound DC motor are most commonly
used. This is because the electromagnetic windings are more cost effective than permanent
magnets in this power range.
Caution: If a DC motor suffers a loss of field (if for example, the field power connections are
broken), the DC motor will immediately begin to accelerate to the top speed which the loading
will allow. This can result in the motor flying apart if the motor is lightly loaded. The possible
loss of field must be accounted for, particularly with shunt wound DC motors.

Opposing the stator field is the armature field, which is generated by a changing electromagnetic
flux coming from windings located on the rotor. The magnetic poles of the armature field will
attempt to line up with the opposite magnetic poles generated by the stator field. If we stopped
the design at this point, the motor would spin until the poles were opposite one another, settle
into place, and then stop -- which would make a pretty useless motor!

However, we are smarter than that. The section of the rotor where the electricity enters the rotor
windings is called the commutator. The electricity is carried between the rotor and the stator by
conductive graphite-copper brushes (mounted on the rotor) which contact rings on stator.
Imagine power is supplied:

The motor rotates toward the pole alignment point. Just as the motor would get to this point, the
brushes jump across a gap in the stator rings. Momentum carries the motor forward over this gap.
When the brushes get to the other side of the gap, they contact the stator rings again and -- the
polarity of the voltage is reversed in this set of rings! The motor begins accelerating again, this
time trying to get to the opposite set of poles. (The momentum has carried the motor past the
original pole alignment point.) This continues as the motor rotates.

In most DC motors, several sets of windings or permanent magnets are present to smooth out the
motion.

Easy to control speed

Controlling the speed of a brushed DC motor is simple. The higher the armature voltage, the
faster the rotation. This relationship is linear to the motor's maximum speed.

The maximum armature voltage which corresponds to a motor's rated speed (these motors are
usually given a rated speed and a maximum speed, such as 1750/2000 rpm) are available in
certain standard voltages, which roughly increase in conjuntion with horsepower. Thus, the
smallest industrial motors are rated 90 VDC and 180 VDC. Larger units are rated at 250 VDC
and sometimes higher.

Specialty motors for use in mobile applications are rated 12, 24, or 48 VDC. Other tiny motors
may be rated 5 VDC.

Most industrial DC motors will operate reliably over a speed range of about 20:1 -- down to
about 5-7% of base speed. This is much better performance than the comparible AC motor. This
is partly due to the simplicity of control, but is also partly due to the fact that most industrial DC
motors are designed with variable speed operation in mind, and have added heat dissipation
features which allow lower operating speeds.

Easy to control torque

In a brushed DC motor, torque control is also simple, since output torque is proportional to
current. If you limit the current, you have just limited the torque which the motor can achieve.
This makes this motor ideal for delicate applications such as textile manufacturing.

Simple, cheap drive design

The result of this design is that variable speed or variable torque electronics are easy to design
and manufacture. Varying the speed of a brushed DC motor requires little more than a large
enough potentiometer. In practice, these have been replaced for all but sub-fractional horsepower
applications by the SCR and PWM drives, which offer relatively precisely control voltage and
current. Common DC drives are available at the low end (up to 2 horsepower) for under US$100
-- and sometimes under US$50 if precision is not important.

Large DC drives are available up to hundreds of horsepower. However, over about 10


horsepower careful consideration should be given to the price/performance tradeoffs with AC
inverter systems, since the AC systems show a price advantage in the larger systems. (But they
may not be capable of the application's performance requirments).

Disadvantages
 Expensive to produce
 Can't reliably control at lowest speeds
 Physically larger
 High maintenance
 Dust

WORKING OF DC MOTOR

In any electric motor, operation is based on simple electromagnetism. A current-carrying


conductor generates a magnetic field; when this is then placed in an external magnetic field, it
will experience a force proportional to the current in the conductor, and to the strength of the
external magnetic field. As you are well aware of from playing with magnets as a kid, opposite
(North and South) polarities attract, while like polarities (North and North, South and South)
repel. The internal configuration of a DC motor is designed to harness the magnetic interaction
between a current-carrying conductor and an external magnetic field to generate rotational
motion.

Principle

When a rectangular coil carrying current is placed in a magnetic field, a torque acts on the coil
which rotates it continuously.

When the coil rotates, the shaft attached to it also rotates and thus it is able to do mechanical
work.
Every DC motor has six basic parts -- axle, rotor (a.k.a., armature), stator, commutator, field
magnet(s), and brushes. In most common DC motors (and all that BEAMers will see), the
external magnetic field is produced by high-strength permanent magnets1. The stator is the
stationary part of the motor -- this includes the motor casing, as well as two or more permanent
magnet pole pieces. The rotor (together with the axle and attached commutator) rotate with
respect to the stator. The rotor consists of windings (generally on a core), the windings being
electrically connected to the commutator. The above diagram shows a common motor layout --
with the rotor inside the stator (field) magnets.

The geometry of the brushes, commentator contacts, and rotor windings are such that when
power is applied, the polarities of the energized winding and the stator magnet(s) are misaligned,
and the rotor will rotate until it is almost aligned with the stator's field magnets. As the rotor
reaches alignment, the brushes move to the next commentator contacts, and energize the next
winding. Given our example two-pole motor, the rotation reverses the direction of current
through the rotor winding, leading to a "flip" of the rotor's magnetic field, driving it to continue
rotating.

In real life, though, DC motors will always have more than two poles (three is a very common
number). In particular, this avoids "dead spots" in the commutator. You can imagine how with
our example two-pole motor, if the rotor is exactly at the middle of its rotation (perfectly aligned
with the field magnets), it will get "stuck" there. Meanwhile, with a two-pole motor, there is a
moment where the commutator shorts out the power supply (i.e., both brushes touch both
commutator contacts simultaneously). This would be bad for the power supply, waste energy, and
damage motor components as well. Yet another disadvantage of such a simple motor is that it
would exhibit a high amount of torque "ripple" (the amount of torque it could produce is cyclic
with the position of the rotor).
Construction and Working

Parts of a DC Motor

Armature

A D.C. motor consists of a rectangular coil made of insulated copper wire wound on a soft iron
core. This coil wound on the soft iron core forms the armature. The coil is mounted on an axle
and is placed between the cylindrical concave poles of a magnet.

Commutator

A commutator is used to reverse the direction of flow of current. Commutator is a copper ring
split into two parts C1 and C2. The split rings are insulated form each other and mounted on the
axle of the motor. The two ends of the coil are soldered to these rings. They rotate along with the
coil. Commutator rings are connected to a battery. The wires from the battery are not connected
to the rings but to the brushes which are in contact with the rings.
Brushes

Two small strips of carbon, known as brushes press slightly against the two split rings, and the
split rings rotate between the brushes.

The carbon brushes are connected to a D.C. source.

Working of a DC Motor

When the coil is powered, a magnetic field is generated around the armature. The left side of the
armature is pushed away from the left magnet and drawn towards the right, causing rotation.
When the coil turns through 900, the brushes lose contact with the commutator and the current
stops flowing through the coil.

However the coil keeps turning because of its own momentum.

Now when the coil turns through 1800, the sides get interchanged. As a result the commutator
ring C1 is now in contact with brush B 2 and commutator ring C2 is in contact with brush B1.
Therefore, the current continues to flow in the same direction.
PARAMETRS OF THE DC MOTRS

1.  Direction of rotation
2. Motor Speed
3. Motor Torque
4. Motor Start and Stop

Direction of Rotation

A DC Motor has two wires. We can call them the positive terminal and the negative terminal,
although these are pretty much arbitrary names (unlike a battery where these polarities are vital
and not to be mixed!). On a motor, we say that when the + wire is connected to + terminal on a
power source, and the - wire is connected to the - terminal source on the same power source, the
motor rotates clockwise (if you are looking towards the motor shaft). If you reverse the wire
polarities so that each wire is connected to the opposing power supply terminal, then the motor
rotates counter clockwise. Notice this is just an arbitrary selection and that some motor
manufacturers could easily choose the opposing convention. As long as you know what rotation
you get with one polarity, you can always connect in such a fashion that you get the direction
that you want on a per polarity basis.
DC Motor Rotation vs Polarity

Facts:

 DC Motor rotation has nothing to do with the voltage magnitude or the current magnitude
flowing through the motor.
 DC Motor rotation does have to do with the voltage polarity and the direction of the
current flow.

DC Motor Speed

Whereas the voltage polarity controls DC motor rotation, voltage magnitude controls motor
speed. Think of the voltage applied as a facilitator for the strengthening of the magnetic field. In
other words, the higher the voltage, the quicker will the magnetic field
become strong. Remember that a DC motor has an electromagnet and a series of permanent
magnets. The applied voltage generates a magnetic field on the electromagnet portion. This
electromagnet field is made to oppose the permanent magnet field. If the electromagnet field is
very strong, then both magnetic entities will try to repel each other from one side, as well as
atract each other from the other side. The stronger the induced magnetic field, the quicker will
this separation/attaction will try to take place. As a result, motor speed is directly proportional
to applied voltage.
Motor Speed Curve

 One aspect to have in mind is that the motor speed is not entirely lineal. Each motor will have
their own voltage/speed curve. One thing I can guarantee from each motor is that at very low
voltages, the motor will simply not move. This is because the magnetic field strength is not
enough to overcome friction. Once friction is overcome, motor speed will start to increase as
voltage increase.

The following video shows the concept of speed control and offers some ideas on how this can
be achieved.

  Motor Torque

In the previous segment I kind of described speed as having to do with the strength of the
magnetic field, but this is in reality misleading. Speed has to do with how fast the magnetic field
is built and the attraction/repel forces are installed into the two magnetic structures. Motor
strength, on the other hand, has to do with magnetic field strength. The stronger the
electromagnet attracts the permanent magnet, the more force is exerted on the motor load.

Per example, imagine a motor trying to lift 10 pounds of weight. This is a force that when
multiplied by a distance (how much from the ground we are lifting the load) results in WORK.
This WORK when exerted through a predetermined amount of time (for how long we are lifting
the weight) gives us power. But whatever power came in, must come out as energy can not be
created or destroyed. So that you know, the power that we are supplying to the motor is
computed by

P = IV

Where P is power, I is motor current and V is motor voltage

Hence, if the voltage (motor speed) is maintained constant, how much load we are moving must
come from the current. As you increase load (or torque requirements) current must also increase.

Motor Loading

One aspect about DC motors which we must not forget is that loading or increase of torque can
not be infinite as there is a point in which the motor simply can not move. When this happens,
we call this loading “Stalling Torque”. At the same time this is the maximum amount of current
the motor will see, and it is refer to Stalling Current. Stalling deserves a full chapter as this is a
very important scenario that will define a great deal of the controller to be used. I promise I will
later write a post on stalling and its intricacies.
Motor Start and Stop

You are already well versed on how to control the motor speed, the motor torque and the motor
direction of rotation. But this is all fine and dandy as long as the motor is actually moving. How
about starting it and stopping it? Are these trivial matters? Can we just ignore them or should we
be careful about these aspects as well? You bet we should!

Starting a motor is a very hazardous moment for the system. Since you have an inductance
whose energy storage capacity is basically empty, the motor will first act as an inductor. In a
sense, it should not worry us too much because current can not change abruptly in an inductor,
but the truth of the matter is that this is one of the instances in which you will see the highest
currents flowing into the motor. The start is not necessarily bad for the motor itself as in fact the
motor can easily take this Inrush Current. The power stage, on the other hand and if not properly
designed for, may take a beating.

Once the motor has started, the motor current will go down from inrush levels to whatever load
the motor is at. Per example, if the motor is moving a few gears, current will be proportional to
that load and according to torque/current curves.

Stopping the motor is not as harsh as starting. In fact, stopping is pretty much a breeze. What we
do need to concern ourselves is with how we want the motor to stop. Do we want it to coast
down as energy is spent in the loop, or do we want the rotor to stop as fast as possible? If the
later is the option, then we need braking. Braking is easily accomplished by shorting the motor
outputs. The reason why the motor stops so fast is because as a short is applied to the motor
terminals, the Back EMF is shorted. Because Back EMF is directly proportional to speed,
making Back EMF = 0, also means making speed = 0.

MOTORDRIVER CIRCUIT

The name "H-Bridge" is derived from the actual shape of the switching circuit which control the
motoion of the motor. It is also known as "Full Bridge". Basically there are four switching
elements in the H-Bridge as shown in the figure below.
As you can see in the figure above there are four switching elements named as "High side left",
"High side right", "Low side right", "Low side left". When these switches are turned on in pairs
motor changes its direction accordingly. Like, if we switch on High side left and Low side right
then motor rotate in forward direction, as current flows from Power supply through the motor
coil goes to ground via switch low side right. This is shown in the figure below.

Similarly, when you switch on low side left and high side right, the current flows in opposite
direction and motor rotates in backward direction. This is the basic working of H-Bridge. We can
also make a small truth table according to the switching of H-Bridge explained above.

Truth Table
High Left High Right Low Left Low Right Description
On Off Off On Motor runs clockwise
Off On On Off Motor runs anti-clockwise
On On Off Off Motor stops or decelerates
Off Off On On Motor stops or decelerates

As already said, H-bridge can be made with the help of trasistors as well as MOSFETs, the only
thing is the power handling capacity of the circuit. If motors are needed to run with high current
then lot of dissipation is there. So head sinks are needed to cool the circuit.
Now you might be thinkin why i did not discuss the cases like High side left on and Low side left
on or high side right on and low side right on. Clearly seen in the diagra, you don't want to burn
your power supply by shorting them. So that is why those combinations are not discussed in the
truth table.

3.5 l293D

L293D is a dual H-Bridge motor driver, So with one IC we can interface two DC motors which
can be controlled in both clockwise and counter clockwise direction and if you have motor with
fix direction of motion the you can make use of all the four I/Os to connect up to four DC
motors. L293D has output current of 600mA and peak output current of 1.2A per channel.
Moreover for protection of circuit from back EMF ouput diodes are included within the IC. The
output supply (VCC2) has a wide range from 4.5V to 36V, which has made L293D a best choice
forDCmotordriver.

A simple schematic for interfacing a DC motor using L293D is shown below.


As you can see in the circuit, three pins are needed for interfacing a DC motor (A, B, Enable). If
you want the o/p to be enabled completely then you can connect Enable to VCC and only 2 pins
needed from controller to make the motor work.

As per the truth mentioned in the image above its fairly simple to program the microcontroller.

3.6 GSM

SM is a mobile communication modem; it is stands for global system for mobile communication
(GSM). The idea of GSM was developed at Bell Laboratories in 1970.  It is widely used mobile
communication system in the world. GSM is an open and digital cellular technology used for
transmitting mobile voice and data services operates at the 850MHz, 900MHz, 1800MHz and
1900MHz frequency bands.

GSM system was developed as a digital system using time division multiple access (TDMA)
technique for communication purpose. A GSM digitizes and reduces the data, then sends it down
through a channel with two different streams of client data, each in its own particular time slot.
The digital system has an ability to carry 64 kbps to 120 Mbps of data rates.

GSM Modem
There are various cell sizes in a GSM system such as macro, micro, pico and umbrella cells.
Each cell varies as per the implementation domain. There are five different cell sizes in a GSM
network macro, micro, pico and umbrella cells. The coverage area of each cell varies according
to the implementation environment.

Time Division Multiple Access

TDMA technique relies on assigning different time slots to each user on the same frequency. It
can easily adapt to data transmission and voice communication and can carry 64kbps to
120Mbps of data rate.

GSM Architecture

A GSM network consists of the following components:


 A Mobile Station:  It is the mobile phone which consists of the transceiver, the display
and the processor and is controlled by a SIM card operating over the network.
 Base Station Subsystem: It acts as an interface between the mobile station and the
network subsystem. It consists of the Base Transceiver Station which contains the radio
transceivers and handles the protocols for communication with mobiles. It also consists of the
Base Station Controller which controls the Base Transceiver station and acts as a interface
between the mobile station and mobile switching centre.
 Network Subsystem: It provides the basic network connection to the mobile stations.
The basic part of the Network Subsystem is the Mobile Service Switching Centre which
provides access to different networks like ISDN, PSTN etc. It also consists of the Home
Location Register and the Visitor Location Register which provides the call routing and
roaming capabilities of GSM. It also contains the Equipment Identity Register which
maintains an account of all the mobile equipments wherein each mobile is identified by its
own IMEI number. IMEI stands for International Mobile Equipment Identity.
Features of GSM Module:

 Improved spectrum efficiency


 International roaming
 Compatibility with integrated services digital network (ISDN)
 Support for new services.
 SIM phonebook management
 Fixed dialing number (FDN)
 Real time clock with alarm management
 High-quality speech
 Uses encryption to make phone calls more secure
 Short message service (SMS)
The security strategies standardized for the GSM system make it the most secure
telecommunications standard currently accessible. Although the confidentiality of a call and
secrecy of the GSM subscriber is just ensured on the radio channel, this is a major step in
achieving end-to- end security.
GSM Modem

A GSM modem is a device which can be either a mobile phone or a modem device which can be
used to make a computer or any other processor communicate over a network. A GSM modem
requires a SIM card to be operated and operates over a network range subscribed by the network
operator.  It can be connected to a computer through serial, USB or Bluetooth connection.

A GSM modem can also be a standard GSM mobile phone with the appropriate cable and
software driver to connect to a serial port or USB port on your computer. GSM modem is usually
preferable to a GSM mobile phone. The GSM modem has wide range of applications in
transaction terminals, supply chain management, security applications, weather stations and
GPRS mode remote data logging.

Working of GSM Module:

From the below circuit, a GSM modem duly interfaced to the MC through the level shifter IC
Max232. The SIM card mounted GSM modem upon receiving digit command by SMS from any
cell phone send that data to the MC through serial communication. While the program is
executed, the GSM modem receives command ‘STOP’ to develop an output at the MC, the
contact point of which are used to disable the ignition switch. The command so sent by the user
is based on an intimation received by him through the GSM modem ‘ALERT’ a programmed
message only if the input is driven low. The complete operation is displayed over 16×2 LCD
display.
GMS Modem Circuit
Intelligent GSM Device for Automation and Security

In these days, the GSM mobile terminal has become one of the items that are constantly with us.
Just like our wallet/purse, keys or watch, the GSM mobile terminal provides us a communication
channel that enables us to communicate with the world. The requirement for a person to be
reachable or to call anyone at any time is very appealing.

In this project, as the name says project is based on GSM network technology for transmission of
SMS from sender to receiver. SMS sending and receiving is used for ubiquitous access of
appliances and allowing breach control at home. The system proposes two sub-systems.
Appliance control subsystem enables the user to control home appliances remotely and the
security alert subsystem gives the automatic security monitoring.

The system is capable enough to instruct user via SMS from a specific cell number to change the
condition of the home appliance according to the user’s needs and requirements. The second
aspect is that of security alert which is achieved in a way that on the detection of intrusion, the
system allows automatic generation of SMS thus alerting the user against security risk. GSM will
allow communication anywhere, anytime, and with anyone. The functional architecture of GSM
employing intelligent networking principles, and its ideology, which provides the development
of GSM is the first step towards a true personal communication system that enough
standardization to ensure compatibility.
4. KEIL SOFTWARE
Keil compiler is software used where the machine language code is written and compiled. After
compilation, the machine source code is converted into hex code which is to be dumped into the
microcontroller for further processing. Keil compiler also supports C language code.

How to write Embedded C Program in Keil Software.

Procedure Steps

Step-1:

Install Keil MicroVision-2 in your PC, Then after Click on that “Keil UVision-2” icon.
After opening the window go to toolbar and select Project Tab then close previous project.
Step-2:

Next select New Project from Project Tab.


Step-3:

Then it will open “Create New Project” window. Select the path where you want to save
project and edit project name.

Step-4:

Next it opens “Select Device for Target” window, It shows list of companies and here
you can select the device manufacturer company.
Step-5:

For an example, for your project purpose you can select the chip as 89c51/52 from Atmel
Group. Next Click OK Button, it appears empty window here you can observe left side a small
window i.e, “Project Window”. Next create a new file.

Step-6:

From the Main tool bar Menu select “File” Tab and go to New, then it will open a
window, there you can edit the program.
Step-7:

Here you can edit the program as which language will you prefer either Assembly or C.

Step-8:

After editing the program save the file with extension as “.c” or “.asm”, if you write a
program in Assembly Language save as “.asm” or if you write a program in C Language save as
“.c” in the selected path. Take an example and save the file as “test.c”.
Step-9:

Then after saving the file, compile the program. For compilation go to project window
select “source group” and right click on that and go to “Add files to Group”.

Step-10:

Here it will ask which file has to Add. For an example here you can add “test.c” as you
saved before.
Step-11:

After adding the file, again go to Project Window and right click on your “c file” then
select “Build target” for compilation. If there is any “Errors or Warnings” in your program you
can check in “Output Window” that is shown bottom of the Keil window.

Step-12:

Here in this step you can observe the output window for “errors and warnings”.
Step-13:

If you make any mistake in your program you can check in this slide for which error and
where the error is by clicking on that error.

Step-14:

After compilation then next go to Debug Session. In Tool Bar menu go to “Debug” tab
and select “Start/Stop Debug Session”.
Step-15:

Here a simple program for “Leds Blinking”. LEDS are connected to PORT-1. you can
observe the output in that port.

Step-16:

To see the Ports and other Peripheral Features go to main toolbar menu and select
peripherals.
Step-17:

In this slide see the selected port i.e, PORT-1.

Step-18:

Start to trace the program in sequence manner i.e, step by step execution and observe the
output in port window.
Step-19:

After completion of Debug Session Create an Hex file for Burning the Processor. Here to
create an Hex file go to project window and right click on Target next select “Option for Target”.

Step-20:

It appears one window; here in “target tab” modify the crystal frequency as you
connected to your microcontroller.

Step-21:
Next go to “Output’ tab. In that Output tab click on “Create HEX File” and then click
OK.

6.RESULT

7. CONCLUSION

Thus the developed system enhances the motor control through wireless using GSM in the field
optimally. The system ensures protection of motor against overloads, overheating, dry running
and phase imbalances. It also provides automated restarting if normal conditions are re-
established i.e. when proper power restoration takes place. Uniform distribution of water at
regular intervals, reduction in labour cost, prevention of unwanted water spillage, minimization
of occurrences of motor faults and intimation to user about the completion of task are the major
advantage of this system. The use of mobile phone has become more common among the
farmers and hence used. The system proves to be great boon to farmers whose pump sets are
located far away from their homes due to capability of remote control using cell phone and
intimation about any abnormal conditions. The system is designed to have cell phone with in-
built security against unauthorizedusers. Any cell phone model can be used for communication
so that the system improves its adaptability to use. Low operating cost using messages and
missed calls are the major attractions of this system.
8. BIBLIOGRAPHY

1. T. Karuppiah, V. Sivasankaran, Azha. Periasamy and S. Muruganand,” Embedded System


Based Industrial Power Plant Boiler Automation Using GSM Technology, “International Journal
of Advanced Research in Computer and Communication Engineering Vol. 2, Issue 8, and August
2013. Pg.3321-3325.

2. Ejiofor Virginia Ebere and Oladipo Onaolapo Francisca,” Microcontroller based Automatic
Water level Control System”, Nnamdi Azikiwe University, International Journal of Innovative
Research in Computer and Communication Engineering Vol. 1, Issue 6, August 2013.Pg. 1390-
1396.

3. R. Jaichandran, A. Anthony Irudhayaraj, Surabhi, Rajkumar Kuila and Trisha Sinha,”


Prototype for Automatic Controlling and Remote Accessing of Irrigation Motor”, AVIT-VMU,
International Journal of Innovative Research in Computer and Communication Engineering Vol.
1, Issue 4, June 2013. Pg. 800-807.

4. Prathyusha.K, G. Sowmya Bala and K. Sreenivasa Ravi,” A Real–Time Irrigation Control


System for Precision Agriculture Using WSN in Indian Agricultural Sectors”, Dept. of ECM, KL
University, International Journal of Computer Science, Engineering and Applications (IJCSEA)
Vol.3, No.4, August 2013. Pg. 75-80.

5. [7] V.Ramya, B. Palaniappan and V.Sumathi, ” GSM Based Embedded System for Remote
Laboratory Safety Monitoring and Altering”, Annamalai University, International Journal of
Distributed and Parallel Systems (IJDPS) Vol.3, No.6, November 2012. Pg. 31-49.

6. [8] O.Homa Kesav and B. Abdul Rahim, ” Automated Wireless Meter Reading System for
Monitoring and Controlling Power Consumption”, International Journal of Recent Technology
and Engineering (IJRTE) ISSN: 2277-3878, Volume-1, Issue-2, June 2012. Pg. 66-69

You might also like