A Mini Project Report
A Mini Project Report
A Mini Project Report
On
Asst.Prof.K.MIRANJI, (M.Tech)
Department of E.C.E
BVRM Page 1
CONFIRMATION
HOD, ECE
BVRM Page 2
CERTIFICATE
H. O. D.
BVRM Page 3
ACKNOWLEDGEMENT
BVRM Page 4
CONTENTS Page no’s
ABSTRACT
LIST OF FIGURES
1.2PROJECTOVERVIEW...................................................................................(11-13)
1.3)WIRELESS TECHNOLOGY…………………………………………….....(13-14)
CHAPTER 3: MAX232………………………………………………(25-26)to(29-31)
3.1)INTRODUCTION………………………………………………………….(25-26)
3.3)APPLICATIONS OF MAX232……………………………………………(29-31)
BVRM Page 5
CHAPTER 4: L293D………………………………………………….(32-34) to(36)
4.1)PINCONFIGURATION OF L293D………………………………….......(33-34)
4.3)FEATURES OF L293D………………………………………………...........(36)
CHAPTER 5: ZIGBEE………………………………………………………(37-42)
5.3)ZIGBEE PINSIGNALS…………………………………………………..(38-39)
5.4)HOW IT WORKS………………………………………………………..(39-41)
5.5)APPLICATIONS OF ZIGBEE……………………………………………..(42)
a) KEIL SOFTWARE…………………………………………………………..(42)
b) FLASH MAGIC……………………………………………………………...(45)
SOFTWARE PROGRAM…………………………………………………..(45-48)
RESULTS………………………………………………………………………..(49)
CONCLUSION …………………………………………………………………(50)
BIBLOGRAPHY ……………………………………………………………(51)
BVRM Page 6
ABSTRACT
BVRM Page 7
LIST OF FIGURES Page no’s
CHAPTER1:
CHAPTER 2:
CHAPTER 3
CHAPTER 4
BVRM Page 8
Figure 4.3: Circuit for implementation of L293D with capacitors……………..37
CHAPTER 5
CHAPTER 6
Figure:Hardware kit……………………………………………………………..49
BVRM Page 9
CHAPTER 1
INTRODUCTION
Like the familiar Microwave Oven, an Embedded System is designed to perform some
dedicated function. A combination of hardware and software, it forms an embedded part
of a complete device. Since an Embedded system has a limited range of applications,
design engineers face no problem to optimize both size and cost or enhance reliability and
quality of performance. Complexity varies from low, with a single microcontroller chip,
to very high with multiple units, peripherals and networks mounted inside a large chassis
or enclosure.Typically; embedded systems are Reactive and Real time systems.
Characteristics
1) Embedded Systems are designed to do some specific task, rather than be a general-
purpose computer for multiple tasks. Some also have real-time performance constraints
that must be met, for reason such as safety and usability; others may have low or no
performance requirements, allowing the system hardware to be simplified to reduce costs.
2) Embedded Systems are not always separate devices. Most often they are physically
built-in to the devices they control.
3) The software written for embedded systems is often called firmware, and is stored in
read-only memory or Flash memory chips rather than a disk drive. It often runs with
limited computer hardware resources: small or no keyboard, screen, and little memory.
4) Maintainability M (d) = Probability of system working correctly d time units after error
occurred
BVRM Page 10
7) Security: Confidential and authentic communication. Even perfectly designed systems
can fail if the assumptions about the workload and possible errors turn out to be wrong.
8) Must be efficient
Application areas
Automotive,Electronics,Avionics,Trains,Telecommunication,Medical
systems,Authentication
Military applications,Robotics,Sensor technology,Mobile phones,Mobile basestation,
Telecom switch,Optical O copper connections,Smart welding machine,Sewing machine
SCMS School of Technology and Management.
1.2)PROJECT OVERVIEW:
The main aim of this project is to control the Robot(moving a Robot to
left,right,front,back)using Zigbee technology.In this project the main parts used to design
this module are,8051 microcontroller which helps to accepts binary data, process data
according to instructions as output,MAX232 used as Serial communication device
between system and controller,L293D acts as DC modulator driver,ZigBee. Apart
from,ZigBee is used to control the robot over large distance(1000m) by giving
instructions from the controller.
The heart of this project is ZigBee.ZigBee is a new wireless technology developed by the
ZigBee Alliance to overcome the limitations of BLUETOOTH and Wi-Fi.Though we
have couple of methods for multimedia applications, till now nothing has been developed
for sensor networking and control machines which require longer battery life and
continuous working without human intervention.Here,by using ZigBee devices,we have
to rectify these limitations and allow batteries to last up to years using primary cells (low
cost) without any chargers (low cost and easy installation).
The ZigBee standard provides network, security, and application support services.ZigBee
has a wide range application area such as home networking, industrial networking, and
manymore having different profiles specified for each field. The upcoming of ZigBee will
evolutionize the home networking and rest of the wireless world.
BVRM Page 11
BLOCK DIAGRAM:
Figure1(a):Block diagram for robot control
ZigBee ZigBee
PC Microcontroller
Robot
Driver Motor
CIRCUIT DIAGRAM:
BVRM Page 12
OPERATION
The Block diagram of zigbee navigation is to control the Robot(moving a Robot to
left,right,front,back)using Zigbee technology.In this project the main parts used to design
this module are,8051 microcontroller which helps to accepts binary data, process data
according to instructions as output,MAX232 used as Serial communication device
between system and controller,L293D acts as DC modulator driver. Apart from,ZigBee
is used to control the robot over large distance(1000m) by giving instructions from the
controller.
The instructions taken from PC,which fed to the zigbee transmitter using simplex
communication ,zigbee receiver recives the instructions and given to microcontroller,
controller controls the driver finally driver which drives the motor either left,right,front or
back.
1.2) WIRELESS TECHNOLOGY
Wireless is a term used to describe telecommunications in which electromagnetic waves
(rather than some form of wire) carry the signal over part or all of the communication
path.
A versatile and easy to use module, based on the Xbee® module from DIGI.
Different versions of the Xbee® module are available and can simply adapted to the
Coax. In
BVRM Page 13
General, these modules offer higher range compared to the Bluetooth module, but
lower data rate.
The popular XBee 2mW Series 2.5 with Wire Antenna, available at Spark fun has the
following
Wireless technology is rapidly evolving, and is playing an increasing role in the lives of
people throughout the world. In addition, ever-larger numbers of people are relying on the
technology directly or indirectly.
In simplex transmission, signals are transmitted in only one direction; one station is the
transmitter and the other is the receiver.
Fig1(c): Simplex
Data exchanges over a transmission line can be classified as full duplex or half duplex
transmission.
With half-duplex transmission, only one of two stations on a point-to-point link may
transmit at a time. This mode is also referred to as two-way alternate, suggestive of the
fact that two stations must alternate in transmitting; this can be compared to a one-lane,
two-way bridge. This form of transmission is often used for terminal-to-computer
BVRM Page 14
interaction. While a user is entering and transmitting data, the computer is prevented from
sending data, which would appear on the terminal screen and cause confusion.
Fig1(d): Half-duplex
For full duplex transmission, two stations can simultaneously send and receive data
from each other. Thus, this mode is known as two-way simultaneous and may be
compared to a two-lane, two-way bridge. For computer-to-computer data exchange, this
form of transmission is more efficient than half-duplex transmission.
Fig1(e): Full-duplex
With digital signaling, which requires guided transmission, full-duplex operation usually
requires two separate transmission paths (e.g., two twisted pairs), while half duplex
requires only one. For analog signaling, it depends on frequency; if a station transmits and
receives on the same frequency, it must operate in half-duplex mode for wireless
transmission, although it may operate in full-duplex mode for guided transmission using
two separate transmission lines. If a station transmits on one frequency and receives on
another, it may operate in full-duplex mode for wireless transmission and in full-duplex
mode with a single line for guided transmission.
BVRM Page 15
CHAPTER 2
8051 is one of the most popular microcontrollers in use today. Many derivative
microcontrollers have since been developed that are based on—and compatible with—the
8051.Thus, the ability to program an 8051 is an important skill for anyone who plans to
develop products that will take advantage of microcontrollers.
The fixed amount of on-chip ROM, RAM, and number of I/O ports makes them ideal
for many applications in which cost and space are critical In many applications, the space
it takes, the power it consumes, and the price per unit are much more critical
considerations than the computing poweri.cro-
BVRM Page 16
Two timers
One serial port
Four I/O ports, each 8 bits wide
6 interrupt sources
Micro controller is the heart of total system. The micro controller controls all the
devices connected in the diagram. Micro controller sends pulses to all the devices,
which are connected to it.We can program it in any language i.e., in assembly or C or
C++, depending upon the user. In this flash memory is more compatible with others. In
our design, this controller is compatible and also reliable one.
It has 128bytes of inbuilt RAM space and if required external memory of 64KB can be
interfaced to the microcontroller.
There are 4 parallel 8bit ports namely port 0, port 1, port 2 and port 3 which are
addressable as well as programmable.
BVRM Page 17
Fig 2.1:8051 Micro controller Architecture
It has full duplex serial I/O port having two pins namely TxD, RxD.
It has two 16bit timers namely Timer 0 and Timer 1 which can be used either as timer
for internal operation or as counter for external operation.
It has five interrupt sources. All of them are maskable as well as vector interrupts.
They are External Interrupt 0, Timer Interrupt 0, External Interrupt 1, Timer Interrupt 1,
and Serial Port Interrupt.
BVRM Page 18
Register and Internal RAM organization
BVRM Page 19
BVRM Page 20
Fig 2.3:Basic circuit for 8051 micro controller
EA/VP Pin
The EA on pin 31 is tied high to make the 8051 executes program from Internal ROM
Reset Circuit
RESET is an active High input When RESET is set to High,
8051 goes back to the power on state.
The 8051 is reset by holding the RST high for at least two machine cycles and
then returning it low.
Power-On Reset
BVRM Page 21
Manual reset
Oscillator Circuit
The 8051 uses the crystal for precisely that: to synchronize it’s operation.
8051 instruction can be executed. although many instructions take multiple cycles.
It needs an external crystal thats decides the operating frequency of the 8051.
The oscillator can also be a TTL clock source connected with a NOT gate as shown.
A cycle is, in reality, 12 pulses of the crystal. That is to say, if an instruction takes
BVRM Page 22
one machine cycle to execute, it will take 12 pulses of the crystal to execute.
Since we know the crystal is pulsing 11,059,000 times per second and that
one machine cycle is 12 pulses, we can calculate how many instruction cycles the 8051
11,059,000 / 12 = 921,583
11.0592 MHz crystals are often used because it can be divided to give you exact clock rates
for most of the common baud rates for the UART,especially for the higher speeds (9600,19200).
Despite the "oddball" value, these crystals are readily available and commonly used.
POWER SUPPLY
C1-1000 mf ,C2-100 mf
The input voltage ranges from 7V to 35V and the output voltage is about 5V.
8051 is TTL logic device. TTL logic has two levels: Logic "High" (1) and logic "Low" (0).
The voltage and current involved for the two levels are as follows:
BVRM Page 23
Current
Level Voltage
Ports Function
High Above 2.4V Virtually no current flow
Dual-purpose port- 1. general purpose I/O Port.
1.6mA Sinking current from
Port 0 2. multiplexed address & data bus
Low Below 0.9V TTL input to ground
Open drain outputs
(Depends on logic family)
(Pin 32-39)
Port 1
Dedicated I/O port – Used solely for interfacing to external devices
(Pin 1-8) Internal pull-ups
Port 2
Dual-purpose port- 1. General purpose I/O port.
2. a multiplexed address & data bus.
(Pin 21-28)
Internal pull-ups
BVRM Page 24
CHAPTER 3
MAX232
Introduction
A standard serial interface for PC, RS232C, requires negative logic, i.e., logic 1 is -3V to
-12V and logic 0 is +3V to +12V. To convert TTL logic, say, TxD and RxD pins of the
microcontroller thus need a converter chip. A MAX232 chip has long been using in many
microcontrollers boards. It is a dual RS232 receiver / transmitter that meets all RS232
specifications while using only +5V power supply. It has two onboard charge pump
voltage converters which generate +10V to -10V power supplies from a single 5V supply.
It has four level translators, two of which are RS232 transmitters that convert TTL/CMOS
input levels into +9V RS232 outputs. The other two level translators are RS232 receivers
that convert RS232 input to 5V. Typical MAX232 circuit is shown below.
Features:
1. Operates With Single 5-V Power Supply
2. LinBiCMOSE Process Technology
3. Two Drivers and Two Receivers
4.±30-V Input Levels
BVRM Page 25
6. Meets or Exceeds TIA/EIA-232-F and ITU
Recommendation V.28
7. Designed to be Interchangeable With
Maxim MAX232
8. Applications
TIA/EIA-232-F
Battery-Powered Systems
Terminals, Modems, Computers
9. ESD Protection Exceeds 2000 V Per
MIL-STD-883, Method 3015
Circuit connections:
A standard serial interfacing for PC, RS232C, requires negative logic, i.e., logic '1' is
-3V to -12V and logic '0' is +3V to +12V. To convert TTL logic, say, TxD and RxD pins
of the uC chips thus need a converter chip. A MAX232 chip has long been using in many
uC
Fig 3.2:MAX232 circuit connections
BVRM Page 26
The MAX232 from maxim was the first IC which in one package contains the necessary
drivers (two) and receivers (also two), to adapt the RS-232 signal voltage levels to TTL
logic. It became popular, because it just needs one voltage (+5V) and generates the
necessary RS-232 voltage levels (approx. -10V and +10V) internally. This greatly
simplified the design of circuitry. Circuitry designers no longer need to design and build a
power supply with three voltages (e.g. -12V, +5V, and +12V), but could just provide one
+5V power supply, e.g. with the help of a simple 78x05 voltage converter.
The MAX232 has a successor, the MAX232A. The ICs are almost identical, however, the
MAX232A is much more often used (and easier to get) than the original MAX232, and
BVRM Page 27
the MAX232A only needs external capacitors 1/10th the capacity of what the original
MAX232 needs.
It should be noted that the MAX232(A) is just a driver/receiver. It does not generate the
necessary RS-232 sequence of marks and spaces with the right timing, it does not decode
the RS-232 signal, it does not provide a serial/parallel conversion. All it does is to convert
signal voltage levels. Generating serial data with the right timing and decoding serial data
has to be done by additional circuitry, e.g. by a 16550 UART or one of these small micro
controllers (e.g. Atmel AVR, Microchip PIC) getting more and more popular.
The MAX232 and MAX232A were once rather expensive ICs, but today they are cheap.
It has also helped that many companies now produce clones (ie. Sipex). These clones
sometimes need different external circuitry, e.g. the capacities of the external capacitors
vary. It is recommended to check the data sheet of the particular manufacturer of an IC
instead of relying on Maxim's original data sheet.
The original manufacturer (and now some clone manufacturers, too) offers a large series
of similar ICs, with different numbers of receivers and drivers, voltages, built-in or
external capacitors, etc. E.g. The MAX232 and MAX232A need external capacitors for
the internal voltage pump, while the MAX233 has these capacitors built-in. The MAX233
is also between three and ten times more expensive in electronic shops than the
MAX232A because of its internal capacitors. It is also more difficult to get the MAX233
than the garden variety MAX232
Capacitor
Capacitor Value
Nbr Name Purpose Signal Voltage Value
MAX232A
MAX232
+ connector for capacitor should
1 C1+ 1µF 100nF
capacitor C1 stand at least 16V
2 V+ output of voltage +10V, capacitor 1µF to VCC 100nF to VCC
pump should stand at
BVRM Page 28
least 16V
- connector for capacitor should
3 C1- 1µF 100nF
capacitor C1 stand at least 16V
+ connector for capacitor should
4 C2+ 1µF 100nF
capacitor C2 stand at least 16V
- connector for capacitor should
5 C2- 1µF 100nF
capacitor C2 stand at least 16V
-10V, capacitor
output of voltage
6 V- should stand at 1µF to GND 100nF to GND
pump / inverter
least 16V
7 T2out Driver 2 output RS-232
8 R2in Receiver 2 input RS-232
Receiver 2
9 R2out TTL
output
10 T2in Driver 2 input TTL
11 T1in Driver 1 input TTL
Receiver 1
12 R1out TTL
output
13 R1in Receiver 1 input RS-232
14 T1out Driver 1 output RS-232
15 GND Ground 0V 1µF to VCC 100nF to VCC
16 VCC Power supply +5V see above see above
V+ (2) is also connected to VCC via a capacitor (C3). V-(6) is connected to GND via a
capacitor (C4). And GND (16) and V CC (15) are also connected by a capacitor (C5), as
close as possible to the pins.
Application of MAX232A
BVRM Page 29
The MAX232(A) has two receivers (converts from RS-232 to TTL voltage levels) and
two drivers (converts from TTL logic to RS-232 voltage levels). This means only two of
the RS-232 signals can be converted in each direction. The old MC1488/1498 combo
provided four drivers and receivers.
There are not enough drivers/receivers in the MAX232 to also connect the DTR, DSR,
and DCD signals. Usually these signals can be omitted when e.g. communicating with a
PC's serial interface. If the DTE really requires these signals either a second MAX232 is
needed, or some other IC from the MAX232 family can be used (if it can be found in
consumer electronic shops at all). An alternative for DTR/DSR is also given below.
Maxim's data sheet explains the MAX232 family in great detail, including the pin
configuration and how to connect such an IC to external circuitry. This information can
be used as-is in own design to get a working RS-232 interface. Maxim's data just misses
one critical piece of information: How exactly to connect the RS-232 signals to the IC. So
here is one possible example:
MAX232 Pin Nbr. MAX232 Pin Name Signal Voltage DB9 Pin
7 T2out RTS RS-232 8
8 R2in CTS RS-232 7
9 R2out CTS TTL n/a
10 T2in RTS TTL n/a
11 T1in TX TTL n/a
12 R1out RX TTL n/a
13 R1in TX RS-232 3
BVRM Page 30
14 T1out RX RS-232 2
15 GND GND 0 5
In addition one can directly wire DTR (DB9 pin 4) to DSR (DB9 pin 6) without going
through any circuitry. This gives automatic (brain dead) DSR acknowledgment of an
incoming DTR signal. Sometimes pin 6 of the MAX232 is hard wired to DCD (DB9 pin
1). This is not recommended. Pin 6 is the raw output of the voltage pump and inverter for
the -10V voltage. Drawing currents from the pin leads to a rapid breakdown of the
voltage, and as a consequence to a breakdown of the output voltage of the two RS-232
drivers. It is better to use software which doesn't care about DCD, but does hardware-
handshaking via CTS/RTS only.
+5V: Pin 16
BVRM Page 31
GND: Pin 15
CHAPTER 4
L293D
L293D: An H-Bridge
H-what?
An H-Bridge is nothing but an electronic circuit. Using such a circuit, you can supply
current in two directions. That’s it. The L293D is an H-Bridge with two possible outputs.
Meaning, you can connect two things to it… and you can control the direction of current
flow in both.
BVRM Page 32
If you close both S1 and S2, you’ll short circuit the entire thing. Same goes with S3 and
S4. Such a condition, in technical terms, is called a shoot through. So we won’t consider
shoot throughs.
Now, if you close switches S1 and S4, current flows through the motor from left to right.
If you close S3 and S2, current flows from right to left. In these two conditions, the
direction of rotation is different.
This is exactly what’s needed in most robotics projects using differential drive wheels.
But having physical switches would be very inconvenient. You’d need more motors to
close and open switches. And to control those motors you’d need even more switches. Ah
well. You probably get the point.
So what the researchers made was an electronically controlled switch: a transistor. And
people used those transistors and made circuits similar to the one shown above. The only
difference was that instead of physical switches, they had electronic switches.
The L293D
BVRM Page 33
As I had mentioned earlier, you get two output ports with the L293D. In the above pinout diagram, the
left and right sides denote the two outputs. The OUTPUT1 / OUTPUT2 pair forms one output and
OUTPUT3 / OUTPUT4 froms another pair. Current can flow through these pairs as dictated by the
INPUT1 / INPUT2 and INPUT3 / INPUT4 pairs.
Vss is the logical voltage supply for a 1. For example, if you connect it to a 5V supply, 5 volts into any
of the INPUTs would mean a logical 1. However, if you connect it to a 36V supply, the same 5 volts
into any INPUT would mean a logical 0.
How did that happen? Well, you can roughly consider Vss/2 as the “threshold” for a
logical 1. If a voltage is above Vss/2, then its a 1… otherwise its a 0. So for the 36V
case… if any INPUT is given a voltage greater than 18V, only then will it be considered a
logical 1.
Vs is the actual voltage that needs to be output. This has nothing to do with the logical 0s
and 1s.
GND represents grounds. These are needed for the multiple solid state switches that are
burned into the IC.
ENABLE pins enable/disable the corresponding sides. Putting a logical 1 into ENABLE1
would enable INPUT1/INPUT2 and OUTPUT1/OUTPUT2. Similarly, ENABLE2 would
enable the other two input and output pins. A logical 0 disables the corresponding side.
BVRM Page 34
Notice the D?
The name of the chip has a D in it… notice that? That indicates the presence of a diode
for each OUTPUTx pin.Whenever the direction of current changes, the device connected
across the OUTPUT pins will resist the change. And this results in a back current. The
diodes make sure that no back-current damages the circuit inside the chip or before the
chip.
You could do without the diodes too (use an L293B in that case). But its recommended
that you use the one with diodes, unless you know what you’re doing.
HOW IT WORKS?
Now that you know what each pin does, explaining how to make the chip work will be
easy.Lets say you put a logical 1 into INPUT1. Then the chip will simply put Vs volts
into OUTPUT1. Similarly, if you put a logical 0 into INPUT1, the chip will ground
OUTPUT1.Same thing with others. Putting a logical 1 into INPUTx will put Vs volts in
Basic Implementation:
As you can see, a 5V Voltage Regulator is between the battery and pins 1, 9, 16.
Pin 8 gets power before the VReg, if your motor needs for example 6V you should put 6V
directly in this pin, all the other pins should not get more than 5V.
BVRM Page 35
This is the correct Implementation (with the capacitors), and note that pin 8 is feeded by
unregulated voltage. This means that if your motors need more than 5V, you should
power this pin with that amount of voltage, and the rest of the circuit with 5V.
BVRM Page 36
Fig 4.4:L293D connections on breadboard
FEATURES OF L293D
Featuring Unitrode L293 and L293D Products Now From Texas Instruments
Thermal Shutdown
High-Noise-Immunity Inputs
BVRM Page 37
Peak Output Current 2 A Per Channel (1.2 A for L293D)
CHAPTER 5
ZIGBEE
INTRODUCTION TO ZIGBEE TECHNOLOGY
ZigBee is a new wireless technology developed by the ZigBee Alliance to overcome the
limitations of BLUETOOTH and Wi-Fi. ZigBee is developed on the top of IEEE 802.15.4
standard. It is designed for low-power consumption allowing batteries to essentially last
forever.Though we have couple of methods for multimedia applications, till now nothing has
been developed for sensor networking and control machines which require longer battery life
and continuous working without human intervention. ZigBee devices allow batteries to last
up to
years using primary cells (low cost) without any chargers (low cost and easy installation).
The ZigBee standard provides network, security, and application support services operating
on top of the IEEE 802.15.4.IEEE 802.15.4 standard has two basic layers medium Access
Control (MAC) and Physical Layer (PHY) wireless standard. The network layer supports
various topologies such star, clustered tree topology and self healing mesh topology. Apart
from easy installation and easy implementation ZigBee has a wide application area such as
home networking, industrial networking, many more having different profiles specified for
each field. The upcoming of ZigBee will revolutionize the home networking and rest of the
wireless world.
Why is it called Zigbee?
It has been suggested that the name evokes the haphazard paths that bees follow as they
harvest pollen, similar to the way packets would move through a mesh network. Using
communication system, whereby the bee dances in a zig-zag pattern, worker bee is able to
share information such as the location, distance, And direction of a newly discovered food
BVRM Page 38
source to her fellow colony members. Instinctively implementing the ZigBee Principle, bees
around the world actively sustain productive itchiness and promote future generations of
Colony members.
What is zigbee?
ZigBee is a specification for a suite of high level communication protocols using small,
low-power digital radios based on the IEEE 802.15.4-2003 standard for wireless personal
area networks (WPANs), such as wireless headphones connecting with cell phones via
short-range radio. ..
ZigBee and Other Wireless Technologies
The XBee and XBee-PRO OEM RF Modules were engineered to operate within the
net-works. The modules require minimal power and provide reliable delivery of data
between remote devices. Both modules operate within the ISM 2.4 GHz frequency band
and are pin-for-pin compatible with each other
ZIGBEE PIN SIGNALS
BVRM Page 39
Figure 5.1:Zigbee Pinconfiguration
Pin Assignments for the XBee and XBee‐PRO Modules (Low‐asserted
signals are distinguished with a horizontal line above signal name.)
Pin # Name Direction Description
1 VCC - Power supply
2 DOUT Output UART Data Out
3 DIN / CONFIG Input UART Data In
4 DO8* Output Digital Output 8
5 RESET Input Module Reset (reset pulse must be at least 200 ns)
6 PWM0 / RSSI Output PWM Output 0 / RX Signal Strength Indicator
7 [reserved] - Do not connect
8 [reserved] - Do not connect
9 DTR / SLEEP_RQ* / DI8 Input Pin Sleep Control Line or Digital Input 8
10 GND - Ground
11 AD4* / DIO4* Either Analog Input 4 or Digital I/O 4
12 CTS / DIO7* Either Clear-to-Send Flow Control or Digital I/O 7
13 ON / SLEEP Output Module Status Indicator
14 VREF* Input Voltage Reference for A/D Inputs
15 Associate / AD5* / DIO5* Either Associated Indicator, Analog Input 5 or Digital I/O 5
16 RTS* / AD6* / DIO6* Either Request-to-Send Flow Control, Analog Input 6 or
Digital I/O 6
17 AD3* / DIO3* Either Analog Input 3 or Digital I/O 3
18 AD2* / DIO2* Either Analog Input 2 or Digital I/O 2
19 AD1* / DIO1* Either Analog Input 1 or Digital I
20 AD0* / DIO0* Either Analog Input 0 or Digital I/O
BVRM Page 40
HOW IT’S WORKS
ZigBee basically uses digital radios to allow devices to communicate with one another.
A typical ZigBee network consists of several types of devices. A network coordinator is
a device that sets up the network, is aware of all the nodes within its network, and
manages both the information about each node as well as the information that is being
transmitted/received within the network. Every ZigBee network must contain a network
coordinator. Other Full Function Devices (FFD's) may be found in the network, and
these devices support all of the 802.15.4 functions. They can serve as network
coordinators, network routers, or as devices that interact with the physical world. The
final device found in these networks is the Reduced Function Device (RFD), which
usually only serve as devices that interact with the physical world. An example of a
ZigBee network is shown below in
The figure above introduces the concept of the ZigBee network topology. Several
topologies are supported by ZigBee, including star, mesh, and cluster tree. Star and
mesh networking are both shown in the figure above. As can be seen, star topology is
most useful when several end devices are located close together so that they can
communicate with a single router node. That node can then be a part of a larger mesh
network that ultimately communicates with the network coordinator. Mesh
BVRM Page 41
networking allows for redundancy in node links, so that if one node goes down,
devices can find an alternative path to communicate with one another. Figures 5.3
provide an example of
ZigBee operates in two main modes: non-beacon mode and beacon mode. Beacon mode
is a fully coordinated mode in that all the device know when to coordinate with one
another. In this mode, the network coordinator will periodically "wake-up" and send out
a beacon to the devices within its network. This beacon subsequently wakes up each
device, who must determine if it has any message to receive. If not, the device returns to
sleep, as will the network coordinator, once its job is complete. Non-beacon mode, on the
other hand, is less coordinated, as any device can communicate with the coordinator at
will. However, this operation can cause different devices within the network to interfere
with one another, and the coordinator must always be awake to listen for signals, thus
requiring more power. In any case, ZigBee obtains its overall low power consumption
because the majority of network devices are able to remain inactive over long periods of
time.
BVRM Page 42
APPLICATIONS:
Figure5.4:Zigbee Applications
CHAPTER 6
SOFTWARE TOOLS
BVRM Page 43
Figure6.1:Keil Compiler Professional kit
Keil Compiler:
Keil compiler is software used where the machine language code is written and compiled.
After compilation, the machine source code is converted into hex code which is to be
dumped
into the microcontroller for further processing. Keil compiler also supports C language
code.
Fig 6.2compile the program
BVRM Page 44
Fig 6..3 Run the compiled program
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. Unless you have to
use the tolls on the command line, the choice is clear. KEIL Greatly simplifies the process
of creating and testing an embedded application.
Projects
The user of KEIL centers on “projects”. A project is a list of all the source files
required to build a single application, all the tool options which specify exactly how to
build the application, and – if required – how the application should be simulated. A
project contains enough information to take a set of source files and generate exactly the
binary code required for the application. KEIL can then execute each tool with the correct
options. It is also possible to create new projects in KEIL. Source files are added to the
project and the tool options are set as required. The project can then be saved to preserve
the settings. The project also stores such things as which windows were left open in the
simulator/debugger, so when a project is reloaded and the simulator or debugger started,
all the desired windows are opened. KEIL project files have the extension
Simulator/Debugger
BVRM Page 45
The simulator/ debugger in KEIL can perform a very detailed simulation of a
micro controller along with external signals. It is possible to view the precise execution
time of a single assembly instruction, or a single line of C code, all the way up to the
entire application, simply by entering the crystal frequency. A window can be opened for
each peripheral on the device, showing the state of the peripheral. This enables quick
trouble shooting of mis-configured peripherals. Breakpoints may be set on either
assembly instructions or lines of C code, and execution may be stepped through one
instruction or C line at a time. The contents of all the memory areas may be viewed along
with ability to find specific variables. In addition the registers may be viewed allowing a
detailed view of what the microcontroller is doing at any point in time.
The Keil Software 8051 development tools listed below are the programs you
use to compile your 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 relocatable object modules from
your C source code,
A51 Macro Assembler: creates relocatable object modules from your 8051
assembler source code,
BL51 Linker/Locator: combines relocatable object modules created by the compiler
and assembler into the final absolute object module,
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
SOFTWARE CODING:
#include<reg51.h>
#include<intrins.h>
sbit m1=P1^0;
sbit m12=P1^1;
BVRM Page 46
sbit m2=P1^2;
sbit m21=P1^3;
void serial_init();
void DCmotorForward();
void DCmotorReverse();
void DCmotorLeft();
void DCmotorRight();
void stop();
void delay(unsigned int);
unsigned char flag;
void main()
{
serial_init();
while(1)
{
if(flag==1)
{
if(SBUF=='f'||SBUF=='F')
{
DCmotorForward();
}
else if(SBUF=='b'||SBUF=='B')
{
DCmotorReverse();
}
else if(SBUF=='l'||SBUF=='L')
{
DCmotorLeft();
delay(10);
stop();
}
else if(SBUF=='r'||SBUF=='R')
{
BVRM Page 47
DCmotorRight();
delay(10);
stop();
}
else if(SBUF=='s'||SBUF=='S')
{
stop();
}
}
}
}
void serial_init()
{
EA=1;
ES=1;
SCON=0X50;
TMOD=0X20;
TH1=0XFD;
TR1=1;
}
void serial() interrupt 4
{
if(RI==1)
{
flag=1;
RI=0;
}
}
void DCmotorForward()
{
m1=1;
m12=0;
m2=1;
BVRM Page 48
m21=0;
}
void DCmotorReverse()
{
m1=0;
m12=1;
m2=0;
m21=1;
}
void DCmotorRight()
{
m1=1;
m12=0;
m2=0;
m21=0;
}
void DCmotorLeft()
{
m1=0;
m12=0;
m2=1;
m21=0;
}
void stop()
{
P1=0x00;
}
void delay(unsigned int T)
{
int j;
while(T--)
for(j=0;j<-180;j++);
}
BVRM Page 49
.
RESULTS:
HARDWARE KIT:
BVRM Page 50
CONCLUSION:
This project focuses on developing an embedded system to create a rescue robot which is
used for fire fighters to send the robot into the fire building and help to rescue the people
from the building. Wireless personal Area Networking applies not only to household
BVRM Page 51
devices, but also to individualised office automation applications, ZigBee is here to stay.
It is more than likely the basis of future home-networking solutions.
BIBLOGRAPHY:
http://www.ZigBee.org
http://www.ieee802.org/15
http:// bheile@ieee.org
BVRM Page 52
www.ece projects.com
www.latest ece projects.com
www.datasheetcatalog.com(for MAX232,L293D,ZIGBEE)
BVRM Page 53
BVRM Page 54