Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
INTRODUCTION
CHAPTER 1
INTRODUCTION
1.1 Introduction:
In the existing system, only zigbee is used as a wireless communication device
to transmit the sensed data to the control room through commercial platform Zigbee.
Zigbee wireless technology includes short range, low band widths and low data speed
transmission to the control room. So, zigbee can transmit the sensed data in short
range only.
The application of WSN/Zigbee is growing popularity and how to connect
WSN/Zigbee to the present standard network seamlessly is an issue what is worth
studying. In this paper, it designs and realizes a Zigbee Wi-Fi wireless gateway based
on ARM9 and embedded Wi-Fi module. In Zigbee network, wireless gateway as a
sink, it receives data from sensor nodes and interacts with them. In WLAN, wireless
gateway communicates with PC or network servers by means of AP.
Zigbee is a specification based on the IEEE 802.15.4 standard for wireless
personal area networks (WPANs). Zigbee operates in the ISM radio bands, and it
defines a general-purpose, inexpensive, self-organizing, mesh network for industrial
control, embedded sensing, medical data collection, smoke and intruder warning,
building automation and home automation, etc.
The standard for (IEEE 802.11) wireless local area networks (WLANs). Its like
a common language that all the devices use to communicate to each other. If you have
a standard, people can make all sorts of devices that can work with each other.
A wireless sensor network (WSN) consists of a number of distributed devices
using sensors to cooperatively monitor physical or environmental conditions, such as
temperature, sound, vibration or pressure at different locations. ZigBee is a new
IEEE802.15.4 standards-based, short distance, low-data rate and low-power
consumption wireless communication technology. Moreover, ZigBee specification has
better compatibility between versions from earliest Zigbee 1.0, Zigbee 1.1 to Zigbee
2007/PRO. With the constantly improving and maturing of Zigbee technology, it is
widely used in WSN. Wi-Fi is a most successful wireless local area network (WLAN)
system that builds upon the IEEE 802.11 standards. With the rapid development of Wi-
Fi in recent years, infrastructure facilities have been improved. Whats more, the
coverage of wireless access points (AP) has already been very wide and the price is
cheap. Usually, the bandwidth of WLAN is higher than the bandwidth of other types of
internet connection such as ADSL, GPRS and 3G and the transmission delay of
WLAN is less than theirs.
In this project, a small in size, low-power, low-price and lightweight Zigbee
Wi-Fi wireless gateway is introduced. It contains two functions. For one thing, in
wireless sensor network based on Zigbee (it is called Zigbee network for short),
terminal sensor nodes and route sensor nodes are responsible for collecting and
processing data. They will employ Zigbee technology to communicate with wireless
gateway. The wireless gateway encapsulates the data that received from ZigBee
network according to a certain format and transmits them to Wi-Fi module. For
another, Wi-Fi module sends data to monitoring software on PC by means of AP. In
addition, the Wi-Fi module sends commands from PC to Zigbee network.
1.1.1 Proposed System:
In the proposed system, the application of WSN/Zigbee is growing popularity
and how to connect WSN/Zigbee to the present standard network seamlessly is an
issue what is worth studying. It designs and realizes a Zigbee Wi-Fi wireless gateway
based on RF chip and embedded Wi-Fi module. In Zigbee network, wireless gateway
as a sink, it receives data from sensor nodes and interacts with them. In WLAN,
wireless gateway communicates with PC or network servers by means of AP. Both the
hardware scheme and software scheme of the wireless gateway are introduced. Then
the performance of the wireless gateway is tested, and the result shows that it can be
used for general purposes and the performance is stable. The wireless gateway can
realize communication effectively between Zigbee network and WLAN.
If any equipment breaks down in any location it can be figured out
immediately. The temperature sensor information can be used to monitor the
atmosphere of the machinery. This reduces the need of maintenance staff on the
premises. Monitoring is everywhere, from weather stations and power meters to
industrial systems, to help reduce cost, improve productivity, and even save lives. It
is
different
from
typical
measurement
applications
because
monitoring
Figure: 1.1 The communication model between Zigbee network and WLAN
1.2 Literature Survey:
In 2005 about 98% of the more than one billion mobile phones sold each year used
at least one ARM processor. As of 2009 ARM processors accounted for approximately 90%
of all embedded 32-bit RISC processors and were used extensively in consumer electronics,
including personal digital assistants (PDAs), tablets, mobile phones, digital media and
music players, hand-held game consoles, calculators and computer peripherals such as hard
drives and routers.
1.2.1 Zigbee:
Zigbee is a specification for a suite of high level communication protocols using
small, low-power digital radios based on an IEEE 802 standard for personal area networks.
Zigbee devices are often used in mesh network form to transmit data over longer distances,
passing data through intermediate devices to reach more distant ones. This allows Zigbee
networks to be formed ad-hoc, with no centralized control or high-power transmitter/
receiver able to reach all of the devices. Any Zigbee device can be tasked with running the
network.
Zigbee is targeted at applications that require a low data rate, long battery life, and
secure networking. Zigbee has a defined rate of 250 Kbit/s, best suited for periodic or
intermittent data or a single signal transmission from a sensor or input device. Applications
include wireless light switches, electrical meters with in-home-displays, traffic
5
management systems, and other consumer and industrial equipment that requires shortrange wireless transfer of data at relatively low rates. The technology defined by the Zigbee
specification is intended to be simpler and less expensive than other WPANs, such as
Bluetooth.
1.2.2 Wi-Fi :
Wi-Fi is short for Wireless Fidelity. Wi-Fi is a wireless networking technology that
allows computers, some mobile phones, iPads, game consoles, and other devices to
communicate over a wireless signal. The same way a radio can tune into a radio station
signal over the airwaves, your device can pick up a signal that connects it to the internet,
thru the air. As a matter of fact, a Wi-Fi signal is a high-frequency radio signal.
And just the same way that the frequency of a radio station is regulated, the
standards for Wi-Fi are regulated. All the electronic components that make up a wireless
network (your device, the router, etc) are based on one of the 802.11 standards that were set
by the IEEE (Institute of Electrical and Electronics Engineers) and the Wi-Fi Alliance.
The Wi-Fi alliances were the people who trademarked the name Wi-Fi and
promoted the technology. The technology is also referred to as WLAN short for wireless
local area network, however, Wi-Fi has definitely become the more popular expression.
The history of the 802.11 standard (the radio frequency) used for broadcasting a Wi-Fi
signal. Secondly, we have to look at the electronic equipment involved in sending and
receiving a Wi-Fi signal, and not surprisingly there are many patents connected with Wi-Fi
technology, however, one important patent stands out.
Vic Hayes has been called the "father of Wi-Fi" because he chaired the IEEE
committee that created the 802.11 standard in 1997. Before the public even heard of Wi-Fi,
Vic Hayes established the standards that would make Wi-Fi feasible.
The 802.11 standard was established in 1997. Subsequently, improvements to the
network bandwidth were added to the 802.11 standard.
That's what the appended letters represent: 802.11a, 802.11b, 802.11g, 802.11n, and
more. As a consumer, you should know that the latest version is the best version in terms of
performance and is the version you would want all your new equipment to be compatible
with.
1.2.3 Gateway:
In a communications network, a network node equipped for interfacing with
another network that uses different protocols. A gateway may contain devices such as
protocol translators, impedance matching devices, rate converters, fault isolators, or signal
translators as necessary to provide system interoperability.
It also requires the establishment of mutually acceptable administrative procedures
between both networks. A protocol translation/mapping gateway interconnects networks
with different network protocol technologies by performing the required protocol
conversions. Loosely, a computer or computer program configured to perform the tasks of a
gateway. For a specific case, see default gateway. Gateways, also called protocol
converters, can operate at any network layer. The activities of a gateway are more complex
than that of the router or switch as it communicates using more than one protocol.
A gateway is a network point that acts as an entrance to another network. On the
Internet, a node or stopping point node or a host (end-point) node. Both the computers of
Internet users and the computers that serve pages to users are host nodes, while the nodes
that connect the networks in between are gateways. For example, the computers that
control traffic between company networks or the computers used by internet service
providers (ISPs) to connect users to the internet are gateway nodes.
In the network for an enterprise, a computer server acting as a gateway node is
often also acting as a proxy server and a firewall server. A gateway is often associated with
both a router, which knows where to direct a given packet of data that arrives at the
gateway, and a switch, which furnishes the actual path in and out of the gateway for a given
packet. On an IP network, clients should automatically send IP packets with a destination
outside a given subnet mask to a network gateway.
A subnet mask defines the IP range of a private network. For example, if a private
network has a base IP address of 192.168.0.0 and has a subnet mask of 255.255.255.0, then
any data going to an IP address outside of 192.168.0.X will be sent to that network's
gateway. While forwarding an IP packet to another network, the gateway might or might
not perform Network Address Translation.
A gateway is an essential feature of most routers, although other devices (such as
any PC or server) can function as a gateway. A gateway may contain devices such as
protocol translators, impedance matching devices, rate converters, fault isolators, or signal
translators as necessary to provide system interoperability. It also requires the
establishment of mutually acceptable administrative procedures between both networks.
CHAPTER 2
HARDWARE DESCRIPTION
CHAPTER 2
HARDWARE DESCRIPTION
2.1 Block Diagram
This project consists of two sections. They are transmitter and ARM9 receiver
section. The block diagrams of these sections are given below.
REGULATED
POWER SUPPLY
LDR
Zigbee
Transmitter
AT89S5
2
ADC
TEMPERATUR
E SENSOR
GAS
SENSO
R
10
temperature sensor, LDR and gas sensor. In this way, the output of the light, gas and
temperature sensors is given as an input to the microcontroller. The measured values sent
wirelessly through the X-bee transmitter to the controlling station. At the controlling
station, we will have X-bee receiver by using which the parameters measured at the remote
location is received and given as an input to the MINI 2440 board by using serial port. The
measured values of temperature, gas alert and the light intensity will be send from the
controlling station to anywhere by using the technology like Ethernet with a speed of
100Mbps the Ethernet technology. From the remote locations, also we can monitor the
parameters that are present at the lab.
WIFI ROUTER
S3C244
0
(ARM9)
COM1
ZIGBEE Receiver
11
the required intensity of the light is not present through our we can activate a bulb and we
can supply required intensity of the light for the lab
In this way we can monitor the parameters that are present at the lab which at
remote area and even we can control the parameters from the remote locations. In this way,
we can go for lab remote monitoring and controlling with less power consumption.
2.2 ARM Processor Overview
The ARM (Acorn RISC Machine) architecture is developed at Acorn Computer
12
Profiles are allowed to subset the architecture. For example the ARMv7-M profile
used by the Cortex-M3 core is notable in that it supports only the Thumb-2 instruction set,
and the ARMv6-M profile (used by the Cortex-M0) is a subset of the ARMv7-M profile
(supporting fewer instructions).
To keep the design clean, simple and fast, the original ARM implementation was
hardwired without microcode, like the much simpler 8-bit 6502 processor used in prior
Acorn microcomputers. 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.
The ARM architecture includes the following RISC features:
Load/store architecture.
No support for misaligned memory accesses (now supported in ARMv6 cores, with
some exceptions related to load/store multiple word instructions).
Fixed instruction width of 32 bits to ease decoding and pipelining, at the cost of
decreased code density. Later, "the Thumb instruction set" increased code density.
Instruction cache, data cache, writes buffer and Physical address TAG RAM to reduce
the effect of main memory bandwidth and latency on Performance.
13
Eight memory banks: Six memory banks for ROM, SRAM, and others.
Supports various types of ROM for booting (NOR/NAND Flash, EEPROM, and
others).
Cache Memory.
8words length per line with one valid bit and two dirty bits per line.
The write buffer can hold 16 words of data and four addresses.
On-chip MPLL and UPLL: UPLL generates the clock to operate USB.
14
Sleep mode: The Core power including all peripherals is shut down.
Interrupt Controller.
60 Interrupt sources (One Watch dog timer, 5 timers, 9 UARTs, 24 external interrupts, 4
DMA, 2 RTC, 2 ADC, 1 IIC, 2 SPI, 1 SDI, 2 USB, 1 LCD, 1 Battery Fault, 1 NAND
and 2 Camera), 1 AC97.
On-chip MPLL and UPLL: UPLL generates the clock to operate USB.
Supports Fast Interrupt request (FIQ) for very urgent interrupt request.
4-ch 16-bit Timer with PWM / 1-ch 16-bit internal timer with DMA-based or interruptbased operation.
Dead-zone generation.
I/O: 3.3V.
Operating Frequency.
15
Fclk Up to 400MHz
Hclk Up to 136MHz
Pclk Up to 68MHz
Package
289-FPGA
16
principles, and the instruction set and related decode mechanism are much simpler than
those of micro programmed Complex Instruction Set Computers (CISC).
Pipeline techniques are employed so that all parts of the processing and memory
systems can operate continuously. Typically, while one instruction is being executed, its
successor is being decoded, and a third instruction is being fetched from memory. The
ARM9 processor also employs a unique architectural strategy known as Thumb, which
makes it ideally suited to high-volume applications with memory restrictions, or
applications where code density is an issue.
The Thumb sets 16-bit instruction length allows it to approach twice the density of
standard ARM code while retaining most of the ARMs performance advantage over a
traditional 16-bit processor using 16-bit registers. This is possible because Thumb code
operates on the same 32-bit register set as ARM code. Thumb code is able to provide up to
17
65% of the code size of ARM, and 160% of the performance of an equivalent ARM
processor connected to a 16-bit memory system.
On-Chip Static RAM:
On-chip static RAM may be used for code and/or data storage. The SRAM may be
accessed as 8-bit, 16-bit, and 32-bit. The LPC2148 provide 32 KB of static RAM. In case
of LPC2148 only, an 8 KB SRAM block intended to be utilized mainly by the USB can
also be used as a general purpose RAM for data storage and code storage and execution.
On-Chip Flash Program memory:
The LPC2148 incorporate a 512 KB flash memory system. This memory may be
used for both code and data storage. Programming of the flash memory may be
accomplished in several ways. It may be programmed In System via the serial port. The
application program may also erase and/or program the flash while the application is
running, allowing a great degree of flexibility for data storage field firmware upgrades, etc.
Due to the architectural solution chosen for an on-chip boot loader, flash memory available
for users code on LPC2148 is 500 KB. The flash memory provides a minimum of 100000
erase/write cycles and 20 years of data-retention.
Interrupt Sources:
Each peripheral device has one interrupt line connected to the Vectored Interrupt
Controller, but may have several internal interrupt flags. Individual interrupt flags may also
represent more than one interrupt source.
Interrupt controller:
The Vectored Interrupt Controller (VIC) accepts all of the interrupt request inputs
and categorizes them as Fast Interrupt Request (FIQ), vectored Interrupt Request (IRQ),
and non-vectored IRQ as defined by programmable settings. The programmable
assignment scheme means that priorities of interrupts from the various peripherals can be
dynamically assigned and adjusted. Fast interrupt request (FIQ) has the highest priority.
Vectored IRQs have the middle priority. Non-vectored IRQs have the lowest priority.
Pin Connect Block:
The pin connect block allows selected pins of the microcontroller to have more than
one function. Configuration registers control the multiplexers to allow connection between
the pin and the on chip peripherals. Peripherals should be connected to the appropriate pins
18
prior to being activated, and prior to any related interrupt(s) being enabled. Activity of any
enabled peripheral function that is not mapped to a related pin should be considered
defined. The Pin Control Module with its pin select registers defines the functionality of the
microcontroller in a given hardware environment.
10 bit ADC:
It contains two analog to digital converters. These converters are single 10-bit
successive approximation analog to digital converters. While ADC0 has six channels,
ADC1 has eight channels. Therefore, total number of available ADC inputs for ARM9 is
14.
10 bit DAC:
The DAC enables to generate a variable analog output. The maximum DAC output
voltage is the VREF voltage.
Fast General purpose Parallel I/O:
Device pins that are not connected to a specific peripheral function are controlled
by the GPIO registers. Pins may be dynamically configured as inputs or outputs. Separate
registers allow the setting or clearing of any number of outputs simultaneously. The value
of the output register may be read back, as well as the current state of the port pins.
LPC2148 introduces accelerated GPIO functions over prior LPC2000 devices:
GPIO registers are relocated to the ARM local bus for the fastest possible I/O
timing.
Mask registers allow treating sets of port bits as a group, leaving other bits
unchanged.
Bit-level set and clear registers allow a single instruction to set or clear any number
of bits in one port.
19
unplugging, and dynamic configuration of the devices. All transactions are initiated by the
host controller.
The LPC2148 is equipped with a USB device controller that enables 12 Mbits/s
data exchange with a USB host controller. It consists of a register interface, serial interface
engine, endpoint buffer memory and DMA controller. The serial interface engine decodes
the USB data stream and writes data to the appropriate end point buffer memory. The status
of a completed USB transfer or error condition is indicated via status registers. An interrupt
is also generated if enabled. A DMA controller can transfer data between an endpoint buffer
and the USB RAM.
I2C Bus Serial I/O Controller:
It contains two I2C-bus controllers. The I2C-bus is bidirectional, for inter-IC
control using only two wires: a serial clock line (SCL), and a serial data line (SDA). Each
device is recognized by a unique address and can operate as either a receiver-only device or
a transmitter with the capability to both receive and send information. Transmitters and/or
receivers can operate in either master or slave mode, depending on whether the chip has to
initiate a data transfer or is only addressed. The I2C-bus is a multi-master bus; it can be
controlled by more than one bus master connected to it. The I2C-bus supports bit rates up
to 400 Kbit/s (Fast I2C-bus).
UARTs:
The LPC2148 contains two UARTs. In addition to standard transmit and receive
data lines, the LPC2148 UART1 also provide a full modem control handshake interface.
Compared to previous LPC2000 microcontrollers, UARTs in LPC2148 introduce a
fractional baud rate generator for both UARTs, enabling these microcontrollers to achieve
standard baud rates such as 115200 with any crystal frequency above 2MHz. In addition,
auto-CTS/RTS flow-control functions are fully implemented in hardware.
SPI Serial I/O Controller:
The single SPI is a full duplex serial interface, designed to handle multiple masters
and slaves connected to a given bus. Only a single master and a single slave can
communicate on the interface during a given data transfer. During a data transfer the master
always sends a byte of data to the slave, and the slave always sends a byte of data to the
master.
20
21
count cycles of the peripheral clock (PCLK) and optionally generate interrupts or perform
other actions when specified timer values occur, based on seven match registers. The PWM
function is also based on match register events.
The ability to separately control rising and falling edge locations allows the PWM
to be used for more applications. For instance, multi-phase motor control typically requires
three non-overlapping PWM outputs with individual control of all three pulse widths and
positions.
PLL (Phase Locked Loop):
The PLL accepts an input clock frequency in the range of 10 MHz to 25MHz. The
input frequency is multiplied up into the range of 10 MHz to 60 MHz with a Current
Controlled Oscillator (CCO). The multiplier can be an integer value from 1 to 32 (in
practice, the multiplier value cannot be higher than 6 on this family of microcontrollers due
to the upper frequency limit of the CPU).
The CCO operates in the range of 156 MHz to 320 MHz, so there is an additional
divider in the loop to keep the CCO within its frequency range while the PLL is providing
the desired output frequency. The output divider may be set to divide by 2, 4, 8, or 16 to
produce the output clock. Since the minimum output divider value is 2, it is insured that the
PLL output has a 50 % duty cycle. The PLL is turned off and bypassed following a chip
reset and may be enabled by software. The program must configure and activate the PLL,
wait for the PLL to Lock, then connect to the PLL as a clock source. The PLL settling time
is 100ms.
Crystal Oscillator:
On-chip integrated oscillator operates with external crystal in range of 1MHz to
25MHz. The oscillator output frequency is called f osc and the ARM processor clock
frequency is referred to as CCLK for purposes of rate equations, etc. f osc and CCLK have
the same value unless the PLL is running and connected.
Reset and Wake up Timer:
Reset has two sources on the ARM9: the RESET pin and watchdog reset. The
RESET pin is a Schmitt trigger input pin with an additional glitch filter. Assertion of chip
reset by any source starts the Wake-up Timer, causing the internal chip reset to remain
22
asserted until the external reset is de-asserted, the oscillator is running, a fixed number of
clocks have passed, and the on-chip flash controller has completed its initialization.
External Interrupt Inputs:
It include up to nine edge or level sensitive External Interrupt Inputs as selectable
pin functions. When the pins are combined, external events can be processed as four
independent interrupt signals. The External Interrupt Inputs can optionally be used to wakeup the processor from Power-down mode. Additionally capture input pins can also be used
as external interrupts without the option to wake the device up from Power-down mode.
Brown Out Detector:
It includes 2-stage monitoring of the voltage on the VDD pins. If this voltage falls
below 2.9 V, the BOD asserts an interrupt signal to the VIC. This signal can be enabled for
interrupt; if not, software can monitor the signal by reading dedicated register. The second
stage of low voltage detection asserts reset to inactivate the ARM9 when the voltage on the
VDD pins falls below 2.6 V.
This reset prevents alteration of the flash as operation of the various elements of the
chip would otherwise become unreliable due to low voltage. The BOD circuit maintains
this reset down below 1 V, at which point the POR circuitry maintains the overall reset.
Both the 2.9 V and 2.6 V thresholds include some hysteresis. In normal operation, this
hysteresis allows the 2.9V detection to reliably interrupt, or a regularly executed event loop
to sense the condition.
Memory Mapping Control:
The Memory Mapping Control alters the mapping of the interrupt vectors that
appear beginning at address 0x0000 0000. Vectors may be mapped to the bottom of the onchip flash memory, or to the on-chip static RAM. This allows code running in different
memory spaces to have control of the interrupts.
Power Control:
It supports two reduced power modes: Idle mode and Power-down mode. In Idle
mode, execution of instructions is suspended until either a reset or interrupt occurs.
Peripheral functions continue operation during idle mode and may generate interrupts to
cause the processor to resume execution. Idle mode eliminates power used by the processor
itself, memory systems and related controllers and internal buses.
23
In Power-down mode, the oscillator is shut down and the chip receives no internal
clocks. The processor state and registers, peripheral registers, and internal SRAM values
are preserved throughout Power-down mode and the logic levels of chip output pins remain
static.
The Power-down mode can be terminated and normal operation resumed by either a
reset or certain specific interrupts that are able to function without clocks. Since all
dynamic operation of the chip is suspended, Power-down mode reduces chip power
consumption to nearly zero.
Emulation and Debugging:
It supports emulation and debugging via a JTAG serial port. A trace port allows
tracing program execution. Debugging and trace functions are multiplexed only with
GPIOs on Port 1. This means that all communication, timer and interface peripherals
residing on Port0 are available during the development and debugging phase as they are
when the application is run in the embedded system.
VPB Bus:
The VPB (VLSI Peripheral Bus) divider determines the relationship between the
processor clock (CCLK) and the clock used by peripheral devices (PCLK). The VPB
divider serves two purposes. The first is to provide peripherals with the desired PCLK via
VPB bus so that they can operate at the speed chosen for the ARM processor.
Embedded ICE:
Standard ARM Embedded ICE logic provides on-chip debug support. The
debugging of the target system requires a host computer running the debugger software and
an Embedded ICE protocol converter. Embedded ICE protocol converter converts the
remote debug protocol commands to the JTAG data needed to access the ARM core.
Real Monitor:
Real Monitor is a configurable software module, developed by ARM Inc., which
enables real-time debug. It is a lightweight debug monitor that runs in the background
while users debug their foreground application. It communicates with the host using the
DCC, which is present in the Embedded ICE logic. The LPC2148 contains a specific
configuration of Real Monitor software programmed into the on-chip flash memory.
Embedded Trace:
24
Since the LPC2148 have significant amounts of on-chip memory, it is not possible
to determine how the processor core is operating simply by observing the external pins.
The Embedded Trace Macro cell (ETM) provides real-time trace capability for deeply
embedded processor cores. It outputs information about processor execution to the trace
port.
2.4.1 Pipeline
In ARM 7, A 3 stage pipeline is used. The stages being fetch, decode, and execute.
A three stage pipeline is the simplest form of pipeline that does not suffer from the
problems such as read before write. In a pipeline, when one instruction is executed, second
instruction is decoded and third instruction will be fetched. This is executed in a single
cycle.
2.4.2 Processor Modes
The ARM has six operating modes as discussed below.
25
Depending upon application R13 and R14 can also be used as GPR.
CPSR contains a number of flags which report and control the operation of ARM7 CPU.
30
29
28
I F T M M M M M
N Z C V
4
Fig 2.6 32-bit CPSR Register
Conditional Code Flags
N - Negative Result from ALU
26
27
processor designed by Advanced RISC Machines, Ltd. The ARM920T implements MMU,
AMBA BUS, and Harvard cache architecture with separate 16KB instruction and 16KB
data caches, each with an 8-word line length. By providing a complete set of common
system peripherals, the S3C2440A minimizes overall system costs and eliminates the need
to configure additional components.
DMA.
4-ch DMA controllers with external request pins.
3-ch UARTs (IrDA1.0, 64-Byte Tx FIFO, and 64-Byte Rx FIFO).
2-ch SPI.
28
2.5.1Applications:
Applications running on Open OS
Symbian OS
Linux, Palm OS
WinCE
High performance wireless applications:
Smart phones
PDAs
Networking applications
Digital set top boxes
Automotive control solutions
Audio and video encoding and decoding
Benefits:
Benefits when we are using ARM9
ARM9.
High performance allows system designers to integrate more functionality into price
29
LCD controller (up to 4K color STN and 256K color TFT) with 1-ch LCD dedicated to
DMA. Camera interface supporting up to 4096x4096 (supports ITU601/ ITU656 input
format).
SD Host interface version 1.0 & Multi-Media Card Protocol version 2.11 compatible.
30
31
functionality while waiting for an event such as a button press or interrupt. Power
consumption while sleeping (CPU clock and peripherals disabled) may be just nano watts,
making them ideal for low power and long lasting battery applications.
Micro controllers are used in automatically controlled products and devices, such as
automobile engine control systems, remote controls, office machines, appliances, power
tools, and toys. By reducing the size, cost, and power consumption compared to a design
using a separate microprocessor, memory, and input/output devices, micro controllers make
it economical to electronically control many more processes.
2.6.1 The Major Features of 89S52 Microcontroller
The 89S52 architecture consists of these specific features:
32
Port 0: Port 0 is an 8-bit open drain bi-directional port. As an open drain output
port, it can sink eight LS TTL loads. Port 0 pins that have 1s written to them float, and in
that state will function as high impedance inputs. Port 0 is also the multiplexed low-order
address and data bus during accesses to external memory. In this application it uses strong
internal pull-ups when emitting 1s. Port 0 emits code bytes during program verification. In
this application, external pull-ups are required.
Port 1: Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. Port 1 pins
that have 1s written to them are pulled high by the internal pull-ups, and in that state can be
used as inputs. As inputs, port 1 pins that are externally being pulled low will source
current because of the internal pull-ups.
Port 2: Port 2 is an 8-bit bi-directional I/O port with internal pull-ups. Port 2 emits
the high-order address byte during accesses to external memory that use 16-bit addresses.
In this application, it uses the strong internal pull-ups when emitting 1s.
Port 3: Port 3 is an 8-bit bi-directional I/O port with internal pull-ups. It also serves
the functions of various special features of the 89S52 Family as follows:
Port Pin Alternate Function
P3.0 RxD (serial input port)
P3.1 TxD (serial output port)
P3.2 INT0 (external interrupt 0)
P3.3 INT1 (external interrupt 1)
P3.4 T0 (timer 0 external input)
P3.5 T1 (timer 1 external input)
P3.6 WR (external data memory write strobe)
P3.7 RD (external data memory read strobe)
33
The 89S52 instruction set is optimized for 8-bit control applications. It provides a
variety of fast addressing modes for accessing the internal RAM to facilitate byte
operations on small data structures. The instruction set provides extensive support for onebit variables as a separate data type, allowing direct bit manipulation in control and logic
systems that require Boolean processing.
34
The ratio of the number of turns on each coil, called the turns ratio, determines the
ratio of the voltages.
35
Rectifier:
A rectifier is an electrical device that converts alternating current to direct current, a
process known as rectification. Full-wave rectification converts both polarities of the input
waveform to DC (direct current), and is more efficient. Here in our project for full wave
rectification we use bridge rectifier. From the basic bridge configuration we see that two
diodes(say D2 & D3) are conducting while the other two diodes (D1 & D4) are in off state
during the period t = 0 to T/2.Accordingly for the negative cycle of the input the
conducting diodes are D1 & D4 .Thus the polarity across the load is the same.
In the bridge rectifier the diodes may be of variable types like 1N4001, 1N4003,
1N4004, 1N4005, IN4007 etc can be used. But here we use 1N4007, because it can
withstand up to 1000v.
Filter:
The filtered waveform is essentially a dc voltage with negligible ripples & it is
ultimately fed to the load. 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 diagram shows the varying DC
(dotted line) and the smoothed DC (solid line).
The capacitor charges quickly near the peak of the varying DC, and then discharges
as it supplies current to the output.
36
The voltage regulator is a device, which maintains the output voltage constant
irrespective of the change in supply variations, load variations & temperature changes.
Here we use fixed voltage regulator namely LM7805. The IC LM7805 is a +5v regulator
1
4 -
+ 2
DB106
IN
OUT
U3
3
R1
GND
1
2
LM7805
330E
C1
2
9V I/P
C2
100uF/16V
470uF/25V
C3
0.1uF
D2
LED
37
2.7.1 Features
These are the following features for LM 35:
38
By introducing a measured gas into a gas collecting container of the CO 2 gas sensor
and carrying out electrolysis according to a potential sweep method or a pulse method with
the measured gas being in contact with the detecting section, a CO 2 gas concentration in the
measured gas can be measured based on an electrical current value obtained at the
detecting section and changes of the electrical current with elapse of time.
According to the CO2 gas sensor of the present invention, it is possible to accurately
carry out detection and measurement of the concentration of CO2 gas when CO2 gas is to be
detected or measured even in a gaseous atmosphere containing a relatively large amount of
hydrogen gas and CO2 gas.
The present invention relates to a CO gas sensor for measuring the concentration of
CO2 gas contained in a gaseous phase and to a method of measuring the concentration of
CO2 gas, and in particular relates to a CO 2 gas sensor for measuring the concentration of
CO2 gas in a gaseous atmosphere containing relatively high concentrations of hydrogen gas
and carbon dioxide gas, a fuel cell power generating apparatus equipped with such CO 2 gas
sensor.
2.9 Light Dependent Resistor
Light dependent resistors are used to re-charge a light during different changes in
the light, or they are made to turn a light on during certain changes in lights. One of the
most common uses for light dependent resistors is in traffic lights.
The light dependent resistor controls a built in heater inside the traffic light, and
causes it to recharge over night so that the light never dies. Other common places to find
light dependent resistors are in: infrared detectors, clocks and security alarms.
Identification:
A light dependent resistor is shaped like a quarter. They are small, and can be nearly
any size. Other names for light dependent resistors are: photoconductors, photo resistor, or
a CDS cell.
There are black lines on one side of the light dependent resistor. The overall color of
a light dependent resistor is gold. Usually other electrical components are attached to the
light dependent resistor by metal tubes soldered to the sides of the light dependent resistor.
39
Function:
The main purpose of a light dependent resistor is to change the brightness of a light
in different weather conditions. This can easily be explained with the use of a watch. Some
watches start to glow in the dark so that it is possible to see the time without having to
press any buttons. It is the light dependent resistor that allows the watch to know when it
has gotten dark, and change the emissions level of the light at that time. Traffic lights use
this principle as well but their lights have to be brighter in the day time.
Considerations:
Light dependent resistors have become very useful to the world. Without them
lights would have to be on all the time, or they would have to be manually adjusted. A light
dependent resistor saves money and time for any creation that needs a change in light.
Another feature of the light dependent resistor is that it can be programmed to turn on with
changes in movements. This is an extremely useful feature that many security systems
employ. Security would be harder without light dependent resistors.
Expert Insight:
It is possible to build a light dependent resistor into an existing light circuit. There
are many electrical plans that outline how to install one. Usually the sign for a light
dependent resistor on these plans is marked by a rectangle with two arrows pointing down
to it. This shows the placement of the light dependent resistor in the circuit so that it will
work properly. Usually only an electrician can build new circuits, however.
Benefits:
There are many great benefits to light dependent resistors. They allow less power to
be used in many different kinds of lights. They help lights last much longer. They can be
trigged by several different kinds of triggers, which is very useful for motion lights and
security systems. They are also very useful in watches and cars so that the lights can turn
on automatically when it becomes dark. There are a lot of things that light dependent
resistors.
2.10 Zigbee
In an industry during certain hazards is will be very difficult to monitor the
parameter through wires and analog devices such as transducers. To overcome this problem
we use wireless device to monitor the parameters so that we can take certain steps even in
40
worst case. Few years back the use of wireless device was very less, but due the rapid
development is technology now a days we use maximum of our data transfer through
wireless Wi-Fi, Bluetooth, Wi MAX, etc.
In view of all this things, the design of wireless parameter progress helps in an
industry to monitor the parameter in real time with the use of zigbee, is an easy installation
platform, cost effective method for the low bit rate transmission, so with the help of the
ready
41
networks. Every network must have one coordinator device, tasked with its creation, the
control of its parameters and basic maintenance. Within star networks, the coordinator must
be the central node.
Both trees and meshes allow the use of Zigbee routers to extend communication at
the network level (they are not Zigbee coordinators, but may act as 802.15.4 coordinators
within their personal operating space)
But they differ in a few important details are communication within trees is
hierarchical and optionally utilizes frame beacons, whereas meshes allow generic
communication structures but no router becoming.
42
43
Zigbee operates in the industrial, scientific and medical (ISM) radio bands are 868
MHz in Europe, 915 MHz in countries such as USA and Australia, and 2.4 GHz in most
jurisdictions worldwide. The technology is intended to be simpler and cheaper than other
WPANs such as Bluetooth. The most capable ZigBee node type is said to require only
about 10% of the software of a typical Bluetooth or Wireless Internet node, while the
simplest nodes are about 2% However, actual code sizes are much higher, closer to 50% of
Bluetooth code size Zigbee chip vendors have announced 128-kilobyte devices.
44
profiles like Automatic Meter Reading, Commercial building automation and home
automation based on the "cluster library principle".
Zigbee 2007, now the current stack release, is sometimes called "Pro", but pro is a
stack profile, which defines certain stack settings and mandatory features. ZigBee 2007 at
the network level is not backwards-compatible with ZigBee 2004/2006, although a ZigBee
2004/2006 RFD node can join a 2007 network, and vice-versa. It's not possible to mix
2004/2006 routers with 2007 routers/coordinator.
2.10.3 Network Layer:
The main functions of the network layer are to enable the correct use of the MAC
sub layer and provide a suitable interface for use by the next upper layer, namely the
application layer. Its capabilities and structure are those typically associated to such
network layers, including routing. On the one hand, the data entity creates and manages
network layer data units from the payload of the application layer and performs routing
according to the current topology.
On the other hand, there is the layer control, which is used to handle configuration
of new devices and establish new networks. It can determine whether a neighboring device
belongs to the network and discovers new neighbors and routers. The control can also
detect the presence of a receiver, which allows direct communication and MAC
synchronization.
2.10.4 Application Layer:
The application layer is the highest-level layer defined by the specification, and is
the effective interface of the Zigbee system to its end users. It comprises the majority of
components added by the Zigbee specification are
procedures, together with application objects defined by the manufacturer, are considered
part of this layer.
2.10.5 Main Components
The ZDO is responsible for defining the role of a device as either coordinator or end
device, as mentioned above, but also for the discovery of new (one-hop) devices on the
network and the identification of their offered services. It may then go on to establish
secure links with external devices and reply to binding requests accordingly.
45
The application support sub layer (APS) is the other main standard component of
the layer, and as such it offers a well-defined interface and control services. It works as a
bridge between the network layer and the other components of the application layer.
It keeps up-to-date binding tables in the form of a database, which can be used to
find appropriate devices depending on the services that are needed and those the different
devices offer. As the union between both specified layers, it also routes messages across the
layers of the protocol stack.
2.10.6 Communication Models
An application may consist of communicating objects which cooperate to carry out
the desired tasks. The focus of ZigBee is to distribute work among many different devices
which reside within individual ZigBee nodes which in turn form a network (said work will
typically be largely local to each device, for instance the control of each individual
household appliance).
The collections of objects that form the network communicate using the facilities
provided by APS, supervised by ZDO interfaces. The application layer data service follows
a typical request-confirm/indication-response structure.
Within a single device, up to 240 application objects can exist, numbered in the
range 1-240. 0 is reserved for the ZDO data interface and 255 for broadcast; the 241-254
range is not currently in use but may be in the future.
The ZigBee network model must take particular care of security considerations, as
ad hoc networks may be physically accessible to external devices and the particular
working environment cannot be foretold.
2.10.7 Communication and Device Discovery
In order for applications to communicate, their comprising devices must use a
common application protocol (types of messages, formats and so on). These sets of
conventions are grouped in profiles. Furthermore, binding is decided upon by matching
input and output cluster identifiers, unique within the context of a given profile and
associated to an incoming our outgoing data flow in a device. Binding tables contain source
and destination pairs.
Depending on the available information, device discovery may follow different
methods. When the network address is known, the IEEE address can be requested using
46
unicast communication. When it is not, petitions are broadcast (the IEEE address being part
of the response payload). End devices will simply respond with the requested address,
while a network coordinator or a router will also send the addresses of all the devices
associated with it.
This extended discovery protocol permits external devices to find out about devices
in a network and the services that they offer, which endpoints can report when queried by
the discovering device (which has previously obtained their addresses). Matching services
can also be used.
The use of cluster identifiers enforces the binding of complementary entities by
means of the binding tables, which are maintained by ZigBee coordinators, as the table
must be always available within a network and coordinators are most likely to have a
permanent power supply are backups may be needed by some applications, whose higherlevel layers must manage. Binding requires an established communication link are after it
exists, whether to add a new node to the network is decided, according to the application
and security policies.
Communication can happen right after the association. Direct addressing uses both
radio address and endpoint identifier, whereas indirect addressing requires every relevant
field (address, endpoint, cluster and attribute) and sends it to the network coordinator,
which maintains these associations and translates requests for communication. Indirect
addressing is particularly useful to keep some devices very simple and minimize their need
for storage. Besides these two methods, broadcast to all endpoints in a device is available,
and group addressing is used to communicate with groups of endpoints belonging to a set
of devices.
2.10.8 Security Services
As one of its defining features, Zigbee provides facilities for carrying out secure
communications, protecting establishment and transport of cryptographic keys, ciphering
frames and controlling devices. It builds on the basic security framework defined in IEEE
802.15.4. This part of the architecture relies on the correct management of symmetric keys
and the correct implementation of methods and security policies.
Basic Security Model:
47
48
Key distribution is one of the most important security functions of the network. A
secure network will designate one special device which other devices trust for the
distribution of security keys are the trust center. Ideally, devices will have the trust center
address and initial master key preloaded. If a momentary vulnerability is allowed, it will be
sent as described above. Typical applications without special security needs will use a
network key provided by the trust center (through the initially insecure channel) to
communicate.
Thus, the trust center maintains both the network key and provides point-to-point
security. Devices will only accept communications originating from a key provided by the
trust center, except for the initial master key.
2.10.9 Software and Hardware Zigbee
The software is designed to be easy to develop on small, cheap microprocessors.
The radio design used by Zigbee has been carefully optimized for low cost in large scale
production. It has few analog stages and uses digital circuits wherever possible.
Even though the radios themselves are cheap, the ZigBee Qualification Process
involves a full validation of the requirements of the physical layer. This amount of concern
about the Physical Layer has multiple benefits, since all radios derived from that
semiconductor mask set would enjoy the same RF characteristics. On the other hand, an
uncertified physical layer that malfunctions could cripple the battery lifespan of other
devices on a ZigBee network. Where other protocols can mask poor sensitivity or other
esoteric problems in a fade compensation response, Zigbee radios have very tight
engineering constraints, they are both power and bandwidth constrained. Thus, radios are
tested to the ISO 17025 standard with guidance given by Clause 6 of the 802.15.4-2003
Standard. Most vendors plan to integrate the radio and microcontroller onto a single chip.
The security architecture is distributed among the network layers as follows:
49
50
determine the best path for each packet. Most routers connect a LAN (like the one in your
home or office) to a WAN (like the cable system running your cable modem) by interfacing
a broadband modem to the network within the enterprise, small office, or home. A wireless
LAN router adds a built-in access point function to a multi-port Ethernet router. This
combines multiple Ethernet networks with wireless connections as well. A typical WLAN
router includes four Ethernet ports, an 802.11 access point, and sometimes a parallel port so
it can be a print server. This gives wireless users the same ability as wired users to send and
receive packets over multiple networks. 802.11b, 802.11a, and 802.11b/combo WLAN
routers are now available from several vendors such as Net gear, D-Link and Auctioned.
802.11g routers are also starting to come on the market.
51
devices. These functions make the WLAN router much more versatile than an access point.
52
one or more of these networks and also surf the Internet. A WLAN router enables them to
access everything through the wireless connection.
Improve Network management
WLAN routers in an enterprise environment give network administrators an extra
way to monitor and update their networks. In addition to being able to log on either locally
or remotely via the wired network, they will be able to log on wirelessly and make any
observations or changes.
Improve Network performance
Because routers only send packets to specific, directed addresses, they do not
forward the often numerous broadcast packets that are sent out by other devices. This
results in an increase in throughput because of lower utilization on the network and less
work needed by the router. This enables WLANs to operate much more effectively. The
router, however, will offer more delay than an access point, but the impacts are generally
unnoticeable.
Increase Security
A strong advantage of WLAN routers is that they provide an added layer of
security, both on the wired side and wireless side. The wired side is usually protected by a
firewall and has extensive access control filters. These filters can be set based on MAC
(medium access control) address, IP address, URL, domain name, and even a set schedule
that allows access only at certain times. If an unauthorized user tries to access the network,
an e-mail alert is immediately sent to the network administrator. For supporting sensitive
information, many WLAN routers support multiple and concurrent IPSec sessions, so users
can more securely access networks through a range of virtual private network (VPN)
clients. Most WLAN routers also implement wired equivalent privacy (WEP) encryption.
2.12 Ethernet
Ethernet is a family of computer networking technologies for local area networks
(LANs) commercially introduced in 1980. Standardized in IEEE 802.3, Ethernet has
largely replaced competing wired LAN technologies.
Systems communicating over Ethernet divide a stream of data into individual
packets called frames. Each frame contains source and destination addresses and errorchecking data so that damaged data can be detected and re-transmitted. The standards
53
define several wiring and signaling variants. The original 10BASE5 Ethernet used coaxial
cable as a shared medium. Later the coaxial cables were replaced by twisted pair and fiber
optic links in conjunction with hubs or switches. Data rates were periodically increased
from the original 10 megabits per second, to 100 gigabits per second.
54
Ethernet stations communicate by sending each other data packets blocks of data
individually sent and delivered. As with other IEEE 802 LANs, each Ethernet station is
given a 48-bit MAC address. The MAC addresses are used to specify both the destination
and the source of each data packet.
Ethernet establishes link level connections, which can be defined using both the
destination and source addresses. On reception of a transmission, the receiver uses the
destination address to determine whether the transmission is relevant to the station or
should be ignored.
Network interfaces normally do not accept packets addressed to other Ethernet
stations. Adapters come programmed with a globally unique address. An Ethertype field in
each frame is used by the operating system on the receiving station to select the appropriate
protocol module (i.e. the Internet protocol module). Ethernet frames are said to be selfidentifying, because of the frame type. Self-identifying frames make it possible to in termix
multiple protocols on the same physical network and allow a single computer to use
multiple protocols together.
Despite the significant changes in Ethernet, all generations of Ethernet (excluding
early experimental versions) use the same frame formats (and hence the same interface for
higher layers), and can be readily interconnected through bridging.
55
over the conventional R/2R ladder because of its inherent monotonicity, which guarantees
no missing digital codes. Monotonicity is particularly important in closed loop feedback
control systems. A non-monotonic relationship can cause oscillations that will be
catastrophic for the system. Additionally, the 256R network does not cause load variations
on the reference voltage. The bottom resistor and the top resistor of the ladder network .The
difference in these resistors causes the output characteristic to be symmetrical with the zero
and full-scale points of the transfer curve.
The first output transition occurs when the analog signal has reached + LSB and
succeeding output transitions occur every 1 LSB later up to full-scale. The successive
approximation register (SAR) performs 8 iterations to approximate the input voltage. For
any SAR type converter, n-iterations are required for an n-bit converter. A typical example
of a 3-bit converter. In theADC0808, ADC0809, the approximation technique is extended
to 8 bits using the 256R network. The A/D converter's successive approximation register
(SAR) is reset on the positive edge of the start conversion start pulse. The conversion is
begun on the falling edge of the start conversion pulse. A conversion in process will be
interrupted by receipt of a new start conversion pulse. Continuous conversion may be
accomplished by tying the end-of-conversion (EOC) output to the SC input. If used in this
mode, an external start conversion pulse should be applied after power up. End ofconversion will go low between 0 and 8 clock pulses after the rising edge of start
conversion.
speak to each other using serial ports. The devices are commonly referred to as a DTE (data
terminal equipment) and DCE (data communications equipment), for example, a computer
and modem, respectively.
RS232 is the most known serial port used in transmitting the data in communication
and interface. Even though serial port is harder to program than the parallel port, this is the
most effective method in which the data transmission requires less wires that yields to the
less cost. The RS232 is the communication line which enables the data transmission by
only using three wire links. The three links provides transmit, receive and common
ground. The transmit and receive line on this connecter send and receive data between
the computers. As the name indicates, the data is transmitted serially. The two pins are
TXD & RXD. There are other lines on this port as RTS, CTS, DSR, DTR, and RTS, RI.
The 1 and 0 are the data which defines a voltage level of 3V to 25V and -3V to -25V
respectively.
He electrical characteristics of the serial port as per the EIA (Electronics Industry
Association) RS232C Standard specifies a maximum baud rate of 20,000bps, which is slow
compared to todays standard speed. For this reason, we have chosen the new RS-232D
Standard, which was recently released.
2.15 Design Specification
S.no
1
2
3
4
5
6
7
8
9
10
11
57
CHAPTER 3
SOFTWARE DESCRIPTION
CHAPTER 3
58
SOFTWARE DESCRIPTION
3.1 Keil Software:
It is possible to create the source files in a text editor such as Notepad, run the
Compiler on each C source file, specifying a list of controls, run the Assembler on each
Assembler source file, specifying another list of controls, run either the Library Manager or
Linker and finally running the Object-HEX Converter to convert the Linker output file to
an Intel Hex File. Once that has been completed the Hex File can be downloaded to the
target hardware and debugged. Alternatively KEIL can be used to create source files;
automatically compile, link and covert using options set with an easy to use user interface
and finally simulate or perform debugging on the hardware with access to C variables and
memory. KEIL Greatly simplifies the process of creating and testing an embedded
application.
The Keil Software 8051 development tools listed below are the programs you use
to compile C code, assemble your assembler source files, link your program together,
create HEX files, and debug your target program. Vision2 for Windows Integrated
Development Environment, combines Project Management, Source Code Editing, and
Program Debugging in one powerful environment.
C51 ANSI Optimizing C Cross Compiler: creates reloadable object modules from
your C source code.
creates
reloadable
object
modules
from
your
BL51 Linker/Locator:
LIB51 Library Manager: combines object modules into a library, which may be
used by the linker.
OH51 Object-HEX Converter: creates Intel HEX files from absolute object
modules.
A project manager.
59
A make facility.
Tool configuration.
Editor.
A powerful debugger.
Figure 3.2
Figure 3.2 shows the circuit diagram of the stand-alone spi programmer, the
power to the interface is provided by the PC USB port which can supply a max of
100mA current. Get a cheap USB cable, cut the cable other end connector and attach a
crimp shell connector to this end, red wire is 5V and black is 0V.
For the u-controller a 40 pin ZIF socket can be used. This programmer circuit can
be use to program the 16FX series devices and the AVR series devices which are pin
compatible to 8051.
Software:
The ISP-30a.zip file contains the main program and the I/O port driver. Place all
files in
the
same
folder.
The
main
screen
view
of
the
program.
For the auto hardware detection it is necessary to short pin 2 and 12 of DB25 connector,
otherwise the software uses the default parallel port i.e. LPT1. Following are the main
features of this software.
61
function
is
provide
the
erase
command
because
this
erase the controller, first use the clear buffer command then program the controller, this
will erase the controller and also set the AVR device fuses to default setting.
62
63
Simulator:
Once the code is ready then it is always not a good idea to dump into micro
controller. First it has to be tested in our IDE itself. The tool provided by an IDE which
shows an exact replica of micro controllers perception is nothing but our simulator.
3.1.4 Keil IDE
This tool is used to develop the source code needed for the design. It helps us to
compile and stimulate the code. The compiled embedded C is converted to equivalent
HEX code
3.1.5 Using Keil Vision
1. Open the Keil Vision.
2. Open project window and then select a new project and save it by any name
myfile.
3. Now a "select device for target 'target1' " window will appear. Select the name of
the chip vendor (Microchip, Atmel, Intel, Philips, Siemens, etc.) in the Vendor box.
Select the device family from the drop down menu in the Family box. Enter the part
number for the device in the Device box.
4. Now in "project workspace"(window on the left side), target1 will appear. Click on
target1, source group1 will appear.
5. Open new file and write a program in assembly. Save it with .asm (like
'myfile.asm').
6. Now right click on the "source group1' and select "add files to group 'source
group1'" give the file name as 'myfile.asm and add it and close that window. Again
left click on the source group1; you can see the added file.
7. Right click on this added file and select "build target". By this you can compile your
program.
8. Check the output window. If the program is compiled properly then go to 'Debug'.
9. Select 'start/stop debug session' in project workspace you can see how your program
is running.
10. Use F11 for running program step-by-step.
11. Again go to Debug and select 'start/stop debug session' to stop the program.
65
Choose the 16F877 dll from the drop down list box; you can also select this
directly.
Click OK.
You should now see the source code of the file typed in earlier.
This will bring up 5 boxes that display the status of the ports on the microcontroller.
You can also debug single step through you program or set break points at locations
that you want the debugger to stop at. To set a breakpoint, double click on the line.
3.2 Linux
The development of Linux is one of the most prominent examples of free and open
source software collaboration and typically all the underlying source code can be used,
freely modified, and redistributed, both commercially and non-commercially, by anyone
under licenses such as the GNU General Public License. Typically Linux is packaged in a
format known as a Linux distribution for desktop and server use. Linux distributions
include the Linux kernel and all of the supporting software required to run a complete
system, such as utilities and libraries, the X Window System, the GNOME and KDE
desktop environments, and the Apache HTTP Server.
Commonly used applications with desktop Linux systems include the Mozilla
Firefox web-browser, the OpenOffice.org office application suite and the GIMP image
66
editor. The proposed lab remote monitoring system makes use embedded board which
makes use of less power consumptive and advanced micro controller like S3C2440.
S3C2440 is a Samsung companys microcontroller, which designed based on the structure
of ARM 920T family. This microcontroller works for a voltage of +3.3V DC and at an
operating frequency of 400 MHz, The maximum frequency up to which this micro
controller can work is 533 MHz
We cannot get S3C2440 microcontroller individually. We will get it in the form of
FRIENDLY ARM board else, we can call it as MINI 2440 board.
In order to work with ARM 9 micro controllers we require 3 things. They are as
follows.
1. Boot Loader
2. Kernel
3. Root File System
3.2.1 Boot loader
The main functionality of boot loader is to initialize all the devices that are present
on the motherboard of MINI 2440 and at the same time to find out whether any problem or
any other fault is there in the devices that are present on that motherboard of MINI 2440.
The other feature of the boot loader is to find out what are the different operating
systems that are present in the standard storage devices and to show it on to the display
device so that user can select between the operating systems into which he wants to enter.
One other feature of the boot loader is lo load operating system related files byte by
byte into the temporary memory like RAM. In our current project, we are using boot loader
like super vivid, which is MINI 2440 specific
3.2.2 Kernel
The core part of an operating system we can call like kernel. Operating system will
perform its functionalities like File management, Process management, Memory
management, Network management and Interrupt management with the help of the kernel
only. Kernel holds the device related drivers that are present on the motherboard.
FRIENDLY ARM board supports for operating systems like SYMBIAN, ANDROID,
EMBEDDED LINUX, and WINCE. However, in all these operating systems EMBEDDED
LINUX will provide high security to drivers and files. Therefore, in our current project we
67
are making use of kernel of EMBEDDED LINUX with which device related drivers that
are present on the motherboard of FRIENDLY ARM board will automatically come when
we load EMBEDDED LINUX related kernel.
3.2.3 Root File System
File system will tell how files arrangement there inside the internal standard storage
devices. In embedded Linux, kernel treats everything as a file even the input and output
devices. In embedded Linux, Root is the parent directory it contains other sub directories
like dev, lib, home, bin, sbin, media, mnt, temp, proc, etc, opt and etc. According to our
application, we will interface some external devices also. All the devices means internal
devices that are present on the motherboard of MINI 2440 will get their corresponding
drivers when we load Embedded Linux related kernel. However, these device drivers
require micro controller related header files and some other header files, which will be
present in the lib directory, which is present in the root directory. In addition, the devices
related drivers would be present in the dev directory, which is again present in the root
directory. Therefore, whenever we will load the Root File System then we will get different
directories, which will be helpful to the kernel. So compulsorily, we need to load the Root
File System. MINI 2440 specific Root File System is Root Qtopia.
The essential programs that are required in order to work with MINI 2440 like Boot
loader, Embedded Linux related Kernel, Root File System will be loaded into the NOR
flash which is present on the MINI 2440 board itself. The program related with the
application will be loaded into NAND flash, which is also present on the MINI 2440 board
itself. By using bootstrap switch that is present on the MINI 2440 will help the user to
select either NOR or NAND flash. After that by using DNW tool we can load Boot loader,
Embedded Linux neither related kernel and Root File System into NOR flash by using
USB cable and the application related program into NAND flash.
Once loading everything into MINI 2440 board it starts working based on the
application program that we have loaded into the NAND flash. So controlling station waits
for the remote data that is coming from the remote location.
The remote location like lab consists of an embedded board, which interfaced to the
sensors like light, temperature and gas. Light Dependent Resistor (LDR) will continuously
measure the intensity of the light and converts the analog quantity like light intensity into
68
voltage format. In order to check whether any poisonous gas that is released in the lab or
not for that purpose we are having a gas sensor. This gas sensor also converts the analog
quantity like gas release into voltage format. To indicate the temperature present in the lab
we are having a temperature sensor, which will convert analog quantity like temperature
into voltage.
But in order to observe the step to step changes that are occurring in the lab we need
to connect the output of the temperature, LDR and gas sensors to the ADC so that we can
observe the step to step voltage change that are occurring in the lab with the help of
temperature sensor, LDR and gas sensor.
In this way, the output of the light, gas and temperature sensors is given as an input
to the microcontroller. The measured values sent wirelessly through the X-bee transmitter
to the controlling station. At the controlling station, we will have X-bee receiver by using
which the parameters measured at the remote location is received and given as an input to
the MINI 2440 board by using serial port. The measured values of temperature, gas alert
and the light intensity will be send from the controlling station to anywhere by using the
technology like Ethernet with a speed of 100Mbps the Ethernet technology. From the
remote locations, also we can monitor the parameters that are present at the lab.
We can control the parameter like the temperature then from the remote location
through any PC. We can automatically activate a blower fan that already interfaced to the
embedded board and we can reduce the temperature before reaching the threshold value. If
the required intensity of the light is not present through our we can activate a bulb and we
can supply required intensity of the light for the lab
In this way we can monitor the parameters that are present at the lab which at
remote area and even we can control the parameters from the remote locations. In this way,
we can go for lab remote monitoring and controlling with less power consumption.
3.2.4 Features of Linux
Linux has evolved to have the following features as an outstanding operating system which
is strong in security and networking.
Multitasking: Several programs can run at the same time.
Multiuser: Several users can logon to the same machine at the same time There is no
need to have separate user licenses.
69
well
with
TCP/IP
networking,
including
ftp,
telnet.
70
71
A popup window will require you to name this connection. In this example we typed
ttyS0. Windows does not accept names like COM1 that have already been used by the
system.
72
73
74
If we want both Windows XP and Linux operating System, install windows XP first
and then Linux, otherwise windows installation on Linux erases the partitions. Also if we
select option 2) Remove all partition on this system windows partition and hence window
XP will get deleted. So dont select this option. Select option 1) Remove all Linux
partition on this system. Or option 3) Keep all partition and use existing free space.
We can also select boot loader password (Not mandatory).
Creating new partition
If we want to create new partition then Click New to create new partition and fill
the data that was decided earlier. Select proper mount point from the list menu or the
directory. For the root and boot select mount point as EXT3.For swap there is no mount
point. First select /boot and give 100 MB space then select swap partition and allot
double the size of RAM for swap. Then select \ directory and give maximum space.
Ensure that windows partition will also exist.
09) Next stage is Network Configuration
If we want Automatic IP address then select DHCP (Dynamic host configuration
Protocol) i.e. dynamic IP addressing. If we want static IP address then unchecked
DHCP option and assign IP address manually.
For our VBCE college for system number 20 data is like below -IP Address 192.168.1.20
Net mask 255.255.255.0
Gateway 192.168.1.1
Primary DNS 4.2.2.1
Secondary DNS 156.154.70.1
Machine name VBCE-20
Domain VBCE
10) Next stage is for selecting nearest city in our time zone.
Select Asia Calcutta (We can directly point on India in the world map).
11) Next stage is for selecting root password. Again type same password in confirmation
box.
75
12) Next stage is for selection of firewall. We can use option line no firewall. We select
firewall then we can block www sites, we can block emails etc.
13) Next stage is for language selection Select only default language i.e. English.
14) Tick enable no file password and enable shadow password and unchecked other (This
is important because you may not be able to log in otherwise), click next.
15) Next stage is for selection of packages. Select default packages.
We can select custom option if we dont want some programmers like games etc.
16) Next stage is for confirmation of CD 1 is in the CD drive. Click continues and after
LILO:
Loading sequence
for "other=" (ie DOS) option load first 512 bytes of the partition
76
CHAPTER 4
RESULTS
77
CHAPTER 4
RESULTS
Results:
The results when we are accessing with WI-Fi Authentication is needed and the
transmission control protocol/Internet protocol we are using here Class C 192.168.1.130.
Various environmental parameters displayed on Laptop or hand held devices with Wi-Fi at
remote location.
Operation:In order to check whether any poisonous gas that is released in the lab or not for
that purpose we are having a gas sensor. This gas sensor also converts the analog quantity
like gas release into voltage format. To indicate the temperature present in the lab we are
having a temperature sensor, which will convert analog quantity like temperature into
voltage. But in order to observe the step to step changes that are occurring in the lab we
need to connect the output of the temperature ,LDR and gas sensors to the ADC so that we
can observe the step to step voltage change that are occurring in the lab with the help of
temperature sensor, LDR and gas sensor.
In this way, the output of the light, gas and temperature sensors is given as an input
to the microcontroller. The measured values sent wirelessly through the X-bee transmitter
to the controlling station. At the controlling station, we will have X-bee receiver by using
which the parameters measured at the remote location is received and given as an input to
the MINI 2440 board by using serial port. The measured values of temperature, gas alert
and the light intensity will be send from the controlling station to anywhere by using the
technology like Ethernet with a speed of 100Mbps the Ethernet technology.
78
79
80
81
CHAPTER 5
ADVANTAGES AND APPLICATIONS
82
CHAPTER 5
ADVANTAGES AND APPLICATIONS
5.1 Advantages:
The application of WSN/Zigbee is growing popularity and how to connect
WSN/Zigbee to the present standard network seamlessly is an issue what is worth studying.
It designs and realizes a ZigbeeWi-Fi wireless gateway based on ARM9 and embedded
Wi-Fi router. In Zigbee network, wireless gateway as a sink, it receives data from sensor
nodes and interacts with them.
In WLAN, wireless gateway communicates with PC or network servers by means
of AP. In this project we have monitor various environmental conditions such as Smoke,
Light dependency, temperature at room or underground of coal mines. If the temperature is
raised to particular level we have to maintain safest precautions.
In this project we are migrating two technologies such as Zigbee (802.15.4) and WiFi (802.11b) but both of them are work with 2.4 GHz, Used For lab remote monitoring and
weather monitoring, low cost easy to implement and low power consumption and
controlling is done by using web technology.
Physical security is a major component of a wired LAN security solution. Wired
networks equipment can be locked inside offices. Wireless networks cannot offer the same
level of physical security, however, and therefore must depend on additional authentication
routines to ensure that users accessing the network are authorized to do so. Authentication
is a necessary prerequisite to association because only authenticated users are authorized to
use the network. Deauthentication terminates an authenticated relationship. Because
authentication is needed before network use is authorized, a side effect of Deauthentication
is termination of any current association.
It designs and realizes a Zigbee Wi-Fi wireless gateway based on RF
chip and embedded Wi-Fi module. In Zigbee network, wireless gateway as a sink, it
receives data from sensor nodes and interacts with them. In WLAN, wireless gateway
communicates with PC or network servers by means of AP.
83
5.2 Applications:
Monitoring Equipment:
If any equipment breaks down in any location it can be figured out immediately.
The temperature sensor information can be used to monitor the atmosphere of the
machinery. This reduces the need of maintenance staff on the premises. Monitoring is
everywhere, from weather stations and power meters to industrial systems, to help reduce
cost, improve productivity, and even save lives.
It is different from typical measurement applications because monitoring
measurements are usually performed over extended periods of time to generate alarms or
notifications, identify data trends, and gain efficiencies. An example is machine condition
monitoring (MCM), which is often used for the predictive maintenance of mechanical
devices. MCM incorporates sensor measurements to identify when components such as
gears or bearings within a mechanical system need to be changed or updated before a
failure occurs. This maximizes the lifetime of mechanical components while avoiding
costly system failures.
Household Applications:
Used to control home appliances such as electric bulbs, fans and air coolers,
microwave ovens, geysers. When a sensor is connected to the embedded internet based data
acquisition system it can also be used as security system.
Controlling Equipment:
Any equipment in factories like in computer rooms, generator rooms or any other
machinery can be operated from just one control room. Whether you are controlling the
temperature of a room, the speed of a motor, or the pressure of hydraulic fluids, you can
use data acquisition hardware to connect sensors and actuators to your computer and build
the exact control system for your application needs.
Many feedback control systems involve taking a measurement, comparing the
measured value with the desired value, and then controlling an actuator to get closer to the
desired value. For this process, you can use basic on/off control, popular algorithms such as
PID control, or more complex advanced control with multiple inputs and outputs.
Following the same fundamental principles, you can use your computer and data
acquisition hardware to take sensor measurements, compare the measured values with the
84
desired set points in software, and update output signals accordingly. There are a number of
advantages to using a PC for control applications that lead to flexibility, high performance,
and customization.
To study the environmental conditions such as temperature, light and Co2. In zigbee
data transfer rate is slow when compared with wi-fi the problem is overcome by zigbee
wireless gateway. When we are Wi-Fi data loss is less as compared to other technologies
like 3G, ADSL. Migrating two different technologies are Zigbee (802.15.4) and Wi-Fi
(802.11b). Remotely we can monitor the environmental conditions through Wi-Fi devices
such as Laptop, Mobiles PDAs.
85
CHAPTER 6
CONCLUSIONS AND FUTURE SCOPE
86
CHAPTER 6
CONCLUSIONS AND FUTURE SCOPE
6.1 Conclusions:
The project The Design and Realization ZigbeeWi-Fi Wireless gateway has
been successfully designed and tested. It has been developed by integrating features of all
the hardware components and software used. Presence of every module has been reasoned
out and placed carefully thus contributing to the best working of the unit. Secondly, using
highly advanced ARM9 board and with the help of growing technology the project has
been successfully implemented.
In this project we have concluded Zigbee (802.15.4) and Wi-Fi (802.11b) the
gateway is established and monitor the parameters like temperature, Gas, light intensity
with controlling of Wi-Fi. But when we are accessing the data authentication is needed with
Wi-Fi router. The wireless gateway can realize communication effectively between ZigBee
network and WLAN. The ARM9 we are using less coding takes place while compared to
other processors.
87
any report that was located at the hospital's web site from anywhere. With on-line drug
system, medicine could be ordered from anywhere and the results of this change were
astounding. Patients mortality rate was down and the quality of care was up. Whether it is
manufacturing or service industry, everyone is realizing significant gains with the
improvement in wireless internet connectivity.
88
REFERENCES
[1] David Culler, Deborab Esrtin, Mani Sivastava, Overview of sensor networks, IEEE
Computer Society, August 2004.
[2] Hong-jiang He, Zhu-qiang Yue, and Xiao-jie Wang, Design and realization of wireless
Sensor network gateway based on ZigBee and GPRS Int. Conf. Inf. Computer
Science, ICIC. Manchester, United Kingdom: IEEE Computer Society, 2009, pp.196199.
[3] Cai Hao, Feng Rennin, and Wan Jiangwen, Wireless sensor network gateway with
multi-communication methods. Chinese Journal of Sensor and Actuators. 2008,
21(1):169-172.
[4] Ali. Khidir.M, Owens. Thomas J, Access mechanisms in Wi-Fi networks state of art,
Flaws and proposed solutions, ICT: Int. Conf. Telecommunication. Doha, Qatar: IEEE
Computer Society, 2010, pp.280-287.
[5] Ghasemi Abdorasoul, Razavizadeh S. Mohammad, A simple MAC protocol for
Cognitive wireless networks, IEICE Trans Communication. Vol E92-B, pp. 36933700, 2009.
[6] Shon.Taeshik and Park Yongsuk, Implementation of RF4CE-Based Wireless Auto
Configuration Architecture for Ubiquitous Smart Home, CISIS - Int. Conf. Complex,
Intelligent Software, Intensive Sys. Krakow, Poland: IEEE Computer Society, 2010,
pp.779-783.
[7] I. Akyildiz, X. Wang, W. Wang, Wireless mesh networks: a survey, Computer
Networks 47(4), 2005, pp.445-487.
[8] Xu Xiaotao and Wu Yanlin, Technology and Application of Wireless Personal Area
Network (WPAN). Beijing: Posts Telecom press, 2009.
[9] Title Embedded Systems 2E Author of RajKamal Publisher TataMcGraw-Hill
Education, 2008.
[10] Wireless And Mobile Communication Kumar, Sanjeev - 2008 .
89
BIBLIOGRAPHY
[1] www.arm9.net.
[2] www.keil.com.
[3] www.atmel.com
[4] http://www.st.com/mcu
[5] http://www.mxchip.com
[6] ZigBee Alliance, Latest ZigBee specification including the PRO feature set.
http://www.zigbee.org, 2005.
[7] Mixchip, EMW-380_RM01040141.pdf. http://www.mxchip.com, 2009.
[8] STMicroelectronics, UM0923 User manual EmberZNet application developer guide.
http://www.st.com/mcu, 2010.
[9] www.nptel.iitm.ac.in/.../Embedded%20systems/New_index1.html
[10] www.rajkamal.org/books.html
90