CHAPTER 1 1.1 Introduction:
Micro controller based speaking system for deaf and dumb 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 pressing the control buttons by proper potentiometer value, which are given some redefined messages like asking for water, washroom etc., here the person can just press the control button 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. 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. The main aim of the project is to provide a user-friendly interaction with the deaf and dumb people. It is highly sensitive and reliable for the dumb people and it is also very easy to operate. The basic firmware for the microcontroller is written in Embedded C language and compiled using PIC complier. The compiler generates the Hex code for the microcontroller and the Hex code is stored /programmed in flash memory of micro controller.

1.2 Project Overview:
An embedded system is a combination of software and hardware to perform a dedicated task. Some of the main devices used in embedded products are Microprocessors and Microcontroller Microprocessors are commonly referred to as general purpose processors as they simply accept the inputs, process it and give the output. In contrast, a microcontroller not only accepts the data as inputs but also manipulates it, interfaces the data with various devices, controls the data and thus finally gives the result.


The “Speaking Micro Controller for Deaf and Dumb” using PIC16F72 microcontroller is an exclusive project which is used to help the deaf and dumb people to announce their requirements using voice module APR9600. The main aim of the project is to provide a user-friendly interaction for the deaf and dumb people with other persons.

1.3 Thesis:
The thesis explains the implementation of “Speaking Micro Controller for Deaf and Dumb” using PIC16F72 microcontroller. The organization of the thesis is explained here with: Chapter 1 Presents introduction to the overall thesis and the overview of the project. In the project overview, a brief introduction of APR9600 voice module and its applications are discussed. Chapter 2 Presents the topic embedded systems. It explains the about what is embedded

systems, need for embedded systems, explanation of it along with its applications. Chapter 3 Presents the hardware description. It deals with the block diagram of the project

and explains the purpose of each block. In the same chapter the explanation of microcontroller, APR9600 voice module, power supplies and LED‘s are considered. Chapter 4 Presents the software description. It explains the implementation of the project using PIC C Compiler software. Chapter 5 presents the project description along with APR9600 module interfacing to microcontroller. Chapter 6 presents the advantages, disadvantages and applications of the project. Chapter 7 presents the results, conclusion and future scope of the project.


2.1 Embedded Systems:
An embedded system is a computer system designed to perform one or a few dedicated functions often with real-time computing constraints. It is embedded as part of a complete device often including hardware and mechanical parts. By contrast, a general-purpose computer, such as a personal computer (PC), is designed to be flexible and to meet a wide range of end-user needs. Embedded systems control many devices in common use today. Embedded systems are controlled by one or more main processing cores that are typically either microcontrollers or digital signal processors (DSP). The key characteristic, however, is being dedicated to handle a particular task, which may require very powerful processors. For example, air traffic control systems may usefully be viewed as embedded, even though they involve mainframe computers and dedicated regional and national networks between airports and radar sites. (Each radar probably includes one or more embedded systems of its own.) Since the embedded system is dedicated to specific tasks, design engineers can optimize it to reduce the size and cost of the product and increase the reliability and performance. Some embedded systems are mass-produced, benefiting from economies of scale. Physically embedded systems range from portable devices such as digital watches and MP3 players, to large stationary installations like traffic lights, factory controllers, or the systems controlling nuclear power plants. Complexity varies from low, with a single microcontroller chip, to very high with multiple units, peripherals and networks mounted inside a large chassis or enclosure. In general, "embedded system" is not a strictly definable term, as most systems have some element of extensibility or programmability. For example, handheld computers share some

RAM (6). but they allow different applications to be loaded and peripherals to be connected. large application systems will have subcomponents at most points even if the system as a whole is "designed to perform one or a few dedicated functions". Moreover. Hiring a programmer for an extra month is cheap in comparison.1. programming for an embedded system is like programming PC 15 years ago. A modern example of embedded system is shown in fig: 2. Fig 2. while at the same time battling a need for efficiency not seen in most PC applications. .Embedded systems programming is not like normal PC programming.1:A modern example of embedded system Labeled parts include microprocessor (4). Below is a list of issues specific to the embedded field. Spending an extra dollar a unit in order to make things easier to program can cost millions. flash memory (7). On a continuum from "general purpose" to "embedded". This means the programmer must make do with slow processors and low memory. The hardware for the system is usually chosen to make the device as cheap as possible.4 elements with embedded systems such as the operating systems and microprocessors which power them. and is thus appropriate to call "embedded". In many ways. even systems which don't expose programmability as a primary feature generally need to support software updates.

permanent equipment damage can occur.1 History: In the earliest years of computers in the 1930–40s. you can't always run a debugger on it. the concept of programmable controllers evolved from traditional electromechanical sequencers. There's also a large number of embedded architectures. 2. and the Unix world where there's only 3 or 4 major ones. developed by Charles Stark Draper at the MIT Instrumentation Laboratory.5 2. On a major embedded project.1. Over time however. if you stop on a breakpoint when your system is controlling real world hardware (such as a motor). the Apollo guidance computer was considered the riskiest item in the Apollo project as it employed the then newly developed monolithic integrated circuits to reduce the size and weight. and less developed. An early mass-produced embedded system was the Autonetics D-17 guidance computer for the Minuteman missile. people doing embedded programming quickly become masters at using serial IO channels and error message style debugging. via solid state devices. the D-17 was replaced with a new computer that was the first high-volume use of integrated circuits. Special hardware such as JTAG ports can overcome this issue in part. When the Minuteman II went into production in 1966. As a result.1. but were far too large and expensive for most kinds of tasks performed by embedded computers of today. This makes fixing your program difficult. at some point you will almost always find a compiler bug of some sort. Debugging tools are another issue.2 Tools: Embedded development makes up a small fraction of total programming. This means that the tools are more expensive. . It also means that they're lower featured. However. released in 1961. Since you can't always run general programs on your embedded processor. It was built from transistor logic and had a hard disk for main memory. to the use of computer technology. At the project's inception. computers were sometimes dedicated to a single task. unlike the PC world where 1 instruction set rules. One of the first recognizably modern embedded systems was the Apollo Guidance Computer.

or avoided altogether. you will frequently sacrifice processor time for memory.6 2. embedded systems frequently have the cheapest processors that can do the job. For example. embedded systems usually have the least memory they can get away with. These resources either need to be emulated in software. Memory is also an issue. This is made even more difficult by the lack of resources available. this won't happen too often.1. normal profilers won't work well. When dealing with large data sets. issues like memory cache misses that never matter in PC programming can hurt you.3 Resources: To save costs. due to the same reason debuggers don't work well.2 Need For Embedded Systems: . or even damage hardware such as motors. Other resources programmers expect may not even exist. That means their algorithms must be memory efficient (unlike in PC programs. Of course. and optimize only when necessary. It also means you can't afford to leak memory. This means your programs need to be written as efficiently as possible.use reasonably efficient algorithms to start. Almost all embedded systems need to be able to prioritize some tasks over others. Failure to do so could cause inaccuracy in measurements. most embedded processors do not have hardware FPUs (Floating-Point Processing Unit).4 Real Time Issues: Embedded systems frequently control hardware. 2. Luckily. and to be able to put off/skip low priority tasks such as UI in favor of high priority tasks like hardware control. For the same cost savings reasons. and must be able to respond to them in real time. Embedded applications generally use deterministic memory techniques and avoid the default "new" and "malloc" functions. so that leaks can be found and eliminated more easily.1. 2. rather than the reverse).

it's wiser to just buy the generic chip and write your own custom software for it. a hardware device that connects to the microprocessor via a JTAG or Nexus interface. Producing a custom-made chip to handle a particular task or set of tasks costs far more time and money. depending on the facilities available. In recent years. So when implementing a new form of control.7 The uses of embedded systems are virtually limitless. From simplest to most sophisticate they can be roughly grouped into the following areas: • Interactive resident debugging. using the simple shell provided by the embedded operating system (e. because every day new products are introduced to the market that utilizes embedded computers in novel ways.g. Many embedded computers even come with extensive libraries. The main elements that make embedded systems unique are its reliability and ease in debugging. This allows the operation of the microprocessor to be controlled externally.1 Debugging: Embedded debugging may be performed at different levels. but is typically restricted to specific debugging capabilities in the processor. microcontrollers. hardware such as microprocessors. . so that "writing your own software" becomes a very trivial task indeed. 2. Forth and Basic) • External debugging using logging or serial port output to trace operation using either a monitor in flash or using a debug server like the Remedy Debugger which even works for heterogeneous multi core systems.2. • An in-circuit debugger (ICD). Embedded systems are often required to provide Real-Time response. and FPGA chips have become much cheaper. there is a major difference between a computer and an embedded system. From an implementation viewpoint. • An in-circuit emulator replaces the microprocessor with a simulated equivalent. providing full control over all aspects of the microprocessor.

the debugging strategy may vary. Because an embedded system is often composed of a wide variety of elements. and automobiles. switches or buttons are avoided.2. Examples include space systems. undersea cables. bore-hole systems. For instance. Therefore the software is usually developed and tested more carefully than that for personal computers. FPGA. or it is too inaccessible to repair. and start or stop its operation. The view of the code may be as assembly code or source-code. the programmer can typically load and run software through the tools. allowing all of it to be controlled and modified and allowing debugging on a normal PC. . navigational beacons.8 • A complete emulator provides a simulation of all aspects of the hardware. at signal/bus level. for instance. • Unless restricted to external debugging. Specific reliability issues may include: • The system cannot safely be shut down for repair. co-processor). 2. An increasing number of embedded systems today use more than one single processor core. and unreliable mechanical moving parts such as disk drives. In such a case. debugging a software(and microprocessor) centric embedded system is different from debugging an embedded system where most of the processing is performed by peripherals (DSP. which requires very low-level debugging. with a logic analyzer.2 Reliability: Embedded systems often reside in machines that are expected to run continuously for years without errors and in some cases recover by themselves if an error occurs. view the code running in the processor. A common problem with multi-core development is the proper synchronization of software execution. the embedded system design may wish to check the data traffic on the busses between the processor cores.

This may also allow a subsystem to be automatically shut down and restarted on fault detection. improving reliability. Often backups are selected by an operator.3. reactor control systems. funds transfer and market making. This encapsulation keeps faults from propagating from one subsystem to another.9 • The system must be kept running for safety reasons. factory controls. or privileged-level system software. A variety of techniques are used. engines on single-engine aircraft.1 Software Architecture: . sometimes in combination. Examples include aircraft navigation. and also soft errors in the hardware: • Watchdog timer that resets the computer unless the software periodically notifies the watchdog • • • Subsystems with redundant spares that can be switched over to software "limp modes" that provide partial function Designing with a Trusted Computing Base (TCB) architecture[6] ensures a highly secure & reliable system environment • An Embedded Hypervisor is able to provide secure encapsulation for any subsystem component. • The system will lose large amounts of money when shut down: Telephone switches. automated sales and service. to recover from errors—both software bugs such as memory leaks.3 Explanation of Embedded Systems: 2. "Limp modes" are less tolerable. • Immunity Aware Programming 2. train signals. so that a compromised software component cannot interfere with other subsystems. bridge and elevator controls. safety-critical chemical factory controls.

except that the loop is hidden in an API. usually called “pause”. etc.The advantages and disadvantages are very similar to the control loop. • Cooperative Multitasking: A non-preemptive multitasking system is very similar to the simple control loop scheme. The programmer defines a series of tasks. • Interrupt Controlled System: Some embedded systems are predominantly interrupt controlled. but this task is not very sensitive to unexpected delays. or by a serial port controller receiving a byte. a low-level piece of code switches between tasks or threads based on a timer (connected to an interrupt). these tasks are executed by the main loop. it calls an idle routine. Later. • Primitive Multitasking: In this type of system. or adding to the queue-interpreter. each of which manages a part of the hardware or software. after the interrupt handler has finished. When a task is idle. These kinds of systems are used if event handlers need low latency and the event handlers are short and simple. This method brings the system close to a multitasking kernel with discrete processes. This is the level at which the system is generally . Usually these kinds of systems run a simple task in a main loop also. “wait”. Sometimes the interrupt handler will add longer tasks to a queue structure.10 There are several different types of software architecture in common use. • Simple Control Loop: In this design. An interrupt could be generated for example by a timer in a predefined frequency. “yield”. except that adding new software is easier. the software simply has a loop. The loop calls subroutines. This means that tasks performed by the system are triggered by different kinds of events. and each task gets its own environment to “run” in. “nop” (stands for no operation). by simply writing a new task.

and/or battery life. and access to shared data must be controlled by some synchronization strategy. semaphores or a nonblocking synchronization scheme. allowing the application programmers to concentrate on device functionality rather than operating system services. it is common for organizations to buy a real-time operating system. Exokernels communicate efficiently by normal subroutine calls. Depending on how much functionality is required. smaller systems often cannot afford the overhead associated with a generic real time system. functionality. The hardware and all the software in the system are available to. and fail when they are slow. • Microkernel’s And Exokernels: A microkernel is a logical step up from a real-time OS. etc. In general. Based on performance.2 Stand Alone Embedded System: . The usual arrangement is that the operating system kernel allocates memory and switches the CPU to different threads of execution. and extensible by application programmers. performance. As any code can potentially damage the data of another task (except in larger systems using an MMU) programs must be carefully designed and tested. microkernel’s succeed when the task switching and inter task communication is fast. network interfaces. User mode processes implement major functions such as file systems. such as message queues. Because of these complexities. due to limitations regarding memory size. at least for large systems.11 considered to have an "operating system" kernel. requirement the embedded systems are divided into three categories: 2.3. it introduces more or less of the complexities of managing multiple tasks running conceptually in parallel.

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

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

all these are built on a single chip. VCD players. • Microprocessors are more powerful than microcontrollers.. remote control. • Among these Microcontroller is of low cost processor and one of the main advantage of microcontrollers is.4 APPLICATIONS OF EMBEDDED SYSTEMS: 2.4.14 2. But the microprocessor requires many external components like memory. DVD players. They are used in major applications with a number of tasking requirements. microcontroller. The numbers of external components that are connected to it are very less according to the application..5 Different types of processing units: The central processing unit (CPU) can be any one of the following microprocessor. serial communication. .1 Consumer applications: At home we use a number of embedded systems which include microwave oven. the components such as memory. camera etc…. input output ports etc.. digital signal processing.3. so the power consumption is also very high when compared to microcontrollers. serial communication interfaces. hard disk. • Digital signal processing is used mainly for the applications that particularly involved with processing of signals 2.. analog to digital converters etc.

4. printer etc… Fig2.3: Automatic coffee makes equipment 2.4: Fax machine Fig2. Industrial automation: .3.2 Office automation: We use systems like fax machine.15 Fig2.5: Printing machine 2.4. modem.

16 Today a lot of industries are using embedded systems for process control...voltage. humidity . pressure.6: Robot In critical industries where human presence is avoided there we can use robots which are programmed to do a specific operation. Fig2. In industries we design the embedded systems to perform a specific operation like monitoring temperature.4.5 Computer networking: Embedded systems are used as bridges routers etc. and basing on these monitored levels we do control other devices. 2. current etc. we can send information to a centralized monitoring station. ..

17 Fig2.4.6 Tele communications: Cell phones.7: Computer networking 2. . web cameras etc.

9: Web camera CHAPTER 3: HARDWARE DESCRIPTION 3.18 Fig2.1 Introduction: .8: Cell Phone Fig2.

Block diagram is shown in fig: 3.1.1: FIG 3.1: Block diagram of speaking microcontroller for deaf and dumb .1.19 In this chapter the block diagram of the project and design aspect of independent modules are considered.

20 The main blocks of this project are: 1. 4.2 Microcontrollers . 5. APR9600 voice module. 7.2 Micro controller: Fig: 3. 3. Reset button. 2. 3. Crystal oscillator. Potentiometer (POT).1. Micro controller (16F72). 6. LED indicator. Regulated power supply (RPS).

The microcontroller used in this project is PIC16F72. There are basically four families of PIC microcontrollers: PIC12CXXX 12/14-bit program word . selling over 120 million devices each year. A microcontroller has a CPU in addition to a fixed amount of RAM.2. That was a prerequisite for production of microprocessors. I/O ports and a timer embedded all on a single chip. RAM and number of I/O ports in microcontrollers makes them ideal for many applications in which cost and space are critical. ROM. These integrated circuits contained both processor and peripherals. Further increasing of the volume of the package resulted in creation of integrated circuits. This development has made it possible to store hundreds of thousands of transistors into one chip. or what would later be known as a microcontroller came about. Currently they are some of the most popular microcontrollers. timers and other. and the first computers were made by adding external peripherals such as memory.21 3. The fixed amount of on-chip ROM. That is how the first chip containing a microcomputer. Microcontroller is a programmable device. Microprocessors and microcontrollers are widely used in embedded systems products. The PIC families of microcontrollers are developed by Microchip Technology Inc. input-output lines.1 Introduction to Microcontrollers: Circumstances that we find ourselves in today in the field of microcontrollers had their beginnings in the development of technology of integrated circuits.

These devices are known as low-end architectures. the microcontroller consisted of a simple processor executing 12-bit wide instructions with basic I/O functions. Low . Some of the low-end device numbers are 12C5XX 16C5X 16C505 . pin description of the microcontroller used are discussed in the following sections. The main reason is that Microchip Technology has continuously upgraded the device architecture and added needed peripherals to the microcontroller to suit customers' requirements.end PIC Architectures: Microchip PIC microcontrollers are available in various types. These devices have been very successful in 8-bit microcontrollers. They have limited program memory and are meant for applications requiring simple interface functions and small program & data memories. The development tools such as assembler and simulator are freely available on the internet at www.2.2 Description: Introduction to PIC Microcontrollers: PIC stands for Peripheral Interface Controller given by Microchip Technology to identify its single-chip microcontrollers. When PIC microcontroller MCU was first available from General Instruments in early 1980's.22 PIC 16C5X 12-bit program word PIC16CXXX and PIC16FXXX 14-bit program word PIC17CXXX and PIC18CXXX 16-bit program word The features.com. 3.microchip.

• • • • Low power crystal Mid range crystal High range crystal RC oscillator (low cost). Power-on-reset and brown-out reset.23 Mid range PIC Architectures: Mid range PIC architectures are built by upgrading low-end architectures with more number of peripherals. Some of the mid-range devices are 16C6X 16C7X 16F87X Program memory type is indicated by an alphabet. 2. RC = Mask ROM Popularity of the PIC microcontrollers is due to the following factors. RISC architecture. Speed: Harvard Architecture. 1 instruction cycle = 4 clock cycles. Instruction set simplicity: The instruction set consists of just 35 instructions (as opposed to 111 instructions for 8051). more number of registers and more data/program memory. PIC microcontroller has four optional clock sources. Brown-out-reset means when the power supply goes below a specified voltage (say 4V). F = Flash. A watch dog timer (user programmable) resets the processor if the software/program ever malfunctions and deviates from its normal operation. 4. it causes PIC to reset. 1. C = EPROM. 3. . hence malfunction is avoided.

24 5. all PIC microcontrollers offer the following features: • • • • • • RISC instruction set with around 35 instructions _9 Digital I/O ports On-chip timer with 8-bit prescaler. Power-on reset Watchdog timer Power saving SLEEP mode Direct. CPU Architecture: The CPU uses Harvard architecture with separate Program and Variable (data) memory interface. I/O port expansion capability. This facilitates instruction fetch and the operation on data/accessing of variables simultaneously.) 8.) current sourcing capability per pin. EPROM/OTP/ROM/Flash memory option. Architecture of PIC microcontroller Fig. Up to 12 independent interrupt sources. 6. and relative addressing modes . Powerful output pin control (25 mA (max. indirect.3. 9.Architecture of PIC microcontroller Basically. Programmable timers and on-chip ADC. 7.3.

PWM (CCP) module Capture is 16-bit. max resolution is 200 ns PWM max. max resolution is 12. Compare.5ns Compare is 16-bit. Capture. resolution is 10-bit 8-bit 5 channel analog-to-digital converter Synchronous serial port (SSP) with SPI (Master/Slave) and (Slave) Some devices offer the following additional features: • • • • Analogue input channels Analogue comparators Additional timer circuits EEPROM data memory .25 • • • External clock interface RAM data memory EPROM (or OTP) program memory Peripheral features: • • High sink/source current 25mA Timer0: 8-bit timer/counter with 8-bit prescaler can be incremented during sleep via external crystal/clock • • • • • • • Timer2:8-bit timer/counter with 8-bit period register prescaler and post scalar.

2. DIP is an abbreviation for Dual In Package. 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. 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. .3 Pin diagram: Pin description: PIC16F72 has a total of 28 pins.26 • • • • • Flash EEPROM program memory External and timer interrupts In-circuit programming Internal oscillator USART serial interface 3.

1. These are the pin functions. VSS – ground 9. MCLR – to reset the PIC 2. RA0 – port A pin 0 3. OSC1 – connect to oscillator 10. RA5 – port A pin 5 8. Others are already for specific functions. OSC2 – connect to oscillator . RA3 – port A pin 3 6. RA1 – port A pin 1 4. RA4 – port A pin 4 7.27 Pins on PIC16F72 microcontroller have the following meaning: There are 28 pins on PIC16F72. Most of them can be used as an IO pin. RA2 – port A pin 2 5.

VSS . For more detail function for each specific pin please refer to the device datasheet from Microchip. . VDD – power supply 21. RC3 – port C pin 3 15. RB6 .port C pin 5 17. RC7 .port B pin 3 25. RB7 . 6. RC0 – port C pin 0 VDD – power supply 12.port B pin 7 By utilizing all of this pin so many application can be done such as: 1.port C pin 7 19.port B pin 0 22. LED – connect to any pin declared as output. LDR.28 11.port B pin 4 26. Relay and Motor . 2. RC2 – port C pin 2 14. RB3 .port B pin 5 27. 4. External EEPROM – connect to I2C interface pin – RC3 and RC4 (SCL and SDA) 5. RC6 . 3.port B pin 6 28. RB4 . RB0 .port C pin 4 16. RB2 . RC5 . LCD – connect to Port B pin. RC4 .port B pin 1 23.port B pin 2 24. RB5 .ground 20. GSM modem dial up modem – connect to RC6 and RC7 – the serial communication interface using RS232 protocol.connect to any pin declared as output. RC1 – port C pin 1 13. Potentiometer and sensor – connect to analogue input pin such as RA0.port C pin 6 18. RB1 .

and resetting a bit in TRISB register defines the corresponding port pin as output. By selecting one of the functions the other one is disabled. If the appropriate bit of TRIS register contains logical "1". Thus. Selection of one of these two pin functions is done in one of the configuration registers. . according to the needs of a device that's being developed. The appropriate register for data direction is TRISB. some pins have twofold roles like PA4/TOCKI for instance. Pin direction can be changed during the course of work which is particularly fitting for one-line communication where data flow constantly changes direction. which is in the same time the fourth bit of port A and an external input for free-run counter. port A has TRISA. and port B has TRISB. Due to functionality. port is a register inside a microcontroller which is connected by wires to the pins of a microcontroller. or read from them an existing status. it's an output pin. Ports represent physical connection of Central Processing Unit with an outside world. All port pins can be designated as input or output. Microcontroller uses them in order to monitor or control other components or devices. PORTB and TRISB: PORTB have adjoined 8 pins. or on which we can set the desired combination of zeros and ones. Every port has its proper TRIS register. and if the opposite is true.29 Ports Term "port" refers to a group of pins on a microcontroller which can be accessed simultaneously. the right combination of zeros and ones must be written in TRIS register. In order to define a pin as input or output pin. An illustration of this is the fifth bit T0CS in OPTION register. then that pin is an input pin. while TRISA and TRISB pin direction registers are located in bank 1. Physically. PORTA and PORTB state registers are located in bank 0. Setting a bit in TRISB register defines the corresponding port pin as input.

Only pins configured as input can cause this interrupt to occur (if any RB7:RB4 pin is configured as an output.30 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. pull-ups are disabled. each push on a key will then cause an interrupt. If rows on the keyboard are connected to these pins. an interrupt won't be generated at the change of status. . When a microcontroller is started. These 'pull-up' resistors are automatically being turned off when port pin is configured as an output. RB7:RB4 can cause an interrupt which occurs when their status changes from logical one into logical zero and opposite. A microcontroller will determine which key is at hand while processing an interrupt It is not recommended to refer to port B at the same time that interrupt is being processed. Four pins PORTB.) This interrupt option along with internal pull-up resistors makes it easier to solve common problems we find in practice like for instance that of matrix keyboard.

and 7 output. 2. Example shows how pins 0. 1. Like with port B. Whether RA4 will be a standard input or an input for a counter depends on T0CS bit (TMR0 Clock Source Select bit). It is important to note that PORTA pin RA4 can be input only. RA4. and clearing a bit in TRISA register defines the corresponding port pin as output. it is possible to read the pins RA2. and 4 are designated input. 6. 3. After this. setting a bit in TRISA register defines also the corresponding port pin as input. This pin enables the timer TMR0 to increment either from internal oscillator or via external impulses on RA4/T0CKI pin. The corresponding register for data direction is TRISA at address 85h. . On that pin is also situated an external input for timer TMR0. and to set logical zero or one to pins RA0 and RA1.31 PORTA and TRISA: PORTA have 5 adjoining pins. and pins 5. RA3.

while FLASH memory makes up the program block. one for data and the other for program. EEPROM memory with GPR and SFR registers in RAM memory make up the data block. Program memory: Program memory has been carried out in FLASH technology which makes it possible to program a microcontroller many times before it's installed into a device.32 Memory organization: PIC16F72 has two separate memory blocks. and even after its installment if eventual changes in program or process parameters should occur. The size of .

3. GPR registers can be accessed regardless of which bank is selected at the moment.33 program memory is 1024 locations with 14 bits width where locations zero and four are reserved for reset and interrupt vector. RAM memory for data occupies space on a memory map from location 0x0C to 0x4F which comes to 68 locations. EEPROM memory consists of 256 eight bit locations whose contents are not lost during loosing of power supply. EEPROM is not directly addressable. Data memory: Data memory consists of EEPROM and RAM memories. Locations of RAM memory are also called GPR registers which is an abbreviation for General Purpose Registers. but is accessed indirectly through EEADR and EEDATA registers. 3.3 REGULATED POWER SUPPLY 3. there is a strict procedure for writing in EEPROM which must be followed in order to avoid accidental writing. of a given temperature in temperature regulators) .1 Introduction: Power supply is a supply of electrical power. As EEPROM memory usually serves for storing important parameters (for example. A device or system that supplies electrical or other types of energy to an output load or group of loads is called a power .

Low voltage.34 supply unit or PSU. Chemical fuel cells and other forms of energy storage systems. low power DC power supply units are commonly integrated with the devices they supply. The term is most commonly applied to electrical energy supplies. and rarely to others.3. Solar power. less often to mechanical ones. • • • • Batteries. such as computers and household electronics. Generators or alternators. 3. typically involving converting AC line voltage to a well-regulated lower-voltage DC for electronic devices. A power supply may include a power distribution system as well as primary or secondary sources of energy such as • Conversion of one form of electrical power to another desired form and voltage.2 Block Diagram: .

. Regulated Power Supply The basic circuit diagram of a regulated power supply (DC O/P) with led connected as load is shown in fig: 3.35 Fig 3.

This effect is called mutual induction. LED (light emitting diode). Transformer. Voltage regulator(IC 7805). If a load is connected to the secondary. Bridge rectifier (diodes). For transforming energy we use transformers.3. an electric current will flow in the secondary winding and electrical energy will be transferred from the primary circuit through the . 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. A varying current in the first or primary winding creates a varying magnetic flux in the transformer's core.3 Circuit diagram of Regulated Power Supply with Led connection The components mainly used in above figure are • 230V AC mains. Transformers: A transformer is a device that transfers electrical energy from one circuit to another through inductively coupled conductors without changing its frequency. Capacitor.36 Fig 3. This varying magnetic field induces a varying electromotive force (EMF) or "voltage" in the secondary winding. Resistor. and thus a varying magnetic field through the secondary winding.

3.37 transformer to the load. The input coil is called the PRIMARY WINDING. the lines of force move outwards from the coil. the lines of force move inwards.3. if the secondary has half the primary turns. the output coil is the SECONDARY WINDING. With the 50 Hz AC mains supply.4 shows step-down transformer. For example. . This is called MUTUAL INDUCTION and forms the basis of the transformer.4: Step-Down Transformer The voltage induced in the secondary is determined by the TURNS RATIO. then the turn’s ratio is 10:1. as the field moves out or in. Fig 3. As it does this. If the current is increased. This field is made up from lines of force and has the same shape as a bar magnet. this will happen 50 times a second. If another coil is placed adjacent to the first coil then. Another example is if the primary has 5000 turns and the secondary has 500 turns. Fig: 3. a voltage is induced in the second coil. the moving lines of force will "cut" the turns of the second coil. If the current is reduced. the secondary will have half the primary voltage.

and releases less amount of voltage. then the primary must supply 24 watts.38 If the primary voltage is 240 volts then the secondary voltage will be x 10 smaller = 24 volts. Transformers are sometimes used for IMPEDANCE MATCHING. or in the other direction. which has a constantly changing current and moving field. and secondary winding is having less number of turns because of that it accepts less number of flux. We can use the transformers as step up or step down. Because of having more turns secondary winding accepts more energy. Some transformers have an electrostatic screen between primary and secondary. Primary winding induces more flux than the secondary winding. the coils are wound on a metal CORE. the power provided by the primary must equal the power taken by a load on the secondary. . This is to prevent some types of interference being fed from the equipment down into the mains supply. and it releases more voltage at the output side. Step down transformer: Incase of step down transformer. into this core. Step Up transformer: In case of step up transformer. called EDDY CURRENTS. If a 24-watt lamp is connected across a 24 volt secondary. To aid magnetic coupling between primary and secondary. Transformers to work at higher frequencies have an iron dust core or no core at all. Since the primary would induce power. This means that it is made up from metal sheets insulated from each other. Assuming a perfect transformer. primary windings are every less compared to secondary winding. the core is LAMINATED. DC has a steady current and therefore a steady field and there would be no induction. Note that the transformer only works on AC.

it consists of lead and lead/dioxide electrodes which are immersed in sulfuric acid. the lead is converted to lead sulfate and the sulfuric acid is converted to water.5 shows HiWatt 9V battery Fig 3. and a zinc plate alternately until the desired total voltage is achieved.5. a layer of electrolyte paste. This battery cell is completely sealed and rechargeable. The most common dry-cell batteries have one of the following voltages: 1.39 Battery power supply: A battery is a type of linear power supply that offers benefits that traditional line-operated power supplies lack: mobility.5.5: Hi-Watt 9V Battery The most commonly used dry-cell battery is the carbon-zinc dry cell battery. portability and reliability. and magnesium dioxide is reduced at the carbon electrode. The lead-acid storage battery may be used. 6. During the discharge of a carbon-zinc battery. Dry-cell batteries are made by stacking a carbon plate. the lead sulfate is converted back to lead and lead dioxide A nickel-cadmium battery has become more popular in recent years. and 90. During discharge. When fully charged. These actions establish a voltage of approximately 1. 22. .06-2.3. 3.3.5 V. The electrolyte is not involved in the electrode reaction.14 V potential (A 12 volt car battery uses 6 cells in series). 9. this type of battery has a 2. 45. When the battery is charging. Fig: 3. the zinc metal is converted to a zinc salt in the electrolyte. A battery consists of multiple electrochemical cells connected to provide the voltage desired. This battery is rechargeable.

Rectifiers may be made of solid-state diodes. and other components. For rectification purpose we use rectifiers. nickel oxide is oxidized to its higher oxidation state and cadmium oxide is reduced.6: Pencil Battery of 1.5V. They have a long service life. A device that it can perform the opposite function (converting DC to AC) is known as an inverter. When only one diode is used to rectify AC (by blocking the negative or positive portion of the waveform). They can be stored both charged and uncharged. Fig: 3. the difference between the term diode and the term rectifier is merely . Rectifiers: A rectifier is an electrical device that converts alternating current (AC) to direct current (DC). During the charging process. a process known as rectification. Rectifiers have many uses including as components of power supplies and as detectors of radio signals.3.40 making the voltage constant over the span of the batteries long service life.6 shows pencil battery of 1. and the ability to be recharged. constant voltage. Fig 3.3.5V Rectification: The process of converting an alternating current to a pulsating direct current is called as rectification. The nickel-cadmium batteries have many benefits. vacuum tube diodes. high current availabilities. mercury arc valves.

D1 and D3 remain OFF. The conducting diodes will be in series with the load resistance RL and hence the load current flows through RL. i.7. which converts an ac voltage to dc voltage using both half cycles of the input ac voltage. The circuit has four diodes connected to form a bridge. The conducting diodes D2 and D4 will be in series with the load resistance RL and hence the current flows through RL in the same direction as in the previous half cycle. The load resistance is connected between the other two ends of the bridge. Almost all rectifiers comprise a number of diodes in a specific arrangement for more efficiently converting AC to DC than is possible with only one diode. Thus a bi-directional wave is converted into a unidirectional wave. Bridge full wave rectifier: The Bridge rectifier circuit is shown in fig: 3.3.e. The ac input voltage is applied to the diagonally opposite ends of the bridge. vacuum tube diodes and copper (I) oxide or selenium rectifier stacks were used. diodes D2 and D4 conduct whereas. the term rectifier describes a diode that is being used to convert AC to DC. The Bridge rectifier circuit is shown in the figure. Before the development of silicon semiconductor rectifiers. diodes D1 and D3 conduct. For the negative half cycle of the input ac voltage. whereas diodes D2 and D4 remain in the OFF state. Input Output .41 one of usage. For the positive half cycle of the input ac voltage..

7: Bridge rectifier: a full-wave rectifier using 4 diodes DB107: Now -a -days Bridge rectifier is available in IC with a number of DB107. Reliable low cost construction utilizing molded. In our project we are using an IC in place of bridge rectifier.42 Fig 3.0 gram. Surge overload rating .3. Ideal for printed circuit board. Features: • • • • • • • • Good for automation insertion. . Polarity symbols molded on body. The picture of DB 107 is shown in fig: 3. Mounting position: Any.8. Glass passivated device.3. Weight: 1.30 amperes peak.

Introduction to Capacitors: The Capacitor or sometimes referred to as a Condenser is a passive device. In its basic form a capacitor consists of two parallel conductive plates that are not connected but are electrically separated either by air or by an insulating material called the Dielectric. a current flows charging up the plates with electrons giving one plate a positive charge and the other plate an equal and opposite negative charge. to enhance wanted ones.3. and one which stores energy in the form of an electrostatic field which produces a potential (static voltage) across its plates.8: DB107 Filtration: The process of converting a pulsating direct current to a pure direct current using filters is called as filtration. specifically to remove unwanted frequency components from the signal. Filters: Electronic filters are electronic circuits. When a voltage is applied to these plates.43 Fig 3. which perform signal-processing functions. This flow of electrons to the plates is known as the Charging Current and .

44 continues to flow until the voltage across the plates (and hence the capacitor) is equal to the applied voltage Vcc.10 respectively. At this point the capacitor is said to be fully charged and this is illustrated below.3. The construction of capacitor and an electrolytic capacitor are shown in figures 3. .3.9 and 3. = 0.3.000000001 = 10-9 F Fig 3.000.000 = 0. First. If we imagine a capacitor as being a storage tank with an inlet and an outlet pipe. .9:Construction Of a Capacitor Capaticor Units of Capacitance: Microfarad (μF) 1μF = 1/1. our "storage tank" capacitor will allow the current waves to pass through.000 = 0.000. If the current flow is alternating between zero and a maximum.000001 = 10-6 F Nanofarad (nF) 1nF = 1/1.000.000000000001 = 10-12 F Operation of Capacitor: Think of water flowing through a pipe. it is possible to show approximately how an electronic capacitor works. However. let's consider the case of a "coupling capacitor" where the capacitor is used to connect a signal from one part of a circuit to another but without allowing any direct current to flow.10:Electrolytic Pico farad (pF) 1pF = 1/1.45 Fig 3. if there is a steady current. only the initial short burst will flow until the "floating ball valve" closes and stops further flow.

A capacitor will pass alternating current but (apart from an initial surge) it will not pass d. 9V. the LM79XX series is . Voltage Regulators are available in a variety of outputs like 5V. 6V. a steady current quickly fills the tank so that all flow stops. The LM78XX series of voltage regulators are designed for positive input. For applications requiring negative input. However. waves or pulses of current are passed to ground while d. It converts a varying input voltage into a constant ‘regulated’ output voltage.c. Where a capacitor is used to decouple a circuit. Regulation: The process of converting a varying voltage to a constant regulated voltage is called as regulation. 12V and 15V. Any ripples.c.46 So a coupling capacitor allows "alternating current" to pass through because the ball valve doesn't get a chance to close as the waves go up and down. Flows smoothly. the effect is to "smooth out ripples". 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. For the process of regulation we use voltage regulators.

Other characteristics include temperature coefficient. Voltage regulators are very robust. Practical resistors can be made of various compounds and films. Fig 3.11: Voltage Regulator Resistors: A resistor is a two-terminal electronic component that produces a voltage across its terminals that is proportional to the electric current passing through it in accordance with Ohm's law: V = IR Resistors are elements of electrical networks and electronic circuits and are ubiquitous in most electronic equipment.11 shows voltage regulator.47 used. Reverse polarity destroys the regulator almost instantly. and .3. It is not possible to obtain a voltage lower than the stated rating. noise. such as nickel/chrome). maximum working voltage and the power rating. the regulator will cut off before any damage occurs. The primary characteristics of a resistor are the resistance. In both cases.3. Fig: 3. as well as resistance wire (wire made of a high-resistivity alloy. You cannot use a 12V regulator to make a 5V power supply. The only way to destroy a regulator is to apply reverse voltage to its input. Using a pair of ‘voltage-divider’ resistors can increase the output voltage of a regulator circuit. These can withstand over-current draw due to short circuits and also over-heating. the tolerance.

Critical resistance is determined by the design. materials and dimensions of the resistor. the value below which power dissipation limits the maximum permitted current flow.48 inductance. Less well-known is critical resistance. Power dissipation: The power dissipated by a resistor (or the equivalent resistance of a resistor network) is calculated using the following: . Theory of operation: Ohm's law: The behavior of an ideal resistor is dictated by the relationship specified in Ohm's law: V = IR Ohm's law states that the voltage (V) across a resistor is proportional to the current (I) through it where the constant of proportionality is the resistance (R). and above which the limit is applied voltage. to workas Voltage dividers. to dissipate power and it can shape electrical waves when used in combination of other components. Basic unit is ohms. Resistors can be made to control the flow of current.

LED: A light-emitting diode (LED) is a semiconductor light source.13: Color Bands In Resistor 3.3.12: Resistor Fig 3.4. Introduced as a practical .3. and are increasingly used for lighting.49 Fig 3. LEDs are used as indicator lamps in many devices.


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. The internal structure and parts of a led are shown in figures 3.4.1 and 3.4.2 respectively.

Fig 3.4.1: Inside a LED

Fig 3.4.2: Parts of a LED

he 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-emiTtting 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. The electrical symbol and polarities of led are shown in fig: 3.4.3.

Fig 3.4.3: Electrical Symbol & Polarities of LED LED lights have a variety of advantages over other light sources: • • • • • • High-levels of brightness and intensity High-efficiency Low-voltage and current requirements Low radiated heat High reliability (resistant to shock and vibration) No UV Rays


• •

Long source life Can be easily controlled and programmed

Applications of LED fall into three major categories:

Visual signal application where the light goes more or less directly from the LED to the human eye, to convey a message or meaning.

Illumination where LED light is reflected from object to give visual response of these objects.

Generate light for measuring and interacting with processes that do not involve the human visual system.

3.5: APR9600 voice Module:

3.5.1. Description: APR9600 multi-section sound recorder/replay IC and experimental board:

APR9600 is a low-cost high performance sound record/replay IC incorporating flash analogue storage technique. Recorded sound is retained even after power supply is removed from the module. The replayed sound exhibits high quality with a low noise level. Sampling rate for a 60 second recording period is 4.2 kHz that gives a sound record/replay bandwidth of 20Hz to 2.1 kHz.

5. sound can be recorded in 2. In idle mode. This shortens the total length of sound recording to 32 seconds. In serial access mode. It is also possible to control the IC using external digital circuitry such as micro-controllers and computers. APR9600 Experimental board: .2. The IC can operate in one of two modes: serial mode and parallel mode. 4 or 8 sections. by changing an oscillation resistor.5V. Supply voltage is between 4. support components and necessary switches to allow users to explore all functions of the APR9600 chip. The APR9600 has a 28 pin DIP package. a sampling rate as high as 8.0 kHz can be achieved. current consumption is 25 mA. The IC can be controlled simply using push button keys. During recording and replaying. the current drops to 1  The APR9600 experimental board is an assembled PCB board consisting of an APR9600 A.53 However. sound can be recorded in 256 sections.2 kHz. In parallel access mode. The oscillation resistor is chosen so that the total recording period is 60 seconds with a sampling rate of 4. Total sound recording time can be varied from 32 seconds to 60 seconds by changing the value of a single resistor. 3.5V to 6. an electret microphone. IC. The board measures 80mm by 55mm.


1. APR9600: Pin-out of the APR9600 is given in Figure 1. A typical connection of the chip is given in Figure 2 (This is the circuit diagram of the module). Pin functions of the IC are given in Table 1. During sound recording, sound is picked up by the microphone. A microphone pre-amplifier amplifies the voltage signal from the microphone. An AGC circuit is included in the preamplifier, the extent of which is controlled by an external capacitor and resistor. If the voltage level of a sound signal is around 100 mV peak to- peak, the signal can be fed directly into the IC through ANA IN pin (pin 20). The sound signal passes through a filter and a sampling and hold circuit. The analogue voltage is then written into non-volatile flash analogue RAMs. It has a 28 pin DIP package. Supply voltage is between 4.5V to 6.5V. During recording and replaying, current consumption is 25 mA. In idle mode, the current drops to 1 A.

3.5.3. APR9600 circuit diagram:


2. APR9600 module:

The circuit diagram of the module is shown in Figure 2. The module consists of an APR9600 chip, an electrets microphone, support components, a mode selection switch (-RE,MSEL1, MSEL2 and – M8) and 9 keys (-M1 to –M8 and CE). The oscillation resistor is chosen so that the total recording period is 60 seconds with a sampling rate of 4.2 kHz. Users can change the value of the ROSC to obtain other sampling frequencies. It should be noted that if the sampling


rate is increased, the length of recording time is decreased. Table 3 gives the details. An 8-16 Ohm speaker is to be used with the module. Users can select different modes using the mode selection switch. The module is measured 80mm  55mm. Connection points (0-8, C and B) can connect to other switches or external digital circuits. In this cased, on-board keys M1 to M8 and CE are by-passed. 3. Using the APR9600 module

3.5.4. Parallel mode recording and replaying: Record sound tracks:
This is an example of recording 8 sound tracks. The mode switch should have the following pattern: MSEL1=1(switched to left-hand side of the mode selection switch), MSEL2=1 (lefthand side). –M8=1 (left-hand side). RE=0 (right-hand side). The maximum length of the 8 tracks is 7.5 seconds. Press –M1 continuously 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 7.5 seconds. Similarly, press –M2 to -M8 to record other sound tracks. INTEC DATA SHEETS APR9600 sound recording module Intec Associates Ltd.

Replay sound tracks:
Now make RE=1 (switched to Left-hand side of the mode selection switch) while keep other switches at the same location. Toggle –M1 to –M8 (press key and release) 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.

Serial mode recording and replaying Record sound tracks sequentially: This is an example of recording sequential sound tracks.5. Press CE first to reset the sound track counter to zero. Press –M1 again and again to record 2nd. MSEL2=0 (right-hand side). Press CE first to reset the sound track counter to zero.57 3. Record sound tracks with forward control: This is an example of recording sound tracks with forward control. 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. MSEL2=0 (right-hand side). –M8=1 (left-hand side). 4th and other consecutive sound tracks. The only difference is that after –M1 is pressed and released. 3rd. The mode switch should have the following pattern: MSEL1=0(switched to right-hand side of the mode selection switch). 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). –M2 . The mode switch should have the following pattern: MSEL1=0(switched to right-hand side of the mode selection switch). To move to the next sound track. 3rd. RE=0 (right-hand side). 4th and other consecutive sound tracks. Press and hold –M1 down and you will see BUZY LED illuminates. but the accumulated length of all sound tracks will not exceed 60 seconds. Toggle –M1 again and again will play the 2nd. Toggle –M1 (press key and release) causes the 1st sound track to be played once. Press CE to reset the sound track counter to zero. This mode is rather similar to the above sequential sound recording.5. You can now speak to the microphone. the sound track counter does not increment itself to the next sound track location. RE=0 (right-hand side). –M8=0 (right-hand side). Each sound track may have different lengths.

If Audio Line In is used.58 should be toggled. the amplitude of input signal should be < 100 mV p-p. sound will be recorded at the same sound track location. Do not use a bare speaker which gives you degraded sound. Toggle –M1 again and again will still play the 1st sound track. the sound track counter is incremented and the next sound can be played. Use a good quality 8 Ohm speaker with a cavity such as speakers for computer sound systems. use microphone input or Audio Line In input. Sampling rates The sampling rate is determined by the value of the OSC resistor (R8 in the circuit diagram). So if –M1 is not toggled again and again without toggling –M2. 3. 4. 2. For better sound replay quality. Replay sound tracks with forward control: Now make RE=1 (switched to Left-hand side of the mode selection switch) while keep other switches at the same location. 5. Toggle –M1 (press key and release) causes the 1st sound track to be played once. INTEC DATA SHEETS APR9600 sound recording module Intec Associates Ltd. It can be adjusted by users to suit their specific requirements. speak with a distance to the on-board microphone and speak clearly. For even better sound replay quality. . Also keep the background noise as low as possible. Application tips Tips for better sound replay quality: 1. Press CE to reset the sound track counter to zero. Once –M2 is toggled.

Terminology description: The term "loudspeaker" may refer to individual transducers (known as "drivers") or to complete speaker systems consisting of an enclosure including one or more drivers. The speaker moves in accordance with the variations of an electrical signal and causes sound waves to propagate through a medium such as air or water.5.6. typically found in small radios.speaker The speaker is an inexpensive. A loudspeaker (or "speaker") is an electro acoustic transducer that converts an electrical signal into sound.5. To adequately . loudspeakers (and other electro acoustic transducers) are the most variable elements in a modern audio system and are usually responsible for most distortion and audible differences when comparing sound systems.7. Speaker: Fig 3.59 3.6. low fidelity 3½-inch speaker. 3.5. After the acoustics of the listening space.

woofers (low frequencies). When multiple drivers are used in a system.5. a mid-range. Individual drivers are used to reproduce different frequency ranges. particularly for higher sound pressure level or maximum accuracy. and a tweeter. most loudspeaker systems employ more than one driver. separates the incoming signal into different frequency ranges and routes them to the appropriate driver. so the task of reproducing the mid-range sounds falls upon the woofer and tweeter.8. and sometimes super tweeters. 3. mid-range speakers (middle frequencies).60 reproduce a wide range of frequencies. optimized for the highest audible frequencies. tweeters (high frequencies). depending on the application. . In two-way systems there is no mid-range driver. The terms for different speaker drivers differ. A loudspeaker system with n separate frequency bands is described as "n-way speakers": a two-way system will have a woofer and a tweeter. Home stereos use the designation "tweeter" for the high frequency driver. a "filter network". Speaker driver design: Cut away view of a dynamic loudspeaker. a three-way system employs a woofer. while professional concert systems may designate them as "HF" or "highs". called a crossover. The drivers are named subwoofers (for very low frequencies).

and as control inputs for electronic circuits. for example. Fig: Diagram of potentiometer . Potentiometers are commonly used to control electrical devices such as volume controls on audio equipment. Instead they are used to adjust the level of analog signals (e.g. it acts as a variable resistor or rheostat. Potentiometers are rarely used to directly control significant power (more than a watt). Potentiometers operated by a mechanism can be used as position transducers. volume controls on audio equipment). in a joystick.[1] If only two terminals are used (one side and the wiper). a light dimmer uses a potentiometer to control the switching of a TRIAC and so indirectly control the brightness of lamps.61 Potentiometer: A potentiometer (colloquially known as a "pot") is a three-terminal resistor with a sliding contact that forms an adjustable voltage divider. For example.

62 Theory of operation: The potentiometer can be used as a voltage divider to obtain a manually adjustable output voltage at the slider (wiper) from a fixed input voltage applied across the two ends of the pot. The voltage across RL can be calculated by: If RL is large compared to the other resistances (like the input to an operational amplifier). This is the most common use of pots. the output voltage can be approximated by the simpler equation: As an example. assume .

. Potentiometer construction: . . and Since the load resistance is large compared to the other resistances. always a small amount of contact resistance. depending on the load. however. dividers are able to vary the output voltage from maximum (VS) to ground (zero volts) as the wiper moves from one end of the pot to the other.623 V. the load resistance is often not known and therefore simply placing a variable resistor in series with the load could have a negligible effect or an excessive effect. the output voltage VL will be approximately: Due to the load resistance. There is. however.63 . it will actually be slightly lower: ≈ 6. In addition. One of the advantages of the potential divider compared to a variable resistor in series with the source is that. while variable resistors have a maximum resistance where some current will always flow.

although other materials may be used. It is a multi-turn potentiometer operated by an attached reel of wire turning against a spring. A potentiometer is constructed with a resistive element formed into an arc of a circle. Besides graphite.64 Fig: Diagram of internal construction of potentiometer Construction of a wire-wound circular potentiometer: The resistive element (1) of the shown device is trapezoidal. The resistive element. The resistive element is a rectangular strip. The wiper is connected through another sliding contact to another terminal. a sliding control is provided instead of a dial control. Due to the large opening slot or the wiper. For single-turn pots. The wiper (3) rotates with the axis (4). carbon particles in plastic. providing the changeable resistance between the wiper contact (6) and the fixed contacts (5) and (9). this wiper typically travels just under one revolution around the contact. "Multi turn" potentiometers also exist. not semi-circular as in a rotary potentiometer. giving a non-linear relationship between resistance and turn angle. and a sliding contact (wiper) traveling over that arc. and is commonly made of graphite. the wiper is usually the center terminal of three. One form of rotary potentiometer is called a String potentiometer. In a linear slider pot. this type of pot has a greater potential for getting contaminated. It is used as a position transducer. materials used to make the resistive element include resistance wire. and a ceramic/metal mixture called cermets. though multi turn pots are usually constructed of a conventional resistive element wiped via a worm gear. where the resistor element may be helical and the wiper may move 10. The vertical position of the axis is fixed in the body (2) with the ring (7) (below) and the bolt (8) (above). . with a terminal at one or both ends. is flat or angled. On panel pots. 20. or more complete revolutions.

solvents. The curing process removes all solvents and allows the conductive polymer to polymerize and cross link. Linear taper potentiometer: A linear taper potentiometer has a resistive element of constant cross-section.) may be used to identify which taper is intended.65 Potentiometers can be obtained with either linear or logarithmic relations between the slider position and the resistance (potentiometer laws or "tapers"). The tracks are made by screen printing the paste onto a paper based phenolic substrate and then curing it in an oven. A letter code ("A" taper. Manufacturers of conductive track potentiometers use conductive polymer resistor pastes that contain hard wearing resins and polymers. intended for infrequent adjustment. lubricant and carbon – the constituent that provides the conductive/resistive properties. This produces a durable track with stable electrical resistance throughout its working life. Types of potentiometers: PCB mount trimmer potentiometers. "B" taper. but the letter code definitions are variable over time and between manufacturers. etc. 1. resulting in a device where the resistance between the contact (wiper) and one end terminal is proportional to . or "trim pots".

This results in a device where output voltage is a logarithmic function of the mechanical angle of the pot. Logarithmic potentiometer: A logarithmic taper potentiometer has a resistive element that either 'tapers' in from one end to the other. not the geometry of the resistive element. Logarithmic taper potentiometers are often used in connection with audio amplifiers. 2. . controls used for adjusting the centering of (an analog) cathode-ray oscilloscope. A high power wire wound potentiometer. but use two regions of different resistance (but constant resistivity) to approximate a logarithmic law. Any potentiometer may be connected as a rheostat. for example. Most (cheaper) "log" pots are actually not logarithmic. A log pot can also be simulated with a linear pot and an external resistor. True log pots are significantly more expensive. or is made from a material whose resistivity varies from one end to the other. Linear taper potentiometers are used when an approximately proportional relation is desired between shaft rotation and the division ratio of the potentiometer. Linear taper describes the electrical characteristic of the device.66 the distance between them.

5% to 5% depending on the material.1mm and 1. Often these are designed to handle much higher voltage and current. design and manufacturing process. 5. Digital potentiometer: A digital potentiometer is an electronic component that mimics the functions of analog potentiometers. Rheostat: The most common way to vary the resistance in a circuit is to use a variable resistor or a rheostat. A rheostat is a two-terminal variable resistor. The service life of these types of potentiometers is typically 1 million to 20 million cycles depending on the materials used during manufacturing and the actuation method. and Kapton. The "fingers" can be moved along the coil of resistance wire by a sliding knob thus changing the "tapping" point. Any three-terminal potentiometer can be used as a two-terminal variable resistor by not connecting to the third terminal. . Typically these are constructed as a resistive wire wrapped to form a toroid coil with the wiper moving over the upper surface of the toroid. contact and contactless (magnetic) methods are available. It is common practice to connect the wiper terminal to the unused end of the resistance track to reduce the amount of resistance variation caused by dirt on the track. Linearity can range from 0. 4.67 3. The repeat accuracy is typically between 0. Sometimes a rheostat is made from resistance wire wound on a heatresisting cylinder with the slider made from a number of metal fingers that grip lightly onto a small portion of the turns of resistance wire.0mm with a theoretically infinite resolution. sliding from one turn of the wire to the next. They are usually used as variable resistors rather than variable potential dividers. Many different material variations are available such as PET(foil). Membrane Potentiometer: A membrane potentiometer uses a conductive membrane that is deformed by a sliding element to contact a resistor voltage divider. just as in an analog potentiometer. the resistance between two terminals can be adjusted. Through digital input signals. FR4.

with each having a height of 0. Applications of Potentiometer: Potentiometers are widely used as user controls. on a volume control marked 0 to 10. 1. a setting of 5 sounds half as loud as a setting . rotary. The 'log pot' is used as the volume control in audio amplifiers. Membrane potentiometers can be used for position sensing. It ensures that. because the amplitude response of the human ear is also logarithmic. and application-specific variations. for example. Audio control: Linear potentiometers ("faders") One of the most common uses for modern low-power potentiometers is as audio control devices. frequency attenuation and other characteristics of audio signals.5mm. However they remain in many applications. The widespread use of potentiometers in consumer electronics has declined in the 1990s. Both linear pots (also known as "faders") and rotary potentiometers (commonly called knobs) are regularly used to adjust loudness. and may control a very wide variety of equipment functions. The linear versions can range from 9mm to 1000mm in length and the rotary versions range from 0° to 360°(multi-turn). with digital controls now more common. such as volume controls and as position sensors. where it is also called an "audio taper pot".68 Membrane potentiometer manuafacturers offer linear.

the shaft rotation might represent an angle. 3. A potentiometer was often used to adjust "vertical hold". . Potentiometers used in combination with filter networks act as tone controls or equalizers.69 of 10. for instance. and the voltage division ratio can be made proportional to the cosine of the angle. 4. high precision potentiometers are used to scale intermediate results by desired constant factors. Television Potentiometers were formerly used to control picture brightness. Transducers Potentiometers are also very widely used as a part of displacement transducers because of the simplicity of construction and because they can give a large output signal. A motor-driven potentiometer may be used as a function generator. and color response. 2. There is also an anti-log pot or reverse audio taper which is simply the reverse of a log pot. using a non-linear resistance card to supply approximations to trigonometric functions. which affected the synchronization between the receiver's internal sweep circuit (sometimes a multi vibrator) and the received picture signal. Computation In analog computers. or to set initial conditions for a calculation. It is almost always used in a ganged configuration with a log pot. in an audio balance control. contrast. For example.

. schematic diagram and interfacing of PIC16F72 microcontroller with each module is considered.70 CHAPTER 4: PROJECT DESCRIPTION 4.1 schematic diagram of PIC16F72 microcontroller: In this chapter.

2 Interfacing crystal oscillator and reset button with micro controller: . The above schematic diagram speaking microcontroller for deaf and dumb explains the interfacing section of each component with micro controller and APR9600 voice module.1: schematic diagram of speaking microcontroller for deaf and dumb. The detailed explanation of each module interfacing with microcontroller is as follows: 4. regulated power supply is connected to micro controller and also the LED’s connecting to micro controller through resistors.71 Fig 4. Crystal oscillator connected to 9th and 10th pins of micro controller.

2: Crystal and reset button interfacing with PIC microcontroller .2 explains crystal oscillator and reset button which are connected to micro controller.e.. The 1st pin of the microcontroller is referred as MCLR i. the purpose of external crystal oscillator is to speed up the execution part of instructions per cycle and here the crystal oscillator having 20 MHz frequency. master clear pin or reset input pin is connected to reset button or power-on-reset. Fig 4.72 Fig:4. The two pins of oscillator are connected to the 9th and 10th pins of micro controller.

3 Interfacing APR 9600 voice module with micro controller .73 4.

3: Diagram of APR9600 voice module interfacing with PIC microcontroller .74 Fig 4.

.4 LED interfacing with PIC16F72 LED stands for Light Emitting Diode and these are connected to micro controller through resistors.75 4.

4: LED interfacing with PIC microcontroller .76 Fig 4.

few cables.77 CHAPTER 5: SOFTWARE DESCRIPTION This project is implemented using following software’s: • • • Express PCB – for designing circuit PIC C compiler . but it does have several limitations.for compilation part Proteus 7 (Embedded C) – for simulation part 5. It can be likened to more of a toy then a professional CAD program. It has a poor part library (which we can work around) . ideally should have a neat PCB. It is very easy to use. however the final product of a project. and survive a shake test.1 Express PCB: Breadboards are great for prototyping equipment as it allows great flexibility to modify a design when needed. Not only is a proper PCB neater but it is also more durable as there are no cables which can yank loose. Express PCB is a software tool to design PCBs specifically for manufacture by the company Express PCB (no other PCB maker accepts Express PCB files).

and tangent. At this point start the program and get ready to setup the workspace to suit your style. The standard color scheme of red and green is generally used but it is not as pleasing as red and blue. However. Here is the procedure to design in Express PCB and clean up the patterns so they print nicely. However. move them to their final position and then crop the PCB to the correct size. and click “see through the top copper layer” at the bottom.1 Preparing Express PCB for First Use: Express PCB comes with a less then exciting list of parts. Typically after positioning of parts and traces. So before any project is started head over to Audio logic and grab the additional parts by morsel.1 show the toolbar in which the each button has the following functions: . setup the units for “mm” or “in” depending on how you think. Print out PCB patterns and use the toner transfer method with an Etch Resistant Pen to make boards. This yellow outline is the dimension of the PCB.1. Express PCB does not have a nice print layout. and extract them into your Express PCB directory.2 The Interface: When a project is first started you will be greeted with a yellow outline. crop the PCB to the correct size before starting. ppl. Click View -> Options.1. In this menu. 5. in designing a board with a certain size constraint. Fig: 4.78 It cannot import or export files in different formats It cannot be used to make prepare boards for DIY production Express PCB has been used to design many PCBs (some layered and with surfacemount parts. 5.

79 Fig 5. When this tool is selected the top toolbar will give you a large selection of round holes. • The Insert Corner in trace: button does exactly what it says. 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 remove a trace button is not very important since the delete key will achieve the same result. clicking on a trace will insert a corner which can be moved to route around components and other traces. • 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.1. It allows you to move traces to the top / bottom copper layer. and manipulate parts.1: Tool bar necessary for the interface • The select tool: It is fairly obvious what this does. . • • The zoom to selection tool: does just that.3 Design Considerations: Before starting a project there are several ways to design a PCB and one must be chosen to suit the project’s needs. When this tool is selected the top toolbar will show buttons to move 5. and rotate buttons. 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. square holes and surface mount pads.

If a lot of parts are being used in a small space it may be difficult to make a single sided board without jumpiring over traces with a cable. The TPA6120 datasheet specifies not to run a ground plane under the pins or signal traces of this chip as the capacitance generated could effect performance negatively. and vice. more difficult to etch on a DIY board. Ground-plane or other special purposes for one side: When using a double sided board you must consider which traces should be on what side of the board. put power traces on the top of the board. audio signals). relays. and similar parts which don’t have axial leads can NOT have traces on top unless boards are plated professionally. In power supplies this can reduce noise.versa.g. the machine source code is converted into hex code which is to be . but much harder to design for large projects. and in amps it minimizes the distance between parts and their ground connections. or a double sided board. care must be taken with stubborn chips such as the TPA6120 amplifier from TI. jumping only to the bottom if a part cannot be soldiered onto the top plane (like a relay). 5. but makes the layout of components a lot smaller and easier. However. After compilation. check with the components to make sure you can get to its pins with a soldering iron. It should be noted that if a trace is running on the top layer.80 Single sided. Single sided boards are cheaper to produce and easier to etch. Generally. and keeps the ground signal as simple as possible.2 PIC Compiler: PIC compiler is software used where the machine language code is written and compiled. Some projects like power supplies or amps can benefit from having a solid plane to use for ground. A double sided board is more expensive to produce professionally. it should be avoided if the signal travelling over the traces is sensitive (e. or double sided: When making a PCB you have the option of making a single sided board. Large capacitors. While there’s technically nothing wrong with this.

. PCM. PCB. These compilers are specifically designed to meet the unique needs of the PIC microcontroller. all three compilers are covered in this reference manual. If you know assembly. This allows developers to quickly design applications software in a more readable. PCM is for 14bitopcodes. PCM. It’s important that you know C language for microcontroller which is commonly known as Embedded C. and bit twiddling operations.h> // header file for PIC 16F72// . otherwise you will not be able to access registers related to #include <16F72. PIC C is not much different from a normal C program.) loop as they are going to run infinitely. In case of embedded C. Due to many similarities. When compared to a more traditional C compiler. input/output operations. Features and limitations that apply to only specific microcontrollers are indicated within. and also because of the way the compilers optimize the code. writing a C program is not a crisis. This is due to the fact that the PIC has no stack to push variables onto. we will have a main function. and PCH have some limitations. and PCH are separate compilers. fixed point decimal. and arrays of bits. function recursion is not allowed. This can be done with the help of simple while (1) or for (. high-level language. and PCH is for 16-bit opcode PIC microcontrollers. hence we also call it PIC C. PCB is for 12-bit opcodes. As an example of the limitations. So you have to make sure that your program or main file should never exit. The PCB. As we are going to use PIC Compiler. All normal C data types are supported along with pointers to constant arrays. PIC compiler also supports C language code. The compilers can efficiently implement normal C constructs. We have to add header file for controller you are using. In PIC. you do not have any operating system running in there. in which all your application specific work will be defined.81 dumped into the microcontroller for further processing.

#include <16f72.82 5. .h> #include <APR9600. delay_ms(1000). output_high(PIN_C2).3 Program Code: The program code which is dumped in the microcontroller of our project is shown below.h> #use delay (clock=20M) void main() { int final.

delay_ms(1000). delay_ms(1000).83 output_low(PIN_C2). //Play Intro voice message while(1) { final = Read_ADC(). delay_ms(1000). //read POT setting . output_high(PIN_C2). output_low(PIN_C2). play_voice(1).

} . } } else if (final == 1) { output_high(pin_C3).84 final = final/55. if(!input(pin_C0)) { play_voice(2). //devide ADC value into 4 equal parts (Max ADC value is 255 for 8bit ADC) if (final == 0) { output_high(pin_C2). if(!input(pin_C0)) { play_voice(3).

if(!input(pin_C0)) { play_voice(4).85 } else if (final == 2) { output_high(pin_C4). if(!input(pin_C0)) { play_voice(5). } } . } } else if (final == 3) { output_high(pin_C5).

output_low(pin_C4). output_low(pin_C3). output_low(pin_C2).86 else if (final == 4) { output_high(pin_C6). } } delay_ms(500). output_low(pin_C6). } } . if(!input(pin_C0)) { play_voice(6). output_low(pin_C5).

Dynamic user input. Can store upto eight alerts in voice circuit. 4. 5. . Low power consumption.87 CHAPTER 6: ADVANTAGES AND DISADVANTAGES Advantages: 1. Efficient and low cost design. Disadvantages: Recording of alert messages should be done in noise free environment. Storage of alerts in non volatile memory. 3. 2.

CHAPTER 7: RESULTS 7.1 Result: .88 Applications: This system can be practically implemented in real time to express the basic needs of deaf and dumb people.

2 Conclusion: Integrating features of all the hardware components used have been developed in it. This saves the time to understand each other and ease in communication. thus contributing to the best working of the unit. It is highly sensitive and reliable for the dumb people and it is also very easy to operate it. Thus the project has been successfully designed and tested. This device helps the deaf and dumb people to announce their requirements. 7. The micro controller is programmed in such a way that when the person presses a button the alert message specified for that button will be announced. which is interfaced to the micro controller. This project can be extended using high efficient voice circuit. which comes with option of recording more alert messages. This project uses a voice circuit in which the alert messages for basic needs will be stored. We can record the voices in the mobile phone and can fulfill their needs and requirements and make a user-friendly interaction with other people using a mobile phone. Presence of every module has been reasoned out and placed carefully. the project has been successfully implemented. REFERENCES: . 7. Secondly.89 The project “speaking microcontroller for deaf and dumb” is designed such that the It provides help for the deaf and dumb people to announce their requirements using voice module APR9600.3 Future Scope: Our project “Speaking Micro Controller for deaf and dumb” is mainly intended to help the deaf and dumb people in expressing their basic needs through voice message system. using highly advanced IC’s with the help of growing technology.

howstuffworks. Embedded C –Michael. www. 6. www.Pont.L.allaboutcircuits.microchip. APR9600 VoiceModule.wikipedia.com Books referred: 1. 4. .com 3.com 4.90 The sites which were used while doing this project: 1. www. Mazidi and Mazidi –Embedded Systems.com 2.Jones. www.J.Murata. Interfacing and System Design. Raj kamal –Microcontrollers Architecture. 2. PIC Microcontroller Manual – Microchip. Programming. 5. 3. PCB Design Tutorial –David.

91 .

Sign up to vote on this title
UsefulNot useful