Professional Documents
Culture Documents
In present scenario, in our educational organisations or institutions there are basically two
types of manual information transfer ,they are ,Firstly, Circulation of information in a paper
in a printed format, with the help of a person .Secondly, the need to monitor the faculty entry
and exit details along with their subject details and duration of the class by the administration.
Both the methods are exhaustive and time consuming. This project helps an organisation or
institution to transfer the information and to monitor the class in a smarter manner using an
EMBEDDED SYSTEM.
This project uses two modules where one module is wireless electronic notice board
,whenever the administration wants to send the information they do it using an embedded
system based electronic notice board. Second module is regarding monitoring the faculty
entry and exit details, where the details of the faculty present in the class room along with
their subject details are also displayed and recorded in a pc in the administration. Here for
this purpose we use a pc, an embedded system comprising of two Arduino controllers,
Xbees and Embedded C along with a Graphical user interface designed using visual
studio with the help of the language called C # .
1
CHAPTER 1
1.1 INTRODUCTION
Every organisation whether it be an educational organisation or an industrial organisation has
two basic operations about circulating the information and storing entry and exit details of the
faculty or personel. In present day scenario these operations are carried out manually i.e. in
order to circulate the information in the organisation a person always rotates with a printed
copy of the information and for entry and exit details a manual copy is maintained where
faculty entry their details upon entry and exit.
This method is out-dated and time-consuming, and may be improved by applying technology
and designing an embedded system of Wireless electronic notice board and faculty entry and
exit monitoring system. There is a need to design a system which governs the details of each
faculty in a class effectively and efficiently. Micro controller and microprocessor are very
advanced today in terms of technology.
This project consists of two modules one at Master block with a GUI(Graphical User
Interface) in a PC and an embedded system to send messages wirelessly and to store the
details of faculty entry and exit in a text format, and another module at the class room with a
setup of a keypad and LCD to enter the faculty details and to display the messages from
master block.
This paper contains an embedded system which meets the need to store the attendance of
students using technology. This paper contains mainly an instrument with hardware
component consisting of display unit and serial port for communication purpose, and buttons
to mark present or absent, to select subjects, to reset the unit and to send the information to
the personal computer (PC). The device which is explained in this technical paper is
programmed in such a way that it stores one days attendance of 5 students in 3 subjects.
Further which can be plugged in to PC or laptop and information stored into the device is
transferred into the systems memory through serial communication software called
2
terminal. This data can be copied from terminal software to any data manipulation
application like M.S Excel, M.S Access.[1]
This paper contains an embedded system which is similar to the first paper except that the
system uses RFID tags to enter the details of the students for their attendance. Here,
attendance Monitoring System Using ZigBee and RFID are designed to collect and manage
students attendance record from RFID devices installed in an educational environment.
Based on the verification of the student identification in the class, the system could generate
sophisticated student attendance database for analysis purpose. Attendance automation is
based on personalized profile. Profile can be edited on the run time without making any
changes in the hardware. The RFID system consist of an RFID tag, reader and a user
interface computer. Passive RFID are used for access control application. When the tag is
energized by the RF field, it transmits back the contents of its memory by modulating the
incoming RF field. The reader detects and demodulates the signal and identifies the tag.[2]
This paper contains a special way of collecting the attendance of the students, in this paper a
system has been proposed that takes attendance of student and maintaining its records in an
academic institute automatically. Manually taking the attendance and maintaining it for a
long time makes it difficult task as well as wastes a lot of time. For this reason an efficient
system is designed. This system takes attendance with the help of a fingerprint sensor module
and all the records are saved on a computer. Fingerprint sensor module and LCD screen are
dynamic which can move in the room. In order to mark the attendance, student has to place
his/her finger on the fingerprint sensor module. On identification of particular student, his
attendance record is updated in the database and he/she is notified through LCD screen. In
this system we are going to generate Microsoft excel attendance report on computer. This
report will generate automatically after 15 days (depends upon user). This report will be sent
to the respected HOD, teacher and students parents email Id.[3]
3
noticing the fact that it can be met the establishment of an embedded system i.e. maintaing
the details of the faculty entry and exit in to the classroom and their subject details along with
time and date, this need has to be satisfied not only to one classroom but to classrooms of
each department and for year. In today institutions this need is met manually but by observing
this environment an idea has been proposed for an embedded system where this need is met
with technology.
Chapter 2 :
Chapter 2 is all about hardware description i.e. writing the information about the
specifications of the hardware whatever is been used to make system in a systematic format.
Chapter 3:
Chapter 3 is all about description of the software tools used in the system and about the
flow charts of the algorithms used in the system, thus giving the clear view of the design
procedure.
Chapter 4 is all about test plans and putting down the test results, i.e. declaring the
various environments of testing the system and after testing it recording the results is the
main task in the part.
4
CHAPTER 5:
Chapter 5 is the final step, here we conclude the project and declare the future scope of
the project.
APPENDIX:
Here, we write down the several programs which are used in the system and papers which are
used as reference.
5
CHAPTER 2
1. ARDUINO UNO
2. ZIGBEE
3. LCD
4. KEYPAD
5. BUZZER
6. PC
ARDUINO UNO
Microcontroller ATmega328
Operating Voltage 5V
SRAM 2 KB
EEPROM 1 KB
6
ZIGBEE
Built-in antenna
8 digital IO pins
128-bit encryption
LCD
7
2.1 BLOBK DIAGRAM :
Here, this block diagram has five main blocks, namely Arduino controller, LCD, Zigbee,
Keypad. Arduino plays the role of a micro controller, the LCD can be used to display the
message send by the HOD from the master block and to display the faculty details when their
ID is pressed, the Zigbee can be used to communicate with the Master block wirelessly, the
keypad is used to enter the ID details of the faculty, Buzzer is used to ring the alarm at the
specified intervals to notify the end time of the calss
8
Master block module:
Here, this block diagram has three main blocks, namely Arduino controller, Zigbee, PC.
Arduino plays the role of a micro controller, the PC has GUI which has been created using
visual studio, this GUI is used to store the details of the faculty in a text file as well as to send
the information from Master block, the Zigbee can be used to communicate with the class
room block wirelessly.
2.4.1 Introduction:
The Arduino Uno is a microcontroller board based on the ATmega328 (datasheet). It has 14
digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16
MHz crystal oscillator, a USB connection, a power jack, an ICSP header, and a reset button.
It contains everything needed to support the microcontroller; simply connect it to a computer
with a USB cable or power it with a AC-to-DC adapter or battery to get started. The Uno
differs from all preceding boards in that it does not use the FTDI USB-to-serial driver chip.
Instead, it features the Atmega8U2 programmed as a USB-to-serial converter.
"Uno" means one in Italian and is named to mark the upcoming release of Arduino 1.0. The
Uno and version 1.0 will be the reference versions of Arduno, moving forward. The Uno is
the latest in a series of USB Arduino boards, and the reference model for the Arduino
platform; for a comparison with previous versions.
2.4.2 Technical Specifications:
Microcontroller ATmega328
9
Operating Voltage 5V
Input Voltage (recommended) 7-12V
Input Voltage (limits) 6-20V
Digital I/O Pins 14 (of which 6 provide PWM output)
Analog Input Pins 6
DC Current per I/O Pin 40 mA
DC Current for 3.3V Pin 50 mA
Flash Memory 32 KB of which 0.5 KB used by bootloader
SRAM 2 KB
EEPROM 1 KB
Clock Speed 16 MHz
THE BOARD :
10
2.4.3 Power:
The Arduino Uno can be powered via the USB connection or with an external power supply.
The power source is selected automatically.External (non-USB) power can come either from
an AC-to-DC adapter (wall-wart) or battery. The adapter can be connected by plugging a
2.1mm center-positive plug into the board's power jack. Leads from a battery can be inserted
in the Gnd and Vin pin headers of the POWER connector. The board can operate on an
external supply of 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may
supply less than five volts and the board may be unstable. If using more than 12V, the voltage
regulator may overheat and damage the board. The recommended range is 7 to 12 volts.
The power pins are as follows:
VIN. The input voltage to the Arduino board when it's using an external power source (as
opposed to 5 volts from the USB connection or other regulated power source). You can
supply voltage through this pin, or, if supplying voltage via the power jack, access it through
this pin.
5V. The regulated power supply used to power the microcontroller and other components
on the board. This can come either from VIN via an on-board regulator, or be supplied by
USB or another regulated 5V supply.
3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50
mA.
GND. Ground pins.
2.4.4 Memory:
The Atmega328 has 32 KB of flash memory for storing code (of which 0,5 KB is used for the
bootloader); It has also 2 KB of SRAM and 1 KB of EEPROM (which can be read and
written with the EEPROM library).
2.4.5 Input and Output:
Each of the 14 digital pins on the Uno can be used as an input or output, using pinMode(),
digitalWrite(), and digitalRead() functions. They operate at 5 volts. Each pin can provide or
receive a maximum of 40 mA and has an internal pull-up resistor (disconnected by default) of
20-50 kOhms. In addition, some pins have specialized functions:
Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data.
TThese pins areconnected to the corresponding pins of the ATmega8U2 USB-to-TTL Serial
chip .
11
External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt on a low
value, a rising or falling edge, or a change in value.
PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analogWrite() function.
SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication,
which, although provided by the underlying hardware, is not currently included in the
Arduino language.
LED: 13. There is a built-in LED connected to digital pin 13. When the pin is HIGH value,
the LED is on, when the pin is LOW, it's off.
The Uno has 6 analog inputs, each of which provide 10 bits of resolution (i.e. 1024 different
values). By default they measure from ground to 5 volts, though is it possible to change the
upper end of their range using the AREF pin and the analogReference() function.
Additionally, some pins have specialized functionality:
I2C: 4 (SDA) and 5 (SCL). Support I2C (TWI) communication using the Wire library.
There are a couple of other pins on the board:
AREF. Reference voltage for the analog inputs. Used with analogReference().
Reset. Bring this line LOW to reset the microcontroller. Typically used to add a reset button
to shields which block the one on the board.
2.4.6 Communication:
The Arduino Uno has a number of facilities for communicating with a computer, another
Arduino, or other microcontrollers. The ATmega328 provides UART TTL (5V) serial
communication, which is available on digital pins 0 (RX) and 1 (TX). An ATmega8U2 on the
board channels this serial communication over USB and appears as a virtual com port to
software on the computer. The '8U2 firmware uses the standard USB COM drivers, and no
external driver is needed. However, on Windows, an *.inf file is required..
The Arduino software includes a serial monitor which allows simple textual data to be sent to
and from the Arduino board. The RX and TX LEDs on the board will flash when data is
being transmitted via the USB-toserial chip and USB connection to the computer (but not for
serial communication on pins 0 and 1). A SoftwareSerial library allows for serial
communication on any of the Uno's digital pins. The ATmega328 also support I2C (TWI)
and SPI communication.
2.4.7 Programming:
12
The Arduino Uno can be programmed with the Arduino software (download). Select
"Arduino Uno w/ATmega328" from the Tools > Board menu (according to the
microcontroller on your board).
The ATmega328 on the Arduino Uno comes preburned with a bootloader that allows you to
upload new code to it without the use of an external hardware programmer. It communicates
using the original STK500 protocol (reference, C header files).
You can also bypass the bootloader and program the microcontroller through the ICSP (In-
Circuit Serial Programming) header.
The ATmega8U2 firmware source code is available . The ATmega8U2 is loaded with a DFU
bootloader, which can be activated by connecting the solder jumper on the back of the board
(near the map of Italy) and then resetting the 8U2. You can then use Atmel's FLIP software
(Windows) or the DFU programmer (Mac OS X and Linux) to load a new firmware. Or you
can use the ISP header with an external programmer (overwriting the DFU bootloader).
13
labelled "RESET-EN". You may also be able to disable the auto-reset by connecting a 110
ohm resistor from 5V to the reset line.
2.5 ATMEGA328P
The ATmega328 is a single chip micro-controller created by Atmel and belongs to the
megaAVR series.
2.5.1 Specifications
14
The Atmel 8-bit AVR RISC-based microcontroller combines 32 KB ISP flash memory with
read-while-write capabilities, 1 KB EEPROM, 2 KB SRAM, 23 general purpose I/O lines, 32
general purpose working registers, three flexible timer/counters with compare modes, internal
and external interrupts, serial programmable USART, a byte-oriented 2-wire serial interface,
SPI serial port, 6-channel 10-bit A/D converter (8-channels in TQFP and QFN/MLF
packages), programmable watchdog timer with internal oscillator, and five software
selectable power saving modes. The device operates between 1.8-5.5 volts. The device
achieves throughputs approaching 1 MIPS per MHz.
PARAMETERS VALUE
32
Flash
Kbytes
2
RAM
Kbytes
Pin Count 28
Max. Operating Frequency 20 MHz
8-bit
CPU
AVR
# of Touch Channels 16
15
Max I/O Pins 26
Ext Interrupts 24
USB Interface No
USB Speed No
Series alternatives
2.5.3 Applications
Today the ATmega328 is commonly used in many projects and autonomous systems where a
simple, low-powered, low-cost micro-controller is needed. Perhaps the most common
implementation of this chip is on the popular Arduino development platform, namely the
Arduino Uno and Arduino Nano models.
16
Figure 2.4: Block Diagram of Atmega328
The AVR core combines a rich instruction set with 32 general purpose working registers. All
the 32 registers are directly connected to the Arithmetic Logic Unit (ALU), allowing two
independent registers to be accessed in one single instruction executed in one clock cycle.
The resulting architecture is more code efficient while achieving throughputs up to ten times
faster than conventional CISC microcontrollers.
17
The ATmega32 provides the following features: 32K bytes of In-System Programmable
Flash Program memory with Read-While-Write capabilities, 1024 bytes EEPROM, 2K
byte SRAM, 32 general purpose I/O lines, 32 general purpose working registers, a JTAG
interface for Boundary-scan, On-chip Debugging support and programming, three flexible
Timer/Counters with compare modes, Internal and External Interrupts, a serial
programmable USART, a byte oriented Two-wire Serial Interface, an 8-channel, 10-bit
ADC with optional differential input stage with programmable gain (TQFP package only), a
programmable Watchdog Timer with Internal Oscillator, an SPI serial port, and six
software selectable power saving modes. The Idle mode stops the CPU while allowing the
USART, Two-wire interface, A/D Converter, SRAM, Timer/Counters, SPI port, and
interrupt system to continue functioning. The Power-down mode saves the register con-
tents but freezes the Oscillator, disabling all other chip functions until the next External
Interrupt or Hardware Reset. In Power-save mode, the Asynchronous Timer continues to
run, allowing the user to maintain a timer base while the rest of the device is sleeping. The
ADC Noise Reduction mode stops the CPU and all I/O modules except Asynchronous
Timer and ADC, to minimize switching noise during ADC conversions. In Standby mode,
the crystal/resonator Oscillator is running while the rest of the device is sleeping. This
allows very fast start-up combined with low-power consumption. In Extended Standby
mode, both the main Oscillator and the Asynchronous Timer continue to run.
The device is manufactured using Atmels high density nonvolatile memory technology.
The On-chip ISP Flash allows the program memory to be reprogrammed in-system
through an SPI serial interface, by a conventional nonvolatile memory programmer, or by
an On-chip Boot program running on the AVR core. The boot program can use any
interface to download the application program in the Application Flash memory. Soft-
ware in the Boot Flash section will continue to run while the Application Flash section is
updated, providing true Read-While-Write operation. By combining an 8-bit RISC CPU
with In-System Self-Programmable Flash on a monolithic chip, the Atmel ATmega32 is a
powerful microcontroller that provides a highly-flexible and cost-effective solution to
many embedded control applications.
The ATmega32 AVR is supported with a full suite of program and system development
tools including: C compilers, macro assemblers, program debugger/simulators, in-circuit
emulators, and evaluation kits.
18
2.5.4 Pin Descriptions
Gnd Ground
Port A (PA7..PA0) Port A serves as the analog input to the A/D converter
19
Port C (PC7..PC0) Port C is an 8-bit bi-directional I/O port with internal
pull-up resistors (selected for each bit). The Port C
output buffers have symmetrical drive characteristics
with both high sink and source capability. As inputs,
Port C pins that are externally pulled low will source
current if the pull-up resistors are activated. The Port C
pins are tri-stated when a reset condition becomes
active, even if the clock is not running. If the JTAG
interface is enabled, the pull-up resistors on pins
PC5(TDI), PC3(TMS) and PC2(TCK) will be acti-
vated even if a reset occurs.
20
AVCC AVCC is the supply voltage pin for Port A and the A/D
Converter. It should be externally connected to VCC,
even if the ADC is not used. If the ADC is used, it
should be con- nected to VCC through a low-pass
filter.
2.6.1 INTRODUCTION:
LCD stands for Liquid Crystal Display. LCD is finding wide spread use replacing LEDs
(seven segment LEDs or other multi segment LEDs) because of the following reasons.
A model described here is for its low price and great possibilitises most frequently used
in practice. It is based on the HD44780 micro controller (Hitachi) and can display
messages in two lines with 16 characters each. It displays all the alphabets. Greek letters,
punctuation marks, mathematical symbols etc. in addition , it is possible to display
symbols that user makes up on its own.Automatic shifting message on display (shift left
and right), appearance of the pointer, backlight ete. Are considered as useful
characterstics.
21
2.6.2 LCD screen
LCD screen consist of two lines with 16characters each. Each character consists of 5X8
or 5X11 dot matrix. This book covers 5X8 character display because it is commonly used.
Contrast on display depends on the power supply voltage and whether messages are
displayed in one or two lines. For that reason, variable voltage 0- Vdd is applied on pin mark
as Vee. Trimmer potentiometer is usually used for that purpose. Some versions of displays
have built in backlight (blue or green diodes). When used during operating, a resistor for
current limitation should be used (like with any LE diode).
If there are no characters on display or all of them are dimmed upon the display is on , the
first thing that should be done is to check the potentiometer for contrast regulation. It is
properly adjusted? Same applies in case the operation mode is changed(writing in one or two
lines)
There are pins along one side of the small printed board used for connection to the
microcontroller. There are total 14 pins marked with numbers ( 16 in case the background
light is built in.) their function is described in the table below
22
Pin Description: (Table 2.1)
Pin
Function Name
No
4 Selects command register when low; and data register when Register Select
high
5 Low to write to the register; High to read from the register Read/write
6 Sends data to data pins when a high to low pulse is given Enable
7 DB0
8 DB1
9 DB2
10 DB3
8-bit data pins
11 DB4
12 DB5
13 DB6
14 DB7
23
All data transferred to LCD through outputs D0-D7 will be interpreted as commands or as
data, which depends on logic state on pin RS: RS=1 Bits D0 D7 are addresses of
characters that should be displayed. Built in processor addresses built in map oc characters
and displays corresponding symbols. Displaying position is determined by DDRAM address.
This address is either previously defined or the address of previously transferred character is
automatically incremented. RS=0- Bits D0-D7 are commands which determine display mode.
List of commands which LCD recognizes are given in the table below:
DDRAM
DDRAM
24
Function Value Operation
I/D 1 Increment by 1
0 Decrement by 1
S 1 Display shift on
D 1 Display on
0 Display off
U 1 Cursor on
0 Cursor off
B 1 Cursor blink on
0 Shift left
DL 1 8-bit interface
0 4-nit interface
0 Cursor shift
25
2.6.5 LCD Connection
Depending on how many lines are used for connection to the micro controller, there are 8-bit
and 4-bit LCD modes. The appropriate mode is determined at the beginning of the process in
a phase called initialization. In the first case, the data are transferred through outputs D0-
D7 as it has been already explained. In case of 4-bit mode for the sake of saving valuable I/O
pins of the micro controller, there are only 4 higher bits (D4-D7)used for communication,
while other may be left unconnected.
Consequently, each data is sent to LCD in two steps: four higher bits are sent first (that
normally would be sent through lines D4-D7), four lower bits are sent afterwards. With the
help of initialization, LCD will correctly connect and interpret each data received. Besides,
with regards to the fact that data are rarely read from LCD(data mainly are transferred from
microcontroller to LCD) one more I/O pin may be saved by simple connecting R/W pin to the
Ground. Such saving has its price. Even though message displaying will be normally
performed, It will not be possible to read from busy flag since it is not possible to read from
display.
Once the power supply is turned on, LCD is automatically cleared. This process lasts for
approximately 15mS. After that, display is ready to operate. The mode of operating is set by
default. This means that:
1. Display is cleared
2. Mode
DL=1 communication through 8-bit interface
N=0 messages are displayed in one line
F=0 characters font 5x8 dots
3. Display/cursor on/off
D=0 display off
U=0 cursor off
B=0 cursor blink off
4. Character entry
26
ID=1 address on display are automatically incremented by 1
S=0 display shift off
Automatic reset is mainly performed without any problems. If for any reason power supply
voltage does not reach full value in the course of 10mS, Display will start to perform
completely unpredictably.
If voltage supply unit cannot meet this condition or if it is needed to provide completely safe
operating, the process of initialization by which a new reset enabling display to operate
normally must be applied.
27
Figure 2.6 : LCD Initialisation
Contrast control:
To have a clear view of the characters on the LCD, contrast should be adjusted. To adjust the
contrast, the voltage should be varied . for this, a preset is used which can behave like a
variable voltage device. As the voltage of this preset is varied, the contrast of the LCD can be
adjusted.
28
Figure 2.7 : Potentiometers
2.6.7 Potentiometer
variable resistors used as potentiometers have all three terminals connected. This
arrangement is normally used to vary voltage, for example to set the switching point of a
circuit with sensor, or control the volume (loudness) in an amplifier circuit. If the terminals at
the ends of the track are connected across the power supply, then the wiper terminal will
provide a voltage which can be varied from zero up to the maximum of the supply.
potentiometer Symbol
Presets
These are miniature versions of the standard variable resistor. They are designed to be
mounted directly on to the circuit board and adjusted only when the circuit is built. For
example , to set the frequency of an alarm tone or the sensitivity of a light-sensitive circuit, a
small screwdriver or similar tool is required to adjust presets.
29
Presets are much cheaper than standard variable resistors so they are sometimes used in
projects where atandard variable resistor would normally be used.
Multiturn presets are used where very precise adjustments must be made. The screw must
be turned many times (10+) to move the slider from one end of the track to the other, giving
very fine control.
preset symbol
30
Fig 2.8: LCD interfacing with Arduino
Vss pin is connected to thr ground Vdd and Vee pins are connected to the 5V rail on the
general purpose PCB which draws 5V from the Arduino
We have used 5 4 3 2 1 digital pins of Arduino to coonect the d4 d5 d6 d7 pins of LCD here
we have used the 4bit mode operation of LCD.
2.7 ZIGBEE
ZigBee is a Ad-hoc networking technology for WPAN which can form mesh
networks.
Based On IEEE 802.15.4 standard that defines the PHY and Mac Layers for ZigBee.
Intended for 2.45 Ghz , 868 Mhz and 915 Mhz Band.
31
Low in cost ,complexity & power consumption as compared to competing
technologies.
Data rates touch 250Kbps for 2.45Ghz ,40 Kbps 915Mhz and 20Kbps for 868Mhz
band.
Data from RFID, GPS receiver, GSM modem, Sensors etc can be send using Zigbee
Wireless network to another Zigbee which may in turn connected to pc or
microcontroller.
The output power of the radios is generally 0-20 dBm (1-100 mW).
Transmission range is between 10 and 75 meters and up to 1500 meters for ZigBee
PRO, although it is heavily dependent on the particular environment.
ZigBee is used in applications that require a low price, low data rate, long battery life,
and secure networking.
So ZigBee is a specification for a suite of high level communication protocols using small,
low-power digital radios based on an IEEE 802 standard for personal area networks.
32
2.7.2 ZigBee Network Devices FFD (Full Function Device)
33
Comparison Chart of Different Wireless Technologies (Table 2.4)
Zigbee was conceived in 1998, standardized in 2003 and revised in 2006. The name
refers to the waggle dance of honey bees after their return to the beehive.
It was thought that Wi-Fi and Bluetooth were not good enough and suitable for some
applications, it was decided to have ZigBee style networks in 1998, actually it was
realized that need for self-organizing ad-hoc digital radio networks.
34
around a hundred other manufacturers to form a consortium called the ZigBee
Alliance. This consortium also enjoys the support of Paul Allen, one of the founders
of Microsoft, who invested several million dollars in it.
Zigbee Alliance is a group of companies that maintain and publish the ZigBee
standard based on IEEE 802.15.4 standard published in 2003 (also called as wireless
PAN standard ).The term ZigBee is a registered trademark of this group, not a single
technical standard. The Alliance publishes application profiles that allow multiple
OEM vendors to create interoperable products. The relationship between IEEE
802.15.4 and ZigBee is similar to that between IEEE 802.11 and the Wi-Fi Alliance.
This organisation has many members companies which are increasing every year, of
which five have taken on the status of what they term "promoter." These five
companies are Ember, Honeywell, Invensys, Mitsubishi, Motorola, Philips, and
Samsung. Under the umbrella of the ZigBee Alliance, the new standard will be
pushed forward, taking on board the requirements of the users, manufacturers and the
system developers.
In 2007, ZigBee PRO which is final version was announced. It contains enhanced
ZigBee specification. ZigBee 2007 is fully backward compatible with ZigBee 2006
devices.
The current list of application profiles either published, or in the works are:
Released specifications
o ZigBee Home Automation
35
o ZigBee Telecommunication Services
The Digi Xbee 802.15.4 modules are the easiest to use, most reliable and cost-effective RF
devices we've experienced. The 802.15.4 Xbee pro modules provide two friendly modes of
communication - a simple serial method of transmit/receive or a framed mode providing
advanced features. These modules can communicate point to point, from one point to a PC, or
in a mesh network.
The Xbee pro modules work at the 2.4 GHz frequency which means smaller board and
antenna size. Xbee pro modules have the ability to transmit Digital, PWM, Analog or Serial
RS232 signals wirelessly. To communicate over UART or USART, we just need three basic
signals which are namely, RXD (receive), TXD (transmit), GND (common ground). So to
interface UART with 8051, we just need the basic signals.
36
2.7.5.2 Tarang Module
The Tarang modules work at the 2.4 GHz frequency which means smaller board and antenna
size.Tarang modules have the ability to transmit Digital, PWM, Analog or Serial RS232
signals wirelessly. To communicate over UART or USART, we just need three basic signals
which are namely, RXD (receive), TXD (transmit), GND (common ground). So to interface
UART with 8051, we just need the basic signals.
Digi XBee 802.15.4 modules are the easiest-to-use, most reliable and cost-effective RF
devices weve experienced. The 802.15.4 XBee modules provide two friendly modes of
communication a simple serial method of transmit/receive or a framed mode providing
37
advanced features. XBees are ready to use out of the package, or they can be configured
through the X-CTU utility or from your microcontroller. These modules can communicate
point to point, from one point to a PC, or in a mesh network.
You only need to choose an antenna style (PCB or wire) and power level (1 mW for up to
300 ft). The PCB antenna version provides a lower profile footprint for applications with
limited space while the wire antenna version allows for more flexibility in adjusting for
optimal range at the same output power. Only series 1 modules can work with series 1 type
modules you cannot mix up series 1 and series 2 modules to setup communication.
2.7.6.1Key Features:
2.7.6.3 Specifications
38
Operating temperature range: -40 to +185 F (-40 to +85 C)
Note: Because XBee modules have 2 mm pin spacing, we recommend one of our adapter
boards for each module. Our RS232 and USB adapter boards provide several advantages to
the XBee modules such breadboard-friendly standard 0.1 inch pin spacing, mounting holes,
and easy-to-solder connections. Even if you are communicating point-to-point without a PC,
we still recommend that you always have at least one XBee USB Adapter so you can easily
configure and test each XBee module prior to putting it in a point-to-point application.
This section will provide a Quick start guide to Xbee RF module from Digi International. It
has just 1mW transmitting power. This section is just to start communicating wirelessly
through Xbees devices quickly. You need a serial port, 3.3V supply, a resistor, wires, SIL
(Single in line) connectors, breadboard and a terminal software nothing else.
You just need to see the pin out page on datasheet. I just used some basic Pins for quick start
which are shown in table given below.
Table 2.5
39
Figure 2.10: XBEE Schematic.
When you setup all the wiring carefully. You just switch ON the supply. And here you go for
basic communication. You can use any terminal software. Configure the serial port as
9600bps, 8bits, no parity and no flow control. Now you dont need to configure these module
for quick start. They are configured to factory settings Just type in one terminal and receive
that string in second one or vice versa. If you want to make a personal area network (PAN)
and want that no one is interrupting your network then you may configure them with PAN ID
and addresses. But for the very basic communication you dont need to configure them.
40
2.7.7 ZIGBEE INTERFACING WITH ARDUINO
The Xbee ZB is mounted on the Xbee adapter , this adapter pins are used to interface the
Arduino with Xbee ZB
the adapters RX is connectd to 10(software RX pin) and TX is connected to 11 (software TX
pin)
ground pin is connetd to common ground
5V pin is connetd to %V rail on the general purpose PCB this Xbee adapter has a internal
3.3v voltage regulator whch step downs 5V to 3.3V and gives to to the actual Xbee
This 16-button keypad provides a useful human interface component for microcontroller
projects. Convenient adhesive backing provides a simple way to mount the keypad in a
variety of applications.
41
2.8.1 Features
Ultra-thin design
Adhesive backing
Operating temperature: 32 to
122 F (0 to 50C)
Dimensions:
Keypad, 2.7 x 3.0 in (6.9 x
7.6 cm) Cable: 0.78 x 3.5 in
(2.0 x 8.8 cm)
Security systems
42
Menu selection
Matrix keypads use a combination of four rows and four columns to provide button states to
the host device, typically a microcontroller. Underneath each key is a pushbutton, with one
end connected to one row, and the other end connected to one column. These connections are
shown in Figure 2.9.
Figure 2.12 : Matrix Keypad Connections
In order for the microcontroller to determine which button is pressed, it first needs to pull
each of the four columns (pins 1-4) either low or high one at a time, and then poll the states
of the four rows (pins 5-8). Depending on the states of the columns, the microcontroller can
43
tell which button is pressed.
For example, say your program pulls all four columns low and then pulls the first row high. It
then reads the input states of each column, and reads pin 1 high. This means that a contact has
been made between column 4 and row 1, so button A has been pressed.
Figure 2.13
Figure 2.14
44
2.8.6 KEYPAD INTERFACING WITH ARDUINO
We have used 4*4 membrane Keypad which act as input in our class module. It is used to
recognize the person entry event , ID , exit event by corresponding key press
2.9 BUZZER
45
2.9.1 BUZZER INTERFACING WITH ARDUINO
Buzzer is connected to digital pin 6 and the ground pin of buzzer is connetd to arduinos
ground .
Buzzer will ring for 4 secs after 50min from the faculty entry time.
46
CHAPTER 3
SOFTWARE DESCRIPTION
Below is the list of software tools that are used in the project
2) Digi X-CTU
Arduino programs are written in C or C++. The Arduino IDE comes with a software
library called "Wiring" from the original Wiring project, which makes many common
47
input/output operations much easier. The users need only to define two functions to make an
executable cyclic executive program:
setup(): a function run once at the start of a program that can initialize settings
A typical first program for a microcontroller simply blinks an LED on and off. In the Arduino
environment, the user might write a program like this.
A typical first program for a microcontroller simply blinks an LED on and off. In the Arduino
environment, the user might write a program like this:
#define LED_PIN 13
void setup() {
pinMode(LED_PIN, OUTPUT); // Enable pin 13 for digital output
}
void loop() {
digitalWrite(LED_PIN, HIGH); // Turn on the LED
delay(1000); // Wait one second (1000 milliseconds)
digitalWrite(LED_PIN, LOW); // Turn off the LED
delay(1000); // Wait one second
}
It is a feature of most Arduino boards that they have an LED and load resistor connected
between pin 13 and ground; a convenient feature for many simple tests. The previous code
would not be seen by a standard C++ compiler as a valid program, so when the user clicks the
"Upload to I/O board" button in the IDE, a copy of the code is written to a temporary file
48
with an extra include header at the top and a very simple main() function at the bottom, to
make it a valid C++ program.
The Arduino IDE uses the GNU toolchain and AVR Libc to compile programs, and uses
avrdude to upload programs to the board.
3.1.1 Steps to Dump the code in Arduino UNO using Arduino IDE:
49
Step2: Select the appropriate COM port by browsing Tools Serial port COM port
Step3: Click on verify to check for compilation errors and on successful verification click on
upload icon to dump the code into arduino.
50
3.2 DIGI-XCTU
configuration platform for XBee
XCTU is a free multi-platform application designed to enable developers to interact with Digi
RF modules through a simple-to-use graphical interface. It includes new tools that make it
easy to set-up, configure and test XBee RF modules.
XCTU includes all of the tools a developer needs to quickly get up and running with XBee.
Unique features like graphical network view, which graphically represents the XBee network
along with the signal strength of each connection, and the XBee API frame builder, which
intuitively helps to build and interpret API frames for XBees being used in API mode,
combine to make development on the XBee platform easier than ever.
You can manage and configure multiple RF devices, even remotely (over-the-air)
connected devices.
The firmware update process seamlessly restores your module settings,
automatically handling mode and baud rate changes.
Two specific API and AT consoles, have been designed from scratch to communicate
with your radio devices.
You can now save your console sessions and load them in a different PC running
XCTU.
XCTU includes a set of embedded tools that can be executed without having any RF
module connected:
o Frames generator: Easily generate any kind of API frame to save its value.
o Frames interpreter: Decode an API frame and see its specific frame values.
o Recovery: Recover radio modules which have damaged firmware or are in
programming mode.
o Load console session: Load a console session saved in any PC running
XCTU.
51
o Range test: Perform a range test between 2 radio modules of the same
network.
o Firmware explorer: Navigate through XCTU's firmware library.
An update process allows you to automatically update the application itself and
the radio firmware library without needing to download any extra files.
XCTU contains complete and comprehensive documentation which can be
accessed at any time.
52
3.3 MICROSOFT VISUAL STUDIO
In this project Microsoft Visual Studio 2013 is used to develop the GUI (Graphical User
Interface) which helps to facilitates the communication between two modules (Class Module
and Master Module) and also saves the data (i.e. faculty entry and exit details) .
3.3.1 INTRODUCTION:
Visual Studio includes a code editor supporting IntelliSense (the code completion
component) as well as code refactoring. The integrated debugger works both as a source-level
debugger and a machine-level debugger. Other built-in tools include a forms designer for
building GUI applications, web designer, class designer, and database schema designer. It
accepts plug-ins that enhance the functionality at almost every levelincluding adding
support for source-control systems (like Subversion) and adding new toolsets like editors and
visual designers for domain-specific languages or toolsets for other aspects of the software
development lifecycle (like the Team Foundation Server client: Team Explorer).
Visual Studio supports different programming languages and allows the code editor and
debugger to support (to varying degrees) nearly any programming language, provided a
language-specific service exists. Built-in languages include C, C++ and C++/CLI (via Visual
C++), VB.NET (via Visual Basic .NET), C# (via Visual C#), and F# (as of Visual Studio
2010). Support for other languages such as M, Python, and Ruby among others is available
via language services installed separately. It also supports XML/XSLT, HTML/XHTML,
JavaScript and CSS. Java (and J#) were supported in the past.
53
FLOW CHARTS
54
Fig:3.3 Flow Chart Of Class Module
55
CHAPTER 4
PROJECT TEST PLAN AND RESULTS
Scenario one:
Testing the wireless communication between two blocks( i.e. class room block and Master
block), i.e. communicating the information from master block and receiving the Faculty
details from class room block.
Scenario two:
Testing the communication of NON ASCII characters while sending the information or
message from master block.
Scenario three:
Testing the range of communication between two blocks in both line of sight( LOS ) and
non line of sight (NLOS) conditions.
56
4.2 TEST RESULTS:
Here, the above figure is showing a GUI(graphical user interface) in a PC at the master block
with the information CVSR. So, here we are testing the Wireless Electronic Notice
Board module. Therefore, this module is confirmed to be performing upto its functionality
if the LCD at the class room block has received this message. And thus confirming the
wireless communication between two blocks.
57
The above figure is showing the LCD with display as CVSR at the class room side, thus
confirming that Wireless Electronic Notice Board functionality as a success.
58
4.2.2 Testing the Faculty Foyer and Egress Monitoring System module
Here, the above figure represents the scenario of Entering the ID of the faculty in the LCD.
59
Here, the above picture represents the scenario after pressing the ID of the faculty. Here, the
Faculty name and his/her subject details are displayed in the LCD.
60
Here, the above picture represents the scenario after pressing the ID of the faculty in the class
room block, in the PC of master block. Here, the Faculty name and his/her subject details are
displayed in the notepad which are saved with the help of the GUI(Graphical User
Interface)along with date and time.
Here, the above picture represents the scenario after pressing the exit key by the faculty.
Here, the session complete message is displayed in the LCD.
Here, the above picture represents the scenario after pressing the exit key by the faculty in the
class room block, in the GUI(Graphical User Interface) in the PC of master block. Here, the
Faculty name and his/her subject details are displayed in the GUI along with initial and final
date and timings.
61
4.2.3 Testing the LOS(Line of sight) and NLOS(non line of sight) details:
Here, the above figure represents the scenario of a GUI in the PC of master block showing
the text as 75 meters. This information is communicated wirelessly from the master block to
the class room block when the distance between the master and class room block is
approximately 75 meters in the line of sight condition.
The above figure represents the scenario of message display in the LCD when distance
between the class room and master block is 75 meters. Thus, confirming that LOS
communication works upto 75 meters.
62
Here, the above figure represents the scenario of a GUI in the PC of master block showing
the text as 40 meters. This information is communicated wirelessly from the master block to
the class room block when the distance between the master and class room block is
approximately 40 meters in the non-line of sight condition.
The above figure represents the scenario of message display in the LCD when distance
between the class room and master block is 40 meters.
63
The above figure represents the scenario of message display in the LCD when distance
between the class room and master block is 45 meters and the message sent is 45
METERS from GUI. Thus confirming that NLOS communication works only upto 40
meters(As the message is not displayed )
64
Here, the above figure is showing a GUI(graphical user interface) in a PC at the master block
with the information NON ASCII- . So, here we are testing the Communication of non
ascii characters module.
The above figure is showing an LCD with the message NON ASCII-?, confirming that
communication of non ASCII characters is not possible.
65
CHAPTER 5
CONCLUSION AND FUTURE SCOPE
Time on has been spent on investigating various projects required for the project.
Project uses Arduino controller boards for processing the information at both the ends i.e., at
class room end and at HOD room. Xbees are used for communicating information wirelessly
at both ends. A keypad and a LCD setup has been arranged at the class room for entering the
information of faculty. Graphical user interface has been created using visual studio for
storing the faculty entry and exit details in the PC.
For wireless electronic notice board, the same LCD has been used at the class room end for
display purpose and for transferring the information from the HOD PC a Graphical user
interface has been created using visual studio.
The project functionality has been verified successfully at various environments. It has been
tested with line of sight and without line of sight and at various distances.
Future scope:
This project implementation can be further enhanced i.e.,. here, present scenario consists of a
PC for storing the faculty information. But PC may not be in ON mode always, so an SD card
arrangement can be implemented for storing the information wirelessly even if PC is in off
condition.
Here, this project uses Zigbee for point to point communication, but Zigbees are capable of
point to multi point communication. This feature of Zigbee can be used to further extend the
number of class room blocks in this project.
66
APPENDIX
CODE:
CLASSROOM MODULE
#include <Keypad.h>
#include <LiquidCrystal.h>
#include <SoftwareSerial.h>
int bu;
int buzzer = 6;
char p;
char keys[ROWS][COLS] = {
{'1','2','3'},
{'4','5','6'},{'I','8','E'}
};
// Connect keypad ROW0, ROW1, ROW2 and ROW3 to these Arduino pins.
67
Keypad kpd = Keypad(makeKeymap(keys), rowPins, colPins, ROWS, COLS );
LiquidCrystal lcd(12,13,5,4,3,2);
int text,clas=0;
void setup()
pinMode(buzzer, OUTPUT);
lcd.begin(16,2);
Serial.begin(9600);
chat.begin(9600);
void loop()
if (chat.available()>0)//HOD'S MESSAGE
lcd.clear();
for(int i=0;chat.available()>0&&i<2;i++)
68
{
for(int j=0;chat.available()>0&&j<16;j++)
bu=chat.read();
lcd.setCursor(j,i);
lcd.write(bu);
if(bu==36)
lcd.write("TIME UP...");
digitalWrite(buzzer,HIGH);
delay(4000);
digitalWrite(buzzer,LOW);
bu=0;
char key=kpd.getKey();
if(key)
switch(key)
case '1':
69
{
chat.write("1");
lcd.clear();
lcd.write("Mrs.K.Haripriya");
lcd.write("ES.....");
delay(3000);
lcd.clear();
break;
case '2':
chat.write("2");
lcd.clear();
lcd.write("Mrs.N.Parijatha");
lcd.write("CS.....");
delay(3000);
lcd.clear();
break;
70
}
case '3':
chat.write("3");
lcd.clear();
lcd.write("Mr.K.Praveen");
lcd.write("DSP....");
delay(3000);
lcd.clear();
break;
case '4':
chat.write("4");
lcd.clear();
lcd.write("Mr.TSRCH Murthy");
lcd.write("DC.....");
delay(3000);
lcd.clear();
71
break;
case '5':
chat.write("5");
lcd.clear();
lcd.write("Mr.G.Balakrishna");
lcd.setCursor(0, 1);
// bottom left
lcd.write("OOP.....");
delay(3000);
lcd.clear();
break; }
case '6':
chat.write("6");
lcd.clear();
lcd.write("Mrs.F");
lcd.write("MS.....");
delay(3000);
72
lcd.clear();
break;
case 'I':
chat.write("I");
lcd.clear();
lcd.setCursor(0, 0);
lcd.write("PLEASE ENTER");
lcd.write("YOUR ID...");
clas=1;
break;
case '8':
if(clas==0)
lcd.clear();
delay(100);
lcd.print("Class is Free");
else
73
{
lcd.clear();
delay(100);
lcd.print("Class is Busy");
}break;
case 'E':
chat.write("E");
lcd.clear();
clas=0;
lcd.write("SESSION COMPLETE");
delay(3000);
lcd.clear();
break;
74
CODE:
#include <SoftwareSerial.h>
int text;
void setup()
Serial.begin(9600);
chat.begin(9600);
void loop()
if (chat.available()>0)
while (chat.available())
text = chat.read();
Serial.write(text);
75
}
Serial.println();
if (Serial.available()>0)
while (Serial.available())
text = Serial.read();
chat.write(text);
chat.println();
76
APPENDIX
CODE:
GUI MODULE
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
using System.IO.Ports;
namespace arduino
char i = 'I';
77
char ex='E';
public Form1()
InitializeComponent();
timer1.Enabled = true;
timer1.Start();
this.Invoke((MethodInvoker)delegate
timer1.Enabled = true;
});
myport.WriteLine(textBox1.Text);
textBox1.Clear();
78
}
textBox1.Enabled = true;
Send_button.Visible = true;
try
myport.BaudRate = 9600;
myport.PortName = comport_box.Text;
79
myport.DataReceived += new
SerialDataReceivedEventHandler(mySerialPort_DataReceived);
myport.Open();
catch
Application.Restart();
comport_box.Enabled = false;
this.Invoke((MethodInvoker)delegate
timer1.Enabled = true;
});
80
int s = myport.ReadByte();
char z = (char)s;
if(z==i)
this.Invoke((MethodInvoker)delegate
timer2.Enabled = true;
});
clas_time = 3000;
timer2.Start();
pictureBox1.Image =
Image.FromFile(@"C:\Users\anvar_000.DEEPIKA\Desktop\arduino\arduino\Resources\GRE
EN.png");
in_flag = true;
id_flag = false;
w.Write("\r\n");
w.Write(DateTime.Now);
w.Close();
81
{
pictureBox1.Image=Image.FromFile(@"C:\Users\anvar_000.DEEPIKA\Desktop\arduino\ard
uino\Resources\red.png");
class_status = true;
out_flag = true;
in_flag = false;
id_flag = false;
w.Write(DateTime.Now.ToString("HH:mm:ss"));
w.Close();
else if(in_flag)
switch (z)
case '1':
82
w.Write(" Mrs.K.Haripriya ES ");
w.Close();
id_flag = true;
in_flag = false;
break;
case '2':
w.Close();
id_flag = true;
in_flag = false;
break;
case '3':
83
w.Write(" Mr.K.Praveen Kumar DSP ");
w.Close();
id_flag = true;
in_flag = false;
break;
case '4':
w.Close();
id_flag = true;
in_flag = false;
break;
case '5':
84
w.Close();
id_flag = true;
in_flag = false;
break;
case '6':
w.Close();
id_flag = true;
in_flag = false;
break;
85
label4.Text = DateTime.Now.ToString("hh:mm:ss");
clas_time--;
if (clas_time == 0)
myport.WriteLine("Time over");
timer1.Stop();
86
REFERENCES
[2]. Wireless Fingerprint Based College Attendance System Using Zigbee Technology by
Gunjan Talaviya, Rahul Ramteke, A.K.Shete, International Journal of Engineering and
Advanced Technology (IJEAT) ISSN: 2249 8958, Volume-2, Issue-3, February 2013.
[3]. Attendance Monitoring System Using ZigBee and RFID by Aslam Khan1, Akshay
Patil2, Viral Shah3 and Mansi Kambli4, international journal for research in emerging
science and technology, volume-2, issue-2, february-2015.
87