Professional Documents
Culture Documents
INTRODUCTION
1.1 Introduction
Micro controller based speaking system for patient is designed to give
the signs, which are preloaded in the device. It is a micro controller based device, which
gives the alert sounds just by using a touch screen, which are given some predefined
messages like asking for water, washroom etc., here the person need to touch the touch
screen which indicates the sign of water (example) then the device sounds the same with
some output volume.
Micro controller is the heart of the device. It stores the data of the needs of the
person. So that it can make use of the data stored whenever the person uses the device. This
device helps the deaf and dumb people to announce their requirements. By this the person
who is near can understand their need and help them. This saves the time to understand each
other and ease in communication.
Touch screen based devices can be easily reachable to the common man due
its simpler operation, and at the same time it challenges the designers of the device. These
touch screen sensors can be used as a replacement of the existing switches in home which
produces sparks and also results in fire accidents in few situations. Considering the
advantages of touch screen sensors an advanced automation system was developed to control
the appliances in the house. This device is designed to provide with a greater advantage
producing voice based announcement for the user i.e. the user gets the voice which
pronounces his need as and when it is required.
2. BLOCK DIAGRAM
2.1 Block diagram
2.2 Microcontroller
A Microcontroller is a programmable digital processor with necessary
peripherals. Both
circuits meant to carry out job according to the program / instructions. Sometimes analog
3
input/output interface makes a part of microcontroller circuit of mixed mode (both analog
and digital nature).
1. A smaller computer
2. On-chip RAM, ROM, I/O ports...
Example: Motorolas 6811, Intels 8051, Zilogs Z8 and PIC 16X
2.2.1 Internal Structure of a Microcontroller
Relation between instruction cycles and clock cycles for PIC microcontrollers
Instructions that do not require modification of program counter content get executed in one
instruction cycle.
2.2.3 Memory unit
Memory is part of the microcontroller whose function is to store data.
The easiest way to explain it is to describe it as one big closet with lots of drawers. If we
suppose that we marked the drawers in such a way that they can not be confused, any of their
contents will then be easily accessible. It is enough to know the designation of the drawer
and so its contents will be known to us for sure.
2.2.4 Central Processing Unit
Let add 3 more memory locations to a specific block that will have a built in
capability to multiply, divide, subtract, and move its contents from one memory location onto
another. The part we just added in is called "central processing unit" (CPU). Its memory
locations are called registers.
2.2.5 Microcontroller PIC16F73
The PIC16F73 CMOS FLASH-based 8-bit microcontroller is upward
compatible with the PIC16C73B/74B/76/77, PIC16F873/874/876/877devices. It features 200
ns instruction execution, self programming, an ICD, 2 Comparators, 8 channels of 8-bit
Analog-to-Digital (A/D) converter, 2 capture/compare/PWM functions, a synchronous serial
port that can be configured as either 3-wire SPI or 2-wire I2C bus, a USART, and a Parallel
Slave Port.
High-Performance RISC CPU
Only 35 single word instructions to learn
All single cycle instructions except for program branches which are two-cycle
5
Crystal oscillator
The crystal oscillator speed that can be connected to the PIC microcontroller
range from DC to 20Mhz. Using the CCS C compiler normally 20Mhz oscillator will be used
and the price is very cheap. The 20 MHz crystal oscillator should be connected with about
22pF capacitor. Please refer to my circuit schematic.
There are 5 input/output ports on PIC microcontroller namely port A, port B,
port C, port D and port E. Each port has different function. Most of them can be used as I/O
port.
Applications
PIC16F73 perfectly fits many uses, from automotive industries and controlling
home appliances to industrial instruments, remote sensors, electrical door locks and safety
devices. It is also ideal for smart cards as well as for battery supplied devices because of its
low consumption.
Pin description
PIC16F73 has a total of 28 pins. It is most frequently found in a DIP28 type of
case but can also be found in SMD case which is smaller from a DIP. DIP is an abbreviation
for Dual In Package. SMD is an abbreviation for Surface Mount Devices suggesting that
holes for pins to go through when mounting aren't necessary in soldering this type of a
component.
Pins on PIC16F73 microcontroller have the following meaning:
There are 28 pins on PIC16F73. Most of them can be used as an IO pin. Others are already
for specific functions. These are the pin functions.
1. MCLR to reset the PIC
2. RA0 port A pin 0
3. RA1 port A pin 1
4. RA2 port A pin 2
5. RA3 port A pin 3
6. RA4 port A pin 4
7. RA5 port A pin 5
8. VSS ground
8
fitting for one-line communication where data flow constantly changes direction. PORTA
and PORTB state registers are located in bank 0, while TRISA and TRISB pin direction
registers are located in bank 1.
Each PORTB pin has a weak internal pull-up resistor (resistor which defines a line
to logic one) which can be activated by resetting the seventh bit RBPU in OPTION
register. These 'pull-up' resistors are automatically being turned off when port pin is
configured as an output. When a microcontroller is started, pull-ups are disabled.
Four pins PORTB, RB7:RB4 can cause an interrupt which occurs when their status
changes from logical one into logical zero and opposite. Only pins configured as input can
cause this interrupt to occur (if any RB7:RB4 pin is configured as an output, an interrupt
won't be generated at the change of status.) This interrupt option along with internal pull-up
11
resistors makes it easier to solve common problems we find in practice like for instance that
of matrix keyboard.
Batteries.
Solar power.
Generators or alternators.
12
Fig 2.3.2(b): Circuit diagram of Regulated Power Supply with Led connection
The components mainly used in above figure are
230V AC MAINS
TRANSFORMER
BRIDGE RECTIFIER(DIODES)
CAPACITOR
RESISTOR
The detailed explanation of each and every component mentioned above is as follows:
Transformation
The process of transforming energy from one device to another is called
transformation. For transforming energy we use transformers.
A transformer is a device that transfers electrical energy from one circuit to
another through inductively coupled conductors without changing its frequency. A
varying current in the first or primary winding creates a varying magnetic flux in the
transformer's core, and thus a varying magnetic field through the secondary winding. This
varying magnetic field induces a varying electromotive force (EMF) or "voltage" in the
secondary winding. This effect is called mutual induction.
If a load is connected to the secondary, an electric current will flow in the
secondary winding and electrical energy will be transferred from the primary circuit through
the transformer to the load. This field is made up from lines of force and has the same shape
as a bar magnet.
13
If the current is increased, the lines of force move outwards from the coil. If the
current is reduced, the lines of force move inwards. The input coil is called the PRIMARY
WINDING, the output coil is the SECONDARY WINDING.
14
Rectification
The process of converting an alternating current to a pulsating direct current is
called as rectification. For rectification purpose we use rectifiers.
Rectifiers
A rectifier is an electrical device that converts alternating current (AC) to direct
current (DC), a process known as rectification. Rectifiers have many uses including as
components of power supplies and as detectors of radio signals. Rectifiers may be made of
solid-state diodes, vacuum tube diodes, mercury arc valves, and other components.A device
that it can perform the opposite function (converting DC to AC) is known as an inverter.
15
Input
Output
Fig 2.3.2(f): Full wave bridge rectifier& its input and output waveforms
DB107
Now -a -days Bridge rectifier is available in IC with a number of DB107. In our
project we are using an IC in place of bridge rectifier.
Features
17
Units of Capacitance
Microfarad (F) 1F = 1/1,000,000 = 0.000001 = 10-6 F
Nanofarad (nF) 1nF = 1/1,000,000,000 = 0.000000001 = 10-9 F
Pico farad (pF) 1pF = 1/1,000,000,000,000 = 0.000000000001 = 10-12 F
Regulation
The process of converting a varying voltage to a constant regulated voltage is
called as regulation. For the process of regulation we use voltage regulators.
Voltage Regulator
A voltage regulator (also called a regulator) with only three terminals appears
to be a simple device, but it is in fact a very complex integrated circuit. It converts a
varying input voltage into a constant regulated output voltage. Voltage Regulators are
available in a variety of outputs like 5V, 6V, 9V, 12V and 15V. The LM78XX series of
voltage regulators are designed for positive input. For applications requiring negative
input, the LM79XX series is used. Using a pair of voltage-divider resistors can increase
the output voltage of a regulator circuit.
It is not possible to obtain a voltage lower than the stated rating. You cannot
use a 12V regulator to make a 5V power supply. Voltage regulators are very robust. These
18
can withstand over-current draw due to short circuits and also over-heating. In both cases,
the regulator will cut off before any damage occurs.
2.4 LED
A light-emitting diode (LED) is a semiconductor light source. LEDs are used
as indicator lamps in many devices, and are increasingly used for lighting. Introduced as a
practical electronic component in 1962, early LEDs emitted low-intensity red light, but
modern versions are available across the visible, ultraviolet and infrared wavelengths,
with very high brightness.
Working
The structure of the LED light is completely different than that of the light
bulb. Amazingly, the LED has a simple and strong structure. The light-emitting
19
semiconductor material is what determines the LED's color. The LED is based on the
semiconductor diode.
When a diode is forward biased (switched on), electrons are able to recombine
with holes within the device, releasing energy in the form of photons. This effect is called
electroluminescence and the color of the light (corresponding to the energy of the photon)
is determined by the energy gap of the semiconductor. An LED is usually small in area
(less than 1 mm2), and integrated optical components are used to shape its radiation
pattern and assist in reflection.
LEDs present many advantages over incandescent light sources including
lower energy consumption, longer lifetime, improved robustness, smaller size, faster
switching, and greater durability and reliability. However, they are relatively expensive
and require more precise current and heat management than traditional light sources.
Current LED products for general lighting are more expensive to buy than fluorescent
lamp sources of comparable output. They also enjoy use in applications as diverse as
replacements for traditional light sources in automotive lighting (particularly indicators)
and in traffic signals. The compact size of LEDs has allowed new text and video displays
and sensors to be developed, while their high switching rates are useful in advanced
communications technology.
High-efficiency
20
2. Illumination where LED light is reflected from object to give visual response of these
objects.
narrow gap. When an object, such as a finger, presses down on a point on the panel's outer
surface the two metallic layers become connected at that point: the panel then behaves as
a pair of voltage dividers with connected outputs.
2. Surface acoustic wave
Surface acoustic wave (SAW) sumit technology uses ultrasonic waves that pass
over the touch screen panel. When the panel is touched, a portion of the wave is absorbed.
This change in the ultrasonic waves registers the position of the touch event and sends
this information to the controller for processing. Surface wave touch screen panels can be
damaged by outside elements.
3. Capacitive
A capacitive touch screen panel consists of an insulator such as glass, coated
with a transparent conductor such as indium tin oxide (ITO). As the human body is also a
conductor, touching the surface of the screen results in a distortion of the body's
electrostatic field, measurable as a change in capacitance. Different technologies may be
used to determine the location of the touch. The location can be passed to a computer
running a software application which will calculate how the user's touch relates to the
computer software.
4. Surface capacitance
In this basic technology, only one side of the insulator is coated with a
conductive layer. A small voltage is applied to the layer, resulting in a uniform
electrostatic field. When a conductor, such as a human finger, touches the uncoated
surface, a capacitor is dynamically formed. The sensor's controller can determine the
location of the touch indirectly from the change in the capacitance as measured from the
four corners of the panel.
5. Projected capacitance
Projected Capacitive Touch (PCT) technology is a capacitive technology which
permits more accurate and flexible operation, by etching the conductive layer. An XY
array is formed either by etching a single layer to form a grid pattern of electrodes, or by
etching two separate, perpendicular layers of conductive material with parallel lines or
tracks to form the grid (comparable to the pixel grid found in many LCD displays).
6. Infrared
22
8. Optical imaging
A relatively-modern development in touch screen technology, two or more
image sensors are placed around the edges (mostly the corners) of the screen. Infrared
backlights are placed in the camera's field of view on the other sides of the screen. A
touch shows up as a shadow and each pair of cameras can then be triangulated to locate
the touch or even measure the size of the touching object (see visual hull). This
technology is growing in popularity, due to its scalability, versatility, and affordability,
especially for larger units.
2.5.2 Construction
There are several principal ways to build a touch screen. The key goals are to
recognize one or more fingers touching a display, to interpret the command that this
represents, and to communicate the command to the appropriate application.
In the most popular techniques, the capacitive or resistive approach, there are typically
four layers
1. Top polyester layer coated with a transparent metallic conductive coating on the
bottom
2. Adhesive spacer
23
3. Glass layer coated with a transparent metallic conductive coating on the top
4. Adhesive layer on the backside of the glass for mounting.
When a user touches the surface, the system records the change in the electrical
current that flows through the display. In each case, the system determines the intended
command based on the controls showing on the screen at the time and the location of the
touch.
Resistive Touch screen Technology
Resistive LCD touch screen monitors rely on a touch overlay, which is
composed of a flexible top layer and a rigid bottom layer separated by insulating dots,
attached to a touch screen controller. The inside surface of each of the two layers is coated
with a transparent metal oxide coating (ITO) that facilitates a gradient across each layer
when voltage is applied. Pressing the flexible top sheet creates electrical contact between
the resistive layers, producing a switch closing in the circuit. The control electronics
alternate voltage between the layers and pass the resulting X and Y touch coordinates to
the touch screen controller. The touch screen controller data is then passed on to the
computer operating system for processing.
Working of Resistive Touch screens
24
An Analog Devices AD7843 scans the X and Y axes and determines the unique
voltage drop for each axis. The four electrodes for scanning are labeled X+, X-, Y+, and
Y-. These electrodes are connected to the AD7843 touch screen controller and the touch
sensor is scanned and the analog voltages read.
Graphic LCD with Touch Screen
These GLCD have common display drivers like KS0108 and T6963C and 4
wire resistive touch screen. There is no need for touch screen digitizer/controller for
micro controllers having on chip ADC with four analog channels. Just connect the four
wire of touch screen to analog inputs and read the respective digital data for X and Y
direction of touched point.
They are all constructed similarly in layers-a back layer such as glass with a
uniform resistive coating plus a polyester coversheet, with the layers separated by tiny
insulating dots. When the screen is touched, it pushes the conductive coating on the
coversheet against the coating on the glass, making electrical contact. The voltages
produced are the analog representation of the position touched. An electronic controller
converts these voltages into digital X and Y coordinates which are then transmitted to the
host computer.
28
29
causes a particular sound track to replay once. While the sound is playing, press the same
key again or press CE key will terminate the current sound track. Press other key while a
sound is being played causes a new sound track to be played. If a key from M1 to -M8 is
pressed continuously, the particular sound track will be played continuously. Press CE to
stop playing the sound track.
2 Serial mode recording and replaying
(i)Record sound tracks sequentially
This is an example of recording sequential sound tracks. The mode switch should
have the following pattern: MSEL1=0(switched to right-hand side of the mode selection
switch), MSEL2=0 (right-hand side). M8=1 (left-hand side). RE=0 (right-hand side).
Press CE first to reset the sound track counter to zero. Press and hold M1 down and you
will see BUZY LED illuminates. You can now speak to the microphone. Recording will
terminate if M1 is released or if the recording time exceeds 60 seconds (in this case you
will run out the memory for your next sound track). Press M1 again and again to record
2nd, 3rd , 4th and other consecutive sound tracks. Each sound track may have different
lengths, but the accumulated length of all sound tracks will not exceed 60 seconds.
(ii)Replay sound tracks sequentially
Now make RE=1 (switched to Left-hand side of the mode selection switch) while
keep other switches at the same location. Toggle M1 (press key and release) causes the
1st sound track to be played once. Toggle M1 again and again will play the 2nd, 3rd, 4th
and other consecutive sound tracks. Press CE to reset the sound track counter to zero.
(iii)Record sound tracks with forward control
This is an example of recording sound tracks with forward control. The mode
switch should have the following pattern: MSEL1=0(switched to right-hand side of the
mode selection switch), MSEL2=0 (right-hand side). M8=0 (right-hand side). RE=0
(right-hand side). Press CE first to reset the sound track counter to zero. This mode is
rather similar to the above sequential sound recording. The only difference is that after
M1 is pressed and released; the sound track counter does not increment itself to the next
sound track location. To move to the next sound track, M2 should be toggled. So if M1
is not toggled again and again without toggling M2, sound will be recorded at the same
sound track location.
31
Driver design
33
3. SOFTWARE IMPLEMENTATION
3.1 Software implementation
This project is implemented using following softwares:
The select tool: It is fairly obvious what this does. It allows you to move
and
manipulate parts. When this tool is selected the top toolbar will show buttons to move
traces to the top / bottom copper layer, and rotate buttons.
34
The place pad: button allows you to place small soldier pads which are useful for
board connections or if a part is not in the part library but the part dimensions are
available. When this tool is selected the top toolbar will give you a large selection of
round holes, square holes and surface mount pads.
The place component: tool allows you to select a component from the top toolbar and
then by clicking in the workspace places that component in the orientation chosen
using the buttons next to the component list. The components can always be rotated
afterwards with the select tool if the orientation is wrong.
The place trace: tool allows you to place a solid trace on the board of varying
thicknesses. The top toolbar allows you to select the top or bottom layer to place the
trace on.
The Insert Corner in trace: button does exactly what it says. When this tool is selected,
clicking on a trace will insert a corner which can be moved to route around
components and other traces.
The remove a trace button is not very important since the delete key will achieve the
same result.
When using a double sided board you must consider which traces should be on what side
of the board. Generally, put power traces on the top of the board, jumping only to the
bottom if a part cannot be soldiered onto the top plane (like a relay), and vice- versa.
3.2 PIC compiler
PIC compiler is software used where the machine language code is written and
compiled. After compilation, the machine source code is converted into hex code which is
to be dumped into the microcontroller for further processing. PIC compiler also supports
C language code. Its important that you know C language for microcontroller which is
commonly known as Embedded C. As we are going to use PIC Compiler, hence we also
call it PIC C. The PCB, PCM, and PCH are separate compilers. PCB is for 12-bit
opcodes, PCM is for 14-bitopcodes, and PCH is for 16-bit opcode PIC microcontrollers.
Due to many similarities, all three compilers are covered in this reference manual.
Features and limitations that apply to only specific microcontrollers are indicated within.
These compilers are specifically designed to meet the unique needs of the PIC
microcontroller.
PIC C is not much different from a normal C program. If you know assembly,
writing a C program is not a crisis. In PIC, we will have a main function, in which all
your application specific work will be defined. In case of embedded C, you do not have
any operating system running in there. So you have to make sure that your program or
main file should never exit. This can be done with the help of simple while (1) or for (;;)
loop as they are going to run infinitely. We have to add header file for controller you are using,
otherwise you will not be able to access registers related to peripherals.
3.3 Proteus
Proteus is software which accepts only hex files. Once the machine code is
converted into hex code, that hex code has to be dumped into the microcontroller and this
is done by the Proteus. Proteus is a programmer which itself contains a microcontroller in
it other than the one which is to be programmed. This microcontroller has a program in it
written in such a way that it accepts the hex file from the pic compiler and dumps this hex
file into the microcontroller which is to be programmed. As the Proteus programmer
requires power supply to be operated, this power supply is given from the power supply
circuit designed and connected to the microcontroller in proteus. The program which is to
be dumped in to the microcontroller is edited in proteus and is compiled and executed to
36
check any errors and hence after the successful compilation of the program the program is
dumped in to the microcontroller using a dumper.
You will be prompted to choose a name for the new project, so create a separate
folder where all the files of your project will be stored, choose a name and click save.
Click Project, New, and something the box named 'Text1' is where your code should
be written later.
37
Now you have to click 'File, Save as' and choose a file name for your source code
ending with the letter '.c'. You can name as 'project.c' for example and click save.
Then you have to add this file to your project work.
38
You can then start to write the source code in the window titled 'project.c' then before
testing your source code; you have to compile your source code, and correct eventual
syntax errors.
Fig 3.4.1(d): Picture of checking errors and warnings using PIC C compiler
This is how we compile a program for checking errors and hence the compiled
program is saved in the file where we initiated the program.
39
40
41
3. After connecting the dumper properly to the microcontroller kit the window is appeared as
shown below.
43
44
4. Again by selecting the Tools option and clicking on Check Communication the
microcontroller gets recognized by the dumper and hence the window is as shown below.
45
46
5. Import the program which is .hex file from the saved location by selecting File option
and clicking on Import Hex as shown in below window.
47
6. After clicking on Import Hex option we need to browse the location of our
program and click the prog.hex and click on open for dumping the program into the
microcontroller.
48
49
51
5. RESULTS
The project Haptic based speaking microcontroller was designed a
user friendly multi-language communication system for illiterate/dumb people using
touch screen and voice module. This system provides user-friendly environment for the
users with a kind of image interaction this may be easy for the illiterates to remember.
54
55
56
REFERENCES
B. B. Edin, L. Ascari, L. Beccai, S. Roccella, J. J. Cabibihan, M. C. Carrozza, "BioInspired Sensorization of a Biomechatronic Robot Hand for the Grasp-and-Lift Task",
Brain Research Bulletin, Volume 75, Issue 6, 15 April 2008, pp. 785-795
[CrossRef]
M. Wald, "Captioning for Deaf and Hard of Hearing People by Editing Automatic Speech
Recognition in Real Time", Proceedings of 10th International Conference on Computers
Helping People with Special Needs ICCHP 2006, LNCS 4061, pp. 683-690
Jingdong Zhao, Li Jiang, Shicai Shi, Hegao Cai, Hong Liu, G. Hirzinger, "A Fivefingered Underactuated Prosthetic Hand System", Proceedings of the 2006 IEEE
International Conference on Mechatronics and Automation, June 2006, pp. 1453-1458
Flex Point Inc. USA, "http://www.flexpoint.com", Last Accessed on September 06, 2010
57
B. B. Edin, L. Ascari, L. Beccai, S. Roccella, J. J. Cabibihan, M. C. Carrozza, "BioInspired Sensorization of a Biomechatronic Robot Hand for the Grasp-and-Lift Task",
Brain Research Bulletin, Volume 75, Issue 6, 15 April 2008, pp. 785-795
[CrossRef]
M. Wald, "Captioning for Deaf and Hard of Hearing People by Editing Automatic Speech
Recognition in Real Time", Proceedings of 10th International Conference on Computers
Helping People with Special Needs ICCHP 2006, LNCS 4061, pp. 683-690
Jingdong Zhao, Li Jiang, Shicai Shi, Hegao Cai, Hong Liu, G. Hirzinger, "A Fivefingered Underactuated Prosthetic Hand System", Proceedings of the 2006 IEEE
International Conference on Mechatronics and Automation, June 2006, pp. 1453-1458
Flex Point Inc. USA, "http://www.flexpoint.com", Last Accessed on September 06, 2010
PROGRAM
58
Program Code
The program code which is dumped in the microcontroller of our project is shown below.
#include <16F73.h>
#include <APR9600.h>
#include <ADC.h>
#use delay(clock=20000000)
void main()
{
int i=0;
unsigned int data;
output_high(PIN_C3);
delay_ms(1000);
output_low(PIN_C3);
delay_ms(1000);
output_high(PIN_C3);
delay_ms(1000);
output_low(PIN_C3);
play_voice(8);
while(1)
{
x_coord = GetX();
delay_ms(50);
if((x_coord < 80) && (x_coord > 0))
59
{
output_high(PIN_C3);
play_voice(7);
}
else if((x_coord < 160) && (x_coord > 85) )
{
output_high(PIN_C3);
play_voice(6);
}
else if((x_coord < 250) && (x_coord > 165) )
{
output_high(PIN_C3);
play_voice(5);
}
delay_ms(100);
output_low(PIN_C3);
}
}
60