You are on page 1of 87

ABSTRACT

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.

1.2 LITERATURE REVIEW


In todays world wireless communication is said to be the key to the modern technology.
A deep investigation into this technology and our proposed system resulted in several papers
with similar purpose, they are

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]

1.3 PROBLEM FORMULATION


The most concentrated problems where the embedded systems are proposed to tackle
them through technology in the present day educational institutions are wireless electronic
notice boards and student attendance monitoring system, but there is another acute problem
where the educational institutions spend the most their manual effort and time without

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.

1.4 OBJECTIVES OF THE THESIS


The objective of the thesis is to investigate about the requirements of the project and thus
deriving the specifications of the project which includes both hardware and software, i.e.
gathering various hardware components and software products and integrate them to form
required embedded system. And after forming the required system the objective is to test the
system to confirm whether the system is upto required objective or not in various
environments, and making a record of the results. Thus concluding the project and declaring
the future scope if any of the project.

1.5 ORGANISATION OF THE THESIS

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

BLOCK DIAGRAM&HARDWARE DESCRIPTION

2.1 THE COMPONENTS USED IN THE PROJECT:

1. ARDUINO UNO
2. ZIGBEE
3. LCD
4. KEYPAD
5. BUZZER
6. PC

2.2 SPECIFICATIONS OF IMPORTANT COMPONENTS:

ARDUINO UNO

Microcontroller ATmega328

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 boot loader

SRAM 2 KB

EEPROM 1 KB

Clock Speed 16 MHz

6
ZIGBEE

3.3V @ 40mA(Transmit current) & 50mA(Receive current)

250kbps Max data rate

2mW output (+3dBm)

300ft (100m) outdoor range

100ft(30m) indoor range

Built-in antenna

Fully FCC certified

6 10-bit ADC input pins

8 digital IO pins

128-bit encryption

Local or over-air configuration

LCD

16*2 LCD screen consists of two lines with 16 characters each.


Each character consists of 5x7 pixel matrix.
LCD can be operated in 2 modes 4-bit mode
and 8-bit mode.
Supply= 5V(4.7 to 5.3).
Supply(Idd)=max 3.0mA Typical 1.2mA.
Contrast can be adjusted by adjusting the voltage across
VEE.

7
2.1 BLOBK DIAGRAM :

Class room module:

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:

Fig: Block Diagram 2.1

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 ARDUINO UNO

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 :

Figure 2.2 Arduino 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).

2.4.8 Automatic (Software) Reset:


Rather than requiring a physical press of the reset button before an upload, the Arduino Uno
is designed in a way that allows it to be reset by software running on a connected computer.
One of the hardware flow control lines (DTR) of the ATmega8U2 is connected to the reset
line of the ATmega328 via a 100 nanofarad capacitor. When this line is asserted (taken low),
the reset line drops long enough to reset the chip. The Arduino software uses this capability
to allow you to upload code by simply pressing the upload button in the Arduino
environment. This means that the bootloader can have a shorter timeout, as the lowering of
DTR can be well-coordinated with the start of the upload.
This setup has other implications. When the Uno is connected to either a computer running
Mac OS X or Linux, it resets each time a connection is made to it from software (via USB).
For the following half-second or so, the bootloader is running on the Uno. While it is
programmed to ignore malformed data (i.e. anything besides an upload of new code), it will
intercept the first few bytes of data sent to the board after a connection is opened. If a sketch
running on the board receives one-time configuration or other data when it first starts, make
sure that the software with which it communicates waits a second after opening the
connection and before sending this data. The Uno contains a trace that can be cut to disable
the auto-reset. The pads on either side of the trace can be soldered together to re-enable it. It's

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.4.9 USB Overcurrent Protection:


The Arduino Uno has a resettable polyfuse that protects your computer's USB ports from
shorts and overcurrent. Although most computers provide their own internal protection, the
fuse provides an extra layer of protection. If more than 500 mA is applied to the USB port,
the fuse will automatically break the connection until the short or overload is removed.
2.4.10 Physical Characteristics:
The maximum length and width of the Uno PCB are 2.7 and 2.1 inches respectively, with the
USB connector and power jack extending beyond the former dimension. Three screw holes
allow the board to be attached to a surface or case. Note that the distance between digital pins
7 and 8 is 160 mil (0.16"), not an even multiple of the 100 mil spacing of the other pins.

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.

Fig 2.3 ATMEGA328P

2.5.2 Key parameters

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

A common alternative to the ATmega328 is the "picoPower" ATmega328P. A


comprehensive list of all other member of the megaAVR series can be found on the Atmel
website.

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

Vcc Digital supply voltage

Gnd Ground

Port A (PA7..PA0) Port A serves as the analog input to the A/D converter

Port A also serves as an 8-bit bi-directional I/O port,


if the A/D Converter is not used. Port pins can
provide internal pull-up resistors (selected for each
bit). The Port A output buffers have symmetrical drive
characteristics with both high sink and source
capability. When pins PA0 to PA7 are used as inputs
and are externally pulled low, they will source current
if the internal pull-up resistors are activated. The Port
A pins are tri-stated when a reset condition becomes
active, even if the clock is not running.

Port B (PB7..PB0) Port B is an 8-bit bi-directional I/O port with internal


pull-up resistors (selected for each bit). The Port B
output buffers have symmetrical drive characteristics
with both high sink and source capability. As inputs,
Port B pins that are externally pulled low will source
current if the pull-up resistors are activated. The Port
B pins are tri-stated when a reset condition becomes
active, even if the clock is not running.

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.

Port D (PD7..PD0) Port D is an 8-bit bi-directional I/O port with internal


pull-up resistors (selected for each bit). The Port D
output buffers have symmetrical drive characteristics
with both high sink and source capability. As inputs,
Port D pins that are externally pulled low will source
current if the pull-up resistors are activated. The Port
D pins are tri-stated when a reset condition becomes
active, even if the clock is not running.

RESET Bar Reset Input. A low level on this pin for


longer than the minimum pulse length will gener- ate a
reset, even if the clock is not running.

XTAL1 Input to the inverting Oscillator amplifier and input to


the internal clock operating circuit.

XTAL2 Output from the inverting Oscillator amplifier.

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.

AREF AREF is the analog reference pin for the A/D


Converter.

2.6 LIQUID CRYSTAL DISPLAY

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.

1. The declining prices of LCDs.


2. The ability to display numbers, characters and graphics. This is in contrast to LEDs,
which are limited to numbers and few characters.
3. Incorporation of refreshing controller into the LCD, therby relieving the CPU of the
task of refreshing the LCD. In contrast, the LED must be refreshed by the CPU to
keep displaying the data.
4. Ease of programming for characters and graphics

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).

Figure 2.5: LCD

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)

2.6.3 Pin Functions

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

1 Ground (0V) Ground

2 Supply voltage; 5V (4.7V 5.3V) Vcc

3 Contrast adjustment; through a variable resistor VEE

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

15 Backlight VCC (5V) Led+

16 Backlight Ground (0V) Led-

2.6.4 LCD Basic Commands

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:

Command RS RW D7 D6 D5 D4 D3 D2 D1 D0 Execution time

1.Clear display 0 0 0 0 0 0 0 0 0 0 1.64ms

2.Cursor home 0 0 0 0 0 0 0 0 1 x 1.64ms

3.Entry mode test 0 0 0 0 0 0 0 1 I/D S 40us

4.Display on/off control 0 0 0 0 0 0 1 D U B 40us

5.Cursor/display shift 0 0 0 0 0 1 D/C R/L x x 40us

6.Function set 0 0 0 0 1 DL N F x x 40us

7.Set CGRAM address 0 0 0 1 CGRAM address 40us

8.Set DDRAM address 0 0 1 DDRAM address 40us

9.Ready BUSY Flag(BF) 0 1 BF DDRAM address -

10.Writw to CGRAM or 1 0 D7 D6 D5 D4 D3 D2 D1 D0 40us

DDRAM

11.Read from CGRAM or 1 1 D7 D6 D5 D4 D3 D2 D1 D0 40us

DDRAM

24
Function Value Operation

I/D 1 Increment by 1

0 Decrement by 1

S 1 Display shift on

0 Display shift off

D 1 Display on

0 Display off

U 1 Cursor on

0 Cursor off

B 1 Cursor blink on

0 Cursor blink off

R/L 1 Shift right

0 Shift left

DL 1 8-bit interface

0 4-nit interface

N 1 Display in two lines

0 Display in one line

F 1 Character format 5x10 dots

0 Character format 5x7 dots

D/C 1 Display shift

0 Cursor shift

Table 2.2 : LCD Commands

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.

2.6.6 LCD Initialization

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.

Algorithm, according to initialization , is being performed depends on whether connection to


the microcontroller is through 4- or 8- bit interface, all left over to be done after that is to give
basic commands and of course to display messages.

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

2.6.8 LCD INTERFACING WITH ARDUINO

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

2.7.1 What is ZigBee ?

ZigBee is a Ad-hoc networking technology for WPAN which can form mesh
networks.

ZigBee is a low-cost, low-power, wireless mesh network standard.

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.

Intended to network inexpensive devices

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.

ZigBee Alliance, an industry working group (www.zigbee.org), is developing


standardized application software on top of the IEEE 802.15.4 wireless standard.

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.

It has 16 separate channels, which means that up to 16 networks can be present in a


single location with- out interfering with each other

ZigBee is used in applications that require a low price, low data rate, long battery life,
and secure networking.

Zigbee networks are secured by 128 bit encryption keys.

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.

Frquency Band Allocation for Zigbee :- (Table 2.3)

32
2.7.2 ZigBee Network Devices FFD (Full Function Device)

33
Comparison Chart of Different Wireless Technologies (Table 2.4)

2.7.3 History of ZigBee

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.

In Oct 2002 - ZigBee is alliance formed supported by major players such as


Freescale, Honeywell, Philips, Microchip and Mitsubishi, who have joined with

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.

ZigBee specification were approved on 14 December 2004 which is named as ZigBee


2004 Specification. After approvement, its public availability was announced 13 June
2005. (Zigbee specification V1.0) also known as ZigBee 2004 Specification.

In September 2006, ZigBee 2006 Specification was announced with member


availability version.

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.

2.7.4 ZigBee Application Profile

The current list of application profiles either published, or in the works are:

Released specifications
o ZigBee Home Automation

o ZigBee Smart Energy 1.0

35
o ZigBee Telecommunication Services

o ZigBee Health Care

o ZigBee RF4CE Remote Control

o ZigBee RF4CE Input Device

o ZigBee Light Link

Specifications under development

o ZigBee Smart Energy 2.0

o ZigBee Building Automation

o ZigBee Retail Services

2.7.5 ZigBee Modules

2.7.5.1 Digi ZigBee Modules Xbee Pro

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.

2.7.6 DIGI XBEE:

Figure 2.9: XBEE

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.

Digi Part number: XB24-AWI-001

2.7.6.1Key Features:

Outdoor range up to 300 feet (90 m) line of sight


Indoor range up to 100 feet (30 m)
Data rate up to 250 Kbps
2.4 GHz frequency band (accepted world-wide)

2.7.6.2 Application Ideas:

Remote Industrial Control and Monitoring


Long range remote control
Wireless data acquisition

2.7.6.3 Specifications

Digital I/O lines


I/O line passing
Analog-to-digital conversion
16 channels
128-bit encryption
Voltage requirements: 2.8 to 3.4 VDC (reduced performance below 3.0V)
Current requirements: ~45 mA (transmit), ~50 mA (receive), <10 uA (sleep)
Communication: CMOS UART @ ~3.3V
Dimensions: 1.08" L x 0.96" W x 0.16" H (27.61 x 24.38 x 4.06 mm)

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.

2.7.6.4 Getting Started

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

Sr. Pin Number PIN description


1. 1 Vcc 3.3V
2. 2 DOUT (TXD data OUT)
3. 3 DIN (RXD data IN)
4. 5 RST (Reset active low 50k pullup)
5. 10 GND

39
Figure 2.10: XBEE Schematic.

Schematic is very simple to understand. As shown in figure 1. Pin1 is connected to Vcc


3.3V. Pin5 pulledup through a resistor of 47K. Pin10 is connected with Ground. Pin2 TXD is
connected with RXD of serial port while Pin 3 is connected with TXD of serial port.

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

Fig 2.11: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

2.8 MEMBRANE KEYPAD


4x4 Matrix Membrane Keypad

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

Excellent price/performance ratio

Easy interface to any microcontroller

Example programs provided for


the BASIC Stamp 2 and Propeller
P8X32A microcontrollers

2.8.2 Key Specifications

Maximum Rating: 24 VDC, 30 mA

Interface: 8-pin access to 4x4 matrix

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)

2.8.3 Application Ideas

Security systems

42
Menu selection

Data entry for embedded systems

2.8.4 How it Works

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.

2.8.5 Connection Diagrams

Figure 2.13

For use with the BASIC


Stamp example program
listed below.

Figure 2.14

For use with the Propeller


P8X32A example program
listed below.

44
2.8.6 KEYPAD INTERFACING WITH ARDUINO

Fig 2.15: 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

We have connected the Column pins to a0 a1 a2 pins on Arduino

And row pins to a3 a4 a5 analog pins respectively

2.9 BUZZER

A buzzer or beeper is an audio signaling device,[1] which may be mechanical,


electromechanical, or piezoelectric. Typical uses of buzzers and beepers include alarm
devices, timers and confirmation of user input such as a mouse click or keystroke.

45
2.9.1 BUZZER INTERFACING WITH ARDUINO

Fig 2.16: 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

1) Arduino IDE (v1.0.6)

2) Digi X-CTU

3) Visual Studio 2013

3.1 Arduino IDE (v1.0.6):

Figure 3.1 ARDUINO IDE LOOKOUT

The Arduino integrated development environment (IDE) is a cross-platform application


written in Java, and derives from the IDE for the Processing programming language and
the Wiring projects. It is designed to introduce programming to artists and other newcomers
unfamiliar with software development. It includes a code editor with features such as syntax
highlighting, brace matching, and automatic indentation, and is also capable of compiling and
uploading programs to the board with a single click. A program or code written for Arduino
is called a "sketch".

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

loop(): a function called repeatedly until the board powers off

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.

As the Arduino platform uses Atmel microcontrollers, Atmel's development environment,


AVR Studio or the newer Atmel Studio, may also be used to develop software for the
Arduino.

3.1.1 Steps to Dump the code in Arduino UNO using Arduino IDE:

Step1: Open the Arduino IDE and write the sketch

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.

Other highlights of XCTU include the following features:

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:

Microsoft Visual Studio is an integrated development environment (IDE) from Microsoft. It


is used to develop computer programs for Microsoft Windows, as well as web sites, web
applications and web services. Visual Studio uses Microsoft software development platforms
such as Windows API, Windows Forms, Windows Presentation Foundation, Windows Store
and Microsoft Silverlight.

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

FIG:3.2 Flow Chart of Master Module

54
Fig:3.3 Flow Chart Of Class Module

55
CHAPTER 4
PROJECT TEST PLAN AND RESULTS

4.1 TEST PLAN:


As a point to note, this project consists of two modules, first module is Faculty Foyer
and Egress monitoring system i.e. monitoring faculty entry and exit details and second
module is Wireless Electronic Notice Board i.e. a wireless message display system. For this
there has been an arrangement established at class room and one at HOD Block or Master
Block .At class room a setup of a Keypad and a LCD and a wireless communicating device
has been arranged for entering the faculty details and for displaying the message sent from
the HOD or Master block .At HOD or Master block a setup of wireless communicating
device and PC with GUI(graphical user interface) created with the help of visual studio has
been arranged for communicating the information of faculty from class room block and for
storing it in text format and also to send messages from the HOD or Master Bock. So, here
we have several scenarios to test, they are:

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:

4.2.1 Testing the Wireless Electronic Notice Board module

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.

This is achieved by pressing the button 7 on the keypad.

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 )

4.2.4 Testing the communication of NON ASCII characters:

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;

const byte ROWS = 3; // 3 rows

const byte COLS = 3; // 3 columns

// Define the Keymap

char keys[ROWS][COLS] = {

{'1','2','3'},

{'4','5','6'},{'I','8','E'}

};

// Connect keypad ROW0, ROW1, ROW2 and ROW3 to these Arduino pins.

byte rowPins[ROWS] = {A3,A4,A5};

// Connect keypad COL0, COL1 and COL2 to these Arduino pins.

byte colPins[COLS] = {A0,A1,A2};

// Create the Keypad

67
Keypad kpd = Keypad(makeKeymap(keys), rowPins, colPins, ROWS, COLS );

SoftwareSerial chat(10, 11); // RX, TX

LiquidCrystal lcd(12,13,5,4,3,2);

int text,clas=0;

void setup()

pinMode(buzzer, OUTPUT);

// open hardware serial, TX = 1, RX = 0

lcd.begin(16,2);

Serial.begin(9600);

// set the data rate for the SoftwareSerial port

chat.begin(9600);

delay(1000); // delay 1s to stabilize serial ports

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.setCursor(0, 0); // top left

lcd.write("Mrs.K.Haripriya");

lcd.setCursor(0, 1); // bottom left

lcd.write("ES.....");

delay(3000);

lcd.clear();

break;

case '2':

chat.write("2");

lcd.clear();

lcd.setCursor(0, 0); // top left

lcd.write("Mrs.N.Parijatha");

lcd.setCursor(0, 1); // bottom left

lcd.write("CS.....");

delay(3000);

lcd.clear();

break;

70
}

case '3':

chat.write("3");

lcd.clear();

lcd.setCursor(0, 0); // top left

lcd.write("Mr.K.Praveen");

lcd.setCursor(0, 1); // bottom left

lcd.write("DSP....");

delay(3000);

lcd.clear();

break;

case '4':

chat.write("4");

lcd.clear();

lcd.setCursor(0, 0); // top left

lcd.write("Mr.TSRCH Murthy");

lcd.setCursor(0, 1); // bottom left

lcd.write("DC.....");

delay(3000);

lcd.clear();

71
break;

case '5':

chat.write("5");

lcd.clear();

lcd.setCursor(0, 0); // top left

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.setCursor(0, 0); // top left

lcd.write("Mrs.F");

lcd.setCursor(0, 1); // bottom left

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.setCursor(0, 1); // bottom left

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;

default: lcd.write("wrong Key");

74
CODE:

HOD OR MASTER BLOCK MODULE

#include <SoftwareSerial.h>

SoftwareSerial chat(10, 11); // RX, TX

int text;

void setup()

// open hardware serial, TX = 1, RX = 0

Serial.begin(9600);

// set the data rate for the SoftwareSerial port

chat.begin(9600);

delay(1000); // delay 1s to stabilize serial ports

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

public partial class Form1 : Form

public Boolean class_status,in_flag=false,id_flag,out_flag;

char i = 'I';

77
char ex='E';

public int clas_time ;

private SerialPort myport;

public Form1()

InitializeComponent();

timer1.Enabled = true;

timer1.Start();

private void button1_Click(object sender, EventArgs e)

this.Invoke((MethodInvoker)delegate

timer1.Enabled = true;

});

myport.WriteLine(textBox1.Text);

textBox1.Clear();

private void Form1_Load(object sender, EventArgs e)

78
}

private void textBox1_TextChanged(object sender, EventArgs e)

private void label1_Click(object sender, EventArgs e)

public void button1_Click_1(object sender, EventArgs e)

textBox1.Enabled = true;

Send_button.Visible = true;

try

myport = new SerialPort();

myport.BaudRate = 9600;

myport.PortName = comport_box.Text;

79
myport.DataReceived += new
SerialDataReceivedEventHandler(mySerialPort_DataReceived);

myport.Open();

catch

MessageBox.Show("Problem with Com port or Baud rate");

Application.Restart();

comport_box.Enabled = false;

public void comport_box_TextChanged(object sender, EventArgs e)

public void mySerialPort_DataReceived(object sender, SerialDataReceivedEventArgs e)

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;

using ( StreamWriter w = File.AppendText(@"F:\report.txt"))

w.Write("\r\n");

w.Write(DateTime.Now);

w.Close();

else if (z==ex && id_flag)

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;

using (StreamWriter w = File.AppendText(@"F:\report.txt"))

w.Write(DateTime.Now.ToString("HH:mm:ss"));

w.Close();

else if(in_flag)

switch (z)

case '1':

using (StreamWriter w = File.AppendText(@"F:\report.txt"))

82
w.Write(" Mrs.K.Haripriya ES ");

w.Close();

id_flag = true;

in_flag = false;

break;

case '2':

using (StreamWriter w = File.AppendText(@"F:\report.txt"))

w.Write(" Mrs.N.Parijatha CS ");

w.Close();

id_flag = true;

in_flag = false;

break;

case '3':

using (StreamWriter w = File.AppendText(@"F:\report.txt"))

83
w.Write(" Mr.K.Praveen Kumar DSP ");

w.Close();

id_flag = true;

in_flag = false;

break;

case '4':

using (StreamWriter w = File.AppendText(@"F:\report.txt"))

w.Write(" Mr.TSRCH Murthy DC ");

w.Close();

id_flag = true;

in_flag = false;

break;

case '5':

using (StreamWriter w = File.AppendText(@"F:\report.txt"))

w.Write(" Mr.G.Balakrishna OOP ");

84
w.Close();

id_flag = true;

in_flag = false;

break;

case '6':

using (StreamWriter w = File.AppendText(@"F:\report.txt"))

w.Write(" Mr.D MS ");

w.Close();

id_flag = true;

in_flag = false;

break;

public void timer1_Tick(object sender, EventArgs e)

85
label4.Text = DateTime.Now.ToString("hh:mm:ss");

private void label2_Click(object sender, EventArgs e)

private void label2_Click_1(object sender, EventArgs e)

private void timer2_Tick(object sender, EventArgs e)

clas_time--;

if (clas_time == 0)

myport.WriteLine("Time over");

timer1.Stop();

86
REFERENCES

[1]. Embedded Based Automated Student Attendance Governing System by Sahana S


Bhandari, International Journal of Engineering and Advanced Technology (IJEAT) ISSN:
2249 8958,Volume-2, Issue-5, June 2013.

[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.

[4]. For Arduino Programming :forum.arduino.cc

[5]. For Visual Studio : https://msdn.microsoft.com/en-us/library/dd492171.aspx

[6]. For Configuring Xbee: www.youtube.com/user/tunnelsup/videos

87

You might also like