Embedded Design and Development
CHAPTER 1
COMPANY PROFILE
1.1 History
E-park is based in Silicon Valley Bangalore, are a team of qualified professionals with
extensive industrial exposure that brings to you a mix of youth and experience, They offer Real-
time projects for final year technical students. They also offer guidance, workshops by Industry
experts. And they provide many more IT services.
They have successfully performed projects under various platforms and has delivered
high quality competitively priced products and services to customers all over India. They
specialize in designing network solutions and security systems to meet your individual business
requirements, through their initial concept.
They do their academic projects on embedded, Mat-lab, VLSI, Robotics, java, .net, PHP,
Linux. They also do their workshops on Basic electronics, Embedded Design, Hardware and
Networking, PCB designing, VLSI Design. They provide services on Embedded Design and
Development, PCB Design, Website Design and Hosting, Software Development.
1.2 MAJOR MILESTONES
1.2.1 Hasiru (GSM motor Controller)
Fig 1.1: Hasiru circuit board
Hasiru is a GSM based wireless 3-phase motor controller to operate field installed motors
remotely and in real time. Generally, a substantial amount of time and energy is spent by a
[Link],RIT,Hassan Page 1
Embedded Design and Development
person to visit field for operating motors. The farmer/operator has to travel to fields often during
odd hours and in an unfavorable weather just to switch ON/OFF the motor due to unexpected
erratic power supply. They developed this GSM technology based wireless 3-phase motor
controller to operate 3-phase motor in timely manner and only when needed on real-time basis,
so saves large amount of energy, water and power.
1.2.2 Gas Leak Detector
Fig 1.2: Gas leak detector
The gas Leak detector has been developed for the purpose of detecting minute gas leaks
in and around the gas pipe lines. It is most useful for anyone working with flammable gases. It
shows accurate gas leak point in the gas line. You can use this Device to Check Gas leak as well
as for Alcohol Detection.
1.2.3 Street light timer
Fig 1.3: Belaku circuit board
[Link],RIT,Hassan Page 2
Embedded Design and Development
Belaku is the GSM Street Light Controller is specific energy conservation product
designed to employ in city, villages and colonies where energy saving & energy conservation is
critical issue. The GSM technology based wireless street light controller used to operate street
light in timely manner and only when needed on real-time basis, so saves large amount of energy
and power.
1.2.4 Door interlocking system
Fig 1.4: Circuit diagram of Door interlocking system
The door interlocking system is used to control the entry of personnel to a secure area
such as a clean room, where dust or small particles may be a problem. The principle is generally
well under-stood. In its simplest form, the door interlocking is composed of 2 to 12 doors that are
electrically interlocked in such a way that the all doors cannot be opened simultaneously. The
door interlocks are used in a variety of situations but in essence they are there to control the
unwanted passage from one area to another.
1.2.5 Power Transformers
Fig 1.5: Power transformer
[Link],RIT,Hassan Page 3
Embedded Design and Development
A transformer is an electrical device that transfers electrical energy between two or more
circuits through electromagnetic induction. Electromagnetic induction produces an electromotive
force across a conductor which is exposed to time varying magnetic fields. Commonly,
transformers are used to increase or decrease the voltages of alternating current in electric power
applications.
1.2.6 LCD/LED TV Stabilizer
Fig 1.6: LED/LCD TV Stabilizer
The LED/LCD TV is not the only electronic device in the house taking power. Every
time the AC comes on or the furnace starts, electricity is used. This causes temporary power dips
to other electronics, like the LED TV, which in turn affects the TV’s processes. In fact, one of
the reasons why many LED TVs fail early in life is not because of their display technology, but
instead because their power caps get busted from power surges or dips. Install a voltage regulator
with a battery backup that can provide additional power during dips. Not only will it protect
against hazards like power surges caused by lightning, it will help keep the TV operating
efficiently no matter what other electronics are being used in the home.
[Link],RIT,Hassan Page 4
Embedded Design and Development
1.2.7 Home security systems
Fig 1.7: Home Security system
A security alarm is a system designed to detect intrusion unauthorized entry into a
building or area. Security alarms are used in residential, commercial, industrial, and military
properties for protection against burglary (theft) or property damage, as well as personal
protection against intruders. Car alarms likewise protect vehicles and their contents. Prisons also
use security systems for control of inmates.
Some alarm systems serve a single purpose of burglary protection; combination systems
provide both fire and intrusion protection. Intrusion alarm systems may also be combined with
closed-circuit television surveillance systems to automatically record the activities of intruders,
and may interface to access control systems for electrically locked doors. Systems range from
small, self-contained noisemakers, to complicated, multi-area systems with computer monitoring
and control.
1.3 Tools used in the Organization
As e-park research center is embedded development company, different tools are used.
Tools are listed below
Keil -5
Microchip
Arduino IDE
Flow code-4
Orcad-16.1
Putty serial communication software
[Link],RIT,Hassan Page 5
Embedded Design and Development
XCT-U serial communication software
Flash magic
Nuvoton flasher
Proload for ATMEL
Micro controllers used in e-park
ARM-7
P89v51rd2
AT89s52
Nuvoton
Renesis
Arduino mega
Raspberry pie-3
Technology used in e-park research center
IOT
GSM
ZIGBEE
Bluetooth/wifi
RF wireless technology
Wireless sensors network
1.4 Organization Structure
e-park is one of the best design and development start-up company in Bangaluru, e-park
is active in many sectors, its core businesses being in power saving and automation technologies.
It is also working in IT support and corporate trainings.
Different Departments in Company
e-park research center has following departments
[Link],RIT,Hassan Page 6
Embedded Design and Development
Department of Research and development
Department of Production and QC
Department of Project training
Department of Corporate training
Department of IT services
Department of Marketing and service
Department of Admin and accounts
1.4.1 Department of Research and Development
e-park has a very good and qualified R&D team. The size of the R&D team is four. They
work on new innovative things and develop the new products also work on the existing product
for up gradation. e-park research center takes embedded projects from various industrial clients
and they will design and develop the projects in accordance with client’s requirements.
1.4.2 Department of Production and QC
e-park research center produces various products, e-park has good skilled and qualified
production team. The production team size is five also it has one Quality controller. Every
product manufactured in the e-park will gone through the quality test.
1.4.3 Department of Project Training
With the intension of filling the gap between industrial requirements and present
technical education e-park started an academic projects trainings. In this department students will
come with their own innovative ideas, e-park will guide them in a right way to implement the
idea .e-park has good skilled and qualified project trainers. The team size is four. Even R&D
team will take care of the project development and training. Some projects will be developed by
the industrial freelance developers e-park is training the students in different platform e.g.,
embedded system, VLSI, Image processing, JAVA, web development, IoT, HTML,PHP, Cloud
computing etc.
1.4.4 Department of Corporate Training
[Link],RIT,Hassan Page 7
Embedded Design and Development
Corporate companies are offered jobs for well skilled [Link] e-park research center
offers corporate trainings for qualified engineers and help them to achieve their dreamed job.
Project development team will handle this corporate training also.
1.4.5 Department of IT Services
e-park also deals with following IT services with our co-company “G-mindzInfotech”
support
Computer hardware and networking
Security system
On demand services
Cloud telephone services
AMC service
1.4.6 Department of Marketing and Services
Marketing and service department very essential department in every organization. By
having well skilled marketing and service team an organization can reach the market. e-park has
very skilled and qualified marketing and service team. The team size is four. These four people
will not resides in the office, they will be always in field.
1.4.7 Department of Admin and Accounts
Admin and account departments are take care of the purchase, sales, accounts and all in
& outs of the company. e-park has one admin and accountant. They are working for e-park
growth in all dimensions.
1.5 Company Clients
e-park manufactures electronics products for domestic users and agriculture products for
farmers so farmers and domestic users also clients for e-park. Apart from that as e-park is a start-
up company it has few clients, Clients list is below
Relon Trading limited: Relon is marketing based company located at Richmond
road Bangalore. e-park developed and manufacturing a gas leak detector for
Relon since 2014.
[Link],RIT,Hassan Page 8
Embedded Design and Development
Dastuelectricals: Dastuelectricals is service based company located at Verna-
Goa.
e-park developed various access control systems for farm city or medical
manufacturing industries in the name of Dastuelectricals.
G-mindz InfoTech: G-mindz InfoTech is a IT supporting organization located at
RajrajeshwarinagarBangalore,They are official channel partners for all e-park
products.
CN enterprises: CN enterprises is a leading power transformer and stabilizer
manufacturers located at Rajajinagar Bangalore, e-park is taking care of R&D for
CN enterprises.
CHAPTER 2
GSM BASED AGRICULTURE AUTOMATION
[Link],RIT,Hassan Page 9
Embedded Design and Development
2.1 INTRODUCTION ABOUT GSM MOTOR CONTROLLER
Some wise scientist once said that control system is a system where we can shut down the
machine whenever we want. That’s the difference between controlled and uncontrolled machine.
My project is about make this control system efficient and dynamic. As the name suggested the
automatic control is for controlling the motor from remote place, look over its operating
conditions; get feedback from the motor itself. My target is to control the motor from distant
place by mobile and also get feedback by SMS while it is in ON or OFF condition. We also
ensure the safe operation of the motor by detecting the voltage of the source and ensure feedback
from system while it is over or under voltage. Again we also get these feedbacks by SMS as
well. GSM network is everywhere in our country that’s why we choose GSM network to operate
our motor also transfers feedback information through it. We also use GSM network because if
we use it then we don’t need to establish extra equipment for networking.
2.2 PHYSICAL EFFORT AND INCONVENIENCE
Farmers/operators have to travel to fields often during odd hours to switch ON/OFF the
motor due to erratic power supply.
They often face the risk of wild animals, snakes, hazardous terrain and electric shocks
while visiting the fields in late nights and rainy days.
Existing aids like auto-starters are unreliable and incapable of communicating the
operating state of the motor.
Where a farmer has more than one motor pump set; he has to run around to make sure
that all the motor pumps are working efficiently.
2.3 WASTAGE OF WATER AND ELECTRICITY
Sometimes ignorance will come into mind when physical effort is necessary. This leads
to wastage of both electricity and water.
Excessive watering results in soil erosion, wastage in fertilizers used and hence a loss in
productivity. Excess fertilizer run-off in to larger water bodies (lakes and rivers), further
impacts environment.
[Link],RIT,Hassan Page 10
Embedded Design and Development
Indiscriminate use of resources is also resulting in exploitation of ground water beyond
recharging capacity. Falling water tables further result in increased suction head, and
demand greater energy needs.
2.4 GSM MOTOR CONTROLLER MODELS
After analyzing the above problems e-park has designed the product which will resolve
all above mentioned problems. This product is developed for agriculture field so its name
“HASIRU” that means Green. Basically e-park has developed two models
1. Hasiru (GSM motor controller)-V1
2. Hasiru (GSM motor controller)-V2
2.5 HASIRU (GSM MOTOR CONTROLLER)-V1
Fig 2.1:GSM Motor Controller
Hasiru is a GSM based wireless 3-phase motor controller to operate field installed motors
remotely and in real time. Generally, a substantial amount of time and energy is spent by a
person to visit field for operating motors. The farmer/operator has to travel to fields often during
[Link],RIT,Hassan Page 11
Embedded Design and Development
odd hours and in an unfavorable weather just to switch ON/OFF the motor due to unexpected
erratic power supply. e-park has developed GSM technology based wireless 3-phase motor
controller to operate 3-phase motor in timely manner and only when needed on real-time basis,
so saves large amount of energy, water and power.
2.5.1 FEATURES
User can Store master number through SMS.
SMS to know the motor status.
Missed call to control - motor on and off
Message alerts for power up, motor on, motor off, status.
Master Mode - Only one person can control the motor.
Anybody Access Mode - More than one person can control the motor.
User can check the balance of the inserted SIM card.
2.5.2 Technical Specifications
[Link],RIT,Hassan Page 12
Embedded Design and Development
Input voltage 12V DC
Input current 2A
Control load up to 40HP
Operating temperature 0 to 55 degree centigrade
Power consumption 3-4 watt
GSM module SIM900A module
Command type missed call/SMS
Relay contacts-ON 10A, 230Vac -for ONcontact
Relay contacts-OFF 10A, 230Vac -for OFF contact
Indication type LED
Power indication RED LED
GSM module SIM900A module
Network indication GREEN LED
Device dimensions 150*850*340 (in mm)
Type of device Power indication
Table 2.1:Components Specification
2.5.3 Operation
When power comes system will send intimation message to the owner phone.
[Link],RIT,Hassan Page 13
Embedded Design and Development
If SMS is sent ON or 1st missed call from owner mobile then RLY 1 will Go On for 5 Sec
Then Start Button will be pressed Pump will go On ( Circuit Closed ) and user will get
acknowledgment SMS. PUMP-ON.
If SMS is sent OFF or 2nd missed call from owner mobile Then RLY2 Will Go On for 5 Sec
Then NC will be Open Pump Will Go Off (Circuit Open) and user will get acknowledgment
SMS,PUMP OFF.
Owner can check the pump status by sending SMS- STS.
System will send the present status of the motor.
SMS FORMAT OPERATION ACKNOWLEDGE SMS
ON Motor will turn on PUMP ON
OFF Motor will turn off PUMP OFF
STN”MOBILE NO” Owner no will be stored NUMBER CHANGED
STS Check the status of the PUMP ON/PUMP OFF
motor
Table 2.2:SMS status,operation and acknowledgement
2.6 HASIRU (GSM 3-PHASE MOTOR CONTROLLER)-V2
[Link],RIT,Hassan Page 14
Embedded Design and Development
Fig 2.2:GSM 3-Phase motor controller
2.6.1 ABOUT 3 PHASE DETECTION:
After Power UP 3 Phase will be checked.
If all the 3 phase is present SMS will 3- PHASE - MODE, If any phase is absent SMS
will be 1- Phase / Mode.
If AUTO Mode is On after Testing 3 Phase, Motor will get ON after 5 Sec (using
Commands thru SMS u can On/OFF AUTO Mode .
2.6.2 FEATURES
Simple SMS based switching on and off the pump.
Message 1 to on the pump and message 0 to off the pump.
Missed called based switching after 3 rings.
Auto mode and manual mode option.
option for accepting messages form registered number or any number.
Mobile number changing option.
Option for changing the delay of the pump on time.
Option for checking the sim card balance.
Option for changing form 3 phase to 2/3 mode.
Option for checking the statues of the pump.
[Link],RIT,Hassan Page 15
Embedded Design and Development
Option for checking the single strength of the device.
3 phase detection system. Motor does not start if all the 3 phase is not present.
SMS reply for every operation with feedback.
Power on SMS with the statues display.
Dry run protection sensor. (sensor leads
Motor/pump trip SMS
2.6.3 SMS COMMANDS
SMS FORMAT OPERATION
1 To ON the pump -return SMS
PUMP ON
2 To OFF the pump-return SMS
PUMP OFF
3 AUTO MODE OFF –return SMS
AUTOMODE OFF
4 AUTO MODE ON –return SMS
AUTOMODE ON
10 Message will accept only from
registered number
11 Message will accept from any
number
C To change the owner number
7 To check the status of the motor-
return SMS is status of the motor
S To check the signal strength
BL*123# To check the sim card balance
1st miss call To turn On the motor
Table 2.3: SMS Command Operations
CHAPTER 3
TASKS PERFORMED
[Link],RIT,Hassan Page 16
Embedded Design and Development
3.1 SOFTWARE USED
3.1.1. Keil u-Vision 3.0
Keil Software is used provide you with software development tools for 8051 based
microcontrollers. With the Keil tools, you can generate embedded applications for virtually every
8051 derivative. The supported microcontrollers are listed in the μ-vision3.1.5 Keil Arm μ
Vision is a window-based software development platform that combines a robust and modern
editor with a project manager and make facility tool. It integrates all the tools needed to develop
embedded applications including a C/C++ compiler, macro assembler, linker/locator, and a HEX
file generator. The μ Vision IDE and Debugger is the central part of the Keil development tool
chain and has numerous features that help the programmer to develop embedded applications
quickly and successfully. The Keil tools are easy to use, and are guaranteed to help you achieve
your design goals in a timely manner
3.1.2 Theory of Operation
In this project we interfaced 8051 microcontroller with Motorola’s C168 GSM mobile
phone to decode the received message and do the required action. The protocol used for the
communication between the two is AT command. The microcontroller pulls the SMS received
by phone, decodes it, recognizes the Mobile no. and then switches on the relays attached to its
port to control the appliances. After successful operation, controller sends back the
acknowledgement to the user’s mobile through SMS.
3.1.3 AT-Command set
The following section describes the AT-Command set. The commands can be tried out by
connecting a GSM modem to one of the PC’s COM ports. Type in the test-command, adding CR
+ LF (Carriage return + Line feed = \r\n) before executing. Table gives an overview of the
implemented AT-Commands in this application. The use of the commands is described in the
later sections.
Command Description
[Link],RIT,Hassan Page 17
Embedded Design and Development
AT Check if serial interface and GSM modem is
working.
ATE0 Turn echo off, less traffic on serial line.
AT+CNMI Display of new incoming SMS.
AT+CPMS Selection of SMS memory.
AT+CMGF SMS string format, how they are compressed.
AT+CMGR Read new message from a given memory
location.
AT+CMGS Send message to a given recipient.
AT+CMGD Delete message.
Table 3.1 AT-Command Set Overview
3.2 A BRIEF INTRODUCTION TO NUVOTON MICROCONTROLLER
The W78E054D/W78E052D series is an 8-bit microcontroller which can accommodate a
wider frequency range with low power consumption. The instruction set for the
W78E054D/W78E052D series is fully compatible with the standard 8052.
The W78E054D/W78E052D series contains 16K/8K bytes Flash EPROM programmable
by hardware writer; a 256 bytes RAM; four 8-bit bi-directional (P0, P1, P2, P3) and bit-
addressable I/O ports; an additional 4-bit I/O port P4; three 16-bit timer/counters; a hardware
watchdog timer and a serial port. The-se peripherals are supported by 8 sources 4-level interrupt
capability. To facilitate programming and verification, the Flash EPROM inside the
W78E054D/W78E052D series allows the program memory to be programmed and read
electronically. Once the code is confirmed, the user can protect the code for security.
The W78E054D/W78E052D series microcontroller has two power reduction modes, idle mode
and power-down mode, both of which are software selectable. The idle mode turns off the
processor clock but allows for continued peripheral operation. The power-down mode stops the
crystal oscillator for minimum power consumption. The external clock can be stopped at any
[Link],RIT,Hassan Page 18
Embedded Design and Development
time and in any state without affecting the processor. The W78E054D/W78E052D series
contains In-System Programmable (ISP) 2KB LDROM for loader program, operating voltage
from 3.3V to 5.5V.
Note: If the applied VDD is not stable, especially with long transition time of power on/off,
it’s recommended to apply an external RESET IC to the RST pin for improving the
stability of sys-tem.
Fig 3.1:W78E054D/W78E052D Block Diagram
3.2.1 FUNCTIONAL DESCRIPTION
The W78E054D/W78E052D series architecture consists of a core controller surrounded
by various registers, five general purpose I/O ports, 16K/8K flash EPROM, 2K FLASH EPROM
for ISP function, 256 bytes of RAM, three timer/counters, and a serial port. The processor
supports 111 different op-codes and references both a 64K program address space and a 64K
data storage space.
[Link],RIT,Hassan Page 19
Embedded Design and Development
Fig 3.2 W78E054D/W78E052D Pin Configuration
3.2.2 FEATURES
Fully static design 8-bit CMOS microcontroller
Optional 12T or 6T mode
12T Mode, 12 clocks per machine cycle operation (default), Speed up to 40 MHz/5V
6T Mode, 6 clocks per machine cycle operation set by the writer, Speed up to 20
MHz/5V
Wide supply voltage of 2.4V to 5.5V
Temperature grade is (-40oC~85oC)
Pin and Instruction-sets compatible with MCS-51
256 bytes of on-chip scratchpad RAM
16K/8K bytes electrically erasable/programmable Flash EPROM
2K bytes LDROM support ISP function (Reference Application Note)
64KB program memory address space
[Link],RIT,Hassan Page 20
Embedded Design and Development
64KB data memory address space
Four 8-bit bi-directional ports
8-sources, 4-level interrupt capability
One extra 4-bit bit-addressable I/O port, additional / (available on PQFP, PLCC and
LQFP package) INT2INT3
Three 16-bit timer/counters
One full duplex serial port
Watchdog Timer
EMI reduction mode
Software Reset
Built-in power management with idle mode and power down mode
Code protection
Packages: DIP40, PLCC44, PQFP44, LQFP48, TQFP44 The pin diagram of the
4 register banks, each containing 8 registers
80 bits of general purpose data memory
32 input/output pins arranged as four 8 bit ports: P0-P3
Two 16 bit timer/counters: T0-T1
Two external and three internal interrupt sources Oscillator and clock
circuits.
3.3 Embedded C program for Relay Operation
#include<stdio.h>
#include<reg51.h>
sbit RLAY1=P1^0; // relay 1
sbit RLAY2=P1^2; // relay2
void delay(unsigned int time) //delay for required time
{
unsigned int i,j;
for(i=0;i<time;i++)
for(j=0;j<0xff;j++);
}
[Link],RIT,Hassan Page 21
Embedded Design and Development
unsigned char ReadChar() //reading charactor from GSM
{
unsigned char rxch;
while(RI != 1);
rxch = SBUF;
RI = 0;
return rxch;
}
void GSMdata(unsigned char x) //sending deta to GSM module
{
SBUF=x;
while(TI==0);
TI=0;
}
void GSMcmd(unsigned char *ptr) //sending deta to GSM module
{
while(*ptr!=0)
{
GSMdata(*ptr);
ptr++;
}
}
void InitSerial()
{
SCON = 0x50; /* SCON: mode 1, 8-bit UART, enable rcvr */
TMOD |= 0x20; /* TMOD: timer 1, mode 2, 8-bit reload */
TH1 = 0xfd; /* TH1: reload value for 9600 baud @ 11.0592MHz */
TR1 = 1; /* TR1: timer 1 run */
[Link],RIT,Hassan Page 22
Embedded Design and Development
TI = 1; /* TI: set TI to send first char of UART */
}
void main()
{
char *msg = "+CLIP:+7588931760"; //change calling no
char *string,read_data;
int string_count = 0;
int flag = 0;
GSMcmd("ATE0\r\n"); //Turn OFF echo
delay(3000);
GSMcmd("AT+CLIP=1\r\n "); //activate calling mode
while(1)
{
read_data = ReadChar();
string_count = mystrcmp(msg,read_data,17);
if(string_count == 17)
{
if(flag == 0)
{
flag = 1;
RLAY1 = 1; //relay 1 will ON
RLAY2 = 0; //relay 2 will OFF
delay(5000);
}
else if(flag == 1)
{
flag = 0;
RLAY1 = 0; //relay 1 will OFF
RLAY2 = 1; //relay 2 will ON
[Link],RIT,Hassan Page 23
Embedded Design and Development
delay(5000);
}
string_flag=0;
}
else //otherwise both relay will OFF
{
RLAY1 = 0;
RLAY2 = 0;
}
}
}
3.4ADVANTAGES
Control the operation of the motor from a mobile from absolutely anywhere – freedom
from visiting farms at odd hours or employing labor just to operate the motor.
Provide flexibility to delegate operation of motor to anyone as it involves just instructing
through mobile.
Provide flexibility to run the motor for specific time intervals leading to savings in power
bills and more importantly, conservation of ground water.
Automatic power detection to communicate to the farmer on the availability of power –
helps keep track of erratic power supply and make the most of the limited power supply
in villages.
REFERENCES
[1] [Link]
[2] Sheikh IzzalAzid, Sushi Kumar, Analysis and Performance of a Low Cost SMS
Based Home Security System, International Journal of Smart Home, Vol. 5 No. 3, 2011.
[3]Simcom GSM modem website, [Link]
[Link],RIT,Hassan Page 24
Embedded Design and Development
[Link],RIT,Hassan Page 25