Upload
prateekgupta900
View
238
Download
0
Embed Size (px)
Citation preview
7/30/2019 Wsn Xbee Manual
1/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 1
INDEX
1.INTRODUCTION TO WIRELESS
SENSOR N/W
2
2.COMMUNICATION NETWORK 4
3.STAR TOPOLOGY 5
4.MESH TOPOLOGY 6
5.RING TOPOLOGY 7
6.DATA GATHERING APPLICATION 8
7.COMPUTATION INTENSIVEAPPLICATION
9
8.ON BOARD SPECIFICATIONS 10
9.BUZZER SECTION 12
10.LCD SECTION 13
11.LED SECTION 14
12.RELAY SECTION 14
13.DIP SWITCH SECTION 14
14.HOW TO USE WIRELESS SENSORNETWORK
18
15.HOW TO USE COMPILER 22
16.HOW TO USE FLASH MAGIC 32
17.ECE FLASH MAGIC 41
7/30/2019 Wsn Xbee Manual
2/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 2
INTRODUCTION TO WIRELESS SENSOR NETWORK
A wireless sensor network is a collection of nodes organized into a cooperative network.Each node consists of processing capability (one or more microcontrollers, CPUs or DSP
chips), may contain multiple types of memory (program, data and flash memories), have
a RF transceiver (usually with a single Omni- directional antenna), have a power source
(e.g., batteries and solar cells), and accommodate various sensors and actuators. The
nodes communicate wirelessly and often self-organize after being deployed in an ad hoc
fashion. Such systems can revolutionize the way we live and work.
Wireless Sensor Networks (WSNs) use tiny, inexpensive sensor nodes with several
distinguishing characteristics: they have very low processing power and radio ranges,
permit very low energy consumption and perform limited and specific monitoring and
sensing functions. Several such wireless sensors
in a region self-organize and form a WSN. Information based on sensed data can be
used in agriculture and livestock, assisted driving or even in providing security at home
or in public places. A key requirement from both the technological and commercial
point of view is to provide adequate security capabilities. Fulfilling privacy and security
requirements in an appropriate architecture for WSNs offering pervasive services is
essential for user acceptance. Five key features need to be considered when developing
WSN solutions: scalability, security, reliability, self-healing and robustness. The required
strength of each of these features depends on the application in
Question.Currently, wireless sensor networks are beginning to be deployed at an accelerated
pace. It is not Unreasonable to expect that in 10-15 years that the world will be covered
with wireless sensor networks with access to them via the Internet. This can be
considered as the Internet becoming a physical network. This new technology is exciting
with unlimited potential for numerous application areas including environmental,
medical, military, transportation, entertainment, crisis management, homeland defense,
and smart spaces. Since a wireless sensor network is a distributed real-time system anatural question is how many solutions from distributed and real-time systems can be
used in these new systems?
7/30/2019 Wsn Xbee Manual
3/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 3
7/30/2019 Wsn Xbee Manual
4/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 4
SOLUTION
BASIC REQUIREMENTS FOR WSN
Low Power ConsumptionEase of Use
Scalability
Responsiveness
Range
Bi-Directional Communication
Reliability
Small Module Form Factor
COMMUNICATION NETWORKS
NETWORK TOPOLOGY
The basic issue in communication networks is the transmission of messages to achieve a
prescribed message throughput (Quantity of Service) and Quality of Service (QoS). QoS
can be specified in terms of message delay, message due dates, bit error rates, packet
loss, economic cost of transmission, transmission power, etc. Depending on QoS, the
installation environment, economic considerations, and the application, one of several
basic network topologies may be used.A communication network is composed of nodes, each of which has computing power
and can transmit and receive messages over communication links, wireless or cabled.
The basic network topologies are shown in the figure
Wireless Links Numerous paths to Connect to the same destination.
These could be:-
1. Star2. Mesh3.
Hybrid
A single network may consist of several interconnected subnets of different topologies.
Networks are further classified as Local Area Networks (LAN), e.g. inside one building, or
Wide Area Networks (WAN), e.g. between buildings
7/30/2019 Wsn Xbee Manual
5/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 5
STAR TOPOLOGY
All nodes of the star topology are connected to a single hub node. The hub requiresgreater message handling, routing, and decision-making capabilities than the other
nodes. If a communication link is cut, it only affects one node. However, if the hub is
incapacitated the network is destroyed. In the ring topology all nodes perform the same
function and there is no leader node. Messages generally travel around the ring in a
single direction.
However, if the ring is cut, all communication is lost. The self-healing ring network (SHR)
shown has two rings and is more fault tolerant.
In the bus topology, messages are broadcast on the bus to all nodes. Each node checks
the destination address in the message header, and processes the messages addressed
to it.
The bus topology is passive in that each node simply listens for messages and is not
responsible for retransmitting any messages.
Some features of star are:
Single Hop to Gateway
Gateway serves to communicate between nodes
Nodes cannot send data to each other directly
ProsLowest Power consumption
Easily ScalableConsNot very reliable as one point of failure
No alternate communication paths
7/30/2019 Wsn Xbee Manual
6/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 6
FULLY CONNECTED NETWORK
IT Suffer from problems of NP-complexity as additional nodes are added, the number of
links increases exponentially. Therefore, for large networks, the routing problem is
computationally intractable even with the availability of large amounts of computing
power.
MESH NETWORK
This type of network is regularly distributed networks that generally allow transmissiononly to a nodes nearest neighbors. The nodes in these networks are generally identical,
so that mesh nets are also referred to as peer-to-peer (see below) nets. Mesh nets can
be good models for large-scale networks of wireless sensors that are distributed over a
geographic region, e.g. personnel or vehicle security surveillance systems. Note that the
regular structure reflects the communications topology; the actual geographic
distribution of the nodes need not be a regular mesh. Since there are generally multiple
7/30/2019 Wsn Xbee Manual
7/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 7
routing paths between nodes, these nets are robust to failure of individual nodes or
links. An advantage of mesh nets is that, although all nodes may be identical and have
the same computing and transmission capabilities, certain nodes can be designated as
group leaders that take on additional functions. If a group leader is disabled, another
node can then take over these duties.
Mesh Topology
Multi-Hopping Systems
Nodes can communicate with each other directly
Hybrid Topology
Sensors are arranged in a star topology around the routers
The routers arrange themselves in a mesh form
RING TOPOLOGYIn Ring Topology all devices are situated in the form of a ring and each device connected
within two neighbors devices by the means of communication. In Ring topology all node
communicate with each other clockwise or anti clockwise. Generally FDDI, Token ring
and SONET used to configure ring topology. The use of ring topology increasing day by
day because a network can easily implement in home, office, building, and school .Ring
topology have some benefits such as equal access to every one, transformation of data
at very high speed but have disadvantages like The fault in any cable or wire may cause
of failure network., trouble shooting also a major problem.
APPLICATION OF INTERESTS
We categorize the applications into two classes.
1. The first class, data gathering applications, focuses on entity monitoring withlimited signal processing requirements. The primary goal of these applications is
to gather information of a relatively simple form, such as temperature and
humidity, from the operating environment. Some environmental monitoring and
habitat study applications also belong to this class.
2. The second class of applications requires the processing and transportation oflarge volumes of complex data. This class includes heavy industrial monitoringand video surveillance, where complicated signal processing algorithms are
usually employed. We refer to these applications as computationally intensive
applications.
In the following sections, we describe several academic and industrial
http://www.freewimaxinfo.com/computer-network-topologies.htmlhttp://www.freewimaxinfo.com/computer-network-topologies.html7/30/2019 Wsn Xbee Manual
8/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 8
applications based on the above categorization. While both classes of
applications are important for realizing the potential of WSNs, the involved
techniques can be quite deferent due to their varying computation and
communication demands
DATA GATHERING APPLICATIONS
HABITAT STUDY
Habitat study is one of the driving applications for WSNs such applications usually
require the sensing and gathering of bio-physical or bio-chemical information from the
entities under study, such as Redwoods Storm Petrels Zebras and Oysters. In many
scenarios, habitat study requires relatively simple signal processing, such as data
aggregation using minimum, maximum, or average operations. Hence, motes are ideal
platforms for such applications. The famous Great Duck Island project was initiated inthe spring of 2002 by Intel Research and UC Berkeley, to monitor the microclimates in
and around Storm Petrel nesting burrows. Thirty two motes were deployed on the
island, each equipped with sensors for temperature, humidity, barometric pressure, and
mid-range infrared. The network was designed to have a tiered structure. The motes
were grouped into patches so that data collected in each patch could be relayed via a
gateway to a base station, where data logging was performed. Within one year of
monitoring, the system gathered approximately 1 million readings. In 2003, a second
generation network, with more than 100 nodes, was also deployed.
ENVIORMENTAL MONITORING
Environmental monitoring is another application for WSNs. The vast spaces involved in
such applications require large volumes of low cost sensor nodes that can be easily
dispersed throughout the region. For instance, WSNs have been studied for forest re
alarm, landscape hooding alarm, soil moisture monitoring, microclimate and solar
radiation mapping, and environmental observation and forecasting in rivers.
Researchers at University of West Australia are developing a prototype WSN for
outdoor, ne-grained environmental monitoring of soil water such a network can be used
to assist salinity management strategies, or to monitor irrigated crops, urban irrigation,
and water movement in forest soils. In January 2005, a prototype network was built,
which included 15 Mica2 nodes integrated with soil moisture sensors and other gateway
and routing nodes. The system distinguishes itself by using a reactive data gathering
strategy frequent soil moisture readings are collected during rain, while less frequent
readings are collected otherwise. This strategy helps increase the system lifetime.
7/30/2019 Wsn Xbee Manual
9/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 9
COMPUTATION-INTENSIVE APPLICATION
STRUCTURAL HEALTH MONITORING
Health monitoring for civil structures has long been a research topic for
Industry and academia. Traditional methods include visual inspection,
Acoustic emission, ultrasonic testing, and radar tomography. The emergence of WSNs
has prompted new, non-destructive, and cheap methods for many tasks related to
structural health monitoring. The volume of raw data to be gathered and transported
for such applications is on the order of 1-10 Mbps. Thus, transmitting only useful
information obtained from local signal processing becomes imperative for sustaining a
long system lifetime. Many sophisticated and computationally intensive signal
processing algorithms have been studied, including the Fast Fourier Transformation
(FFT), Wavelet Transform, Autoregressive Models, and AR-ARX Damage DetectionPattern Recognition Method. To serve the large computation demand from these
algorithms, while maximizing energy savings, a dual-core design method has been
employed. For instance, with the aforementioned Medusa node and the sensor node
developed by Lynch while a low-end microcontroller is responsible for frequent sensing
and communication tasks, a high-end embedded processor is occasionally utilized when
heavy signal processing is required.
An on-going Structural Health Monitoring (SHM) project by University
of Southern California has developed two software systems, Wisden
and NET-SHM. These systems facilitate continuous data acquisition over a
Self-conjuring multi-hop WSN, with high data rate and reliable communication
requirements. Moreover, a full-scale tested ceiling of 2848 feet has been built with
actuators to deliver deterministic excitations. Currently, the team is constructing robotic
actuators that can be remotely controlled to move above the ceiling. The team is also
investigating the use of other modalities, such as images, to enhance the deity of the
system.
HEAVY INDUSTRIAL MONITORING
Sensors have already been widely used in industrial applications, such as the
monitoring of automated assembly lines. Integrating wireless technology
with these sensors enables condition based maintenance (CBM) to reducedowntime and enhance safety, with low installation and maintenance cost.
Condition based maintenance can replace traditional high-cost, schedule-
driven, manual maintenance for various industrial entities, including power
plants, oil pipelines, transportation systems and vehicles, engineering facilities, and
industrial equipment. Industrial applications are unique in their requirement of highly
reliable operation in harsh environments. For example, the electromagnetic radiation of
7/30/2019 Wsn Xbee Manual
10/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 10
machines may cause microcontroller malfunction or wireless communication
interference. Also, the large variation in temperature and humidity demands reliable
hardware components. Moreover, industrial applications often require the processing of
large volumes of data with sophisticated signal processing algorithms. Thus,
computation demand is usually high for these applications.
Intel Research has deployed a network with 160 Mica2 motes on a ship
to measure the vibrations in the ship's pumps, compressors, and engines as
an indicator of potential failure. These motes were organized into
clusters, with Star gate gateways forming the backbone of the network.
Without operator intervention, the deployed network operated for 4 months
without major failures. This experiment was still preliminary since the
diagnosis of the ship equipments was performed in a centralized way at
the base station, instead of distributed within the network. However, it
paved the path for WSNs to a broad range of applications in industrial
environments.
ON-BOARD FACILITIES
(a)DISPLAY (LCD, LED) section.(b)SWITCHES (DIP SWITCH) section.
(c)RELAY section.
(d)BUZZER section(e)RS232 SECTION
PERIPHERALS
Part No. Specifications
LCD 16 x 2 character LCD
20 x 4 character LCD (coordinator).
BUZZER 5V
RELAY 5A/250V AC
LED 1.5V
7/30/2019 Wsn Xbee Manual
11/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 11
POWER SUPPLY REQUIREMENTS
Voltage Rating Current Rating
+5 V dc 1A
PROCESSOR
P89C51RD2/P89V51RD2
FEATURES
On-chip Flash Program Memory with In-System Programming (ISP) and In-
Application Programming (IAP) capability
Boot ROM contains low-level Flash programming routines for downloading via the
UART
Can be programmed by the end-user application (IAP)
Parallel programming with 87C51 compatible hardware interface to programmer
Supports 6-clock/12-clock mode via parallel programmer (default clock mode after
Chip Erase is 12-clock)
6-clock/12-clock mode Flash bit erasable and programmable via ISP
6-clock/12-clock mode programmable on-the-fly by SFR bit
Peripherals (PCA, timers, UART) may use either 6-clock or 12-clock mode while the
CPU is in 6-clock mode
Speed up to 20 MHz with 6-clock cycles per machine cycle (40 MHz equivalent
performance); up to 33 MHz with 12 clocks per machine cycle
Fully static operation
RAM expandable externally to 64 Kbytes
Four interrupt priority levels
Seven interrupt sources
Four 8-bit I/O ports
Full-duplex enhanced UART
Framing error detection Automatic address recognition
Power control modes
Clock can be stopped and resumed
Idle mode
Power down mode
Programmable clock-out pin
7/30/2019 Wsn Xbee Manual
12/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 12
Second DPTR register Asynchronous port reset
Low EMI (inhibit ALE)
Programmable Counter Array (PCA)
PWM
Capture/compare
BUZZER SECTION
A Buzzer is output device having +ve andve terminals, which generate a tone when it
get high signal on its positive terminal. These devices are capable of generate sound.
Such kind of devices can be used in hardwares like security systems and sensitive
equipments to protect them from burn. For example if temperature of particular area
rises over than pre-specified temperature then a sound should generate.
Connection: connected with P1.3.
RS232 SECTIONThis section is on board to program the microcontroller through pc serial port either u
can use USB to serial convertor to program microcontroller chip.
The Serial Port is harder to interface than the Parallel Port. In most cases, any device
you connect to the serial port will need the serial transmission converted back to
parallel so that it can be used. This can be done using a UART. On the software side of
things, there are many more registers that you have to attend to than on a Standard
Parallel Port. (SPP)
7/30/2019 Wsn Xbee Manual
13/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 13
LCD DISLAY SECTION
A liquid crystal display (LCD) is a thin, flat panel used for electronically displaying
information such as text, images, and moving pictures. Its uses include monitors forcomputers, televisions, instrument panels, and other devices ranging from aircraft
cockpit displays, to every-day consumer devices such as video players, gaming devices,
clocks, watches, calculators, and telephones. Among its major features are its
lightweight construction, its portability, and its ability to be produced in much larger
screen sizes than are practical for the construction of cathode ray tube (CRT) display
technology. Its low electrical power consumption enables it to be used in battery-
powered electronic equipment. It is an electronically-modulated optical device made up
of any number of pixels filled with liquid crystals and arrayed in front of a light source
(backlight) or reflector to produce images in color or monochrome. The earliest
discoveries leading to the development of LCD technology date from 1888. By 2008,
worldwide sales of televisions with LCD screens had surpassed the sale of CRT units.
Connection (Data port: P0) (control RS: P1.0, EN: P1.1).
TOP VIEW OF LCD
PIN DESCRIPTION OF LCD
7/30/2019 Wsn Xbee Manual
14/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 14
LED SECTIONA light-emitting diode (LED) is an electronic light source. LEDs are based on the
semiconductor diode. When the diode is forward biased (switched on), electrons are
able to recombine with holes and energy is released in the form of light. This effect iscalled electroluminescence and the color of the light is determined by the energy gap of
the semiconductor. The LED is usually small in area (less than 1 mm2) with integrated
optical components to shape its radiation pattern and assist in reflection.
CONNECTIONS
Port 2 of microcontroller through (SW6) dip switch.
RELAY SECTION
A relay is an electrical switch that opens and closes under the control of anotherelectrical circuit. In the original form, the switch is operated by an electromagnet to
open or close one or many sets of contacts. It was invented by Joseph Henry in 1835.
Because a relay is able to control an output circuit of higher power than the input
circuit, it be considered electrical amplifier.
CIRCUIT DIAGRAM OF RELAY RELAY
DIP SWITCH (SW6 and SW7)
Dip switch section is a digital input section which is used to give digital external to
microcontroller.
A DIP switch is a set of manual electric switches that are packaged in a group in a
standard dual in-line package (DIP) (the whole package unit may also be referred to as a
DIP switch in the singular). This type of switch is designed to be used on a printed circuit
board along with other electronic components and is commonly used to customize the
behavior of an electronic device for specific situations.
7/30/2019 Wsn Xbee Manual
15/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 15
DIP switches are an alternative to jumper blocks. Their main advantages are that they
are quicker to change and there are no parts to lose.
DIP SWITCH TYPES
There are many different kinds of DIP switches. Some of the most common are the
rotary, slide, and rocker types.
Rotary DIP switches contain multiple contacts, one of which is selected by rotating the
switch to align it with a number printed on the package.
The slide and rocker types, which are very common, are arrays of simple SPDT (single-
pole, single-throw) contacts, which can be either on or off. This allows each switch to
select a one-bit binary value. The values of all switches in the DIP package can also be
interpreted as one number. For example, seven switches offer 128 combinations,allowing them to select a standard ASCII character. Eight switches offer 256
combinations, which is equivalent to one byte.
The DIP switch package also has socket pins or mounting leads to provide an electrical
path from the switch contacts to the circuit board. Although circuits can use the
electrical contacts directly, it is more common to convert them into high and low
signals. In this case the circuit board also needs interface circuitry for the DIP switch,
consisting of a series of pull-up or pull-down resistors, a buffer, decode logic, and other
components.
Typically the device's firmware reads the DIP switches. They were also
often used on arcade games in the 1980s and early 1990s to store settings, before theadvent of cheaper, battery-backed RAM and were very commonly used to set security
codes on garage door openers as well as on some early cordless phones. This design,
which used up to twelve switches in a group, was used to avoid interference from other
nearby door opener remotes or other devices. Current garage door openers use rolling
code systems for better security. These types of switches were used on early video cards
http://en.wikipedia.org/wiki/Rolling_codehttp://en.wikipedia.org/wiki/Rolling_codehttp://en.wikipedia.org/wiki/Video_cardhttp://en.wikipedia.org/wiki/File:DIP_switch_01_Pengo.jpghttp://en.wikipedia.org/wiki/Video_cardhttp://en.wikipedia.org/wiki/Rolling_codehttp://en.wikipedia.org/wiki/Rolling_codehttp://en.wikipedia.org/wiki/Rolling_code7/30/2019 Wsn Xbee Manual
16/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 16
for early computers to facilitate compatibility with other video standards. For example,
CGA cards allowed for MDA compatibility.
Recently (since the late 1990s), DIP switches have become less common in consumer
electronics. Reasons include the trend toward smaller products, the demand for easier
configuration through setting screens, and the falling price ofnon-volatile memory. But
DIP switches are still widely used in industrial equipment because they are inexpensive
and easy to incorporate into circuit designs, and because they allow settings to be
checked at a glance without powering the system on.
Connection
(SW6) connected with Port 2 of microcontroller with led.
DIP SWITCH SW7 SETTINGS
1. Default settingS3------------ON
S7------------OFF
2. Connect microcontroller with PC using max232.S1------------ON(RX).
S4------------ON(TX).
3. Connect microcontroller with Xbee without using max232.S3------------ON(DIN).
S6------------ON(DOUT).
4. Connect Xbee with PC using max232.S2------------ON(DIN).
S5------------ON(DOUT).
http://en.wikipedia.org/wiki/Color_Graphics_Adapterhttp://en.wikipedia.org/wiki/IBM_Monochrome_Display_Adapterhttp://en.wikipedia.org/wiki/Non-volatile_memoryhttp://en.wikipedia.org/wiki/Non-volatile_memoryhttp://en.wikipedia.org/wiki/IBM_Monochrome_Display_Adapterhttp://en.wikipedia.org/wiki/Color_Graphics_Adapter7/30/2019 Wsn Xbee Manual
17/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 17
FOR PROGRAMING SETTING
For programming the board, switch off all the switches of SW6 (DIP SWITCH) andconnect the programming cable over J16 connector which is along with Xbee module.
Steps for using keil compiler are given below, after how to use the hardware.
After programming switch OFF and switch ON the board (reset coordinator/end device).
TWO DIP SWITCHES ARE AVAILABLE ON BOARD
SW7 used for communication with PC, UC and XBEE module.
SW6 is connected with XBEE and UC. If switches are in off
Condition the leds connected with XBEE otherwise with UC, Onboard relay andbuzzer.
7/30/2019 Wsn Xbee Manual
18/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 18
HOW TO USE WIRELESS SENSOR NETWORK
STEP 1
Arrange/fit all boards on the places which you want to get under wireless network.
STEP 2
Connect sensor with all end devices (module). On all end device there is a two pin
connector provided for sensor connection. Note that sensor connected with this
connector must provide logic high (+5v) on its default situation and provide logic low (0
volt) when sensor is activated. If sensors are not available then short two pin connectorwith wire.
STEP 3
Switch on power supply of board (may be coordinator/end device) with 5v, 1 amp
adaptor.
STEP 4
If we switch on power of coordinator first then its LCD will display massage
Advance Technology
Xbee sensor network.
STEP 5After that processor start searching end devices and try to form network. LCD will
display
Advance Tech
WSN sensor status
x x x x x x x x x xWhere x could be
F------for End device FOUND
N-----for End Device NOT FOUND
A-----for sensor ALARMED
7/30/2019 Wsn Xbee Manual
19/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 19
In this network we can monitor ten sensor at one time means we can form a network of
ten devices. To form a network at least two end devices must be in ON state.
STEP 6
When you switch on power supply of end device, then LCD will show massage
Advance Tech
End device Where y stands for
1 to 10 sensor number
And start searching any coordinator available for making network. If coordinator found
then LCD shows
Associated
STEP 7
After network formation End device and coordinator are associated in a network. Both,
END device and coordinator will wait for sensor Alarming.
STEP 8
If any sensor from complete network alarmed then LCD of that particular END device
whose sensor in alarmed, will show
Sensor
Alarmed
And buzzer of END device also start giving sound.
STEP 9
At the same moment when sensor alarmed then END device send information to
coordinator and LCD shows
7/30/2019 Wsn Xbee Manual
20/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 20
DATA Send
STEP 10
Now coordinator show status as A----- means sensor alarmed and denoted on
particular location on LCD for that particular sensor. Coordinator also sends an
acknowledgement to END device.
STEP11
When END device receive acknowledgement then END devices LCD shows massage
DATA OK
STEP12
Now we can control END device or sensor module from coordinator. I can switch OFF
buzzer and even sensor from coordinator.
There are eight switches available on coordinator module. One each for one sensor
which in connected on END device. For example if sensor 2 is alarmed and buzzer of
same device is producing sound .Then to switch it OFF press SW2 from coordinator. LCD
of END device 2 will shows
Sensor Disabled
STEP13
Coordinators LCD shows * on particular location (position 2 in eg.).
STEP14
Note that after disabling the sensor, END device is still in network but sensor is not innetwork and disabled permanently. To associate sensor again in network RESET POWER
SUPPLY of END device.
7/30/2019 Wsn Xbee Manual
21/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 21
For programming the board switch off all the switches of SW6 (DIP SWITCH) and
connect the programming connector over J16 connector which is along with Xbee
module. Port 3 whole I/O lines were available on JP7.
Two DIP SWITCHES are available on board
SW7 used for communication with PC, UC and XBEE module.
SW6 is connected with XBEE and UC. If switches are in off
Condition the leds connected with XBEE otherwise with UC. Onboard relay and
buzzer.RS232 provided for communication with XBEE and PC.
After programming switch OFF and switch ON the board (coordinator/end device).If you
switch ON the coordinator, the end device on particular PAN (personal area network)
will associate with the coordinator. If end device detected any coordinator then it will
display ASSOCIATED
If you switchon the end device which will search for the coordinator. After detected anyend device the coordinator display the status of device on LCD.
If the co-ordinator detected any end device it will show F for found or N for not
found. If any sensor gets alarmed, the coordinator will show the alarmed status A on
LCD and at the same time the end device will switch on the buzzer.
If you want to switch off the buzzer and deactivate the device, (SW1 for device 1) press
the particular switch that was provided with coordinator and the deactivated status is
denoted by *.
7/30/2019 Wsn Xbee Manual
22/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 22
USE OF COMPILER AND PROGRAMMER
Compiler: KEIL
Programming Tool: FLASH MAGIC
STEP:1
Double Click on the icon present on the desktop.
7/30/2019 Wsn Xbee Manual
23/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 23
STEP: 2
The following window will be popped-up
7/30/2019 Wsn Xbee Manual
24/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 24
STEP: 3
Go to the project & click on new project
STEP: 4
Make a folder on desktop & give file name.
7/30/2019 Wsn Xbee Manual
25/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 25
STEP: 5
when you click on the save button ,following window opens
7/30/2019 Wsn Xbee Manual
26/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 26
STEP: 6
Select Philips & 89v51RD2xx
STEP: 7
Then select NO on the pop-up given below.
7/30/2019 Wsn Xbee Manual
27/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 27
STEP: 8
Then make a New File.
STEP: 9
Write or copy your code there & save it with extension .c or .asm depending on your
coding.
7/30/2019 Wsn Xbee Manual
28/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 28
STEP: 10
Go to target & then source group, right click on there & click on the option add files to
the project.
STEP: 11Select your asm or c file which you want to add.
7/30/2019 Wsn Xbee Manual
29/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 29
Example is with .c extension file
STEP: 12
Go to the option for target, click on output &tick on create hex file option
7/30/2019 Wsn Xbee Manual
30/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 30
STEP: 13
Now build target.
(Click on the pointed option)..
STEP: 14
It will show you 0 errors & 0 warning on Output Window.
7/30/2019 Wsn Xbee Manual
31/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 31
After performing all these steps the chip will be configured through Flash Magic .Let ushand on the steps of chip configuration through Flash Magic
SPECIAL NOTES
Make all the DIP switches in off position before burning the program in the
controller.
Connect the Programming Cable on your Kit (prog. Conn.)And other side of cable
with the COM Port of the Computer.
Burn the Program in the microcontroller with help of FLASH MAGIC or ECE FLASH
as explained in the next section.
7/30/2019 Wsn Xbee Manual
32/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 32
How to use FLASH-MAGICOR
How to use ECE flash
7/30/2019 Wsn Xbee Manual
33/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 33
STEP: 1
The following window will be popped-up
Press cancel to continue.
7/30/2019 Wsn Xbee Manual
34/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 34
STEP: 2
Configuration:
Click options and then click advanced options
7/30/2019 Wsn Xbee Manual
35/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 35
STEP: 3
Now set the parameters as shown below
Click on communication options and set parameters as show in fig below.
7/30/2019 Wsn Xbee Manual
36/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 36
STEP: 4
Click on hardware config and set parameters T1 (200) and T2 (300). Now disableoption use DTR and RST shown in fig below.
7/30/2019 Wsn Xbee Manual
37/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 37
STEP: 5
Click on timeouts option and set parameters regular timeout 30,long timeout 120 and disable option use my timeouts for ISP operations as shown in
fig below.
Now click ok
7/30/2019 Wsn Xbee Manual
38/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 38
STEP: 6
Main front window will appear.Now select device name 89V51RD2XXX as shown in fig below.
7/30/2019 Wsn Xbee Manual
39/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 39
STEP: 7
After selection of the chip (P89v51RD2xx), Port (Com1), Osc. Mhz (11.0592) wecan see the window as below:
Browse for the hex file to be loaded.
7/30/2019 Wsn Xbee Manual
40/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 40
STEP: 8
Press start reset window will appear as shown in fig below.
Press reset button on hardware or ON/OFF power for a while to reset to
make hardware in programming mode.
Within 5-6 seconds message will appear
************FINISHED.***********
Now press again reset on hardware to see output or to run
program.
7/30/2019 Wsn Xbee Manual
41/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 41
STEP: 1
To burn chip 89V51RDRXX through ECE flash it required less.
Double click on icon as shown below.
STEP: 2
Flash window will appear as shown below.
7/30/2019 Wsn Xbee Manual
42/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 42
STEP: 3
Set baud rate 9600, select working comport of PC to hardware and softwarecommunication as shown below.
7/30/2019 Wsn Xbee Manual
43/44
WIRELESS SENSOR NETWORK
ADVANCE TECHNOLOGY
www.atechindia.com Page 43
STEP: 4
Now select hex file to burn in chip through browse option as shown below.
7/30/2019 Wsn Xbee Manual
44/44
WIRELESS SENSOR NETWORK
STEP: 5
Now main window will appear as shown below.
STEP: 6
Click on flash option reset hardware will appear.
Now press reset switch on hardware board and flash will burn
With 5-6 Seconds.
Again press reset switch on hardware board to run your program or to see output