Andriod Mobile Controlled Door Security Locking System by Using TCP-IP
Andriod Mobile Controlled Door Security Locking System by Using TCP-IP
Andriod Mobile Controlled Door Security Locking System by Using TCP-IP
CHAPTER 1
INTRODUCTION
An embedded system is a special-purpose system in which the computer is
completely encapsulated by or dedicated to the device or system it controls. Unlike a
general-purpose computer, such as a personal computer, an embedded system performs
one or a few predefined tasks, usually with very specific requirements. Since the system
is dedicated to specific tasks, design engineers can optimize it, reducing the size and
cost of the product. Embedded systems are often mass-produced, benefiting from
economies of scale.
Personal digital assistants (PDAs) or handheld computers are generally
considered embedded devices because of the nature of their hardware design, even
though they are more expandable in software terms. This line of definition continues to
blur as devices expand. With the introduction of the OQO Model 2 with the Windows
XP operating system and ports such as a USB port — both features usually belong to
"general purpose computers", — the line of nomenclature blurs even more.
Embedded systems plays major role in electronics varies from portable devices to
large stationary installations like digital watches and MP3 players, traffic lights, factory
controllers, or the systems controlling nuclear power plants.
In terms of complexity embedded systems can range from very simple with a
single microcontroller chip, to very complex with multiple units, peripherals and
networks mounted inside a large chassis or enclose.
Page | 1
Andriod mobile controlled door security locking system by using TCP-IP
CHAPTER 2
BLOCK DIAGRAM AND SCHEMATIC DIAGRAM
POWER
SUPPLY LCD
MICRO
WIFI
SWITCH
(OTP) CONTROLLER
Power Supply: This section is meant for supplying Power to all the sections mentioned
above. It basically consists of a Transformer to step down the 230V ac to 9V ac
followed by diodes. Here diodes are used to rectify the ac to dc. After rectification the
obtained rippled dc is filtered using a capacitor Filter. A positive voltage regulator is
used to regulate the obtained dc voltage.
Page | 2
Andriod mobile controlled door security locking system by using TCP-IP
Microcontroller: This section forms the control unit of the whole project. This section
basically consists of a Microcontroller with its associated circuitry like Crystal with
capacitors, Reset circuitry, Pull up resistors (if needed) and so on. The Microcontroller
forms the heart of the project because it controls the devices being interfaced and
communicates with the devices according to the program being written.
MAX 232: The microcontroller can communicate with the serial devices using its
single Serial Port. The logic levels at which this serial port operates is TTL logics. But
some of the serial devices operate at RS 232 Logic levels. For example PC and GSM
etc. So in order to communicate the Microcontroller with either GSM modem or PC, a
mismatch between the Logic levels occurs. In order to avoid this mismatch, in other
words to match the Logic levels, a Serial driver is used. And MAX 232 is a Serial Line
Driver used to establish communication between microcontroller and PC (or GSM)
LCD Display: This section is basically meant to show up the status of the project. This
project makes use of Liquid Crystal Display to display / prompt for necessary
information.
WIFI module: This module helps the data to get placed in the internet and get
transferred to the other authenticated users through a wireless network. Here we use
WIFI module named as HLink RM04.
Page | 3
Andriod mobile controlled door security locking system by using TCP-IP
Explanation:
In this project we required operating voltage for ARM controller board is 12V. Hence
the 12V D.C. power supply is needed for the ARM board. This regulated 12V is
generated by stepping down the voltage from 230V to 18V now the step downed a.c
voltage is being rectified by the Bridge Rectifier using 1N4007 diodes. The rectified
a.c voltage is now filtered using a ‘C’ filter. Now the rectified, filtered D.C. voltage is
fed to the Voltage Regulator. This voltage regulator provides/allows us to have a
Regulated constant Voltage which is of +12V. The rectified; filtered and regulated
voltage is again filtered for ripples using an electrolytic capacitor 100μF. Now the
output from this section is fed to microcontroller board to supply operating voltage.
Page | 4
Andriod mobile controlled door security locking system by using TCP-IP
CHAPTER 3
HARDWARE COMPONENTS
ARM stands for Advanced RISC Machines. It is a 32 bit processor core, used
for high end application. It is widely used in Advanced Robotic Applications.
Page | 5
Andriod mobile controlled door security locking system by using TCP-IP
Page | 6
Andriod mobile controlled door security locking system by using TCP-IP
Page | 7
Andriod mobile controlled door security locking system by using TCP-IP
Page | 8
Andriod mobile controlled door security locking system by using TCP-IP
Page | 9
Andriod mobile controlled door security locking system by using TCP-IP
Page | 10
Andriod mobile controlled door security locking system by using TCP-IP
Page | 11
Andriod mobile controlled door security locking system by using TCP-IP
Page | 12
Andriod mobile controlled door security locking system by using TCP-IP
Pin description:
Register description:
Page | 13
Andriod mobile controlled door security locking system by using TCP-IP
Architecture:
• The VPB interface provides a communications link between the CPU or host
and the UART0.
• The UART0 receiver block, U0RX, monitors the serial input line, RXD0, for
valid input. The
• UART0 RX Shift Register (U0RSR) accepts valid characters via RXD0. After
a valid character
• is assembled in the U0RSR, it is passed to the UART0 RX Buffer Register FIFO
to await access by the CPU or host via the generic host interface.
The UART0 transmitter block, U0TX, accepts data written by the CPU or host and
buffers the data in the UART0 TX Holding Register FIFO (U0THR). The UART0 TX
Shift Register (U0TSR) reads the data stored in the U0THR and assembles the data to
transmit via the serial output pin, TXD0
The UART0 Baud Rate Generator block, U0BRG, generates the timing enables used
by the UART0 TX block. The U0BRG clock input source is the VPB clock (PCLK).
The main clock is divided down per the divisor specified in the U0DLL and U0DLM
registers. This divided down clock is a 16x oversample clock, NBAUDOUT. The
interrupt interface contains registers U0IER and U0IIR. The interrupt interface receives
several one clock wide enables from the U0TX and U0RX blocks. Status information
from the U0TX and U0RX is stored in the U0LSR. Control information for the U0TX
and U0RX is stored in the U0LCR
Page | 14
Andriod mobile controlled door security locking system by using TCP-IP
Page | 15
Andriod mobile controlled door security locking system by using TCP-IP
Pin description:
Register description:
Page | 16
Andriod mobile controlled door security locking system by using TCP-IP
Architecture:
The VPB interface provides a communications link between the CPU or host and the
UART1. The UART1 receiver block, U1RX, monitors the serial input line, RXD1, for
valid input. The UART1 RX Shift Register (U1RSR) accepts valid characters via
RXD1. After a valid character is assembled in the U1RSR, it is passed to the UART1
RX Buffer Register FIFO to await access by the CPU or host via the generic host
interface The UART1 transmitter block, U1TX, accepts data written by the CPU or host
and buffers the data in the UART1 TX Holding Register FIFO (U1THR). The UART1
TX Shift Register
U1TSR) reads the data stored in the U1THR and assembles the data to transmit via the
serial output pin, TXD1. The UART1 Baud Rate Generator block, U1BRG, generates
the timing enables used by the UART1 TX block. The U1BRG clock input source is
the VPB clock (PCLK). The main clock is divided down per the divisor specified in the
U1DLL and U1DLM registers. This divided down clock is a 16x oversample clock,
NBAUDOUT The modem interface contains registers U1MCR and U1MSR. This
interface is responsible for handshaking between a modem peripheral and the UART1
The interrupt interface contains registers U1IER and U1IIR. The interrupt interface
receives several one clock wide enables from the U1TX and U1RX blocks.Status
information from the U1TX and U1RX is stored in the U1LSR. Control information for
the U1TX and U1RX is stored in the U1LCR.
Page | 17
Andriod mobile controlled door security locking system by using TCP-IP
Features:
• 10 bit successive approximation analog to digital converter (one in LPC2141/2
and two in LPC2144/6/8).
• Input multiplexing among 6 or 8 pins (ADC0 and ADC1).
• Power-down mode.
• Burst conversion mode for single or multiple inputs.
• Optional conversion on transition on input pin or Timer Match signal.
• Global Start command for both converters (LPC2144/6/8 only).
Description:
Basic clocking for the A/D converters is provided by the VPB clock. A programmable
divider is included in each converter, to scale this clock to the 4.5 MHz (max) clock
needed by the successive approximation process. A fully accurate conversion requires
11of these clocks.
Pin description:
Page | 18
Andriod mobile controlled door security locking system by using TCP-IP
Operation:
Hardware-triggered conversion:
If the BURST bit in the ADCR is 0 and the START field contains 010-111, the ADC
will start a conversion when a transition occurs on a selected pin or Timer Match signal.
Th choices include conversion on a specified edge of any of 4 Match signals, or
conversion on a specified edge of either of 2 Capture/Match pins. The pin state from
the selected pad or the selected Match signal, XORed with ADCR bit 27, is used in the
edge detection logic
Interrupts:
An interrupt request is asserted to the Vectored Interrupt Controller (VIC) when the
DONE bit is 1. Software can use the Interrupt Enable bit for the A/D Converter in the
VIC to control whether this assertion results in an interrupt. DONE is negated when the
ADDR is read.
Page | 19
Andriod mobile controlled door security locking system by using TCP-IP
3.5 Transformer:
A transformer is an electrical device which is used to convert electrical power
from one electrical circuit to another without change in frequency.
Transformers convert AC electricity from one voltage to another with little loss
of power. Transformers work only with AC and this is one of the reasons why mains
electricity is AC. Step-up transformers increase in output voltage, step-down
transformers decrease in output voltage. Most power supplies use a step-down
transformer to reduce the dangerously high mains voltage to a safer low voltage. The
input coil is called the primary and the output coil is called the secondary. There is no
electrical connection between the two coils; instead they are linked by an alternating
magnetic field created in the soft-iron core of the transformer. The two lines in the
middle of the circuit symbol represent the core. Transformers waste very little power
so the power out is (almost) equal to the power in. Note that as voltage is stepped down
current is stepped up. The ratio of the number of turns on each coil, called the turn’s
ratio, determines the ratio of the voltages. A step-down transformer has a large number
of turns on its primary (input) coil which is connected to the high voltage mains supply,
and a small number of turns on its secondary (output) coil to give a low output voltage.
Page | 20
Andriod mobile controlled door security locking system by using TCP-IP
3.6 Rectifier:
A circuit, which is used to convert a.c to dc, is known as RECTIFIER. The
process of conversion a.c to d.c is called “rectification”
Types of Rectifiers:
• Half wave Rectifier
• Full wave rectifier
1. Center tap full wave rectifier.
2. Bridge type full bridge rectifier.
Page | 21
Andriod mobile controlled door security locking system by using TCP-IP
Operation:
During positive half cycle of secondary, the diodes D2 and D3 are in forward
biased while D1 and D4 are in reverse biased as shown in the fig(b). The current flow
direction is shown in the fig (b) with dotted arrows.
During negative half cycle of secondary voltage, the diodes D1 and D4 are in
forward biased while D2 and D3 are in reverse biased as shown in the fig(c). The
current flow direction is shown in the fig (c) with dotted arrows.
Page | 22
Andriod mobile controlled door security locking system by using TCP-IP
3.7 Filter:
A Filter is a device, which removes the a.c component of rectifier output but
allows the d.c component to reach the load.
Capacitor Filter:
We have seen that the ripple content in the rectified output of half wave rectifier
is 121% or that of full-wave or bridge rectifier or bridge rectifier is 48% such high
percentages of ripples is not acceptable for most of the applications. Ripples can be
removed by one of the following methods of filtering:
(a) A capacitor, in parallel to the load, provides an easier by –pass for the ripples voltage
though it due to low impedance. At ripple frequency and leave the d.c.to appears the
load.
(b) An inductor, in series with the load, prevents the passage of the ripple current (due
to high impedance at ripple frequency) while allowing the d.c (due to low resistance to
d.c)
(c) various combinations of capacitor and inductor, such as L-section filter section
filter, multiple section filter etc. which make use of both the properties mentioned in
(a) and (b) above. Two cases of capacitor filter, one applied on half wave rectifier and
another with full wave rectifier.
Filtering is performed by a large value electrolytic capacitor connected across
the DC supply to act as a reservoir, supplying current to the output when the varying
DC voltage from the rectifier is falling. The capacitor charges quickly near the peak of
the varying DC, and then discharges as it supplies current to the output. Filtering
Page | 23
Andriod mobile controlled door security locking system by using TCP-IP
significantly increases the average DC voltage to almost the peak value (1.4 × RMS
value).
To calculate the value of capacitor(C),
C = ¼*√3*f*r*Rl
Where,
f = supply frequency,
r = ripple factor,
Rl = load resistance
Note: In our circuit we are using 1000microfarads.
Type of Rectifier
Parameter Half wave Full wave Bridge
Number of diodes
1 2 3
PIV of diodes
Vm 2Vm Vm
Page | 24
Andriod mobile controlled door security locking system by using TCP-IP
3.8 Regulator:
Voltage regulator ICs is available with fixed (typically 5, 12 and 15V) or
variable output voltages. The maximum current they can pass also rates them. Negative
voltage regulators are available, mainly for use in dual supplies. Most regulators include
some automatic protection from excessive current ('overload protection') and
overheating ('thermal protection'). Many of the fixed voltage regulator ICs have 3 leads
and look like power transistors, such as the 7805 +5V 1A regulator shown on the right.
The LM7805 is simple to use. You simply connect the positive lead of your unregulated
DC power supply (anything from 9VDC to 24VDC) to the Input pin, connect the
negative lead to the Common pin and then when you turn on the power, you get a 5 volt
supply from the output pin.
Page | 25
Andriod mobile controlled door security locking system by using TCP-IP
Page | 26
Andriod mobile controlled door security locking system by using TCP-IP
displaying capability and a wider temperature range. These have resulted in the LCDs
being extensively used in telecommunications and entertainment electronics. The LCDs
have even started replacing the cathode ray tubes (CRTs) used for the display of text
and graphics, and also in small TV applications.
This section describes the operation modes of LCD’s then describe how to
program and interface an LCD to 8051 using Assembly and C.
Page | 27
Andriod mobile controlled door security locking system by using TCP-IP
3.9.2 Uses:
The LCDs used exclusively in watches, calculators and measuring
instruments are the simple seven-segment displays, having a limited amount of numeric
data. The recent advances in technology have resulted in better legibility, more
information displaying capability and a wider temperature range. These have resulted
in the LCDs being extensively used in telecommunications and entertainment
electronics. The LCDs have even started replacing the cathode ray tubes (CRTs) used
for the display of text and graphics, and also in small TV applications.
Page | 28
Andriod mobile controlled door security locking system by using TCP-IP
To send any command from table 2 to the LCD, make pin RS=0. For data, make
RS=1.Then send a high –to-low pulse to the E pin to enable the internal latch of the
LCD.
3.10 WIFI
The components, organization, and operation of Wi-Fi networks will be presented.
There is an emphasis on security issues and the available security protocols. Wi-Fi is
the name given by the Wi-Fi Alliance to the IEEE 802.11 suite of standards. 802.11
defined the initial standard for wireless local area networks (WLANs), but it was
considered too slow for some applications and so was superseded by the extensions
802.11a and 802.11b, and later by 802.11g (with the release of 802.11n still pending).
At its most basic, Wi-Fi is the transmission of radio signals. Wireless router offer the
embedded systems engineer many benefits in a wide range of applications.
3.10.1 Benefits of Wi-Fi
Page | 29
Andriod mobile controlled door security locking system by using TCP-IP
3.10.3 AT Command
In AT mode, you can configurate the system parameters through the serial port AT
instruction.
Instruction format is as follows:
At+[command]=[value]\r
According to the different command, module will return a different return value.
For example:"at+remoteip=192.168.11.133\n" set remote ip address as
192.168.11.133.
For example:"at+remoteip=?\n" Inquiry remote ip address.
At command is as follows:
netmode Network mode
wifi_conf Wifi configuration
dhcpc Dhcp client configuration
net_ip Network ip address
>Tes
<Trst
AT Commands
net_dns Network dns address
dhcpd Dhcp server configuration
dhcpd_ip Dhcp server ip address
dhcpd_dns Dhcp server dns address
dhcpd_time Dhcp sever time allocation
net_commit Submit network configuration
out_trans Exit transparent transmission mode
remoteip Remote server domain name or IP address
remoteport The local or distal port number
remotepro Network Protocol type
timeout Network timeout
mode Network mode
uart Serial port configuration
Page | 31
Andriod mobile controlled door security locking system by using TCP-IP
3.11 DC Motor
DC motors are configured in many types and sizes, including brush less, servo,
and gear motor types. A motor consists of a rotor and a permanent magnetic field stator.
The magnetic field is maintained using either permanent magnets or electromagnetic
windings. DC motors are most commonly used in variable speed and torque.
Motion and controls cover a wide range of components that in some way are
used to generate and/or control motion. Areas within this category include bearings and
bushings, clutches and brakes, controls and drives, drive components, encoders and
resolves, Integrated motion control, limit switches, linear actuators, linear and rotary
motion components, linear position sensing, motors (both AC and DC motors),
orientation position sensing, pneumatics and pneumatic components, positioning
stages, slides and guides, power transmission (mechanical), seals, slip rings, solenoids,
springs.
Motors are the devices that provide the actual speed and torque in a drive
system. This family includes AC motor types (single and multiphase motors, universal,
servo motors, induction, synchronous, and gear motor) and DC motors (brush less,
servo motor, and gear motor) as well as linear, stepper and air motors, and motor
contactors and starters.
Page | 32
Andriod mobile controlled door security locking system by using TCP-IP
(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.
Let's start by looking at a simple 2-pole DC electric motor (here red represents
a magnet or winding with a "North" polarization, while green represents a magnet or
winding with a "South" polarization).
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) rotates 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, commutator 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
commutator 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, and 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
Page | 33
Andriod mobile controlled door security locking system by using TCP-IP
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).
Fig 3.11.2: Block Diagram of the DC motor having two poles only
So since most small DC motors are of a three-pole design, let's tinker with the
workings of one via an interactive animation (JavaScript required):
You'll notice a few things from this -- namely, one pole is fully energized at a time (but
two others are "partially" energized). As each brush transitions from one commutator
contact to the next, one coil's field will rapidly collapse, as the next coil's field will
rapidly charge up (this occurs within a few microsecond). We'll see more about the
Page | 34
Andriod mobile controlled door security locking system by using TCP-IP
effects of this later, but in the meantime you can see that this is a direct result of the coil
windings' series wiring:
There's probably no better way to see how an average dc motor is put together,
than by just opening one up. Unfortunately this is tedious work, as well as requiring the
destruction of a perfectly good motor. This is a basic 3-pole dc motor, with 2 brushes
and three commutator contacts
3.12 H-BRIDGE
Page | 35
Andriod mobile controlled door security locking system by using TCP-IP
Basic Theory
H-bridge. Sometimes called a "full bridge" the H-bridge is so named because it has four
switching elements at the "corners" of the H and the motor forms the cross bar.
The key fact to note is that there are, in theory, four switching elements within the
bridge. These four elements are often called, high side left, high side right, low side
right, and low side left (when traversing in clockwise order).
The switches are turned on in pairs, either high left and lower right, or lower left and
high right, but never both switches on the same "side" of the bridge. If both switches
on one side of a bridge are turned on it creates a short circuit between the battery plus
and battery minus terminals. If the bridge is sufficiently powerful it will absorb that
Page | 36
Andriod mobile controlled door security locking system by using TCP-IP
load and your batteries will simply drain quickly. Usually however the switches in
question melt.
To power the motor, you turn on two switches that are diagonally opposed. In the
picture to the right, imagine that the high side left and low side right switches are turned
on.
The current flows and the motor begins to turn in a "positive" direction. Turn on the
high side right and low side left switches, then Current flows the other direction through
the motor and the motor turns in the opposite direction.
Actually it is just that simple, the tricky part comes in when you decide what to use for
switches. Anything that can carry a current will work, from four SPST switches, one
DPDT switch, relays, transistors, to enhancement mode power MOSFETs.
One more topic in the basic theory section, quadrants. If each switch can be controlled
independently then you can do some interesting things with the bridge, some folks call
such a bridge a "four quadrant device" (4QD get it?). If you built it out of a single DPDT
relay, you can really only control forward or reverse. You can build a small truth table
that tells you for each of the switch's states, what the bridge will do. As each switch has
one of two states, and there are four switches, there are 16 possible states. However,
since any state that turns both switches on one side on is "bad" (smoke issues forth: P),
there are in fact only four useful states (the four quadrants) where the transistors are
turned on.
High Side Left High Side Right Low Side Left Low Side Right Quadrant Description
Page | 37
Andriod mobile controlled door security locking system by using TCP-IP
The last two rows describe a maneuver where you "short circuit" the motor which
causes the motors generator effect to work against itself. The turning motor generates
a voltage which tries to force the motor to turn the opposite direction. This causes the
motor to rapidly stop spinning and is called "braking" on a lot of H-bridge designs.
Of course there is also the state where all the transistors are turned off. In this case the
motor coasts freely if it was spinning and does nothing if it was doing nothing.
Implementation
1. Using Relays:
Warning: Never turn on A and C or B and D at the same time. This will lead to
a short circuit of the battery and will lead to failure of the relays due to the large
current.
2. Using Transistors:
Page | 38
Andriod mobile controlled door security locking system by using TCP-IP
We can better control our motor by using transistors or Field Effect Transistors
(FETs). Most of what we have discussed about the relays H-Bridge is true of
these circuits. See the diagram showing how they are connected. You should
add diodes across the transistors to catch the back voltage that is generated by
the motor's coil when the power is switched on and off. This fly back voltage
can be many times higher than the supply voltage!
Warning: If you don't use diodes, you could burn out your transistors. Also the
same warning as in the diode case. Don't turn on A and C or B and D at the same
time.
Mosfets are much more efficient, they can provide much more current and not
get as hot. They usually have the fly back diodes built in so you don't need the
diodes anymore. This helps guard against fly back voltage frying your ICs.
Page | 39
Andriod mobile controlled door security locking system by using TCP-IP
It is important that the four quadrants of the H-Bridge circuits be turned on and
off properly. When there is a path between the positive and ground side of the
H-Bridge, other than through the motor, a condition exists called "shoot
through". This is basically a direct short of the power supply and can cause
semiconductors to become ballistic, in circuits with large currents flowing.
There are H-bridge chips available that are much easier, and safer, to use than
designing your own H-Bridge circuit.
The L293 has 2 H-Bridges (actually 4 Half H-Bridges), can provide about 1
amp to each and occasional peak loads to 2 amps.
The L298 has 2 h-bridges on board, can handle 1amp and peak current draws to
about 3amps. The LMD18200 has one h-bridge on board, can handle about 2 or
3 amps and can handle a peak of about 6 amps. There are several more
commercially designed H-Bridge chips as well.
INPUT OUTPUT
A Y
L L
H H
So you just give a High level when you want to turn the Half H-Bridge on and
Low level when you want to turn it off. When the Half H-Bridge is on, the
voltage at the output is equal to Vcc2.If you want to make a Full H-Bridge, you
connect the motor (or the load) between the outputs of two Half H-Bridges and
the inputs will be the two inputs of the Half H-Bridges.
Page | 40
Andriod mobile controlled door security locking system by using TCP-IP
L H L H Forward Running
H L H L Backward Running
Page | 41
Andriod mobile controlled door security locking system by using TCP-IP
CHAPTER 4
SOFTWARE DESCRIPTION
4.3 EMBEDDED C:
The programming Language used here in this project is an Embedded C
Language. This Embedded C Language is different from the generic C language in few
things like
a) Data types
b) Access over the architecture addresses.
Page | 42
Andriod mobile controlled door security locking system by using TCP-IP
The Embedded C Programming Language forms the user friendly language with access
over Port addresses, SFR Register addresses etc.
Embedded C Data types:
Data Types Size in Bits Data Range/Usage
Page | 43
Andriod mobile controlled door security locking system by using TCP-IP
project contains enough information to take a set of source files and generate exactly
the binary code required for the application. Because of the high degree of flexibility
required from the tools, there are many options that can be set to configure the tools to
operate in a specific manner. It would be tedious to have to set these options up every
time the application is being built; therefore they are stored in a project file. Loading
the project file into KEIL informs KEIL which source files are required, where they
are, and how to configure the tools in the correct way. KEIL can then execute each tool
with the correct options. It is also possible to create new projects in KEIL. Source files
are added to the project and the tool options are set as required. The project can then be
saved to preserve the settings. The project is reloaded and the simulator or debugger
started, all the desired windows are opened. KEIL project files have the extension
4.4.2 Simulator/Debugger:
The simulator/ debugger in KEIL can perform a very detailed simulation of a
micro controller along with external signals. It is possible to view the precise execution
time of a single assembly instruction, or a single line of C code, all the way up to the
entire application, simply by entering the crystal frequency. A window can be opened
for each peripheral on the device, showing the state of the peripheral. This enables quick
trouble shooting of mis-configured peripherals. Breakpoints may be set on either
assembly instructions or lines of C code, and execution may be stepped through one
instruction or C line at a time. The contents of all the memory areas may be viewed
along with ability to find specific variables. In addition the registers may be viewed
allowing a detailed view of what the microcontroller is doing at any point in time.
Page | 44
Andriod mobile controlled door security locking system by using TCP-IP
Page | 45
Andriod mobile controlled door security locking system by using TCP-IP
5.Save the Project by typing suitable project name with no extension in u r own
folder sited in either C:\ or D:\
Page | 46
Andriod mobile controlled door security locking system by using TCP-IP
Page | 47
Andriod mobile controlled door security locking system by using TCP-IP
Page | 48
Andriod mobile controlled door security locking system by using TCP-IP
Page | 49
Andriod mobile controlled door security locking system by using TCP-IP
Page | 50
Andriod mobile controlled door security locking system by using TCP-IP
15.Click on the file option from menu bar and select “new”
Page | 51
Andriod mobile controlled door security locking system by using TCP-IP
16.The next screen will be as shown in next page, and just maximize it by double
clicking on its blue boarder.
Page | 52
Andriod mobile controlled door security locking system by using TCP-IP
Page | 53
Andriod mobile controlled door security locking system by using TCP-IP
19.Now right click on Source group 1 and click on “Add files to Group Source”
Page | 54
Andriod mobile controlled door security locking system by using TCP-IP
20.Now you will get another window, on which by default “C” files will appear
Page | 55
Andriod mobile controlled door security locking system by using TCP-IP
21.Now select as per your file extension given while saving the file
22.Click only one time on option “ADD”
23.Now Press function key F7 to compile. Any error will appear if so happen.
Page | 56
Andriod mobile controlled door security locking system by using TCP-IP
Page | 57
Andriod mobile controlled door security locking system by using TCP-IP
27.Now Click on the Peripherals from menu bar, and check your required port as
shown in fig below
Page | 58
Andriod mobile controlled door security locking system by using TCP-IP
Page | 59
Andriod mobile controlled door security locking system by using TCP-IP
Flash Magic is a PC tool for programming flash based microcontrollers from NXP
using a serial or Ethernet protocol while in the target hardware. The figures below show
how the baud rate is selected for the microcontroller, how are the registers erased before
the device is programmed.
Page | 60
Andriod mobile controlled door security locking system by using TCP-IP
Page | 61
Andriod mobile controlled door security locking system by using TCP-IP
If dumping process of the hex file is completed, then the controller will work as per
our requirement
Page | 62
Andriod mobile controlled door security locking system by using TCP-IP
CHAPTER 5
RESULTS
DESCRIPTION:
Page | 63
Andriod mobile controlled door security locking system by using TCP-IP
6.CONCLUSION
Integrating features of all the hardware components used have developed it.
Presence of every module has been reasoned out and placed carefully thus contributing
to the best working of the unit.
Secondly, using highly advanced IC’s and with the help of growing technology
the project has been successfully implemented.
Page | 64
Andriod mobile controlled door security locking system by using TCP-IP
REFERENCES
Books
[1]. ARM7TDMI datasheet ARM
Domonic Symes,
Websites
[1]. http://www.arm.com
[2]. http://www.philips.com
[3]. http://www.lpc2000.com
[4]. http://www.semiconductors.philips.com/
[5]. http://ieeexplore.ieee.org
[6]. http://ww.hitex.co.uk
[7]. http://www.keil.co.uk
[8]. http://www.ucos-ii.com
[9]. http://www.ristancase.com
Page | 65
Andriod mobile controlled door security locking system by using TCP-IP
[11]. http://www.knox.com
Page | 66