Sie sind auf Seite 1von 78

Zigbee and I-button based attendence

CHAPTER 1

1
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

INTRODUCTION
1.1 INTRODUCTION:
Now days we taking the attendance by manually its take much time for taking the attendance. It is difficult to man and time waste process .Different types of drawbacks are placed by using i-button technology we can overcome those problems. The information about the person is inbuilt in I-button chip. The chip contain 16mm stainless steel can. Because of this unique and durable container , up-to-date information can travel with organization or industry. ZigBee is a wireless technology developed as an open global standard to address the unique needs of low-cost, low-power, wireless sensor networks. Zigbee is the set of specs built around the IEEE 802.15.4 wireless protocol. As Zigbee is the upcoming technology in wireless field, we had tried to demonstrate its way of functionality and various aspects like kinds, advantages and disadvantages using a small application of controlling the any kind of electronic devices and machines. The Zigbee technology is broadly adopted for bulk and fast data transmission over a dedicated channel. This project consists of Zigbee based system that transmits the wireless signals according to the voice input given by the user. At the receiver (airhostess) end the information will be displayed on LCD in English language. Here when the user announces the voice command stored predefined by the user while boarding the plane, then micro controller transmits that information through Zigbee based transmitter. The information received by the Zigbee receiver and fed to the controller at that system which process the information and displays the appropriate information relating to data received will be displayed on LCD. a person or object anywhere they go. These I-button will provide the security for each and every person of our

2
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

1.2 PROJECT OVERVIEW:


An embedded system is a combination of software and hardware to perform a dedicated task. Some of the main devices used in embedded products are Microprocessors and Microcontrollers. Microprocessors are commonly referred to as general purpose processors as they simply accept the inputs, process it and give the output. In contrast, a microcontroller not only accepts the data as inputs but also manipulates it, interfaces the data with various devices, controls the data and thus finally gives the result. The project is Zigbee based attendance alert system with person details by using i-button technology..

3
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

CHAPTER 2

EMBEDDED SYSTEMS
4
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

2.1 EMBEDDED SYSTEMS:


An embedded system is a computer system designed to perform one or a few dedicated functions often with real-time computing constraints. It is embedded as part of a complete device often including hardware and mechanical parts. By contrast, a general-purpose computer, such as a personal computer (PC), is designed to be flexible and to meet a wide range of end-user needs. Embedded systems control many devices in common use today. Embedded systems are controlled by one or more main processing cores that are typically either microcontrollers or digital signal processors (DSP). The key characteristic, however, is being dedicated to handle a particular task, which may require very powerful processors. For example, air traffic control systems may usefully be viewed as embedded, even though they involve mainframe computers and dedicated regional and national networks between airports and radar sites. (Each radar probably includes one or more embedded systems of its own.) Since the embedded system is dedicated to specific tasks, design engineers can optimize it to reduce the size and cost of the product and increase the reliability and performance. Some embedded systems are mass-produced, benefiting from economies of scale. Physically embedded systems range from portable devices such as digital watches and MP3 players, to large stationary installations like traffic lights, factory controllers, or the systems controlling nuclear power plants. 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. In general, "embedded system" is not a strictly definable term, as most systems have some element of extensibility or programmability. For example, handheld computers share some elements with embedded systems such as the operating systems and microprocessors which power them, but they allow different applications to be loaded and peripherals to be connected. Moreover, even systems which don't expose programmability as a primary feature generally need to support software updates. On a continuum from "general purpose" to "embedded", large application systems will have subcomponents at most points even if the system as a whole is "designed to perform one or a few dedicated functions", and is thus appropriate to call "embedded". A modern example of embedded system is shown in fig: 2.1.
5
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

Fig 2.1:A modern example of embedded system Labeled parts include microprocessor (4), RAM (6), flash memory (7).Embedded systems programming is not like normal PC programming. In many ways, programming for an embedded system is like programming PC 15 years ago. The hardware for the system is usually chosen to make the device as cheap as possible. Spending an extra dollar a unit in order to make things easier to program can cost millions. Hiring a programmer for an extra month is cheap in comparison. This means the programmer must make do with slow processors and low memory, while at the same time battling a need for efficiency not seen in most PC applications. Below is a list of issues specific to the embedded field. 2.1.1 HISTORY: In the earliest years of computers in the 193040s, computers were sometimes dedicated to a single task, but were far too large and expensive for most kinds of tasks performed by embedded computers of today. Over time however, the concept of programmable controllers evolved from traditional electromechanical sequencers, via solid state devices, to the use of computer technology. One of the first recognizably modern embedded systems was the Apollo Guidance Computer, developed by Charles Stark Draper at the MIT Instrumentation Laboratory. At the project's
6
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

inception, the Apollo guidance computer was considered the riskiest item in the Apollo project as it employed the then newly developed monolithic integrated circuits to reduce the size and weight. An early mass-produced embedded system was the autonetics D-17 guidance computer for the Minuteman missile, released in 1961. It was built from transistor logic and had a hard disk for main memory. When the Minuteman II went into production in 1966, the D-17 was replaced with a new computer that was the first high-volume use of integrated circuits. 2.1.2 TOOLS Embedded development makes up a small fraction of total programming. There's also a large number of embedded architectures, unlike the PC world where 1 instruction set rules, and the Unix world where there's only 3 or 4 major ones. This means that the tools are more expensive. It also means that they're lowering featured, and less developed. On a major embedded project, at some point you will almost always find a compiler bug of some sort. Debugging tools are another issue. Since you can't always run general programs on your embedded processor, you can't always run a debugger on it. This makes fixing your program difficult. Special hardware such as JTAG ports can overcome this issue in part. However, if you stop on a breakpoint when your system is controlling real world hardware (such as a motor), permanent equipment damage can occur. As a result, people doing embedded programming quickly become masters at using serial IO channels and error message style debugging. 2.1.3 RESOURCES: To save costs, embedded systems frequently have the cheapest processors that can do the job. This means your programs need to be written as efficiently as possible. When dealing with large data sets, issues like memory cache misses that never matter in PC programming can hurt you. Luckily, this won't happen too often- use reasonably efficient algorithms to start, and optimize only when necessary. Of course, normal profilers won't work well, due to the same reason debuggers don't work well. Memory is also an issue. For the same cost savings reasons, embedded systems usually have the least memory they can get away with. That means their algorithms must be memory efficient

7
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

(unlike in PC programs, you will frequently sacrifice processor time for memory, rather than the reverse). It also means you can't afford to leak memory. Embedded applications generally use deterministic memory techniques and avoid the default "new" and "malloc" functions. 2.1.4 REAL TIME ISSUES: Embedded systems frequently control hardware, and must be able to respond to them in real time. Failure to do so could cause inaccuracy in measurements, or even damage hardware such as motors. This is made even more difficult by the lack of resources available. Almost all embedded systems need to be able to prioritize some tasks over others, and to be able to put off/skip low priority tasks such as UI in favor of high priority tasks like hardware control.

2.2 NEED FOR EMBEDDED SYSTEMS:


The uses of embedded systems are virtually limitless, because every day new products are introduced to the market that utilizes embedded computers in novel ways. In recent years, hardware such as microprocessors, microcontrollers, and FPGA chips have become much cheaper. So when implementing a new form of control, it's wiser to just buy the generic chip and write your own custom software for it. Producing a custom-made chip to handle a particular task or set of tasks costs far more time and money. 2.2.1 DEBUGGING: Embedded debugging may be performed at different levels, depending on the facilities available. From simplest to most sophisticate they can be roughly grouped into the following areas: 1. Interactive resident debugging, using the simple shell provided by the embedded operating system (e.g. Forth and Basic)
2. External debugging using logging or serial port output to trace operation using

either a monitor in flash or using a debug server like the Remedy Debugger which even works for heterogeneous multi core systems. 3. An in-circuit debugger (ICD), a hardware device that connects to the microprocessor via a JTAG or Nexus interface. This allows the operation of the microprocessor to be controlled externally, but is typically restricted to specific debugging capabilities in the processor.
8
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

4. An in-circuit emulator replaces the microprocessor with a simulated equivalent, providing full control over all aspects of the microprocessor. 5. A complete emulator provides a simulation of all aspects of the hardware, allowing all of it to be controlled and modified and allowing debugging on a normal PC. 6. Unless restricted to external debugging, the programmer can typically load and run software through the tools, view the code running in the processor, and start or stop its operation. The view of the code may be as assembly code or source-code. 2.2.2 RELIABILITY: Embedded systems often reside in machines that are expected to run continuously for years without errors and in some cases recover by them if an error occurs. Therefore the software is usually developed and tested more carefully than that for personal computers, and unreliable mechanical moving parts such as disk drives, switches or buttons are avoided. Specific reliability issues may include: 1. The system cannot safely be shut down for repair, or it is too inaccessible to repair. Examples include space systems, undersea cables, navigational beacons, bore-hole systems, and automobiles. 2. The system must be kept running for safety reasons. "Limp modes" are less tolerable. Often backups are selected by an operator. Examples include aircraft navigation, reactor control systems, safety-critical chemical factory controls, train signals, engines on single-engine aircraft. 3. The system will lose large amounts of money when shut down: Telephone switches, factory controls, bridge and elevator controls, funds transfer and market making, automated sales and service.

2.3 EXPLANATION OF EMBEDDED SYSTEMS:


2.3.1 SOFTWARE ARCHITECTURE: There are several different types of software architecture in common use.
9
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence 1. Simple Control Loop:

In this design, the software simply has a loop. The loop calls subroutines, each of which manages a part of the hardware or software.

2. Interrupt Controlled System: Some embedded systems are predominantly interrupt controlled. This means that tasks performed by the system are triggered by different kinds of events. An interrupt could be generated for example by a timer in a predefined frequency, or by a serial port controller receiving a byte. These kinds of systems are used if event handlers need low latency and the event handlers are short and simple. Usually these kinds of systems run a simple task in a main loop also, but this task is not very sensitive to unexpected delays. Sometimes the interrupt handler will add longer tasks to a queue structure. Later, after the interrupt handler has finished, these tasks are executed by the main loop. This method brings the system close to a multitasking kernel with discrete processes. 3. Cooperative Multitasking: A non-preemptive multitasking system is very similar to the simple control loop scheme, except that the loop is hidden in an API. The programmer defines a series of tasks, and each task gets its own environment to run in. When a task is idle, it calls an idle routine, usually called pause, wait, yield, nop (stands for no operation), etc. 4. Primitive Multitasking: In this type of system, a low-level piece of code switches between tasks or threads based on a timer (connected to an interrupt). This is the level at which the system is generally considered to have an "operating system" kernel. Depending on how much functionality is required, it introduces more or less of the complexities of managing multiple tasks running conceptually in parallel. 2.3.2 STAND ALONE EMBEDDED SYSTEM:

10
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

These systems takes the input in the form of electrical signals from transducers or commands from human beings such as pressing of a button etc.., process them and produces desired output. This entire process of taking input, processing it and giving output is done in standalone mode. Such embedded systems comes under stand alone embedded system. 2.3.3 REAL-TIME EMBEDDED SYSTEMS: Embedded systems which are used to perform a specific task or operation in a specific time period those systems are called as real-time embedded systems. There are two types of realtime embedded systems. 1. Hard Real-time embedded systems: These embedded systems follow an absolute dead line time period i.e.., if the tasking is not done in a particular time period then there is a cause of damage to the entire equipment. Eg: consider a system in which we have to open a valve within 30 milliseconds. If this valve is not opened in 30 ms this may cause damage to the entire equipment. So in such cases we use embedded systems for doing automatic operations. 2. Soft Real Time embedded systems: These embedded systems follow a relative dead line time period i.e.., if the task is not done in a particular time that will not cause damage to the equipment. Eg: Consider a TV remote control system, if the remote control takes a few milliseconds delay it will not cause damage either to the TV or to the remote control. These systems which will not cause damage when they are not operated at considerable time period those systems comes under soft real-time embedded systems.

2.3.4 NETWORK COMMUNICATION EMBEDDED SYSTEMS: A wide range network interfacing communication is provided by using embedded systems. Eg:

11
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

1. Consider a web camera that is connected to the computer with internet can be used to spread communication like sending pictures, images, videos etc.., to another computer with internet connection throughout anywhere in the world. 2. Consider a web camera that is connected at the door lock. Whenever a person comes near the door, it captures the image of a person and sends to the desktop of your computer which is connected to internet. This gives an alerting message with image on to the desktop of your computer, and then you can open the door lock just by clicking the mouse. Fig: 2.2 show the network communications in embedded systems.

Fig 2.3.4: Network communication embedded systems

12
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

CHAPTER 3

13
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

HARDWARE DESCRIPTION
3.1 INTRODUCTION:
In this chapter the block diagram of the project and design aspect of independent modules are considered. In this diagram the main modules are micro controller, zigbee transmitter LCD,crystal oscillator,reset and LED indicators.

2.1 AT89S52
2.2.1 A BRIEF HISTORY OF 8051 In 1981, Intel Corporation introduced an 8 bit microcontroller called 8051. This microcontroller had 128 bytes of RAM, 4K bytes of chip ROM, two timers, one serial port, and four ports all on a single chip. At the time it was also referred as A SYSTEM ON A CHIP AT89S52: The AT89S52 is a low-power, high-performance CMOS 8-bit microcontroller with 8K bytes of in-system programmable Flash memory. The device is manufactured using Atmels high-density nonvolatile memory technology and is compatible with the industry-standard 80C51 instruction set and pin out. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with insystem programmable Flash on a monolithic chip, the Atmel AT89S52 is a powerful microcontroller, which provides a highly flexible and cost-effective solution to many, embedded control applications. The AT89S52 provides the following standard features: 8K bytes of Flash, 256 bytes of RAM, 32 I/O lines, Watchdog timer, two data pointers, three 16-bit timer/counters, a six-vector two-level interrupt architecture, a full duplex serial port, on-chip oscillator, and clock circuitry. In addition, the AT89S52 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port, and interrupt system to continue functioning. The Power-down mode saves the RAM con-tents but freezes the oscillator, disabling all other chip functions until the next interrupt

14
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

8031 has 128 bytes of RAM, two timers and 6 interrupts.

8051 has 4K ROM, 128 bytes of RAM, two timers and 6 interrupts. 8052 has 8K ROM, 256 bytes of RAM, three timers and 8 interrupts.

Of the three microcontrollers, 8051 is the most preferable. Microcontroller supports both serial and parallel communication. In the concerned project 8052 microcontroller is used. Here microcontroller used is AT89S52, which is manufactured by ATMEL laboratories. The 8051 is the name of a big family of microcontrollers. The device which we are going to use along this tutorial is the 'AT89S52' which is a typical 8051 microcontroller manufactured by Atmel. Note that this part doesn't aim to explain the functioning of the different
15
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

components of a 89S52 microcontroller, but rather to give you a general idea of the organization of the chip and the available features, which shall be explained in detail along this tutorial. The block diagram provided by Atmel in their datasheet showing the architecture the 89S52 device can seem very complicated, and since we are going to use the C high level language to program it, a simpler architecture can be represented as the figure 1.2.A. This figure shows the main features and components that the designer can interact with. You can notice that the 89S52 has 4 different ports, each one having 8 Input/output lines providing a total of 32 I/O lines. Those ports can be used to output DATA and orders do other devices, or to read the state of a sensor, or a switch. Most of the ports of the 89S52 have 'dual function' meaning that they can be used for two different functions: the fist one is to perform input/output operations and the second one is used to implement special features of the microcontroller like counting external pulses, interrupting the execution of the program according to external events, performing serial data transfer or connecting the chip to a computer to update the software. NECESSITY OF MICROCONTROLLERS: Microprocessors brought the concept of programmable devices and made many applications of intelligent equipment. Most applications, which do not need large amount of data and program memory, tended to be costly. The microprocessor system had to satisfy the data and program requirements so, sufficient RAM and ROM are used to satisfy most applications .The peripheral control equipment also had to be satisfied. Therefore, almost all-peripheral chips were used in the design. Because of these additional peripherals cost will be comparatively high. An example: 8085 chip needs: An Address latch for separating address from multiplex address and data.32-KB RAM and 32-KB ROM to be able to satisfy most applications. As also Timer / Counter, Parallel programmable port, Serial port, and Interrupt controller are needed for its efficient applications.
16
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

In comparison a typical Micro controller 8051 chip has all that the 8051 board has except a reduced memory as follows. 4K bytes of ROM as compared to 32-KB, 128 Bytes of RAM as compared to 32-KB.
Bulky: On comparing a board full of chips (Microprocessors) with one chip with all components in it (Microcontroller). Debugging: Lots of Microprocessor circuitry and program to debug. In Micro controller there is no Microprocessor circuitry to debug. Slower Development time: As we have observed Microprocessors need a lot of debugging at board level and at program level, where as, Micro controller do not have the excessive circuitry and the built-in peripheral chips are easier to program for operation. So peripheral devices like Timer/Counter, Parallel programmable port, Serial Communic ation Port, Interrupt controller and so on, which were most often used were integrated with the Microprocessor to present the Micro controller .RAM and ROM also were integrated in the same chip. The ROM size was anything from 256 bytes to 32Kb or more. RAM was optimized to minimum of 64 bytes to 256 bytes or more. Microprocessor has following instructions to perform: 1. Reading instructions or data from program memory ROM. 2. Interpreting the instruction and executing it. 3. Microprocessor Program is a collection of instructions stored in a Nonvolatile memory. 4. Read Data from I/O device 5. Process the input read, as per the instructions read in program memory. 6. Read or write data to Data memory. 7. Write data to I/O device and output the result of processing to O/P device.

2.1.2 Introduction to AT89S52


The system requirements and control specifications clearly rule out the use of 16, 32 or 64 bit micro controllers or microprocessors. Systems using these may be earlier to implement due to large number of internal features. They are also faster and more reliable but, the above

17
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

application is satisfactorily served by 8-bit micro controller. Using an inexpensive 8-bit Microcontroller will doom the 32-bit product failure in any competitive market place. Coming to the question of why to use 89S52 of all the 8-bit Microcontroller available in the market the main answer would be because it has 8kB Flash and 256 bytes of data RAM32 I/O lines, three 16-bit timer/counters, a Eight-vector two-level interrupt architecture, a full duplex serial port, on-chip oscillator, and clock circuitry. In addition, the AT89S52 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port, and interrupt system to continue functioning. The Power down Mode saves the RAM contents but freezes the oscillator, disabling all other chip functions until the next hardware reset. The Flash program memory supports both parallel programming and in Serial In-System Programming (ISP). The 89S52 is also InApplication Programmable (IAP), allowing the Flash program memory to be reconfigured even while the application is running. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89S52 is a powerful microcomputer which provides a highly flexible and cost effective solution to many embedded control applications.

2.1.3 FEATURES
Compatible with MCS-51 Products 8K Bytes of In-System Reprogrammable Flash Memory Fully Static Operation: 0 Hz to 33 MHz Three-level Program Memory Lock 256 x 8-bit Internal RAM 32 Programmable I/O Lines Three 16-bit Timer/Counters Eight Interrupt Sources Programmable Serial Channel Low-power Idle and Power-down Modes 4.0V to 5.5V Operating Range
18
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

Full Duplex UART Serial Channel Interrupt Recovery from Power-down Mode Watchdog Timer Dual Data Pointer Power-off Flag Fast Programming Time Flexible ISP Programming (Byte and Page Mode)

2.1.4 PIN DIAGRAM

FIG-2 PIN DIAGRAM OF 89S52 IC

2.1.5 PIN DESCRIPTION Pin Description


VCC: Supply voltage. GND: Ground

19
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

Port 0 Port 0 is an 8-bit open drain bidirectional I/O port. As an output port, each pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as high impedance inputs. Port 0 can also be configured to be the multiplexed low order address/data bus during accesses to external program and data memory. In this mode, P0 has internal pull-ups. Port 0 also receives the code bytes during Flash programming and outputs the code bytes during program verification.External pull-ups are required during program verification. Port 1 Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 1 output buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins, they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 1 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. In addition, P1.0 and P1.1 can be configured to be the timer/counter 2 external count input (P1.0/T2) and the timer/counter 2 trigger input (P1.1/T2EX), respectively, as shown in the following table. Port 1 also receives the low-order address bytes during Flash programming and verification.

Port 2 Port 2 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 2 output buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins, they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 2 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. Port 2 emits the high-order address byte during fetches from external program memory and during accesses to external data memory that uses 16-bit addresses (MOVX @ DPTR). In this application, Port 2 uses strong internal pull-ups when emitting 1s. During accesses to external data memory that uses 8-bit addresses (MOVX @ RI), Port 2 emits the contents of the P2 Special Function Register. Port 2

20
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

also receives the high-order address bits and some control signals during Flash programming and verification. Port 3 Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 3 output buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins, they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will source current (IIL) because of the pull-ups. Port 3 also serves the functions of various special features of the AT89S52, as shown in the following table. Port 3 also receives some control signals for Flash programming and verification.

RST

Reset input. A high on this pin for two machine cycles while the oscillator is running resets the device. This pin drives High for 96 oscillator periods after the Watchdog times out. The DISRTO bit in SFR AUXR (address 8EH) can be used to disable this feature. In the default state of bit DISRTO, the RESET HIGH out feature is enabled. ALE/PROG Address Latch Enable (ALE) is an output pulse for latching the low byte of the address during accesses to external memory. This pin is also the program pulse input (PROG) during Flash programming. In normal operation, ALE is emitted at a constant rate of 1/6 the oscillator frequency and may be used for external timing or clocking purposes. Note, however, that one ALE pulse is skipped during each access to external data memory. If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in external execution mode. PSEN

21
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

Program Store Enable (PSEN) is the read strobe to external program memory. When the AT89S52 is executing code from external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped during each access to external data memory. EA/VPP External Access Enable. EA must be strapped to GND in order to enable the device to fetch code from external program memory locations starting at 0000H up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset. EA should be strapped to VCC for internal program executions. This pin also receives the 12-volt programming enable voltage (VPP) during Flash programming. XTAL1 Input to the inverting oscillator amplifier and input to the internal clock operating circuit. XTAL2: Output from the inverting oscillator amplifier.

FIG-3 Functional block diagram of micro controller

22
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

The 8052 Oscillator and Clock: The heart of the 8051 circuitry that generates the clock pulses by which all the internal all internal operations are synchronized. Pins XTAL1 And XTAL2 is provided for connecting a resonant network to form an oscillator. Typically a quartz crystal and capacitors are employed. The crystal frequency is the basic internal clock frequency of the microcontroller. The manufacturers make 8051 designs that run at specific minimum and maximum frequencies typically 1 to 16 MHz

Fig-4 Oscillator and timing circuit


23
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

MEMORIES Types of memory:


The 8052 have three general types of memory. They are on-chip memory, external Code memory and external Ram. On-Chip memory refers to physically existing memory on the micro controller itself. External code memory is the code memory that resides off chip. This is often in the form of an external EPROM. External RAM is the Ram that resides off chip. This often is in the form of standard static RAM or flash RAM.

a) Code memory Code memory is the memory that holds the actual 8052 programs that is to be run. This memory is limited to 64K. Code memory may be found on-chip or off-chip. It is possible to have 8K of code memory on-chip and 60K off chip memory simultaneously. If only off-chip memory is available then there can be 64K of off chip ROM. This is controlled by pin provided as EA

b) Internal RAM The 8052 have a bank of 256 bytes of internal RAM. The internal RAM is found on-chip. So it is the fastest Ram available. And also it is most flexible in terms of reading and writing. Internal Ram is volatile, so when 8051 is reset, this memory is cleared. 256 bytes of internal memory are subdivided. The first 32 bytes are divided into 4 register banks. Each bank contains 8 registers. Internal RAM also contains 256 bits, which are addressed from 20h to 2Fh. These bits are bit addressed i.e. each individual bit of a byte can be addressed by the user. They are numbered 00h to FFh. The user may make use of these variables with commands such as SETB and CLR. Special Function registered memory:
24
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

Special function registers are the areas of memory that control specific functionality of the 8052 micro controller. a) Accumulator (0E0h) As its name suggests, it is used to accumulate the results of large no of instructions. It can hold 8 bit values. b) B registers (0F0h) The B register is very similar to accumulator. It may hold 8-bit value. The b register is only used by MUL AB and DIV AB instructions. In MUL AB the higher byte of the product gets stored in B register. In div AB the quotient gets stored in B with the remainder in A. c) Stack pointer (81h) The stack pointer holds 8-bit value. This is used to indicate where the next value to be removed from the stack should be taken from. When a value is to be pushed on to the stack, the 8052 first store the value of SP and then stores the value at the resulting memory location. When a value is to be popped from the stack, the 8052 returns the value from the memory location indicated by SP and then decrements the value of SP. d) Data pointer The SFRs DPL and DPH work together work together to represent a 16-bit value called the data pointer. The data pointer is used in operations regarding external RAM and some instructions code memory. It is a 16-bit SFR and also an addressable SFR. e) Program counter The program counter is a 16 bit register, which contains the 2 byte address, which tells the 8052 where the next instruction to execute to be found in memory. When the 8052 is initialized PC starts at 0000h. And is incremented each time an instruction is executes. It is not addressable SFR. f) PCON (power control, 87h)

25
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

The power control SFR is used to control the 8051s power control modes. Certain operation modes of the 8051 allow the 8051 to go into a type of sleep mode which consumes much lee power.

g) TCON (timer control, 88h) The timer control SFR is used to configure and modify the way in which the 8051s two timers operate. This SFR controls whether each of the two timers is running or stopped and contains a flag to indicate that each timer has overflowed. Additionally, some non-timer related bits are located in TCON SFR. These bits are used to configure the way in which the external interrupt flags are activated, which are set when an external interrupt occurs.

h) TMOD (Timer Mode, 89h) The timer mode SFR is used to configure the mode of operation of each of the two timers. Using this SFR your program may configure each timer to be a 16-bit timer, or 13 bit timer, 8-bit auto reload timer, or two separate timers. Additionally you may configure the timers to only count when an external pin is activated or to count events that are indicated on an external pin.

i) TO (Timer 0 low/high, address 8A/8C h)

26
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

These two SFRs taken together represent timer 0. Their exact behavior depends on how the timer is configured in the TMOD SFR; however, these timers always count up. What is configurable is how and when they increment in value. j) T1 (Timer 1 Low/High, address 8B/ 8D h) These two SFRs, taken together, represent timer 1. Their exact behavior depends on how the timer is configured in the TMOD SFR; however, these timers always count up.. k) P0 (Port 0, address 90h, bit addressable) This is port 0 latch. Each bit of this SFR corresponds to one of the pins on a micro controller. Any data to be outputted to port 0 is first written on P0 register. For e.g., bit 0 of port 0 is pin P0.0, bit 7 is pin p0.7. Writing a value of 1 to a bit of this SFR will send a high level on the corresponding I/O pin whereas a value of 0 will bring it to low level. l) P1 (port 1, address 90h, bit addressable) This is port latch1. Each bit of this SFR corresponds to one of the pins on a micro controller. Any data to be outputted to port 0 is first written on P0 register. For e.g., bit 0 of port 0 is pin P1.0, bit 7 is pin P1.7. Writing a value of 1 to a bit of this SFR will send a high level on the corresponding I/O pin whereas a value of 0 will bring it to low level. m) P2 (port 2, address 0A0h, bit addressable): This is a port latch2. Each bit of this SFR corresponds to one of the pins on a micro controller. Any data to be outputted to port 0 is first written on P0 register. For e.g., bit 0 of port 0 is pin P2.0, bit 7 is pin P2.7. Writing a value of 1 to a bit of this SFR will send a high level on the corresponding I/O pin whereas a value of 0 will bring it to low level. n) P3 (port 3, address B0h, bit addressable) :

This is a port latch3. Each bit of this SFR corresponds to one of the pins on a micro controller. Any data to be outputted to port 0 is first written on P0 register. For e.g., bit 0 of port 0 is pin P3.0, bit 7 is pin P3.7. Writing a value of 1 to a bit of this SFR will send a high level on the corresponding I/O pin whereas a value of 0 will bring it to low level.

27
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

o) IE (interrupt enable, 0A8h): The Interrupt Enable SFR is used to enable and disable specific interrupts. The low 7 bits of the SFR are used to enable/disable the specific interrupts, where the MSB bit is used to enable or disable all the interrupts. Thus, if the high bit of IE is 0 all interrupts are disabled regardless of whether an individual interrupt is enabled by setting a lower bit.

p) IP (Interrupt Priority, 0B8h) The interrupt priority SFR is used to specify the relative priority of each interrupt. On 8051, an interrupt may be either low or high priority. An interrupt may interrupt interrupts. For e.g., if we configure all interrupts as low priority other than serial interrupt. The serial interrupt always interrupts the system, even if another interrupt is currently executing. However, if a serial interrupt is executing no other interrupt will be able to interrupt the serial interrupt routine since the serial interrupt routine has the highest priority.

q) PSW (Program Status Word, 0D0h) The program Status Word is used to store a number of important bits that are set and cleared by 8052 instructions. The PSW SFR contains the carry flag, the auxiliary carry flag, the parity flag and the overflow flag. Additionally, it also contains the register bank select flags, which are used to select, which of the R register banks currently in use.

r) SBUF (Serial Buffer, 99h) SBUF is used to hold data in serial communication. It is physically two registers. One is writing only and is used to hold data to be transmitted out of 8052 via TXD. The other is read
28
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

only and holds received data from external sources via RXD. Both mutually exclusive registers use address 99h.

POWER SUPPLY
All digital circuits require regulated power supply. In this article, we are going to learn how to get a regulated positive supply from the mains supply.

Figure 1 shows the basic block diagram of a fixed regulated power supply. Let us go through each block. TRANSFORMER

A transformer consists of two coils also called as WINDINGS namely PRIMARY & SECONDARY.

29
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

They linked together through inductively coupled electrical conductors also called as CORE. A changing current in the primary causes a change in the Magnetic Field in the core & this in turn induces an alternating voltage in the secondary coil. If load applied to the secondary then an alternating current will flow through the load. If we consider an ideal condition then all the energy from the primary circuit will transferred to the secondary circuit through the magnetic field.

So

The secondary voltage of the transformer depends on the number of turns in the Primary as well as in the secondary.

Rectifier A rectifier is a device that converts an AC signal into DC signal. For rectification purpose we use a diode, a diode is a device that allows current to pass only in one direction i.e. when the anode of the diode is positive with respect to the cathode also called as forward biased condition & blocks current in the reversed biased condition. Rectifier classified as follows: 1) Half Wave rectifier

30
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

This is the simplest type of rectifier as you can see in the diagram a half wave rectifier consists of only one diode. When an AC signal applied to it during the positive half cycle, the diode is forward biased & current flows through it. However, during the negative half cycle diode is reverse biased & no current flows through it. Since only one-half of the input reaches the output, it is very inefficient to use in power supplies. 2) Full wave rectifier

Half wave rectifier is quite simple but it is very inefficient, for greater efficiency we would like to use both the half cycles of the AC signal. This can achieve by using a centertapped transformer i.e. we would have to double the size of secondary winding & provide connection to the center. Therefore, during the positive half cycle diode, D1 conducts & D2 is in reverse biased condition. During the negative half cycle diode, D2 conducts & D1 is reverse biased. Thus, we get both the half cycles across the load. One of the disadvantages of Full Wave Rectifier design is the necessity of using a center tapped transformer, thus increasing the size & cost of the circuit. This can avoid by using the Full Wave Bridge Rectifier.

31
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

3)

Bridge Rectifier

As the name suggests it converts the full wave i.e. both the positive & the negative half cycle into DC thus it is much more efficient than Half Wave Rectifier & that too without using a center tapped transformer thus much more cost effective than Full Wave Rectifier. Full Bridge Wave Rectifier consists of four diodes namely D1, D2, D3 and D4. During the positive half cycle diodes D1 & D4 conduct whereas in the negative half cycle diodes D2 & D3 conduct thus the diodes keep switching the transformer connections so we get positive half cycles in the output.

32
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

If we use a center-tapped transformer for a bridge rectifier, we can get both positive & negative half cycles, which can thus used for generating fixed positive & fixed negative voltages. FILTER CAPACITOR Even though half wave & full wave rectifier give DC output, none of them provides a constant output voltage. For this we require to smoothen the waveform received from the rectifier. This can be done by using a capacitor at the output of the rectifier this capacitor is also called as FILTER CAPACITOR or SMOOTHING CAPACITOR or RESERVOIR CAPACITOR. Even after using this capacitor a small amount of ripple will remain.

We place the Filter Capacitor at the output of the rectifier the capacitor will charge to the peak voltage during to zero, thus trying to keep the voltage as constant as possible.

each half cycle then will discharge its stored energy slowly through the load while the rectified voltage drops

33
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

If we go on increasing the value of the filter capacitor then the Ripple will decrease. Then the costing will increase. The value of the Filter capacitor depends on the current consumed by the circuit, the frequency of the waveform & the accepted ripple.

Where, Vr= accepted ripple voltage.( should not be more than 10% of the voltage) I= current consumed by the circuit in Amperes. F= frequency of the waveform. A half wave rectifier has only one peak in one cycle so F=25 Hz Whereas a full wave rectifier has Two peaks in one cycle so F=100 Hz. VOLTAGE REGULATOR A Voltage regulator is a device which converts varying input voltage into a constant regulated output voltage. Voltage regulator can be of two types 1). Linear Voltage Regulator: Also called as Resistive Voltage regulator because they dissipate the excessive voltage resistively as heat 2) Switching Regulators They regulate the output voltage by switching the Current ON/OFF very rapidly. Since either their output is ON or OFF it dissipates very low power thus achieving higher efficiency as compared to linear voltage regulators. However, they are more complex & generate high noise due to their switching action. For low level of output power, switching regulators tend to be costly but for higher output wattage, they are much cheaper than linear regulators. The most commonly available Linear Positive Voltage Regulators are the 78XX series where the XX indicates the output voltage. In addition, 79XX series is for Negative Voltage Regulators.

34
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

After filtering the rectifier output, the signal is given to a voltage regulator. The maximum input voltage that can be applied at the input is 35V.Normally there is a 2-3 Volts drop across the regulator so the input voltage should be at least 2-3 Volts higher than the output voltage. If the input voltage gets below the Vmin of the regulator due to the ripple voltage or due to any other reason the voltage regulator will not be able to produce the correct regulated voltage.

3 Circuit diagram:

Fig2.3. Circuit Diagram of power supply

IC 7805:
7805 is an integrated three-terminal positive fixed linear voltage regulator. It supports an input voltage of 10 volts to 35 volts and output voltage of 5 volts. It has a current rating of 1 amp although lower current models are available. Its output voltage fixed at 5.0V. The 7805 also has a built-in current limiter as a safety feature. 7805 manufactured by many companies, including National Semiconductors and Fairchild Semiconductors. The 7805 will automatically reduce output current if it gets too hot. The last two digits represent the voltage; for instance, the 7812 is a 12-volt regulator. The 78xx series of regulators designed to work in complement with the 79xx series of negative voltage regulators in systems that provide both positive and negative regulated voltages, since the 78xx series cannot regulate negative voltages in such a system.

35
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

The 7805 & 78 is one of the most common and well-known of the 78xx series regulators, as it's small component count and medium-power regulated 5V make it useful for powering TTL devices. Table2.1. Specifications of IC7805

SPECIFICATIONS Vout Vein - Vout Difference Operation Ambient Temp Output Imax

IC 7805 5V 5V - 20V 0 - 125C 1A

36
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

I-Button Introduction
The iButton device is a computer chip enclosed in a 16mm thick stainless steel can. Because of this unique and durable container, up-to-date information can travel with a person or object anywhere they go. The steel iButton device can be mounted virtually anywhere because it is rugged enough to withstand harsh environments, indoors or outdoors. It is small and portable enough to attach to a key fob, ring, watch, or other personal items, and be used daily for applications such as access control to buildings and computers, asset management, and various data logging tasks.

i-Button Components
The Can and Grommet
An iButton device uses its stainless steel 'can' as an electronic communications interface. Each can has a data contact, called the 'lid', and a ground contact, called the 'base'. Each of these contacts is connected to the silicon chip inside. The lid is the top of the can; the base forms the sides and the bottom of the can and includes a flange to simplify attaching the button to just about anything. The two contacts are separated by a polypropylene grommet.

The 1-Wire Interface


By simply touching the iButton device to the two contacts described above, you can communicate with it through our 1-Wire protocol. The 1-Wire interface has two communication speeds: standard mode at 16kbps, and overdrive mode at 142kbps.."

i-Button Versions
The iButton product line now comprises over 20 different products with different functionality added to the basic button. iButton devices come in the following varieties: Address Only Memory Real-Time Clock Secure Data Loggers

How Do I Get Information Into and Out of the iButton Device?


37
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence


Information is transferred between your iButton device and a PC with a momentary contact at up to 142kbps. You simply touch your iButton device to a Blue Dot receptor or other iButton probe, which is connected to a PC. The Blue Dot receptor is cabled to a 1-Wire adapter that is attached to a spare PC port. 1-Wire adapters exist for USB, serial, and parallel ports. The Blue Dot receptor and 1-Wire adapter are inexpensive.. The iButton device is also the ultimate information carrier for AutoID and many portable applications. All the latest handheld computers and PDAs can communicate with iButton devices.

How Durable Is an i-Button Device?


The silicon chip within the iButton device is protected by the ultimate durable material: stainless steel. You can drop an iButton device, step on it, or scratch it. The iButton device is wear-tested for 10-year durability.

What Can I Do with the i-Button Device?


The i-Button device is ideal for any application where information needs to travel with a person or object. Affixed to a key fob, watch, or ring, an iButton device can grant its owner access to a building, a PC, a piece of equipment, or a vehicle. Attached to a work tote, it can measure processes to improve efficiency, such as manufacturing, delivery, and maintenance. Some iButton devices can be used to store electronic cash for small transactions, such as transit systems, parking meters, and vending machines. The i-Button device can also be used as an electronic asset tag to store information needed to keep track of valuable capital equipment. .

What Are the Advantages of iButton Devices over Other Technologies?


When developing an i-Button solution for an application, you can consider many complementary technologies. Bar codes, RFID tags, magnetic stripe, prox, and smart cards are some of the possibilities. Unlike bar codes and magnetic stripe cards, most of the i-Button devices can be read AND be written to. In addition, the communication rate and product breadth of i-Button devices go well beyond the simple memory products typically available with RFID. As for durability, the thin plastic of smart cards is no match for the strength of the stainless-steel-clad i-Button device.

I Do Not Want to Build My Application Myself. Do You Provide Turnkey Solutions?


We have partnered with a number of companies called Authorized Solutions Developers, ASDs for short, who develop turnkey i-Button systems for access control, time and attendance tracking, payroll, truck fleet maintenance, manufacturing control, fare collection, and more. The ASDs can also develop custom iButton applications for youjust talk to them. You can use our i-Button Solutions Search to find our partners' solutions available worldwide.

3.6 ZIGBEE TECHNOLOGY


ZIGBEE Technology
38
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence


Zig-bee

Zig-bee is a specification for a suite of high level communication protocols using small, low-power digital radios based on the IEEE (Institute of Electrical and Electronics Engineers)802.15.4,2006 standard for wireless personal area networks (WPANs), such as wireless headphones connecting with cell phones via short-range radio. The technology defined by the Zig-bee specification intended to be simpler and less expensive than other WPANs, such as Bluetooth. Zig-bee is a targeted at radio frequency (RF) applications that require a low data rate, long battery life, and secure networking. Zig-bee is a low data rate, two-way standard for home automation and data networks. The standard specification for up to 254 nodes including one master, managed from a single remote control. Real usage examples of Zig-bee includes home automation tasks such as turning lights on, setting the home security system, or starting the VCR. With Zig-bee all these tasks can be done from anywhere in the home at the touch of a button. Zig-bee also allows for dial-in access via the Internet for automation control. Zig-bee protocol is optimized for very long battery life measured in months to years from inexpensive, off-the-shelf non-rechargeable batteries, and can control lighting, air conditioning and heating, smoke and fire alarms, and other security devices. The standard supports 2.4 GHz (worldwide), 868 MHz (Europe) and 915 MHz (Americas) unlicensed radio bands with range up to 100 meters. IEEE 802.15.4 IEEE 802.15.4 is standard which specifies the physical layer and medium access control for low-rate wireless personal area networks (LRWPAN's).This standard was chartered to investigate a low data rate solution with multi-month to multi-year battery life and very low complexity. It is
39
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

operating

in

an

unlicensed,

international

frequency

band.

Potential

applications are sensors, interactive toys, smart badges, remote controls, and home automation. 802.15.4 Is part of the 802.15 wireless personal-area network efforts at the IEEE? It is a simple packet-based radio protocol aimed at very low-cost, battery-operated widgets and sensors (whose batteries last years, not hours) that can intercommunicate and send low-bandwidth data to a centralized device. As of 2007, the current version of the standard is the 2006 revision. It is maintained by the IEEE 802.15 working group. It is the basis for the Zigbee specification, which further attempts to offer a complete networking solution by developing the upper layers which are not covered by the standard. 802.15.4 Protocol Data rates of 250 kbps with 10-100 meter range. Two addressing modes; 16-bit short and 64-bit IEEE addressing CSMA-CA channel access. Power management to ensure low power consumption 16 channels in the 2.4GHz ISM band Low duty cycle - Provides long battery life Low latency Support for multiple network topologies: Static, dynamic, star and mesh Up to 65,000 nodes on a network Comparison with other technologies Zig-Bee enables broad-based deployment of wireless networks with low-cost, low-power solutions. It provides the ability to run for years on inexpensive batteries for a host of monitoring applications: Lighting controls, AMR (Automatic Meter Reading), smoke and CO detectors, wireless telemetry, HVAC control, heating control, home security, Environmental controls and shade controls, etc.
40
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

Zigbee Technology: Wireless Control that Simply Works Why is Zigbee needed? There are a multitude of standards that address mid to high data rates for voice, PC LANs, video, etc. However, up till now there hasnt been a wireless network standard that meets the unique needs of sensors and control devices. Sensors and controls do not need high bandwidth but they do need low latency and very low energy consumption for long battery lives and for large device arrays. There are multitudes of proprietary wireless systems manufactured today to solve a multitude of problems that also do not require high data rates but do require low cost and very low current drain. These proprietary systems were designed because there were no standards that met their requirements. These legacy systems are creating significant interoperability problems with each other and with newer technologies. Zigbee/IEEE 802.15.4 - General Characteristics Dual PHY (2.4GHz and 868/915 MHz) Data rates of 250 kbps (@2.4 GHz), 40 kbps (@ 915 MHz), and 20 kbps (@868 MHz) Optimized for low duty-cycle applications (<0.1%) CSMA-CA channel access Yields high throughput and low latency for low duty cycle devices like sensors and controls Low power (battery life multi-month to years) Multiple topologies: star, peer-to-peer, mesh Addressing space of up to: 18,450,000,000,000,000,000 devices (64 bit IEEE address) 65,535 network nodes. Optional guaranteed time slot for applications requiring low latency Fully hand-shaked protocol for transfer reliability Range: 50m typical (5-500m based on environment)

41
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

ZIGBEE NETWORK TOPOLOGY:

PAN Coordinator

Full Function Device Communications Flow Reduced Function Device Star Topology

Peer-to-Peer topology Full function device

Cluster Tree Topology Communications flow

42
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

Three devices in network 1. zigbee PAN coordinator (MASTER) 2. zigbee router (full function device) 3. zigbee end device(reduced function device) ZIGBEE PROTOCOL STACK

ZigBee Stack System

43
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

PHYSICAL LAYER The physical layer designed to accommodate the need for a low cost yet allowing for high levels of integration. The use of direct sequence allows the analog circuitry to be very simple and The PHY provides two services: the PHY data service and PHY management service interfacing to the physical layer management entity (PLME). The PHY data service enables the transmission and reception of PHY protocol data units (PPDU) across the physical radio channel. The features of the PHY are activation and deactivation of the radio transceiver, energy detection(ED), link quality indication (LQI), channel selection, clear channel assessment (CCA) and transmitting as well as receiving packets across the physical medium. The standard offers two PHY options based on the frequency band. Both based on direct sequence spread spectrum (DSSS). The data rate is 250kbps at 2.4GHz, 40kbps at 915MHz and 20kbps at 868MHz. The higher data rate at 2.4GHz attributed to a higher-order modulation scheme. Lower frequency is providing longer range due to lower propagation losses. Low rate translated into better sensitivity and larger coverage area. Higher rate means higher throughput, Lower latency or lower duty cycle. There is a single channel between 868 and 868.6MHz, 10 channels between 902.0 and 928.0MHz, and 16 channels between 2.4 and 2.4835GHz. MAC LAYER The media access control (MAC) layer designed to allow multiple topologies without complexity. The power management operation does not require multiple modes of operation. The MAC allows a reduced functionality device (RFD) that need not have flash nor large amounts of ROM or RAM.

44
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

The MAC designed to handle large numbers of devices without requiring them to be parked. MAC Primitives: MAC Data Service MCPS-DATA exchange data packets between MAC and PHY MCPS-PURGE purge an MSDU from the transaction queue

MAC Management Service MLME-ASSOCIATE/DISASSOCIATE network association MLME-SYNC / SYNC-LOSS - device synchronization MLME-SCAN - scan radio channels MLME- COMM-STATUS communication status MLME-GET / -SET retrieve/set MAC PIB parameters MLME-START / BEACON-NOTIFY beacon management MLME-POLL - beaconless synchronization MLME-GTS - GTS management MLME-RESET request for MLME to perform reset MLME-ORPHAN - orphan device management MLME-RX-ENABLE - enabling/disabling of radio system

45
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

BEACON ENABLED NETWORK

Network Layer The responsibilities of the Zigbee NWK layer include: Starting a network: The ability to successful establish a new network Joining and leaving a network: The ability to gain membership (join) or relinquish membership (leave) a network. Configuring a new device: The ability to sufficiently configure the stack for operation as required Addressing: The ability of a Zigbee coordinator to assign addresses to devices joining the network Synchronization within a network: The ability for a device to achieve synchronization with another device either through tracking beacons or by polling Security: applying security to outgoing frames and removing security to terminating frames Routing: routing frames to their intended destinations.

46
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

Network Routing Overview Perhaps the most straightforward way to think of the Zigbee routing algorithm is as a hiera rchical routing strategy with table-driven optimizations applied where possible. NWK uses an algorithm that allows stack implementers and application developers to balance unit cost, battery drain, and complexity in producing Zigbee solutions to meet the specific cost-performance profile of their application. Started with the well-studied public-domain algorithm AODV and Motorolas Cluster-Tree algorithm and folding in ideas from Ember Corporations GRAd. Network Summary The network layer builds upon the IEEE 802.15.4 MACs features to allow extensibility of coverage. Additional clusters can be added networks can be consolidate or split up. Application layer The Zigbee application layer consists of the APS sub-layer, the ZDO and the manufacturer-defined application objects. The responsibilities of the APS sub-layer include maintaining tables for binding, which is the ability to match two devices together based on their services and their needs, and forwarding messages between bound devices. Another responsibility of the APS sub-layer is discovery, which is the ability to determine which other devices are operating in the personal operating space of a device. The responsibilities of the ZDO include defining the role of the device within the network (e.g., Zigbee coordinator or end device), initiating and/or responding to binding requests and establishing a secure relationship between network devices. The manufacturer-defined application objects implement the actual applications according to the Zigbee-defined application descriptions

Zigbee Device Object Defines the role of the device within the network (e.g., Zigbee coordinator or end device)

47
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

Initiates and/or responds to binding requests Establish a secure relationship between network devices selecting one of ZigBees security methods such as public key, symmetric key, etc. Application Support Layer: This layer provides the following services: Discovery: The ability to determine which other devices are operating in the personal operating space of a device Binding: The ability to match two or more devices together based on their services and their needs and forwarding messages between bound devices APPLICATIONS OF ZIGBEE TECHNOLOGY Typical application areas include

Home Entertainment and Control: Smart lighting, advanced temperature control, safety and security, movies and music Home Awareness Water sensors, power sensors, energy monitoring, smoke and fire detectors, smart appliances and access sensors

Mobile Services m-payment, m-monitoring and control, m-security and access control, m-healthcare and tele-assist Commercial Building Energy monitoring, HVAC, lighting, access control Industrial Plant Process control, asset management,

environmental management, energy management, industrial device control, machine-to-machine (M2M) communication

48
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

Zigbee vs Bluetooth
Zigbee looks rather like Bluetooth but is simpler, has a lower data rate and spends most of its time snoozing. This characteristic means that a node on a Zigbee network should be able to run for six months to two years on just two AA batteries. The operational range of Zigbee is 10-75m compared to 10m for Bluetooth (without a power amplifier). ZigBee sits below Bluetooth in terms of data rate. The data rate of Zigbee is 250kbps at 2.4GHz, 40kbps at 915MHz and 20kbps at 868MHz whereas that of Bluetooth is 1Mbps. ZigBee uses a basic master-slave configuration suited to static star networks of many infrequently used devices that talk via small data packets. It allows up to 254 nodes. Bluetooths protocol is more complex since it is gear towards handling voice, images and file transfers in ad hoc networks. Bluetooth devices can support scatter nets of multiple smaller non-synchronized networks (piconets). It only allows up to 8 slave nodes in a basic master-slave piconet set-up. When ZigBee node is powered down, it can wake up and get a packet in around 15 msec whereas Bluetooth device would take around 3sec to wake up and respond. ZIGBEE MODULE: Comparison with other technologies

Standard

ZigBee 802.15.4 1 100*

Wi-Fi 802.11b 1 100

Bluetooth 802.15.1 1 10

Transmission Range (meters)

49
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

Battery Life (days) Network Size (# of nodes) Application Stack Size (KB) Throughput kb/s)

100 1,000 > 64,000 Monitoring & Control 4 32 20 250

0.5 5.0 32 Web, Email, Video 1,000 11,000

1-7 7 Cable Replacement 250 720

Zigbee-compliant products operate in unlicensed bands worldwide, including 2.4GHz (global), 902 to 928MHz (Americas), and 868MHz (Europe). Raw data throughput rates of 250Kbps can be achieved at 2.4GHz (16 channels), 40Kbps at 915MHz (10 channels), and 20Kbps at 868MHz (1 channel). The transmission distance is expected to range from 10 to 100m, depending on power output and environmental characteristics. Like Wi-Fi, Zigbee uses direct-sequence spread spectrum in the 2.4GHz band, with offset-quadrature phase-shift keying modulation. Channel width is 2MHz with 5MHz channel spacing. The 868 and 900MHz bands also use direct-sequence spread spectrum but with binary-phase-shift keying modulation. ZIGBEE MODULE
SPECIFICATION :

Performance: XBee

Power output:: 1mW (+0 dBm) North American & International version Indoor/Urban range: Up to 100 ft (30 m) Outdoor/RF line-of-sight range: Up to 300 ft (90 m) RF data rate: 250 Kbps Interface data rate: Up to 115.2 Kbps Operating frequency: 2.4 GHz Receiver sensitivity: -92 dBm

Performance: XBee-PRO
50
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

Power output:

63 mW (+18 dBm) North American version 10 mW (+10 dBm) International version

2 3 4 5 6 7

Indoor/Urban range: Up to 300 ft (90 m) Outdoor/RF line-of-sight range: Up to 1 mile (1.6 km) RF LOS RF data rate: 250 Kbps Interface data rate: Up to 115.2 Kbps Operating frequency: 2.4 GHz Receiver sensitivity: -100 dBm (all variants)

Networking

Spread Spectrum type: DSSS (Direct Sequence Spread Spectrum) Networking topology: Point-to-point, point-to-multipoint, & peer-to-peer Error handling: Retries & acknowledgements Filtration options: PAN ID, Channel, and 64-bit addresses Channel capacity:

XBee: 16 Channels XBee-PRO: 12 Channels

Addressing: 65,000 network addresses available for each channel

Power

Supply voltage:

XBee: 2.8 - 3.4 VDC XBee-PRO: 2.8 - 3.4 VDC XBee Footprint Recommendation: 3.0 - 3.4 VDC

Transmit current:

XBee: 45 mA (@ 3.3 V) boost mode 35 mA (@ 3.3 V) normal mode XBee-PRO: 215 mA (@ 3.3 V)

Receive current:

XBee: 50 mA (@ 3.3 V)
51

DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence


4

XBee-PRO: 55 mA (@ 3.3 V)

Power-down sleep current:


XBee: <10 A at 25 C XBee-PRO: <10 A at 25 C

General

Frequency band: 2.4000 - 2.4835 GHz Interface options: 3V CMOS UART

Physical Properties

Size:

XBee: 0.960 in x 1.087 in (2.438 cm x 2.761 cm) XBee-PRO: 0.960 in x 1.297 in (2.438 cm x 3.294 cm)

2 3

Weight: 0.10 oz (3g) Antenna options: U.FL, Reverse Polarity SMA (RPSMA), chip antenna or Operating temperature: -40 C to 85 C (industrial)

wired whip antenna


4

2. The full function device FFD: The FFD is an intermediary router transmitting data from other devices. It needs lesser memory than the ZigBee coordinator node, and entails lesser manufacturing costs. It can operate in all topologies and can act as a coordinator. 3. The reduced function device RFD: This device is just capable of talking in the network; it cannot relay data from other devices. Requiring even less memory, (no flash, very little ROM and RAM), an RFD will thus be cheaper than an FFD. This device talks only to a network coordinator and can be implemented very simply in star topology. 3.6.3 ZIGBEE CHARACTERISTICS:
52
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

The focus of network applications under the IEEE 802.15.4 / ZigBee standard include the features of low power consumption, needed for only two major modes (Tx/Rx or Sleep), high density of nodes per network, low costs and simple implementation. These features are enabled by the following characteristics: 1. 2.4GHz and 868/915 MHz dual PHY modes This represents three license-free bands: 2.4-2.4835 GHz, 868-870 MHz and 902-928 MHz. The number of channels allotted to each frequency band is fixed at sixteen (numbered 11-26), one (numbered 0) and ten (numbered 1-10) respectively. The higher frequency band is applicable worldwide, and the lower band in the areas of North America, Europe, Australia and New Zealand. 2. Low power consumption, with battery life ranging from months to years.

Considering the number of devices with remotes in use at present, it is easy to see that more numbers of batteries need to be provisioned every so often, entailing regular (as well as timely), recurring expenditure. In the ZigBee standard, longer battery life is achievable by either of two means: continuous network connection and slow but sure battery drain, or intermittent connection and even slower battery drain. 3. Maximum data rates allowed for each of these frequency bands are fixed as 250 kbps @2.4 GHz, 40 kbps @ 915 MHz, and 20 kbps @868 MHz.

4. High throughput and low latency for low duty-cycle applications (<0.1%) 5. Channel access using Carrier Sense Multiple Access with Collision Avoidance (CSMA - CA) 6. Addressing space of up to 64 bit IEEE address devices, 65,535 networks 7. 50m typical range 8. Fully reliable hand-shacked data transfer protocol.

53
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

9. Different topologies as illustrated below: star, peer-to-peer, mesh

Figure 3.6.3: ZigBee Topologies ZigBee employs either of two modes, beacon or non-beacon to enable the to-and-fro data traffic. Beacon mode is used when the coordinator runs on batteries and thus offers maximum power savings, whereas the non-beacon mode finds favor when the coordinator is mainspowered. In the beacon mode, a device watches out for the coordinator's beacon that gets transmitted at periodically, locks on and looks for messages addressed to it. If message transmission is complete, the coordinator dictates a schedule for the next beacon so that the device goes to sleep'; in fact, the coordinator itself switches to sleep mode. While using the beacon mode, all the devices in a mesh network know when to communicate with each other. In this mode, necessarily, the timing circuits have to be quite accurate, or wake up sooner to be sure not to miss the beacon. This in turn means an increase in power consumption by the coordinator's receiver, entailing an optimal increase in costs.

54
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

Fig 3.6.4: Beacon Network Communication & Non-Beacon Network Communication The non-beacon mode will be included in a system where devices are asleep' nearly always, as in smoke detectors and burglar alarms. The devices wake up and confirm their continued presence in the network at random intervals. On detection of activity, the sensors spring to attention', as it were, and transmit to the ever-waiting coordinator's receiver (since it is mains-powered). However, there is the remotest of chances that a sensor finds the channel busy, in which case the receiver unfortunately would miss a call'. 3.6.4. ZIGBEE APPLICATIONS: 1. The ZigBee Alliance targets applications "across consumer, commercial, industrial and government markets worldwide". adoption, and rapid ROI. 2. Airbee Wireless Inc has tied up with Radio crafts AS to deliver "out-of-the-box" ZigBeeready solutions, the former supplying the software and the latter making the module platforms. With even light controls and thermostat producers joining the ZigBee Alliance, the list is growing healthily and includes big OEM names like HP, Philips, Motorola and Intel. ZigBee technology is designed to best suit these applications, for the reason that it enables reduced costs of development, very fast market

55
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

3. With ZigBee designed to enable two-way communications, not only will the consumer be able to monitor and keep track of domestic utilities usage, but also feed it to a computer system for data analysis. 4. A recent analyst report issued by West Technology Research Solutions estimates that by the year 2008, "annual shipments for ZigBee chipsets into the home automation segment alone will exceed 339 million units," and will show up in "light switches, fire and smoke detectors, thermostats, appliances in the kitchen, video and audio remote controls, landscaping, and security systems."

56
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

MAX 232

2.3.1 RS-232 WAVEFORM

TTL/CMOS Serial Logic Waveform The diagram above shows the expected waveform from the UART when using the common 8N1 format. 8N1 signifies 8 Data bits, No Parity and 1 Stop Bit. The RS-232 line, when idle is in the Mark State (Logic 1). A transmission starts with a start bit which is (Logic 0). Then each bit is sent down the line, one at a time. The LSB (Least Significant Bit) is sent first. A Stop Bit (Logic 1) is then appended to the signal to make up the transmission. The data sent using this method, is said to be framed. That is the data is framed between a Start and Stop Bit.

RS-232 Voltage levels


+3 to +25 volts to signify a "Space" (Logic 0) -3 to -25 volts for a "Mark" (logic 1). Any voltage in between these regions (i.e. between +3 and -3 Volts) is undefined. The data byte is always transmitted least-significant-bit first. The bits are transmitted at specific time intervals determined by the baud rate of the serial signal. This is the signal present on the RS-232 Port of your computer, shown below.
57
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

RS-232 Logic Waveform

2.3.2 RS-232 LEVEL CONVERTER


Standard serial interfacing of microcontroller (TTL) with PC or any RS232C Standard device, requires TTL to RS232 Level converter. A MAX232 is used for this purpose. It provides 2-channel RS232C port and requires external 10uF capacitors. The driver requires a single supply of +5V.

MAX 232 includes a Charge Pump, which generates +10V and -10V from a single 5v supply.

z
58
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

2.3.3 Serial communication


When a processor communicates with the outside world, it provides data in byte sized chunks. Computers transfer data in two ways: parallel and serial. In parallel data transfers, often more lines are used to transfer data to a device and 8 bit data path is expensive. The serial communication transfer uses only a single data line instead of the 8 bit data line of parallel communication which makes the data transfer not only cheaper but also makes it possible for two computers located in two different cities to communicate over telephone. Serial data communication uses two methods, asynchronous and synchronous. The synchronous method transfers data at a time while the asynchronous transfers a single byte at a time. There are some special IC chips made by many manufacturers for data communications. These chips are commonly referred to as UART (universal asynchronous receiver-transmitter) and USART (universal synchronous asynchronous receiver transmitter). The AT89C51 chip has a built in UART. In asynchronous method, each character is placed between start and stop bits. This is called framing. In data framing of asynchronous communications, the data, such as ASCII characters, are packed in between a start and stop bit. We have a total of 10 bits for a character: 8 bits for the ASCII code and 1 bit each for the start and stop bits. The rate of serial data transfer communication is stated in bps or it can be called as baud rate. To allow the compatibility among data communication equipment made by various manufacturers, and interfacing standard called RS232 was set by the Electronics industries Association in 1960. Today RS232 is the most widely used I/O interfacing standard. This standard is used in PCs and numerous types of equipment. However, since the standard was set long before the advent of the TTL logic family, its input and output voltage levels are not TTL compatible. In RS232, a 1 bit is represented by -3 to -25V, while a 0 bit is represented +3 to +25 V, making -3 to +3 undefined. For this reason, to connect any RS232 to a microcontroller system we must use voltage converters such as MAX232 to connect the TTL logic levels to RS232 voltage levels and vice versa. MAX232 ICs are commonly referred to as line drivers.

59
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

The RS232 cables are generally referred to as DB-9 connector. In labeling, DB-9P refers to the plug connector (male) and DB-9S is for the socket connector (female). The simplest connection between a PC and microcontroller requires a minimum of three pin, TXD, RXD, and ground. Many of the pins of the RS232 connector are used for handshaking signals. They are bypassed since they are not supported by the UART chip.

IBM PC/ compatible computers based on x86(8086, 80286, 386, 486 and Pentium) microprocessors normally have two COM ports. Both COM ports have RS232 type connectors. Many PCs use one each of the DB-25 and DB-9 RS232 connectors. The COM ports are designated as COM1 and COM2. We can connect the serial port to the COM 2 port of a PC for serial communication experiments. We use a DB9 connector in our arrangement.

60
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

61
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

3.7 LCD DISPLAY


3.7.1 LCD BACKGROUND: One of the most common devices attached to a micro controller is an LCD display. Some of the most common LCDs connected to the many microcontrollers are 16x2 and 20x2 displays. This means 16 characters per line by 2 lines and 20 characters per line by 2 lines, respectively.

3.7.2 BASIC 16X 2 CHARACTERS LCD

Fig3.7.2: LCD pin diagram The EN line is called "Enable." This control line is used to tell the LCD that we are sending it data. To send data to the LCD, our program should make sure this line is low (0) and then set the other two control lines and/or put data on the data bus.

62
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

The LCD requires 3 control lines as well as either 4 or 8 I/O lines for the data bus. The user may select whether the LCD is to operate with a 4-bit data bus or an 8-bit data bus. If a 4-bit data bus is used the LCD will require a total of 7 data lines (3 control lines plus the 4 lines for the data bus). If an 8-bit data bus is used the LCD will require a total of 11 data lines (3 control lines plus the 8 lines for the data bus). The three control lines are referred to as EN, RS, and RW. The EN line is called "Enable." This control line is used to tell the LCD that we are sending it data. To send data to the LCD, our program should make sure this line is low (0) and then set the other two control lines and/or put data on the data bus. When the other lines are completely ready, bring EN high (1) and wait for the minimum amount of time required by the LCD datasheet (this varies from LCD to LCD), and end by bringing it low (0) again.

The RS line is the "Register Select" line. When RS is low (0), the data is to be treated as a command or special instruction (such as clear screen, position cursor, etc.). When RS is high (1), the data being sent is text data which should be displayed on the screen. For example, to display the letter "T" on the screen we would set RS high. The RW line is the "Read/Write" control line. When RW is low (0), the information on the data bus is being written to the LCD. When RW is high (1), the program is effectively querying (or reading) the LCD. Only one instruction ("Get LCD status") is a read command. All others are write commands--so RW will almost always be low Finally, the data bus consists of 4 or 8 lines (depending on the mode of operation selected by the user). In the case of an 8-bit data bus, the lines are referred to as DB0, DB1, DB2, DB3, DB4, DB5, DB6, and DB7. 3.7.3 CIRCUIT DESCRIPTION: Above is the quite simple schematic. The LCD panel's Enable and Register Select is connected to the Control Port. The Control Port is an open collector / open drain output. While
63
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

most Parallel Ports have internal pull-up resistors, there is a few which don't. Therefore by incorporating the two 10K external pull up resistors, the circuit is more portable for a wider range of computers, some of which may have no internal pull up resistors. We make no effort to place the Data bus into reverse direction. Therefore we hard wire the R/W line of the LCD panel, into write mode. This will cause no bus conflicts on the data lines. As a result we cannot read back the LCD's internal Busy Flag which tells us if the LCD has accepted and finished processing the last instruction. This problem is overcome by inserting known delays into our program. The 10k Potentiometer controls the contrast of the LCD panel. Nothing fancy here. As with all the examples, I've left the power supply out. We can use a bench power supply set to 5v or use an onboard +5 regulator. Remember a few de-coupling capacitors, especially if we have trouble with the circuit working properly. a) SETB RW Handling the EN control line: As we mentioned above, the EN line is used to tell the LCD that we are ready for it to execute an instruction that we've prepared on the data bus and on the other control lines. Note that the EN line must be raised/ lowered before/after each instruction sent to the LCD regardless of whether that instruction is read or write text or instruction. In short, we must always manipulate EN when communicating with the LCD. EN is the LCD's way of knowing that we are talking to it. If we don't raise/lower EN, the LCD doesn't know we're talking to it on the other lines. Thus, before we interact in any way with the LCD we will always bring the EN line low with the following instruction: b) CLR EN And once we've finished setting up our instruction with the other control lines and data bus lines, we'll always bring this line high:
64
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

c) SETB EN The line must be left high for the amount of time required by the LCD as specified in its datasheet. This is normally on the order of about 250 nanoseconds, but checks the datasheet. In the case of a typical microcontroller running at 12 MHz, an instruction requires 1.08 microseconds to execute so the EN line can be brought low the very next instruction. However, faster microcontrollers (such as the DS89C420 which executes an instruction in 90 nanoseconds given an 11.0592 MHz crystal) will require a number of NOPs to create a delay while EN is held high. The number of NOPs that must be inserted depends on the microcontroller we are using and the crystal we have selected. The instruction is executed by the LCD at the moment the EN line is brought low with a final CLR EN instruction. 3.7.4 CHECKING THE BUSY STATUS OF THE LCD: As previously mentioned, it takes a certain amount of time for each instruction to be executed by the LCD. The delay varies depending on the frequency of the crystal attached to the oscillator input of the LCD as well as the instruction which is being executed. While it is possible to write code that waits for a specific amount of time to allow the LCD to execute instructions, this method of "waiting" is not very flexible. If the crystal frequency is changed, the software will need to be modified. A more robust method of programming is to use the "Get LCD Status" command to determine whether the LCD is still busy executing the last instruction received. The "Get LCD Status" command will return to us two tidbits of information; the information that is useful to us right now is found in DB7. In summary, when we issue the "Get LCD Status" command the LCD will immediately raise DB7 if it's still busy executing a command or lower DB7 to indicate that the LCD is no longer occupied. Thus our program can query the LCD until DB7 goes low, indicating the LCD is no longer busy. At that point we are free to continue and send the next command.

65
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

CHAPTER 4

66
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

SOFTWARE DESCRIPTION

CHAPTER 5

67
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

PROJECT DESCRIPTION
In this chapter, schematic diagram and interfacing of PIC16f73 microcontroller with each module is considered. 1. Transmitter Section

Fig 5.1(i): schematic diagram of transmitter section of Zigbee based attendance alert system with person details by using I button technology

2. Receiver Section

68
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

Fig 5.1(ii): schematic diagram of transmitter section of Zigbee based attendance alert system with person details by using I button technology

Fig 5.2: crystal oscillator and reset input interfacing with micro controller

CHAPTER 6

69
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

ADVANTAGES AND DISADVANTAGES

6.1 ADVANTAGES:
1. Low power consumption. 2. Easy to take attendance with i-button technology 3. Very effective and efficient design. 4. Usage of wireless technology (Zigbee). 5. Can be used with any language. 6. Fast response. 7. Reduce man power

6.2 DISADVANTAGES:
1.Buttons can fall of easily; and are a choking hazard on children's products. 2. Also, they aren't a very strong fastening. Finally, buttons can be damaged when being washed

6.3 APPLICATIONS:
70
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

1. useful for authority person 2. Faster and secure data transmission.


3. Easy to install.

4. Helpful in abroad to express users needs. 5. Deaf and dump people also can interact with others. 6. Can be used with any languages.

CHAPTER 7
71
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

RESULTS&CONCLUSION
7.1 RESULT:
The project Zigbee based wireless Voice to Text translator in Airlines/Hospital assistant system for blind/Illiterates was designed a user friendly multi-language communication system for illiterate/dumb people traveling by Airlines. The language of translated text can be set as user requirement. But, mostly English is preferred as it has prominence of international language.

72
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

73
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

FIG 7.1: TRANSMITTER AND RECIVER PARTS OF ZIGBEE BASED WIRELESS VOICE TO TEXT TRANSLATOR

7.2 CONCLUSION: Integrating features of all the hardware components used have been developed in it. Presence of every module has been reasoned out and placed carefully, thus contributing to the best working of the unit. Secondly, using highly advanced ICs with the help of growing technology, the project has been successfully implemented. Thus the project has been successfully designed and tested.

74
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

75
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

CHAPTER 8

FUTURE SCOPE
8.1 FUTURE SCOPE
Our project Zigbee based wireless Voice to Text translator in Airlines/Hospital assistant system for blind/Illiterates is mainly intended design a user friendly multi-language communication system for illiterate/dumb people traveling by Airlines. This project consists of Zigbee based system that transmits the wireless signals according to the input given by the user using voice commands. At the receiver (airhostess) end the information will be displayed on LCD in English language. Here when user sends his need

76
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

through voice commands, then micro controller transmits that information through Zigbee transmitter. The information received by the Zigbee receiver will be displayed on LCD. This project provides an efficient device that helps dumb/illiterate to communicate with airhostess in airlines. Zigbee used in this project provides a typical range of 50m. By using high power Zigbee module we can extend this range up to 1.3 km. using Zigbee we can send text only. By using IR/RF transmitter and receiver we can send audio and video signals also. But Zigbee provides better data security and range is also more compared to IR. And another thing to be noted is Zigbee works in license free bands. Zigbee is most preferable where data security is important. Further enhancements yet to be made in field of Zigbee Touch screen can also be used as 4wire resistive touch screen. This is chosen because resistive touch screens stability and durability are more compared to other touch screens. Response time is also very less. Resistant to intense light and not very sensitive as compared to other technologies but it accepts only one touch at a time. By using other technology like surface acoustic wave or infrared we can further improve project so that it can accept more than touch at a time. But those touch screens are very sensitive and less resistant to instance light. And also they cant produce accurate results as they are sensitive to environment changes.

BIBLIOGRAPHY
REFERENCES
The sites which were used while doing this project: 1. www.wikipedia.com 2. www.allaboutcircuits.com 3. www.microchip.com
77
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Zigbee and I-button based attendence

4. www.howstuffworks.com 5. www.google.com

BOOKS REFERRED:
1. Raj kamal Microcontrollers Architecture, Programming, Interfacing and System Design. 2. Mazidi and Mazidi Embedded Systems. 3. PCB Design Tutorial David.L.Jones. 4. PIC Microcontroller Manual Microchip. 5. Pyroelectric Sensor Module- Murata. 6. Embedded C Michael.J.Pont.

78
DEPARTMENT OF E.C.E., M.R.R.I.T.S, UDAYAGIRI

Das könnte Ihnen auch gefallen