1. INTRODUCTION
Embedded system is a system that lives inside an other device and act as a hardware
component of that device. An embedded system can be desirable once consisting of a
processor, associated peripherals and software used for a specific purpose. The embedded
system defined as the set of hardware controlled by software. Like any computing system
an embedded system is a combination of software and hardware.
A data base is used for the purpose of data storage. It would contain the details of all the
students and details of their attendance. When a user makes a call to the IVRS phone
number, micro-controller would detect the ring and receive the call. When the user dials
the student’s registration number on his phone, it would be detected by the micro-
controller and sent to PC via serial port. PC would make a search depending on the
registration number, and his attendance details would be played as voice which will be
transmitted via the telephone line to the user.
Telephone Line
Voltage
DTMF Decoder Converter
Ring Detector
Serial port
Micro
Controller PC
ON/OFF Hook
switch
PC Speaker
2. ANALYSIS
2.1 System Architecture-Flow Chart
Ring Detector
When the telephone is in on-hook state the voltage is at about 0v. Telephone company
sends a ringing signal which is an AC waveform. The voltage at the subscribers end
depends upon loop length and number of ringers attached to the line; it could be between
40 and 150 Volts. Ring detector circuit is the one which detects this voltage variation and
sends a signal to the micro-controller.
Hook switch is a switch on a telephone set that operates when the receiver is placed on
the hook or removed from it. In the circuit micro-controller will control the action of
receiving or disconnecting the call using this hook switch.
Micro-Controller
form of NOR flash is also often included on chip, as well as a typically small amount
of RAM. Microcontrollers are designed for embedded applications, in contrast to
the microprocessors used in personal computers or other general purpose applications.
Voltage Converter
Output of the micro-controller is a TTL voltage which has to be converted to serial port
compatible voltage. MAX232 is an integrated circuit that converts signals from an RS-
232 serial port to signals suitable for use in TTL compatible digital logic circuits or vice
versa. The MAX232 is a dual driver/receiver and typically converts the RX, TX, CTS
and RTS signals.
Serial port
In computing, Serial port is a serial communication physical interface through which
information transfers in or out one bit at a time. RS-232 (Recommended Standard 232) is
a standard for serial binary single-ended data and control signals connecting between a
DTE (Data Terminal Equipment) and a DCE (Data Circuit-terminating Equipment)
which is used in serial port communication.
2.4 Estimation
Components Cost
Micro controller 250
DTMF decoder 200
opto coupler 100
Transistor 50
Female RS232 50
DPDT relay 75
CRYSTAL 50
Zener diode 50
Diode 50
Capacitor 50
Resistor 50
Bread board 90
Circuit board 80
IC Base 50
Lead 30
Flux 10
Soldering iron 200
Wires 50
Soldering Stand 75
USB to serial converter 200
TOTAL 1760
3. SYSTEM DESIGN
DTMF Decoder
This is the most important task for our project. As the number pressed by the caller is
needed to be decoded before sending it to the microcontroller, a DTMF decoder is
needed.
For our project, we have used DTMF decoder MT8870.Its features are :-
• Complete DTMF Receiver
• Low power consumption
• Internal gain setting amplifier
• Adjustable guard time
• Central office quality
o Power-down mode
Microcontroller
Relay
Relays available are HK, PLA, OEN and GOODSKY. These are the different
manufacturers of relays. Also, according to the DC voltages, relays available are 5V, 6V,
12V, 18V AND 24V. According to the type, relays available are SPST, DPDT and
SPDT.Also, relays can be PCB mountable and Panel mountable.
MAX 232
Micro-controller (AT89C2051)
The AT89C2051 provides the following standard features: 2K bytes of Flash, 128 bytes
of RAM, 15 I/O lines, two 16-bit timer/counters, a five vector two-level interrupt
architecture, a full duplex serial port, a precision analog comparator, on-chip oscillator
and clock circuitry.
RS232 Connector
It is a standard for serial binary single-ended data and control signals connecting
between a DTE (Data Terminal Equipment) and a DCE (Data Circuit-terminating
Equipment). It is commonly used in computer serial ports. The standard defines the
electrical characteristics and timing of signals, the meaning of signals, and the physical
size and pin out of connectors.
The MT8870 is a state of the art single chip DTMF receiver incorporating switched
capacitor filter technology and an advanced digital counting/averaging algorithm for
period measurement. To aid design flexibility, the DTMF input signal is first buffered by
an input op-amp which allows adjustment of gain and choice of input configuration.
The input stage is followed by a low pass continuous RC active filter which performs an
anti-aliasing function. Dial tone at 350 and 440Hz is then rejected by a third order
switched capacitor notch filter. The signal, still in its composite form, is then split into its
individual high and low frequency components by two sixth order switched capacitor and
pass filters. Each component tone is then smoothed by an output filter and squared up by
a hard limiting comparator.
Optocoupler (MCT2E)
Transistor
Because the controlled (output) power can be much more than the controlling (input)
power, the transistor provides amplification of a signal.
Diode
A diode is a two-terminal electronic component that conducts electric current in only one
direction. The most common function of a diode is to allow an electric current to pass in
one direction (called the diode's forward direction) while blocking current in the opposite
direction (the reverse direction).
Zener diode
A Zener diode is a type of diode that permits current not only in the forward direction
like a normal diode, but also in the reverse direction if the voltage is larger than the
breakdown voltage known as "Zener knee voltage" or "Zener voltage". A conventional
solid-state diode will not allow significant current if it is reverse-biased below its reverse
breakdown voltage. When the reverse bias breakdown voltage is exceeded, a
conventional diode is subject to high current due to avalanche breakdown. Unless this
current is limited by circuitry, the diode will be permanently damaged. In case of large
forward bias (current in the direction of the arrow), the diode exhibits a voltage drop due
to its junction built-in voltage and internal resistance. The amount of the voltage drop
depends on the semiconductor material and the doping concentrations.
A Zener diode exhibits almost the same properties, except the device is specially
designed so as to have a greatly reduced breakdown voltage, the so-called Zener voltage.
By contrast with the conventional device, a reverse-biased Zener diode will exhibit a
controlled breakdown and allow the current to keep the voltage across the Zener diode at
the Zener voltage.
Relay
Crystal oscillator
A crystal oscillator is an electronic oscillator circuit that uses the mechanical resonance
of a vibrating crystal of piezoelectric material to create an electrical signal with a very
precise frequency. The most common type of piezoelectric resonator used is the quartz
crystal, so oscillator circuits designed around them became known as "crystal oscillators."
Quartz crystals are manufactured for frequencies from a few tens of kilohertz to tens of
megahertz.
Resistors
Capacitors
Algorithm
Flow Chart
ATTENDANCE SYSTEM
REGISTER NUMBER
NAME
ATTENDANCE
In the database, there is one table which holds the register number, name, total
attendance. When the microcontroller sends the register number to the PC it searches the
database for the register number, if found then the attendance would be transmitted in
voice by the PC.
Fundamentals
Error refers to the difference between the actual output of software and the correct
output. It is also used to refer to human action those results in software containing a
defect or a fault. Fault is a condition causing the software to fail to perform its required
function. It is the basic reason for software malfunction and is synonymous with the word
‘bug’. Failure is the inability of a system or a component to perform a required function
according to its specifications. A software failure occurs if the behavior of the software is
different from the specified behavior. Failures may be caused due to functional as well as
performance reasons. A failure is produced only when there is a fault in the system. But a
fault does not always produce a failure.
The software reliability is the probability that the software will not undergo a failure
for a specified time under specified conditions. Reliability is basically the level of
confidence one can place in the software, and this level is dependent on time. Reliability
can also be defined in terms of MTTF which specifies the average time between the
occurrences of two failures. We put our system to tests which proved its reliability under
conditions specified in the SRS.
Levels of Testing
It is for showing that the software is working satisfactorily with realistic data.
These different levels try to detect different types of faults. The different levels
are shown below.
i) Top-down approach
In top-down strategy, we start by testing the top of the hierarchy, add modules that
it calls & then the new combined system. This approach requires stubs to be written. A
stub is a dummy routine that simulates a module. To allow the modules to be tested
before their subordinates have actually been coded, stubs simulate the behavior of the
subordinates.
The bottom-up approach starts from the bottom of the hierarchy. First the modules
at the very bottom are tested. Then these modules are combined further with higher level
modules for testing. To perform bottom-up testing, drivers are needed, to set up the
appropriate environment & invoke the module. It is the job of the driver to invoke the
module under testing with different set of test cases.
Functional Testing:
In functional testing, the structure of the program is not considered. Test cases are
decided in the basis of the requirements of the program or module & the intervals of the
module are not considered for the selection of the test cases. Due to its nature, functional
testing is called “Black Box Testing”.
Structural Testing:
The intent of structural testing is not to exercise all the different input or output
conditions, but to exercise different programming & data structures used in the program.
For testing the structure of a program, structural testing aims to achieve test cases that
will force the desired coverage of different structures, to determine if the coverage is
sufficient, we have to define some coverage criteria “Glass Box Testing”.
Modules to be tested
1. Hardware part
2. Software part
The program written must also be tested, in order to get an efficient program
which can perform the required task.
4. IMPLEMENTATION
Programming style refers to a set of rules or guidelines used when writing the source
code for a computer program. It is often claimed that following a particular programming
style will help programmers quickly read and understand source code conforming to the
style as well as helping to avoid introducing faults.
A classic work on the subject was The Elements of Programming Style, written in the
1970s, and illustrated with examples from the Fortran and PL/I languages prevalent at the
time.
The programming style used in a particular program may be derived from the coding
standards or code conventions of a company or other computing organization, as well as
the preferences of the author of the code. Programming styles are often designed for a
specific programming language (or language family), but some rules are commonly
applied to many languages. (Style considered good in C source code may not be
appropriate for BASIC source code, and so on.)
Good style, being a subjective matter, is difficult to concretely categorize; however, there
are several elements common to a large number of programming styles. The issues
usually considered as part of programming style include the layout of the source code,
including indentation; the use of white space around operators and keywords; the
capitalization or otherwise of keywords and variable names; the style and spelling of
user-defined identifiers, such as function, procedure and variable names; the use and style
of comments; and the use or avoidance of programming constructs themselves (such as
GOTO statements).
Code appearance
Programming styles commonly deal with the appearance of source code, with the goal of
improving the readability of the program. However, with the advent of software that
formats source code automatically, the focus on appearance will likely yield to a greater
focus on naming, logic, and higher techniques. As a practical point, using a computer to
format source code saves time, and it is possible to then enforce company-wide standards
without debates.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO.Ports;
namespace SerialPortCommTest1
{
public partial class tester : Form
{
delegate void SetTextCallback(string text);
public tester()
{
InitializeComponent();
// Nice methods to browse all available ports:
{
cmbComSelect.Items.Add(port);
}
}
private void tester_Load(object sender, EventArgs e)
{
}
private void cmbComSelect_SelectionChangeCommitted(object sender, EventArgs e)
{
if (port.IsOpen) port.Close();
port.PortName = cmbComSelect.SelectedItem.ToString();
// stsStatus.Text = port.PortName + ": 9600,8N1";
// try to open the selected port:
try
{
port.Open();
}
// give a message, if the port is not available:
catch
{
MessageBox.Show("Serial port " + port.PortName + " cannot be opened!",
"RS232 tester", MessageBoxButtons.OK, MessageBoxIcon.Warning);
cmbComSelect.SelectedText = "";
//stsStatus.Text = "Select serial port!";
}
}
private void port_DataReceived(object sender, SerialDataReceivedEventArgs e)
{
string dataFromSerialPort = port.ReadExisting();
if (dataFromSerialPort == "A")
{
winMediaPlayer.URL = Application.StartupPath +
@"\Voice\welcome_to_christ_uni.mp3";
}
else if (dataFromSerialPort == "#")
{
winMediaPlayer.URL = Application.StartupPath +
@"\Voice\thanks_for_calling.mp3";
}
else //if( (Convert.ToInt16(dataFromSerialPort) >=0) &&
(Convert.ToInt16(dataFromSerialPort) <=9) )
{
// wat you have to do is
// get digits one by one
// check if the length is 7.
// if there is a time out of say 5 seconds then play reenter..
// if u get 7 digits then check database and play voice
regNo = regNo + dataFromSerialPort;
//timerForRegNoTimeOut.Start();
// check if length is less than 7..
if (regNo.Length < 7)
{
//MessageBox.Show("size chikdu");
//timerForRegNoTimeOut.Stop();
//timerForRegNoTimeOut.Start();
}
else // if length is 7 stop the clock and do the processing
{
//MessageBox.Show(regNo);
SetText("\n");
SetText(regNo);
}
}
private void SetText(string text)
{
// InvokeRequired required compares the thread ID of the
// calling thread to the thread ID of the creating thread.
// If these threads are different, it returns true.
if (this.textBox1.InvokeRequired)
{
//this.textBox1.Clear();
SetTextCallback d = new SetTextCallback(SetText);
this.Invoke(d, new object[] { text });
}
else
{
this.textBox1.Clear();
this.textBox1.Text += text;
}
}
private void timerForRegNoTimeOut_Tick(object sender, EventArgs e)
{
//MessageBox.Show("5 sec aytu");
winMediaPlayer.URL = Application.StartupPath +
@"\Voice\no_data_re_enter.mp3";
regNo = ""
}
private void playVoice(string data)
{
//winMediaPlayer.play
try
{
winMediaPlayer.settings.volume = 100;
//if (int.Parse(data) >= 20)
//{
if (int.Parse(data) == 1)
{
winMediaPlayer.URL = Application.StartupPath + @"\Voice\one.wav";
// winMediaPlayer.URL =
//MessageBox.Show("jai");
//Application.StartupPath
}
else if (int.Parse(data) == 2)
{
winMediaPlayer.URL = Application.StartupPath + @"\Voice\two.wav";
}
else if (int.Parse(data) == 3)
{
winMediaPlayer.URL = Application.StartupPath + @"\Voice\three.wav";
}
else if (int.Parse(data) == 4)
{
winMediaPlayer.URL = Application.StartupPath + @"\Voice\four.wav";
}
else if (int.Parse(data) == 5)
{
winMediaPlayer.URL = Application.StartupPath + @"\Voice\five.wav";
}
else if (int.Parse(data) == 6)
{
winMediaPlayer.URL = Application.StartupPath + @"\Voice\six.wav";
}
else if (int.Parse(data) == 7)
{
winMediaPlayer.URL = Application.StartupPath + @"\Voice\seven.wav";
}
else if (int.Parse(data) == 8)
{
winMediaPlayer.URL = Application.StartupPath + @"\Voice\eight.wav";
}
else if (int.Parse(data) == 9)
{
winMediaPlayer.URL = Application.StartupPath + @"\Voice\nine.wav";
}
else if (int.Parse(data) == 10)
{
winMediaPlayer.URL = Application.StartupPath + @"\Voice\ten.wav";
}
else if (int.Parse(data) == 11)
{
winMediaPlayer.URL = Application.StartupPath + @"\Voice\eleven.wav";
}
else if (int.Parse(data) == 12)
{
winMediaPlayer.URL = Application.StartupPath + @"\Voice\twelve.wav";
}
else if (int.Parse(data) == 13)
{
winMediaPlayer.URL = Application.StartupPath + @"\Voice\thirteen.wav";
}
else if (int.Parse(data) == 14)
{
winMediaPlayer.URL = Application.StartupPath + @"\Voice\fourteen.wav";
}
5. TESTING
Testing is done for both the Hardware and Software part. First we checked whether the
connections made in all circuits are correct.
After testing the circuit manually, it was time to check the circuit using the software.
While testing with software we checked whether the data sent to the computer or received
by the computer to the hardware is correct or not. We also checked whether the data send
by the computer to the hardware was the desired one.
6. CONCLUSION
We have successfully executed our project “Interactive Voice Response System for
College Attendance System” by using our college telephone line .
Advantages
• Save time and money – answering the phone calls takes a lot of time.
• Available 24 hours a day to field register number and get the attendance
percentage.
Disadvantages
6.2Future Works
• Our project should be modified to know the profile and marks of the student
• Access the college database for the execution of our project .
7. BIBLIOGRAPHY
BOOKS
WEBSITES
• http://en.wikipedia.org/wiki/Interactive_voice_response
• http://web.cmc.net.in/products/ivrs/ivrs.asp
• http://www.blissit.org/ivrs.htm
• http://www.kleward.com/ivr_solutions.htm
• http://en.wikipedia.org/wiki/Special:Search?search=information+on+IVR+system