48.Sound Detection System Document

102
INDEX 1. INTRODUCTION 2. MICROCONTROLLER 2.1 A Brief History of 8051 2.2 Description of 89C52 Microcontroller 2.3 Block Diagram of Microcontroller 2.4 Pin Configurations 2.5 Timers 2.6 Interrupts 2.7 Special function registers: 2.8 Memory Organization 3. POWER SUPPLY 3.1 Description 3.2 Block Diagram 3.3 Circuit Diagram 3.4 IC Voltage Regulators 4. ULN 2003 4.1 Pin Connection 4.2 Description 5. LCD

Transcript of 48.Sound Detection System Document

Page 1: 48.Sound Detection System Document

INDEX

1. INTRODUCTION

2. MICROCONTROLLER

2.1 A Brief History of 8051

2.2 Description of 89C52 Microcontroller

2.3 Block Diagram of Microcontroller

2.4 Pin Configurations

2.5 Timers

2.6 Interrupts

2.7 Special function registers:

2.8 Memory Organization

3. POWER SUPPLY

3.1 Description

3.2 Block Diagram

3.3 Circuit Diagram

3.4 IC Voltage Regulators

4. ULN 2003

4.1 Pin Connection

4.2 Description

5. LCD

5.2 Description

5.1 Pin Connection

8. KEIL SOFTWARE

8.1 Software Description

Page 2: 48.Sound Detection System Document

9. CIRCUIT DIAGRAM

10. SOURCE CODING

11. CONCLUSION

BIBLIOGRAPHY

REFERENCES

ABSTRACT

Page 3: 48.Sound Detection System Document

This Project “SOUND DETECTION SYSTEM” is used to detect the sound using

condenser mic and send this information to microcontroller from there information

is send to the buzzer to indicate sound detected.

An instrument that converts the energy of sound waves into electrical currents is a

microphone. When a person speaks into a microphone, sound waves strike a

flexible diaphragm and cause it to vibrate in the pattern of the sound waves. The

diaphragm is connected to an electric circuit in such a way that the movement of

the diaphragm causes a corresponding change in the circuit, causing an electric

current to flow. The strength of the current is proportional to the pressure applied

to the diaphragm. A telephone mouthpiece is a familiar example of a microphone.

Microphones are also used in hearing aids, public-address systems, and in radio

and television broadcasting. (See also Radio; Telephone.)

Using this condenser mic we can indicate sound detected and also control device.

SOUND DETECTING SYSTEM:

HARDWARE COMPONENTS:

MIC

AMPLIFIER

TIMER

MICRO CONTROLLER

BUZZER

Page 4: 48.Sound Detection System Document

1. 8052 MICROCONTROLLER.

2. Condenser mic.

3. Buzzer.

4. Transformer

5. Regulators

SIMULATION:

TOOL:KEIL MICROVISION

LANGUAGE: EMBEDDED ‘C’

Page 5: 48.Sound Detection System Document
Page 6: 48.Sound Detection System Document

2. MICROCONTROLLER

2.1 A Brief History of 8051

In 1981, Intel Corporation introduced an 8 bit microcontroller called

8051. This microcontroller had 128 bytes of RAM, 4K bytes of chip ROM, two

timers, one serial port, and four ports all on a single chip. At the time it was

also referred as “A SYSTEM ON A CHIP”

The 8051 is an 8-bit processor meaning that the CPU can work

only on 8 bits data at a time. Data larger than 8 bits has to be broken into 8

bits pieces to be processed by the CPU. The 8051 has a total of four I\O ports

each 8 bit wide.

There are many versions of 8051 with different speeds and amount of

on-chip ROM and they are all compatible with the original 8051. This means

that if you write a program for one it will run on any of them.

The 8051 is an original member of the 8051 family. There are two

other members in the 8051 family of microcontrollers. They are 8052 and

8031. All the three microcontrollers will have the same internal architecture,

but they differ in the following aspects.

8031 has 128 bytes of RAM, two timers and 6 interrupts.

89C51 has 4KB ROM, 128 bytes of RAM, two timers and

6 interrupts.

89C52 has 8KB ROM, 128 bytes of RAM, three timers

and 8 interrupts.

Of the three microcontrollers, 89C51 is the most preferable.

Microcontroller supports both serial and parallel communication.

Page 7: 48.Sound Detection System Document

In the concerned project 89C52 microcontroller is used. Here

microcontroller used is AT89C52, which is manufactured by ATMEL

laboratories.

2.2 Description of 89C52 Microcontroller

The AT89C52 provides the following standard features: 8Kbytes of

Flash, 256 bytes of RAM, 32 I/O lines, three 16-bit timer/counters, six-vector

two-level interrupt architecture, a full duplex serial port, on-chip oscillator,

and clock circuitry. In addition, the AT89C52 is designed with static logic for

operation down to zero frequency and supports two software selectable

power saving modes. The Idle Mode stops the CPU while allowing the RAM,

timer/counters, serial port, and interrupt system to continue functioning. The

Power down Mode saves the RAM contents but freezes the oscillator,

disabling all other chip functions until the next hardware reset.

By combining a versatile 8-bit CPU with Flash on a monolithic chip, the

AT89C52 is a powerful microcomputer which provides a highly flexible and

cost effective solution to many embedded control applications.

Features of Microcontroller (89S52)

Compatible with MCS-51 Products

8 Kbytes of In-System Reprogrammable Flash Memory

Endurance: 1,000 Write/Erase Cycles

Fully Static Operation: 0 Hz to 24 MHz

Three-Level Program Memory Lock

256 x 8-Bit Internal RAM

32 Programmable I/O Lines

Three 16-Bit Timer/Counters

Eight vector two level Interrupt Sources

Programmable Serial Channel

Page 8: 48.Sound Detection System Document

Low Power Idle and Power Down Modes

In addition, the AT89C52 is designed with static logic for operation down

to zero frequency and supports two software selectable power saving modes.

The Idle Mode stops the CPU while allowing the RAM, timer/counters,

serial port and interrupt system to continue functioning. The Power down

Mode saves the RAM contents but freezes the oscillator disabling all other

chip functions until the next hardware reset.

Page 9: 48.Sound Detection System Document

2.3 Block Diagram of Microcontroller

Figure 2.1 Block Diagram Of 89C52

Page 10: 48.Sound Detection System Document

2.4 Pin Configurations

Figure 2.2 Pin Diagram of 89C52

Page 11: 48.Sound Detection System Document

Pin Description

VCC

Pin 40 provides Supply voltage to the chip. The voltage source is +5v

GND.

Pin 20 is the grounded

Port 0

Port 0 is an 8-bit open drain bidirectional I/O port from pin 32 to 39. As

an output port each pin can sink eight TTL inputs. When 1s are written to

port 0 pins, the pins can be used as high-impedance inputs. Port 0 may also

be configured to be the multiplexed low-order address/data bus during

accesses to external program and data memory. In this mode P0 has internal

pull-ups.

Port 0 also receives the code bytes during Flash programming, and

outputs the code bytes during program verification. External pull-ups are

required during program verification.

Port 1

Port 1 is an 8-bit bidirectional I/O port with internal pull-ups from pin 1

to 8. The Port 1 output buffers can sink/source four TTL inputs. When 1s are

written to Port 1 pins they are pulled high by the internal pull-ups and can be

used as inputs. As inputs, Port 1 pins that are externally being pulled low will

source current (IIL) because of the internal pull-ups.

In addition, P1.0 and P1.1 can be configured to be the timer/counter 2

external count input (P1.0/T2) and the timer/counter 2 trigger input

(P1.1/T2EX), respectively, as shown in following table.

Port 1 also receives the low-order address bytes during Flash

programming and program verification.

Page 12: 48.Sound Detection System Document

Port 2

Port 2 is an 8-bit bidirectional I/O port with internal pull-ups from pin 21

to 28. The Port 2 output buffers can sink / source four TTL inputs. When 1s

are written to Port 2 pins they are pulled high by the internal pull-ups and

can be used as inputs. As inputs, Port 2 pins that are externally being pulled

low will source current (IIL) because of the internal pull-ups.

Port 2 emits the high-order address byte during fetches from external

program memory and during accesses to external data memory that uses

16-bit addresses (MOVX @ DPTR). In this application it uses strong internal

pull-ups when emitting 1s. During accesses to external data memory that

uses 8-bit addresses (MOVX @ RI), Port 2 emits the contents of the P2

Special Function Register. Port 2 also receives the high-order address bits

and some control signals during Flash programming and verification.

Port 3

Port 3 is an 8-bit bidirectional I/O port with internal pull-ups from pin 10

to 17. The Port 3 output buffers can sink / source four TTL inputs. When 1s

are written to Port 3 pins they are pulled high by the internal pull-ups and

can be used as inputs. As inputs, Port 3 pins that are externally being

pulled low will source current (IIL) because of the pull-ups.

Port 3 also serves the functions of various special features of the

AT89C52 as listed below:

Page 13: 48.Sound Detection System Document

Table 2.1 Special Features of port3

Port 3 also receives some control signals for Flash programming and

programming verification.

RST

Pin 9 is the Reset input. It is active high. Upon applying a high pulse to

this pin, the microcontroller will reset and terminate all activities. A high on

this pin for two machine cycles while the oscillator is running resets the

device.

ALE/PROG

Address Latch is an output pin and is active high. Address Latch Enable

output pulse for latching the low byte of the address during accesses to

external memory. This pin is also the program pulse input (PROG) during

Flash programming. In normal operation ALE is emitted at a constant rate

of 1/6 the oscillator frequency, and may be used for external timing or

clocking purposes.

Note, however, that one ALE pulse is skipped during each access to

external Data Memory. If desired, ALE operation can be disabled by

setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during

Page 14: 48.Sound Detection System Document

a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high.

Setting the ALE-disable bit has no effect if the microcontroller is in

external execution mode.

PSEN

Program Store Enable is the read strobe to external program memory.

When the AT89C52 is executing code from external program memory, PSEN

is activated twice each machine cycle, except that two PSEN activations are

skipped during each access to external data memory.

EA/VPP

External Access Enable EA must be strapped to GND in order to enable

the device to fetch code from external program memory locations starting at

0000H up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will

be internally latched on reset. EA should be strapped to VCC for internal

program executions. This pin also receives the 12-volt programming enable

voltage (VPP) during Flash programming when 12-volt programming is

selected.

XTAL1

Input to the inverting oscillator amplifier and input to the internal clock operating circuit.

XTAL2

Output from the inverting oscillator amplifier.

Oscillator Characteristics

XTAL1 and XTAL2 are the input and output, respectively, of an

inverting amplifier which can be configured for use as an on chip oscillator,

as shown in Figure 5.3. Either a quartz crystal or ceramic resonator may be

Page 15: 48.Sound Detection System Document

used. To drive the device from an external clock source, XTAL2 should be left

unconnected while XTAL1 is driven as shown in Figure 5.4.

Figure 2.3 crystal connections

Figure 2.4 External Clock Drive Configuration

There are no requirements on the duty cycle of the external clock

signal, since the input to the internal clocking circuitry is through a divide-by

two flip-flop, but minimum and maximum voltage high and low time

specifications must be observed.

Idle Mode

Page 16: 48.Sound Detection System Document

In idle mode, the CPU puts itself to sleep while all the on-chip

peripherals remain active. The mode is invoked by software. The content of

the on-chip RAM and all the special functions registers remain unchanged

during this mode. The idle mode can be terminated by any enabled interrupt

or by a hardware reset. It should be noted that when idle is terminated by a

hardware reset, the device normally resumes program execution, from

where it left off, up to two machine cycles before the internal reset algorithm

takes control.

On-chip hardware inhibits access to internal RAM in this event, but

access to the port pins is not inhibited. To eliminate the possibility of an

unexpected write to a port pin when Idle is terminated by reset, the

instruction following the one that invokes Idle should not be one that writes

to a port pin or to external memory.

Power down Mode

In the power down mode the oscillator is stopped, and the instruction

that invokes power down is the last instruction executed. The on-chip RAM

and Special Function Registers retain their values until the power down mode

is terminated. The only exit from power down is a hardware reset. Reset

redefines the SFRs but does not change the on-chip RAM. The reset should

not be activated before VCC is restored to its normal operating level and

must be held active long enough to allow the oscillator to restart and

stabilize.

Table 2.2 Status Of External Pins During Idle and Power Down

Mode

Page 17: 48.Sound Detection System Document

Program Memory Lock Bits

On the chip are three lock bits which can be left unprogrammed (U) or

can be programmed (P) to obtain the additional features listed in the table

5.4. When lock bit 1 is programmed, the logic level at the EA pin is sampled

and latched during reset. If the device is powered up without a reset, the

latch initializes to a random value, and holds that value until reset is

activated. It is necessary that the latched value of EA be in agreement with

the current logic level at that pin in order for the device to function properly.

Table 2.3 Lock Bit Protection Modes

TIMERS

Timer 0 and 1

Timer 0 and Timer 1 in the AT89C52 operate the same way as Timer 0

and Timer 1 in the AT89C51.

Register pairs (TH0, TL1), (TH1, TL1) are the 16-bit counter registers

for timer/counters 0 and 1.

Timer 2

Timer 2 is a 16-bit Timer/Counter that can operate as either a timer or

an event counter. The type of operation is selected by bit C/T2 in the SFR

Page 18: 48.Sound Detection System Document

T2CON. Timer 2 has three operating modes: capture, auto-reload (up or

down counting), and baud rate generator. The modes are selected by bits in

T2CON, as shown in Table 5.2. Timer 2 consists of two 8-bit registers, TH2

and TL2. In the Timer function, the TL2 register is incremented every

machine cycle. Since a machine cycle consists of 12 oscillator periods, the

count rate is 1/12 of the oscillator frequency.

Table 2.4 Timer 2 Operating Modes

In the Counter function, the register is incremented in response to a 1-

to-0 transition at its corresponding external input pin, T2. In this function, the

external input is sampled during S5P2 of every machine cycle. When the

samples show a high in one cycle and a low in the next cycle, the count is

incremented. The new count value appears in the register during S3P1 of the

cycle following the one in which the transition was detected. Since two

machine cycles (24 oscillator periods) are required to recognize a 1-to-0

transition, the maximum count rate is 1/24 of the oscillator frequency. To

ensure that a given level is sampled at least once before it changes, the

level should be held for at least one full machine cycle.

There are no restrictions on the duty cycle of external input signal, but

it should for at least one full machine to ensure that a given level is sampled

at least once before it changes.

Capture Mode

Page 19: 48.Sound Detection System Document

In the capture mode, two options are selected by bit EXEN2 in T2CON.

If EXEN2 = 0, Timer 2 is a 16-bit timer or counter which upon overflow sets

bit TF2 in T2CON.This bit can then be used to generate an interrupt. IfEXEN2

= 1, Timer 2 performs the same operation, but a 1-to-0 transition at external

input T2EX also causes the current value in TH2 and TL2 to be captured into

RCAP2H andRCAP2L, respectively. In addition, the transition at T2EXcauses

bit EXF2 in T2CON to be set. The EXF2 bit, likeTF2, can generate an interrupt.

Auto-reload (Up or Down Counter)

Timer 2 can be programmed to count up or down when configured in

its 16-bit auto-reload mode. This feature is invoked by the DCEN (Down

Counter Enable) bit located in the SFR T2MOD (see Table 4). Upon reset, the

DCEN bit is set to 0 so that timer 2 will default to count up. When DCEN is

set, Timer 2 can count up or down, depending on the value of the T2EX pin.

Table2.5: T2MOD-Timer 2 Mode Control Register

Table2.6: T2CON-Timer/Counter2 Control Register

Page 20: 48.Sound Detection System Document
Page 21: 48.Sound Detection System Document

2.5 Interrupts

The AT89C52 has a total of six interrupt vectors: two external

interrupts (INT0 and INT1), three timer interrupts (Timers 0, 1, and 2), and

the serial port interrupt. These interrupts are all shown in Figure 2.5

Figure 2.5 Interrupts source

Each of these interrupt sources can be individually enabled or disabled

by setting or clearing a bit in Special Function Register IE. IE also contains a

global disable bit, EA, which disables all interrupts at once.

Note that Table 5.3 shows that bit position IE.6 is unimplemented. In

the AT89C51, bit position IE.5 is also unimplemented. User software should

not write 1s to these bit positions, since they may be used in future AT89

products.

Page 22: 48.Sound Detection System Document

Table 2.7 Interrupts Enable Register

Timer 2 interrupt is generated by the logical OR of bits TF2 and EXF2 in

register T2CON. Neither of these flags is cleared by hardware when the

service routine is vectored to. In fact, the service routine may have to

determine whether it was TF2 or EXF2 that generated the interrupt, and that

bit will have to be cleared in software.

The Timer 0 and Timer 1 flags, TF0 and TF1, are set at S5P2 of the

cycle in which the timers overflow. The values are then polled by the

circuitry in the next cycle. However, the Timer 2 flag, TF2, is set at S2P2 and

is polled in the same cycle in which the timer overflows.

2.6 Special function registers:

Page 23: 48.Sound Detection System Document

Special function registers are the areas of memory that control specific

functionality of the 89c52 microcontroller.

a) Accumulator (0E0h)

As its name suggests, it is used to accumulate the results of large no.

of instructions. It can hold 8 bit values.

b) B register (oFoh)

The B register is very similar to accumulator. It may hold 8-bit value.

The B register is only used by MUL AB and DIV AB instructions. In MUL AB the

higher byte of the products gets stored in B register. In DIV AB the quotient

gets stored in B with the remainder in A.

c) Stack pointer (081h)

The stack pointer holds 8-bit value. This is used to indicate where the

next value to be removed from the stack should be taken from. When a

value is to be pushed on to the stack, the 8052 first store the value of SP and

then store the value at the resulting memory location. When a value is to be

popped from the stack, the 8052 returns the value from the memory location

indicated by SP and then decrements the value of SP.

d) Data pointer (Data pointer low/high, address 82/83h)

The SFRs DPL and DPH work together to represent a 16-bit value called

the data pointer. The data pointer is used in operations regarding external

RAM and some instructions code memory. It is a 16-bit SFR and also an

addressable SFR.

e) Program counter

Page 24: 48.Sound Detection System Document

The program counter is a 16 bit register, which contains the 2 byte

address, which tells the next instruction to execute to be found in memory.

When the 8052 is initialized PC starts at 0000h and is incremented each time

an instruction is executes. It is not addressable SFR.

f) PCON (power control, 87h)

The power control SFR is used to control the 8052’s power control

modes. Certain operation modes of the 8052 allow the 8052 to go into a type

of “sleep mode” which consumes low power.

g)TCON(Timer control, 88h)

The timer mode control SFR is used to configure and modify the way in

which the 8052’s two timers operate. This SFR controls whether each of the

two timers is running or stopped and contains a flag to indicate that each

timer has overflowed. Additionally, some non-timer related bits are located in

TCON SER. These bits are used to configure the way in which the external

interrupt flags are activated, which are set when an external interrupt occur.

h)TMOD(Timer Mode,89h)

The timer mode SFR is used to configure the mode of operation of each

of the two timers. Using this SR your program may configure each timer to

be a 16-bit timer, or 13 bit timer, 8-bit auto reload timer, or two separate

timers. Additionally you may configure the timers to only count when an

external pin is activated or to count “events” that are indicated on an

external pin.

SMOD ---- --- ---- GF1 GF0

PD IDL

TF1 TR1 TF0 TR0 IE1 IT1 IE0 IT0

Page 25: 48.Sound Detection System Document

TIMER1 TIMER0

i) T0 (Timer 0 low/ high, address 8A/ 8C h)

These two SFRs together represent timer 0. Their exact behavior

depends on how the timer is configured in the TMOD SFR; however, these

timers always count up. What is configurable is how and when they

increment value.

j) T1 (Timer 1 low/ high, address 8B/ 8D h)

These two SFRs together represent timer 1. Their exact behavior

depends on how the timer is configured in the TMOD SFR; however, these

timers always count up. What is configurable is how and when they

increment in value.

k) P0 (Port 0, address 80h, bit addressable)

This is port 0 latch. Each bit of this SFR corresponds to one of the pins

on a micro controller. Any data to be outputted to port 0 is first written on P0

register. For e.g., bit 0 of port 0 is pin P0.0, bit 7 is pin P0.7. Writing a value

of 1 to a bit of this SFR will send a high level on the corresponding I/O pin

whereas a value of 0 will bring it to low level.

l) P1(Port 1, address 90h, bit addressable)

This is port 1 latch. Each bit of this SFR corresponds to one of the pins

on a micro controller. Any data to be outputted to port 1 is first written on P1

register. For e.g., bit 0 of port 1 is pin P1.0, bit 7 is pin P1.7. Writing a value

of 1 to a bit of this SFR will send a high level on the corresponding I/O pin

whereas a value of 0 will bring it to low level.

Gate C/ T M1 M0 Gate

C/ T M1 M0

Page 26: 48.Sound Detection System Document

m) P2 (Port 2, address 0A0h, bit addressable)

This is port 2 latch. Each bit of this SFR corresponds to one of the pins

on a micro controller. Any data to be outputted to port 2 is first written on P2

register. For e.g., bit 0 of port 2 is pin P2.0, bit 7 is pin P2.7. Writing a value

of 1 to a bit of this SFR will send a high level on the corresponding I/O pin

whereas a value of 0 will bring it to low level.

n) P3 (Port 3, address 0B0h, bit addressable)

This is port 3 latch. Each bit of this SFR corresponds to one of the pins

on a micro controller. Any data to be outputted to port 3 is first written on P3

register. For e.g., bit 0 of port 3 is pin P3.0, bit 7 is pin P3.7. Writing a value

of 1 to a bit of this SFR will send a high level on the corresponding I/O pin

whereas a value of 0 will bring it to low level.

o) IE (Interrupt Enable, 0A8h)

The interrupt enable SFR is used to enable and disable specific

interrupts. The low 7 bits of the SFR are used to enable/disable the specific

interrupts, where the MSB bit is used to enable or disable all the interrupts.

Thus, if the high bit of IE 0 all interrupts are disabled regardless of whether

an individual interrupt is enabled by setting a lower bit.

EA _ _ _

ET2 ES ET1 EX1 ET0 EX0

p) IP (Interrupt Priority, 0B8h)

The interrupt priority SFR is used to specify the relative priority of each

interrupt. On 8052, an interrupt may be either low or high priority. An

interrupt may interrupt interrupts. For e.g., if we configure all interrupts as

low priority other than serial interrupt. The serial interrupt always interrupts

Page 27: 48.Sound Detection System Document

the system; even if another interrupt is currently executing no other

interrupt will be able to interrupt the serial interrupt routine since the serial

interrupt routine has the highest priority.

_ _ _ _ _ _ PT2 PS PT1 PX1 PT0 PX0

q)PSW (Program Status Word, 0D0h)

The Program Status Word is used to store a number of important bits

that are set and cleared by 8052 instructions. The PSW SFR contains the

carry flag, the auxiliary carry flag, the parity flag and the overflow flag.

Additionally, it also contains the register bank select flags, which are used to

select, which of the “R” register banks currently in use.

CY AC F0 RS1 RS0 OV - - - - P

Page 28: 48.Sound Detection System Document

r) SBUF (Serial Buffer, 99h)

SBUF is used to hold data in serial communication. It is physically two

registers. One is writing only and is used to hold data to be transmitted out

of 8052 via TXD. The other is read only and holds received data from

external sources via RXD. Both mutually exclusive registers use address 99h.

2.7 Memory Organization

The total memory of 89C52 system is logically divided in Program

memory and Data memory. Program memory stores the programs to be

executed, while data memory stores the data like intermediate results,

variables and constants required for the execution of the program. Program

memory is invariably implemented using EPROM, because it stores only

program code which is to be executed and thus it need not be written into.

However, the data memory may be read from or written to and thus it is

implemented using RAM.

Further, the program memory and data memory both may be

categorized as on-chip (internal) and external memory, depending upon

whether the memory physically exists on the chip or it is externally

interfaced. The 89C52 can address 8Kbytes on-chip memory whose map

starts from 0000H and ends at 1FFFH. It can address 64Kbytes of external

program memory under the control of PSEN (low) signal.

The AT89C52 implements 256 bytes of on-chip RAM. The upper 128

bytes occupy a parallel address space to the Special Function Registers. That

means the upper 128bytes have the same addresses as the SFR space but

are physically separate from SFR space. When an instruction accesses an

internal location above address 7FH, the address mode used in the

instruction specifies whether the CPU accesses the upper 128 bytes of RAM

or the SFR space. Instructions that use direct addressing access SFR space.

For example, the following direct addressing instruction accesses the SFR at

location 0A0H (which is P2).

Page 29: 48.Sound Detection System Document

MOV 0A0H, #data

Instructions that use indirect addressing access the upper128 bytes

of RAM. For example, the following indirect addressing instruction, where R0

contains 0A0H, accesses the data byte at address 0A0H, rather than P2

(whose address is 0A0H)

.MOV @R0, #data

Note that stack operations are examples of indirect addressing, so the upper

128 bytes of data RAM are available as stack space.

Page 30: 48.Sound Detection System Document
Page 31: 48.Sound Detection System Document

7. REGULATED POWER SUPPLY

7.1 Description:

A variable regulated power supply, also called a variable bench

power supply, is one where you can continuously adjust the output voltage

to your requirements. Varying the output of the power supply is the

recommended way to test a project after having double checked parts

placement against circuit drawings and the parts placement guide. This type

of regulation is ideal for having a simple variable bench power supply.

Actually this is quite important because one of the first projects a hobbyist

should undertake is the construction of a variable regulated power supply.

While a dedicated supply is quite handy e.g. 5V or 12V, it's much handier to

have a variable supply on hand, especially for testing. Most digital logic

circuits and processors need a 5 volt power supply. To use these parts we

need to build a regulated 5 volt source. Usually you start with an unregulated

power supply ranging from 9 volts to 24 volts DC (A 12 volt power supply is

included with the Beginner Kit and the Microcontroller Beginner Kit.). To

make a 5 volt power supply, we use a LM7805 voltage regulator IC .

Page 32: 48.Sound Detection System Document

The LM7805 is simple to use. You simply connect the positive lead of

your unregulated DC power supply (anything from 9VDC to 24VDC) to the

Input pin, connect the negative lead to the Common pin and then when you

turn on the power, you get a 5 volt supply from the Output pin.

Circuit Features:

Brief description of operation: Gives out well regulated +5V output,

output current capability of 100 mA

Circuit protection: Built-in overheating protection shuts down

output when regulator IC gets too hot

Circuit complexity: Very simple and easy to build

Circuit performance: Very stable +5V output voltage, reliable

operation

Availability of components: Easy to get, uses only very common

basic components

Design testing: Based on datasheet example circuit, I have used

this circuit successfully as part of many electronics projects

Applications: Part of electronics devices, small laboratory power

supply

Power supply voltage: Unregulated DC 8-18V power supply

Power supply current: Needed output current + 5 mA

Component costs: Few dollars for the electronics components +

the input transformer cost

Page 33: 48.Sound Detection System Document

7.2 Block Diagram:

7.3 Circuit Diagram:

Page 34: 48.Sound Detection System Document

Basic Power Supply Circuit:

Above is the circuit of a basic unregulated dc power supply. A

bridge rectifier D1 to D4 rectifies the ac from the transformer secondary,

which may also be a block rectifier such as WO4 or even four individual

diodes such as 1N4004 types. (See later re rectifier ratings).

The principal advantage of a bridge rectifier is you do not need a

centre tap on the secondary of the transformer. A further but significant

advantage is that the ripple frequency at the output is twice the line

frequency (i.e. 50 Hz or 60 Hz) and makes filtering somewhat easier.

As a design example consider we wanted a small unregulated bench

supply for our projects. Here we will go for a voltage of about 12 - 13V at a

maximum output current (IL) of 500ma (0.5A). Maximum ripple will be 2.5%

and load regulation is 5%.

Now the RMS secondary voltage (primary is whatever is consistent with

your area) for our power transformer T1 must be our desired output Vo PLUS

the voltage drops across D2 and D4 (2 * 0.7V) divided by 1.414.

This means that Vsec = [13V + 1.4V] / 1.414 which equals about 10.2V.

Depending on the VA rating of your transformer, the secondary voltage will

vary considerably in accordance with the applied load. The secondary

voltage on a transformer advertised as say 20VA will be much greater if the

secondary is only lightly loaded.

If we accept the 2.5% ripple as adequate for our purposes then at 13V

this becomes 13 * 0.025 = 0.325 Vrms. The peak to peak value is 2.828

times this value. Vrip = 0.325V X 2.828 = 0.92 V and this value is required to

calculate the value of C1. Also required for this calculation is the time

interval for charging pulses. If you are on a 60Hz system it it 1/ (2 * 60) =

0.008333 which is 8.33 milliseconds. For a 50Hz system it is 0.01 sec or 10

milliseconds.

Page 35: 48.Sound Detection System Document

Remember the tolerance of the type of capacitor used here is very

loose. The important thing to be aware of is the voltage rating should be at

least 13V X 1.414 or 18.33. Here you would use at least the standard 25V or

higher (absolutely not 16V).With our rectifier diodes or bridge they should

have a PIV rating of 2.828 times the Vsec or at least 29V. Don't search for

this rating because it doesn't exist. Use the next highest standard or even

higher. The current rating should be at least twice the load current

maximum i.e. 2 X 0.5A or 1A. A good type to use would be 1N4004, 1N4006

or 1N4008 types.

These are rated 1 Amp at 400PIV, 600PIV and 1000PIV respectively.

Always be on the lookout for the higher voltage ones when they are on

special.

7.4 IC Voltage Regulators:

Voltage regulators comprise a class of widely used ICs. Regulator IC

units contain the circuitry for reference source, comparator amplifier, control

device, and overload protection all in a single IC. Although the internal

construction of the IC is somewhat different from that described for discrete

voltage regulator circuits, the external operation is much the same. IC units

provide regulation of either a fixed positive voltage, a fixed negative voltage,

or an adjustably set voltage.

A power supply can be built using a transformer connected to the ac

supply line to step the ac voltage to desired amplitude, then rectifying that

ac voltage, filtering with a capacitor and RC filter, if desired, and finally

regulating the dc voltage using an IC regulator. The regulators can be

selected for operation with load currents from hundreds of mill amperes to

tens of amperes, corresponding to power ratings from mill watts to tens of

watts.

Three-Terminal Voltage Regulators:

Page 36: 48.Sound Detection System Document

Fixed Positive Voltage Regulators:

Vin

Vout

C1 C2

Fig shows the basic connection of a three-terminal voltage regulator IC

to a load. The fixed voltage regulator has an unregulated dc input voltage,

Vi, applied to one input terminal, a regulated output dc voltage, Vo, from a

second terminal, with the third terminal connected to ground. While the

input voltage may vary over some permissible voltage range, and the output

load may vary over some acceptable range, the output voltage remains

constant within specified voltage variation limits. A table of positive voltage

regulated ICs is provided in table. For a selected regulator, IC device

specifications list a voltage range over which the input voltage can vary to

maintain a regulated output voltage over a range of load current. The

specifications also list the amount of output voltage change resulting from a

change in load current (load regulation) or in input voltage (line regulation).

TABLE: Positive Voltage Regulators in 7800 series

IC No. Output voltage(v) Maximum input voltage(v)

7805 +5

IN OUT78XX

GND

Page 37: 48.Sound Detection System Document

7806780878107812781578187824

+6+8+10+12+15+18+24

35V

40V

ULN 2003 DRIVER:

3.8.ULN 2003/2803

ULN is mainly suited for interfacing between low-level circuits and multiple

peripheral power loads. The series ULN20XX high voltage, high current

Page 38: 48.Sound Detection System Document

darlington arrays feature continuous load current ratings. The driving circuitry in-

turn decodes the coding and conveys the necessary data to the stepper motor, this

module aids in the movement of the arm through steppers.

3.8.1 Pin connection of ULN Driver

The driver makes use of the ULN2003 driver IC, which contains an array of

7 power Darlington arrays, each capable of driving 500mA of current. At an

approximate duty cycle, depending on ambient temperature and number of drivers

turned on, simultaneously typical power loads totaling over 230w can be

controlled.

The device has base resistors, allowing direct connection to any common logic

family. All the emitters are tied together and brought out to a separate terminal.

Output protection diodes are included; hence the device can drive inductive loads

with minimum extra components. Typical loads include relays, solenoids, stepper

motors, magnetic print hammers, multiplexed LED, incandescent displays and

heaters

LCD:-

To send any of the commands from given table to the lcd, make pin RS

=0.For data, make RS=1.then send a high to low pulse to the E pin to enable the

internal latch of the LCD. As shown in figure for LCD connections.

Page 39: 48.Sound Detection System Document

Pin number

Symbol  Level   I/O Function

1 Vss - - Power supply (GND)

2 Vcc - - Power supply (+5V)

3 Vee - - Contrast adjust

4 RS 0/1 I0 = Instruction input1 = Data input

5 R/W 0/1 I0 = Write to LCD module1 = Read from LCD module

6 E 1, 1->0 I Enable signal

7 DB0 0/1 I/O Data bus line 0 (LSB)

8 DB1 0/1 I/O Data bus line 1

9 DB2 0/1 I/O Data bus line 2

10 DB3 0/1 I/O Data bus line 3

11 DB4 0/1 I/O Data bus line 4

12 DB5 0/1 I/O Data bus line 5

13 DB6 0/1 I/O Data bus line 6

14 DB7 0/1 I/O Data bus line 7 (MSB)

Table 2.2., Pin assignment for > 80 character displays

Pin number

Symbol  Level   I/O Function

1 DB7 0/1 I/O Data bus line 7 (MSB)

2 DB6 0/1 I/O Data bus line 6

Page 40: 48.Sound Detection System Document

Table 2.2., Pin assignment for > 80 character displays

Pin number

Symbol  Level   I/O Function

3 DB5 0/1 I/O Data bus line 5

4 DB4 0/1 I/O Data bus line 4

5 DB3 0/1 I/O Data bus line 3

6 DB2 0/1 I/O Data bus line 2

7 DB1 0/1 I/O Data bus line 1

8 DB0 0/1 I/O Data bus line 0 (LSB)

9 E1 1, 1->0 I Enable signal row 0 & 1 (1stcontroller)

10 R/W 0/1 I0 = Write to LCD module1 = Read from LCD module

11 RS 0/1 I0 = Instruction input1 = Data input

12 Vee - - Contrast adjust

13 Vss - - Power supply (GND)

14 Vcc - - Power supply (+5V)

15 E2 1, 1->0 I Enable signal row 2 & 3 (2ndcontroller)

16 n.c.      

Table 2.4. Bit names

Bit name

Setting / Status

I/D 0 = Decrement cursor position1 = Increment cursor position

S 0 = No display shift 1 = Display shift

D 0 = Display off 1 = Display on

C 0 = Cursor off 1 = Cursor on

B 0 = Cursor blink off 1 = Cursor blink on

S/C 0 = Move cursor 1 = Shift display

R/L 0 = Shift left 1 = Shift right

DL 0 = 4-bit interface 1 = 8-bit interface

N 0 = 1/8 or 1/11 Duty (1 line)1 = 1/16 Duty (2 lines)

F 0 = 5x7 dots 1 = 5x10 dots

BF 0 = Can accept instruction1 = Internal operation in progress

Page 41: 48.Sound Detection System Document
Page 42: 48.Sound Detection System Document

Condenser MicrophonesCondenser means capacitor, an electronic component which stores energy in the form of an

electrostatic field. The term condenser is actually obsolete but has stuck as the name for this type

of microphone, which uses a capacitor to convert acoustical energy into electrical energy.

Condenser microphones require power from a battery or external source. The resulting audio

signal is stronger signal than that from a dynamic. Condensers also tend to be more sensitive and

responsive than dynamics, making them well-suited to capturing subtle nuances in a sound. They

are not ideal for high-volume work, as their sensitivity makes them prone to distort.

How Condenser Microphones Work

A capacitor has two plates with a voltage between them. In the condenser mic, one of these

plates is made of very light material and acts as the diaphragm. The diaphragm vibrates when

struck by sound waves, changing the distance between the two plates and therefore changing the

capacitance. Specifically, when the plates are closer together, capacitance increases and a charge

current occurs. When the plates are further apart, capacitance decreases and a discharge current

occurs.

A voltage is required across the capacitor for this to work. This voltage is supplied either by a

battery in the mic or by external phantom power.

Cross-Section of a Typical Condenser Microphone

Page 43: 48.Sound Detection System Document

The Electret Condenser Microphone

The electret condenser mic uses a special type of capacitor which has a permanent voltage built

in during manufacture. This is somewhat like a permanent magnet, in that it doesn't require any

external power for operation. However good electret condenders mics usually include a pre-

amplifier which does still require power.

Other than this difference, you can think of an electret condenser microphone as being the same

as a normal condenser.

Technical Notes:

Condenser microphones have a flatter frequency response than dynamics.

A condenser mic works in much the same way as an electrostatic tweeter (although

obviously in reverse).

Page 44: 48.Sound Detection System Document

"Microphones" redirects here. For the Indie band, see The Microphones.

A microphone, sometimes referred to as a mic or mike (pronounced /ˈmaɪk/), is an acoustic-to-

electric transducer or sensor that converts sound into an electrical signal. Microphones are used

in many applications such as telephones, tape recorders, hearing aids, motion picture production,

live and recorded audio engineering, in radio and television broadcasting and in computers for

recording voice, VoIP, and for non-acoustic purposes such as ultrasonic checking.

A Neumann U87 condenser microphone

Page 45: 48.Sound Detection System Document

The most common design today uses a thin membrane which vibrates in response to sound

pressure. This movement is subsequently translated into an electrical signal. Most microphones

in use today for audio use electromagnetic induction (dynamic microphone), capacitance change

(condenser microphone, pictured right), piezoelectric generation, or light modulation to produce

the signal from mechanical vibration.

Varieties

Condenser, capacitor or electrostatic microphones

In a condenser microphone, also known as a capacitor microphone, the diaphragm acts as one

plate of a capacitor, and the vibrations produce changes in the distance between the plates. There

are two methods of extracting an audio output from the transducer thus formed: DC-biased and

RF (or HF) condenser microphones. With a DC-biased microphone, the plates are biased with a

fixed charge (Q). The voltage maintained across the capacitor plates changes with the vibrations

in the air, according to the capacitance equation (C = Q / V), where Q = charge in coulombs, C =

capacitance in farads and V = potential difference in volts. The capacitance of the plates is

inversely proportional to the distance between them for a parallel-plate capacitor. (See

capacitance for details.)

Page 46: 48.Sound Detection System Document

A nearly constant charge is maintained on the capacitor. As the capacitance changes, the charge

across the capacitor does change very slightly, but at audible frequencies it is sensibly constant.

The capacitance of the capsule and the value of the bias resistor form a filter which is highpass

for the audio signal, and lowpass for the bias voltage. Note that the time constant of an RC

circuit equals the product of the resistance and capacitance. Within the time-frame of the

capacitance change (on the order of 100 μs), the charge thus appears practically constant and the

voltage across the capacitor changes instantaneously to reflect the change in capacitance. The

voltage across the capacitor varies above and below the bias voltage. The voltage difference

between the bias and the capacitor is seen across the series resistor. The voltage across the

resistor is amplified for performance or recording.

RF condenser microphones use a comparatively low RF voltage, generated by a low-noise

oscillator. The oscillator may either be frequency modulated by the capacitance changes

produced by the sound waves moving the capsule diaphragm, or the capsule may be part of a

resonant circuit that modulates the amplitude of the fixed-frequency oscillator signal.

Demodulation yields a low-noise audio frequency signal with a very low source impedance. This

technique permits the use of a diaphragm with looser tension, which may be used to achieve

better low-frequency response. The RF biasing process results in a lower electrical impedance

capsule, a useful byproduct of which is that RF condenser microphones can be operated in damp

weather conditions which would effectively short out a DC-biased microphone. The Sennheiser

"MKH" series of microphones use the RF biasing technique.

Condenser microphones span the range from inexpensive karaoke microphones to high-fidelity

recording microphones. They generally produce a high-quality audio signal and are now the

popular choice in laboratory and studio recording applications. They require a power source,

provided either from microphone inputs as phantom power or from a small battery. Power is

necessary for establishing the capacitor plate voltage, and is also needed for internal

amplification of the signal to a useful output level. Condenser microphones are also available

with two diaphragms, the signals from which can be electrically connected such as to provide a

range of polar patterns (see below), such as cardioid, omnidirectional and figure-eight. It is also

possible to vary the pattern smoothly with some microphones, for example the Røde NT2000 or

CAD M179.Electret condenser microphones

Page 47: 48.Sound Detection System Document

An electret microphone is a relatively new type of capacitor microphone invented at Bell

laboratories in 1962 by Gerhard Sessler and Jim West.[1] The externally-applied charge described

above under condenser microphones is replaced by a permanent charge in an electret material.

An electret is a ferroelectric material that has been permanently electrically charged or polarized.

The name comes from electrostatic and magnet; a static charge is embedded in an electret by

alignment of the static charges in the material, much the way a magnet is made by aligning the

magnetic domains in a piece of iron.

They are used in many applications, from high-quality recording and lavalier use to built-in

microphones in small sound recording devices and telephones. Though electret microphones

were once low-cost and considered low quality, the best ones can now rival capacitor

microphones in every respect and can even offer the long-term stability and ultra-flat response

needed for a measuring microphone. Unlike other capacitor microphones, they require no

polarizing voltage, but normally contain an integrated preamplifier which does require power

(often incorrectly called polarizing power or bias). This preamp is frequently phantom powered

in sound reinforcement and studio applications. Microphones designed for Personal Computer

(PC) use, sometimes called multimedia microphones, use a stereo 3.5mm plug (though a mono

source) with the ring receiving power via a resistor from (normally) a 5V supply in the computer;

unfortunately, a number of incompatible dynamic microphones are fitted with 3.5mm plugs too.

While few electret microphones rival the best DC-polarized units in terms of noise level, this is

not due to any inherent limitation of the electret. Rather, mass production techniques needed to

produce electrets cheaply don't lend themselves to the precision needed to produce the highest

quality microphones.

Page 48: 48.Sound Detection System Document

Dynamic microphones

Dynamic microphones work via electromagnetic induction. They are robust, relatively

inexpensive and resistant to moisture. This, coupled with their high gain before feedback makes

them ideal for on-stage use.

Moving-coil microphones use the same dynamic principle as in a loudspeaker, only reversed. A

small movable induction coil, positioned in the magnetic field of a permanent magnet, is attached

to the diaphragm. When sound enters through the windscreen of the microphone, the sound wave

moves the diaphragm. When the diaphragm vibrates, the coil moves in the magnetic field,

producing a varying current in the coil through electromagnetic induction. A single dynamic

membrane will not respond linearly to all audio frequencies. Some microphones for this reason

utilize multiple membranes for the different parts of the audio spectrum and then combine the

resulting signals. Combining the multiple signals correctly is difficult and designs that do this are

rare and tend to be expensive. There are on the other hand several designs that are more

specifically aimed towards isolated parts of the audio spectrum. The AKG D 112, for example, is

designed for bass response rather than treble[2]. In audio engineering several kinds of

microphones are often used at the same time to get the best result.

Page 49: 48.Sound Detection System Document

Edmund Lowe using a ribbon microphone

Ribbon microphones use a thin, usually corrugated metal ribbon suspended in a magnetic field.

The ribbon is electrically connected to the microphone's output, and its vibration within the

magnetic field generates the electrical signal. Ribbon microphones are similar to moving coil

microphones in the sense that both produce sound by means of magnetic induction. Basic ribbon

microphones detect sound in a bidirectional (also called figure-eight) pattern because the ribbon,

which is open to sound both front and back, responds to the pressure gradient rather than the

sound pressure. Though the symmetrical front and rear pickup can be a nuisance in normal stereo

recording, the high side rejection can be used to advantage by positioning a ribbon microphone

horizontally, for example above cymbals, so that the rear lobe picks up only sound from the

cymbals. Crossed figure 8, or Blumlein stereo recording is gaining in popularity, and the figure 8

response of a ribbon microphone is ideal for that application.

Other directional patterns are produced by enclosing one side of the ribbon in an acoustic trap or

baffle, allowing sound to reach only one side. The classic RCA Type 77-DX microphone has

several externally-adjustable positions of the internal baffle, allowing the selection of several

response patterns ranging from "Figure-8" to "Unidirectional". Such older ribbon microphones,

some of which still give very high quality sound reproduction, were once valued for this reason,

but a good low-frequency response could only be obtained if the ribbon was suspended very

loosely, and this made them fragile. Modern ribbon materials, including new nanomaterials [3]

have now been introduced that eliminate those concerns, and even improve the effective dynamic

range of ribbon microphones at low frequencies. Protective wind screens can reduce the danger

of damaging a vintage ribbon, and also reduce plosive artifacts in the recording. Properly

Page 50: 48.Sound Detection System Document

designed wind screens produce negligible treble attenuation. In common with other classes of

dynamic microphone, ribbon microphones don't require phantom power; in fact, this voltage can

damage some older ribbon microphones. (There are some new modern ribbon microphone

designs which incorporate a preamplifier and therefore do require phantom power, and circuits of

modern passive ribbon microphones (i.e. those without the aforementioned preamplifier) are

specifically designed to resist damage to the ribbon and transformer by phantom power. Also

there are new ribbon materials available that are immune to wind blasts and phantom power.)

Carbon microphones

A carbon microphone, formerly used in telephone handsets, is a capsule containing carbon

granules pressed between two metal plates. A voltage is applied across the metal plates, causing

a small current to flow through the carbon. One of the plates, the diaphragm, vibrates in

sympathy with incident sound waves, applying a varying pressure to the carbon. The changing

pressure deforms the granules, causing the contact area between each pair of adjacent granules to

change, and this causes the electrical resistance of the mass of granules to change. The changes

in resistance cause a corresponding change in the voltage across the two plates, and hence in the

current flowing through the microphone, producing the electrical signal. Carbon microphones

were once commonly used in telephones; they have extremely low-quality sound reproduction

and a very limited frequency response range, but are very robust devices.

Unlike other microphone types, the carbon microphone can also be used as a type of amplifier,

using a small amount of sound energy to produce a larger amount of electrical energy. Carbon

microphones found use as early telephone repeaters, making long distance phone calls possible

in the era before vacuum tubes. These repeaters worked by mechanically coupling a magnetic

telephone receiver to a carbon microphone: the faint signal from the receiver was transferred to

the microphone, with a resulting stronger electrical signal to send down the line. (One illustration

of this amplifier effect was the oscillation caused by feedback, resulting in an audible squeal

from the old "candlestick" telephone if its earphone was placed near the carbon microphone.

Page 51: 48.Sound Detection System Document

Piezoelectric microphones

A crystal microphone uses the phenomenon of piezoelectricity—the ability of some materials to

produce a voltage when subjected to pressure—to convert vibrations into an electrical signal. An

example of this is Rochelle salt (potassium sodium tartrate), which is a piezoelectric crystal that

works as a transducer, both as a microphone and as a slimline loudspeaker component. Crystal

microphones were once commonly supplied with vacuum tube (valve) equipment, such as

domestic tape recorders. Their high output impedance matched the high input impedance

(typically about 10 megohms) of the vacuum tube input stage well. They were difficult to match

to early transistor equipment, and were quickly supplanted by dynamic microphones for a time,

and later small electret condenser devices. The high impedance of the crystal microphone made

it very susceptible to handling noise, both from the microphone itself and from the connecting

cable.

Piezo transducers are often used as contact microphones to amplify sound from acoustic musical

instruments, to sense drum hits, for triggering electronic samples, and to record sound in

challenging environments, such as underwater under high pressure. Saddle-mounted pickups on

acoustic guitars are generally piezos that contact the strings passing over the saddle. This type of

microphone is different from magnetic coil pickups commonly visible on typical electric guitars,

which use magnetic induction rather than mechanical coupling to pick up vibration.

Fiber optical microphones

The fiber optical microphone is an entirely new microphone concept, first invented in Israel in

1984 by Drs. Alexander Paritsky and Alexander Kots[4]. Conversion of acoustical waves into

electrical signals is achieved not by sensing changes in capacitance or magnetic fields (as with

conventional microphones), but instead by sensing changes in light intensity. During operation,

light from a laser source travels through an optical fiber to illuminate the surface of a tiny,

sound-sensitive reflective diaphragm. Sound causes the diaphragm to vibrate, thereby minutely

changing the intensity of the light it reflects. The modulated light is then transmitted over a

second optical fiber to a photo detector, which transforms the intensity-modulated light into

electrical signals for audio transmission or recording.

Page 52: 48.Sound Detection System Document

Typical fiber optical microphone (Optoacoustics' Optimic 1190)

The fiber optical microphone has very specific advantages over conventional microphones. First,

no electronic or metal components are used in the microphone head or the connecting fibers, so

the microphone does not react to or influence any electrical, magnetic, electrostatic or

radioactive fields (this is called EMI/RFI immunity). The fiber optical microphone is therefore

ideal for use in areas where conventional microphones are ineffective or dangerous, such as

inside industrial turbines or in magnetic resonance imaging (MRI) equipment environments.

Another advantage is the physical nature of optical fiber light propagation. The distance between

the microphone's light source and its photo detector may be up to several kilometers without

need for any preamplifier and/or other electrical device. Finally, fiber optical microphones

possess high dynamic and frequency range, similar to the best high fidelity conventional

microphones. They are robust, resistant to environmental changes in heat and moisture, and are

excellent for noise-canceling applications.

Fiber optical microphones can be produced for any directionality or impedance matching. They

have proven especially useful in medical applications (with particular success in MRI patient-to-

staff communications), audio calibration and measurement, industrial equipment sensing, high-

fidelity recording and law enforcement. A comprehensive range of commercial fiber optical

microphones is manufactured by Optoacoustics.[5]

Laser microphones

Laser microphones are often portrayed in movies as spy gadgets. A laser beam is aimed at the

surface of a window or other plane surface that is affected by sound. The slight vibrations of this

surface displace the returned beam, causing it to trace the sound wave. The vibrating laser spot is

Page 53: 48.Sound Detection System Document

then converted back to sound. In a more robust and expensive implementation, the returned light

is split and fed to an interferometer, which detects frequency changes due to the Doppler effect.

The former implementation is a tabletop experiment; the latter requires an extremely stable laser

and precise optics.

Liquid microphones

Main article: Water microphone

Early microphones did not produce intelligible speech, until Alexander Graham Bell made

improvements including a variable resistance microphone/transmitter. Bell’s liquid transmitter

consisted of a metal cup filled with water with a small amount of sulfuric acid added. A sound

wave caused the diaphragm to move, forcing a needle to move up and down in the water. The

electrical resistance between the wire and the cup was then inversely proportional to the size of

the water meniscus around the submerged needle. Elisha Gray filed a caveat for a version using a

brass rod instead of the needle. Other minor variations and improvements were made to the

liquid microphone by Majoranna, Chambers, Vanni, Sykes, and Elisha Gray, and one version

was patented by Reginald Fessenden in 1903. These were the first working microphones, but

they were not practical for commercial application. The famous first phone conversation between

Bell and Watson took place using a liquid microphone.

MEMS microphones

The MEMS (MicroElectrical-Mechanical System) microphone is also called a microphone chip

or silicon microphone. The pressure-sensitive diaphragm is etched directly into a silicon chip by

MEMS techniques, and is usually accompanied with integrated preamplifier. Most MEMS

microphones are variants of the condenser microphone design. Often MEMS microphones have

built in analog-to-digital converter (ADC) circuits on the same CMOS chip making the chip a

digital microphone and so more readily integrated with modern digital products. Major

manufacturers producing MEMS silicon microphones are Wolfson Microelectronics (WM7xxx),

Analog Devices, Akustica (AKU200x), Infineon (SMM310 product), Knowles Electronics,

Memstech (MSMx)and Sonion MEMS.

Page 54: 48.Sound Detection System Document

Speakers as microphones

A loudspeaker, a transducer that turns an electrical signal into sound waves, is the functional

opposite of a microphone. Since a conventional speaker is constructed much like a dynamic

microphone (with a diaphragm, coil and magnet), speakers can actually work "in reverse" as

microphones. The result, though, is a microphone with poor quality, limited frequency response

(particularly at the high end), and poor sensitivity. In practical use, speakers are sometimes used

as microphones in such applications as intercoms or walkie-talkies, where high quality and

sensitivity are not needed.

However, there is at least one other practical application of this principle: using a medium-size

woofer placed closely in front of a "kick" (bass drum) in a drum set to act as a microphone. The

use of relatively large speakers to transduce low frequency sound sources, especially in music

production, is becoming fairly common. Since a relatively massive membrane is unable to

transduce high frequencies, placing a speaker in front of a kick drum is often ideal for reducing

cymbal and snare bleed into the kick drum sound. Less commonly, microphones themselves can

be used as speakers, almost always as tweeters. This is less common since microphones are not

designed to handle the power that speaker components are routinely required to cope with. One

instance of such an application was the STC microphone-derived 4001 super-tweeter, which was

successfully used in a number of high quality loudspeaker systems from the late 1960s to the

mid-70s.

Capsule design and directivity

The shape of the microphone defines its directivity. Inner elements are of major importance, such

as the structural shape of the capsule. Outer elements may include the interference tube.

A pressure-gradient microphone is a microphone in which both sides of the diaphragm are

exposed to the incident sound and the microphone is therefore responsive to the pressure

differential (gradient) between the two sides of the membrane. Sound sources arriving edge-on at

the diaphragm produce no pressure differential, giving pressure-gradient microphones their

characteristic figure-eight, or bi-directional patterns.

Page 55: 48.Sound Detection System Document

The capsule of a pressure-transducer microphone is closed on one side, which results in an

omnidirectional pattern, responding to a change in pressure regardless of the direction to the

source.

Other polar patterns are derived by creating a capsule shape that combines these two effects in

different ways. The cardioid, for instance, features a partially closed backside.[6]

Microphone polar patterns

(Microphone facing top of page in diagram, parallel to page):

OmnidirectionalSubcardioid Cardioid Supercardioid

Hypercardioid Bi-directional or Figure of 8Shotgun

A microphone's directionality or polar pattern indicates how sensitive it is to sounds arriving at

different angles about its central axis. The above polar patterns represent the locus of points that

produce the same signal level output in the microphone if a given sound pressure level is

generated from that point. How the physical body of the microphone is oriented relative to the

diagrams depends on the microphone design. For large-membrane microphones such as in the

Oktava (pictured above), the upward direction in the polar diagram is usually perpendicular to

the microphone body, commonly known as "side fire" or "side address". For small diaphragm

microphones such as the Shure (also pictured above), it usually extends from the axis of the

microphone commonly known as "end fire" or "top/end address".

Some microphone designs combine several principles in creating the desired polar pattern. This

ranges from shielding (meaning diffraction/dissipation/absorption) by the housing itself to

electronically combining dual membranes.

Page 56: 48.Sound Detection System Document

Omnidirectional

An omnidirectional (or nondirectional) microphone's response is generally considered to be a

perfect sphere in three dimensions. In the real world, this is not the case. As with directional

microphones, the polar pattern for an "omnidirectional" microphone is a function of frequency.

The body of the microphone is not infinitely small and, as a consequence, it tends to get in its

own way with respect to sounds arriving from the rear, causing a slight flattening of the polar

response. This flattening increases as the diameter of the microphone (assuming it's cylindrical)

reaches the wavelength of the frequency in question. Therefore, the smallest diameter

microphone will give the best omnidirectional characteristics at high frequencies.

The wavelength of sound at 10 kHz is little over an inch (3.4 cm) so the smallest measuring

microphones are often 1/4" (6 mm) in diameter, which practically eliminates directionality even

up to the highest frequencies. Omnidirectional microphones, unlike cardioids, do not employ

resonant cavities as delays, and so can be considered the "purest" microphones in terms of low

coloration; they add very little to the original sound. Being pressure-sensitive they can also have

a very flat low-frequency response down to 20 Hz or below. Pressure-sensitive microphones also

respond much less to wind noise than directional (velocity sensitive) microphones.

An example of a nondirectional microphone is the round black eight ball.[7]

Unidirectional

A unidirectional microphone is sensitive to sounds from only one direction. The diagram above

illustrates a number of these patterns. The microphone faces upwards in each diagram. The

sound intensity for a particular frequency is plotted for angles radially from 0 to 360°.

(Professional diagrams show these scales and include multiple plots at different frequencies. The

diagrams given here provide only an overview of typical pattern shapes, and their names.)

Page 57: 48.Sound Detection System Document

Cardioids

US664A University Sound Dynamic Supercardioid Microphone

The most common unidirectional microphone is a cardioid microphone, so named because the

sensitivity pattern is heart-shaped (see cardioid). A hyper-cardioid microphone is similar but

with a tighter area of front sensitivity and a tiny lobe of rear sensitivity. A super-cardioid

microphone is similar to a hyper-cardioid, except there is more front pickup and less rear pickup.

These three patterns are commonly used as vocal or speech microphones, since they are good at

rejecting sounds from other directions.

Bi-directional

"Figure 8" or bi-directional microphones receive sound from both the front and back of the

element. Most ribbon microphones are of this pattern.

Shotgun

An Audio-Technica shotgun microphone

"Shotgun" microphones are the most highly directional. They have small lobes of sensitivity to

the left, right, and rear but are significantly more sensitive to the front. This results from placing

the element inside a tube with slots cut along the side; wave-cancellation eliminates most of the

Page 58: 48.Sound Detection System Document

off-axis noise. Due to the precision of their sensitivity area, shotgun microphones are commonly

used on TV and film sets, in stadiums, and for field recording of wildlife.

An omnidirectional microphone is a pressure transducer; the output voltage is proportional to the

air pressure at a given time. On the other hand, a figure-8 pattern is a pressure gradient

transducer; a sound wave arriving from the back will lead to a signal with a polarity opposite to

that of an identical sound wave from the front. Moreover, shorter wavelengths (higher

frequencies) are picked up more effectively than lower frequencies.

A cardioid microphone is effectively a superposition of an omnidirectional and a figure-8

microphone; for sound waves coming from the back, the negative signal from the figure-8

cancels the positive signal from the omnidirectional element, whereas for sound waves coming

from the front, the two add to each other. A hypercardioid microphone is similar, but with a

slightly larger figure-8 contribution. Since pressure gradient transducer microphones are

directional, putting them very close to the sound source (at distances of a few centimeters) results

in a bass boost. This is known as the proximity effect[8]

Application-specific designs

A lavalier microphone is made for hands-free operation. These small microphones are worn on

the body and held in place either with a lanyard worn around the neck or a clip fastened to

clothing. The cord may be hidden by clothes and either run to an RF transmitter in a pocket or

clipped to a belt (for mobile use), or run directly to the mixer (for stationary applications).

A wireless microphone is one in which the artist is not limited by a cable. It usually sends its

signal using a small FM radio transmitter to a nearby receiver connected to the sound system, but

it can also use infrared light if the transmitter and receiver are within sight of each other.

A contact microphone is designed to pick up vibrations directly from a solid surface or object, as

opposed to sound vibrations carried through air. One use for this is to detect sounds of a very low

level, such as those from small objects or insects. The microphone commonly consists of a

magnetic (moving coil) transducer, contact plate and contact pin. The contact plate is placed

against the object from which vibrations are to be picked up; the contact pin transfers these

Page 59: 48.Sound Detection System Document

vibrations to the coil of the transducer. Contact microphones have been used to pick up the sound

of a snail's heartbeat and the footsteps of ants. A portable version of this microphone has recently

been developed. A throat microphone is a variant of the contact microphone, used to pick up

speech directly from the throat, around which it is strapped. This allows the device to be used in

areas with ambient sounds that would otherwise make the speaker inaudible.

A parabolic microphone uses a parabolic reflector to collect and focus sound waves onto a

microphone receiver, in much the same way that a parabolic antenna (e.g. satellite dish) does

with radio waves. Typical uses of this microphone, which has unusually focused front sensitivity

and can pick up sounds from many meters away, include nature recording, outdoor sporting

events, eavesdropping, law enforcement, and even espionage. Parabolic microphones are not

typically used for standard recording applications, because they tend to have poor low-frequency

response as a side effect of their design.

A stereo microphone integrates two microphones in one unit to produce a stereophonic signal. A

stereo microphone is often used for broadcast applications or field recording where it would be

impractical to configure two separate condenser microphones in a classic X-Y configuration (see

microphone practice) for stereophonic recording. Some such microphones have an adjustable

angle of coverage between the two channels.

A noise-canceling microphone is a highly directional design intended for noisy environments.

One such use is in aircraft cockpits where they are normally installed as boom microphones on

headsets. Another use is on loud concert stages for vocalists. Many noise-canceling microphones

combine signals received from two diaphragms that are in opposite electrical polarity or are

processed electronically. In dual diaphragm designs, the main diaphragm is mounted closest to

the intended source and the second is positioned farther away from the source so that it can pick

up environmental sounds to be subtracted from the main diaphragm's signal. After the two

signals have been combined, sounds other than the intended source are greatly reduced,

substantially increasing intelligibility. Other noise-canceling designs use one diaphragm that is

affected by ports open to the sides and rear of the microphone, with the sum being a 16 dB

rejection of sounds that are farther away. One noise-canceling headset design using a single

Page 60: 48.Sound Detection System Document

diaphragm has been used prominently by artists such as Garth Brooks and Janet Jackson.[9] A

few noise-canceling microphones are throat microphones.

Connectors

Electronic symbol for a microphone.

The most common connectors used by microphones are:

Male XLR connector on professional microphones

¼ inch jack plug also known as 1/4 inch TRS connector on less expensive consumer

microphones. Many consumer microphones use an unbalanced 1/4 inch phone jack.

Harmonica microphones commonly use a high impedance 1/4 inch TS connection to be

run through guitar amplifiers.

3.5 mm (sometimes referred to as 1/8 inch mini) stereo (wired as mono) mini phone plug

on very inexpensive and computer microphones

Some microphones use other connectors, such as a 5-pin XLR, or mini XLR for connection to

portable equipment. Some lavalier (or 'lapel', from the days of attaching the microphone to the

news reporters suit lapel) microphones use a proprietary connector for connection to a wireless

transmitter. Since 2005, professional-quality microphones with USB connections have begun to

appear, designed for direct recording into computer-based software.

Impedance-matching

Microphones have an electrical characteristic called impedance, measured in ohms (Ω), that

depends on the design. Typically, the rated impedance is stated.[10] Low impedance is considered

Page 61: 48.Sound Detection System Document

under 600 Ω. Medium impedance is considered between 600 Ω and 10 kΩ. High impedance is

above 10 kΩ. Condenser microphones typically have an output impedance between 50 and

200 ohms.[11]

For best voltage transfer of signal, the impedance of the input circuit should be at least ten times

the impedance of the source device: a bridging input.[11] Microphone preamps that have input

impedance of several thousand ohms work well with microphones that have an output impedance

less than a few hundred ohms. The microphone isn't loaded to any appreciable degree and its

tone quality remains predictable. Microphones that are connected to several inputs in parallel

have been known to change their sonic character due to the additive load placed on them.

Most professional microphones are low impedance, about 200 Ω or lower. Low-impedance

microphones are preferred over high impedance for two reasons: one is that using a high-

impedance microphone with a long cable will result in loss of high frequency signal due to the

capacitance of the cable; the other is that long high-impedance cables tend to pick up more hum

(and possibly radio-frequency interference (RFI) as well). However, some devices, such as

vacuum tube guitar amplifiers, have a very high input impedance on the order of several hundred

thousand ohms that is inherently high, requiring the use of a high impedance microphone or a

matching transformer. Nothing will be damaged if the impedance between microphone and other

equipment is mismatched; the worst that will happen is a reduction in signal or change in

frequency response.

To get the best sound, the impedance of the microphone must be distinctly lower (by a factor of

at least five) than that of the equipment to which it is connected. Most microphones are designed

not to have their impedance matched by the load to which they are connected; [12] doing so can

alter their frequency response and cause distortion, especially at high sound pressure levels.

There are transformers (confusingly called matching transformers) that adapt impedances for

special cases such as connecting microphones to DI units or connecting low-impedance

microphones to the high-impedance inputs of certain amplifiers,[dubious – discuss] but microphone

connections generally follow the principle of bridging (voltage transfer), not matching (power

transfer). In general, any XLR microphone can usually be connected to any mixer with XLR

microphone inputs, and any plug microphone can usually be connected to any jack that is marked

Page 62: 48.Sound Detection System Document

as a microphone input, but not to a line input. This is because the signal level of a microphone is

typically 40 to 60 dB lower (a factor of 100 to 1000) than a line input. Microphone inputs

include the necessary amplification to handle these very low level signals. Certain ribbon and

dynamic microphones, which are most linear when operated into a load of known impedance, are

exceptions[clarification needed].[13]

Digital microphone interface

The AES 42 standard, published by the Audio Engineering Society, defines a digital interface for

microphones. Microphones conforming to this standard directly output a digital audio stream

through an XLR male connector, rather than producing an analog output. Digital microphones

may be used either with new equipment which has the appropriate input connections conforming

to the AES 42 standard, or else by use of a suitable interface box. Studio-quality microphones

which operate in accordance with the AES 42 standard are now appearing from a number of

microphone manufacturers.

Measurements and specifications

A comparison of the far field on-axis frequency response of the Oktava 319 and the Shure SM58

Because of differences in their construction, microphones have their own characteristic responses

to sound. This difference in response produces non-uniform phase and frequency responses. In

addition, microphones are not uniformly sensitive to sound pressure, and can accept differing

levels without distorting. Although for scientific applications microphones with a more uniform

response are desirable, this is often not the case for music recording, as the non-uniform response

of a microphone can produce a desirable coloration of the sound. There is an international

standard for microphone specifications,[10] but few manufacturers adhere to it. As a result,

Page 63: 48.Sound Detection System Document

comparison of published data from different manufacturers is difficult because different

measurement techniques are used. The Microphone Data Website has collated the technical

specifications complete with pictures, response curves and technical data from the microphone

manufacturers for every currently listed microphone, and even a few obsolete models, and shows

the data for them all in one common format for ease of comparison.[1]. Caution should be used

in drawing any solid conclusions from this or any other published data, however, unless it is

known that the manufacturer has supplied specifications in accordance with IEC 60268-4.

A frequency response diagram plots the microphone sensitivity in decibels over a range of

frequencies (typically at least 0–20 kHz), generally for perfectly on-axis sound (sound arriving at

0° to the capsule). Frequency response may be less informatively stated textually like so:

"30 Hz–16 kHz ±3 dB". This is interpreted as a (mostly) linear plot between the stated

frequencies, with variations in amplitude of no more than plus or minus 3 dB. However, one

cannot determine from this information how smooth the variations are, nor in what parts of the

spectrum they occur. Note that commonly-made statements such as "20 Hz–20 kHz" are

meaningless without a decibel measure of tolerance. Directional microphones' frequency

response varies greatly with distance from the sound source, and with the geometry of the sound

source. IEC 60268-4 specifies that frequency response should be measured in plane progressive

wave conditions (very far away from the source) but this is seldom practical. Close talking

microphones may be measured with different sound sources and distances, but there is no

standard and therefore no way to compare data from different models unless the measurement

technique is described.

The self-noise or equivalent noise level is the sound level that creates the same output voltage as

the microphone does in the absence of sound. This represents the lowest point of the

microphone's dynamic range, and is particularly important should you wish to record sounds that

are quiet. The measure is often stated in dB(A), which is the equivalent loudness of the noise on

a decibel scale frequency-weighted for how the ear hears, for example: "15 dBA SPL" (SPL

means sound pressure level relative to 20 micropascals). The lower the number the better. Some

microphone manufacturers state the noise level using ITU-R 468 noise weighting, which more

accurately represents the way we hear noise, but gives a figure some 11 to 14 dB higher. A quiet

microphone will measure typically 20 dBA SPL or 32 dB SPL 468-weighted. Very quiet

Page 64: 48.Sound Detection System Document

microphones have existed for years for special applications, such the Brüel & Kjaer 4179, with a

noise level around 0 dB SPL. Recently some microphones with low noise specifications have

been introduced in the studio/entertainment market, such as models from Neumann and Røde

that advertise noise levels between 5 and 7 dBA. Typically this is achieved by altering the

frequency response of the capsule and electronics to result in lower noise within the A-weighting

curve while broadband noise may be increased.

The maximum SPL (sound pressure level) the microphone can accept is measured for particular

values of total harmonic distortion (THD), typically 0.5%. This is generally inaudible, so one can

safely use the microphone at this level without harming the recording. Example: "142 dB SPL

peak (at 0.5% THD)". The higher the value, the better, although microphones with a very high

maximum SPL also have a higher self-noise.

The clipping level is perhaps a better indicator of maximum usable level, [citation needed] as the

1% THD figure usually quoted under max SPL is really a very mild level of distortion, quite

inaudible especially on brief high peaks. Harmonic distortion from microphones is usually of

low-order (mostly third harmonic) type, and hence not very audible even at 3-5%. Clipping, on

the other hand, usually caused by the diaphragm reaching its absolute displacement limit (or by

the preamplifier), will produce a very harsh sound on peaks, and should be avoided if at all

possible. For some microphones the clipping level may be much higher than the max SPL.

The dynamic range of a microphone is the difference in SPL between the noise floor and the

maximum SPL. If stated on its own, for example "120 dB", it conveys significantly less

information than having the self-noise and maximum SPL figures individually.

Sensitivity indicates how well the microphone converts acoustic pressure to output voltage. A

high sensitivity microphone creates more voltage and so will need less amplification at the mixer

or recording device. This is a practical concern but is not directly an indication of the mic's

quality, and in fact the term sensitivity is something of a misnomer, 'transduction gain' being

perhaps more meaningful, (or just "output level") because true sensitivity will generally be set by

the noise floor, and too much "sensitivity" in terms of output level will compromise the clipping

level. There are two common measures. The (preferred) international standard is made in

Page 65: 48.Sound Detection System Document

millivolts per pascal at 1 kHz. A higher value indicates greater sensitivity. The older American

method is referred to a 1 V/Pa standard and measured in plain decibels, resulting in a negative

value. Again, a higher value indicates greater sensitivity, so −60  dB is more sensitive than

−70 dB.

Measurement microphonesSome microphones are intended for use as

standard measuring microphones for the testing of speakers and checking

noise levels etc. These are calibrated transducers and will usually be

supplied with a calibration certificate stating absolute sensitivity against

frequency.

Microphone calibration techniques

Measurement microphones are used in sound analysis meters, noise measurement (in public

nuisance abatement contexts), acoustic laboratories, loudspeaker design and quality control

work, etc. They are made with greater care than most microphones and generally come with a

calibration certificate. However, like most manufactured products there can be variations, which

may change over the lifetime of the device. Accordingly, it is regularly necessary to test the test

microphones. This service is offered by some microphone manufacturers and by independent

certified testing labs. Some test enough microphones to justify an in-house calibration lab.

Depending on the application, measurement microphones must be tested periodically (every year

or several months, typically) and after any potentially damaging event, such as being dropped

(most such mikes come in foam-padded cases to reduce this risk) or exposed to sounds beyond

the acceptable level.

Pistonphone apparatus

A pistonphone is an acoustical calibrator (sound source) using a closed coupler to generate a

precise sound pressure for the calibration of instrumentation microphones. The principle relies

on a piston mechanically driven to move at a specified rate on a fixed volume of air to which the

microphone under test is exposed. The air is assumed to be compressed adiabatically and the

Page 66: 48.Sound Detection System Document

SPL in the chamber can be calculated from the adiabatic gas law, which requires that the product

of the pressure P with V raised to the power gamma be constant; here gamma is the ratio of the

specific heat of air at constant pressure to its specific heat at constant volume. The pistonphone

method only works at low frequencies, but it can be accurate and yields an easily calculable

sound pressure level. The standard test frequency is usually around 250 Hz.

Reciprocal method

This method relies on the reciprocity of one or more microphones in a group of 3 to be

calibrated. It can still be used when only one of the microphones is reciprocal (exhibits equal

response when used as a microphone or as a loudspeaker).

Microphone array and array microphones

A microphone array is any number of microphones operating in tandem. There are many

applications:

Systems for extracting voice input from ambient noise (notably telephones, speech

recognition systems, hearing aids)

Surround sound and related technologies

Locating objects by sound: acoustic source localization, e.g. military use to locate the

source(s) of artillery fire. Aircraft location and tracking.

High fidelity original recordings

3D spatial beamforming for localized acoustic detection of subcutaneous sounds

Typically, an array is made up of omnidirectional microphones distributed about the perimeter of

a space, linked to a computer that records and interprets the results into a coherent form.

Microphone windscreens

Windscreens are used to protect microphones that would otherwise be buffeted by wind or vocal

plosives (from consonants such as "P", "B", etc.). Most microphones have an integral windscreen

built around the microphone diaphragm. A screen of plastic, wire mesh or a metal cage is held at

Page 67: 48.Sound Detection System Document

a distance from the microphone diaphragm, to shield it. This cage provides a first line of defense

against the mechanical impact of objects or wind. Some microphones, such as the Shure SM58,

may have an additional layer of foam inside the cage to further enhance the protective properties

of the shield. Beyond integral microphone windscreens, there are three broad classes of

additional wind protection.

Microphone covers

Microphone covers are often made of soft open-cell polyester or polyurethane foam because of

the inexpensive, disposable nature of the foam. Optional windscreens are often available from

the manufacturer and third parties. A very visible example of optional accessory windscreen is

the A2WS from Shure, one of which is fitted over each of the two SM57s used on the United

States Presidential lectern. One disadvantage of polyurethane foam microphone covers is that

they can deteriorate over time. Windscreens also tend to collect dirt and moisture in their open

cells and must be cleaned to prevent high frequency loss, bad odor and unhealthy conditions for

the person using the microphone. On the other hand, a major advantage of concert vocalist

windscreens is that one can quickly change to a clean windscreen between users, reducing the

chance of transferring germs. Windscreens of various colors can be used to distinguish one

microphone from another on a busy, active stage.

1. SOFTWARE DESCRIPTION:

1. Click on the Keil uVision Icon on Desktop

2. The following fig will appear

Page 68: 48.Sound Detection System Document

3. Click on the Project menu from the title bar

4. Then Click on New Project

5. Save the Project by typing suitable project name with no extension in u r own folder sited in either C:\ or D:\

Page 69: 48.Sound Detection System Document

6. Then Click on Save button above.

7. Select the component for u r project. i.e. Atmel……

8. Click on the + Symbol beside of Atmel

9. Select AT89C51 as shown below

Page 70: 48.Sound Detection System Document

10. Then Click on “OK”

11. The Following fig will appear

12. Then Click either YES or NO………mostly “NO”

13. Now your project is ready to USE

14. Now double click on the Target1, you would get another option “Source group 1” as

shown in next page.

Page 71: 48.Sound Detection System Document

15. Click on the file option from menu bar and select “new”

16. The next screen will be as shown in next page, and just maximize it by double

clicking on its blue boarder.

Page 72: 48.Sound Detection System Document

17. Now start writing program in either in “C” or “ASM”

18. For a program written in Assembly, then save it with extension “. asm” and for “C”

based program save it with extension “ .C”

19. Now right click on Source group 1 and click on “Add files to Group Source”

Page 73: 48.Sound Detection System Document

20. Now you will get another window, on which by default “C” files will appear.

21. Now select as per your file extension given while saving the file

22. Click only one time on option “ADD”

23. Now Press function key F7 to compile. Any error will appear if so happen.

Page 74: 48.Sound Detection System Document

24. If the file contains no error, then press Control+F5 simultaneously.

25. The new window is as follows

26. Then Click “OK”

27. Now Click on the Peripherals from menu bar, and check your required port as shown

in fig below

Page 75: 48.Sound Detection System Document

28. Drag the port a side and click in the program file.

29. Now keep Pressing function key “F11” slowly and observe.

You are running your program successfully

Page 76: 48.Sound Detection System Document

FUTURE SCOPE

This system is a rapidly growing field and there are new and improved strategies

popping up all the time. For the most part these systems are all built around the same basic

structure, a central box that monitors several detectors and perimeter guards and sounds an alarm

when any of them are triggered.

This system is best for guiding the perimeter of a house or a business center the

points where an intruder would enter the building. In this system IR sensor is used to detect the

intrusion. Similarly the vibration and temperature sensors recognize vibration disturbances and

accidental fires respectively.

This project provides an efficient and economical security system. This system

finds applications in industries, banks and homes.

Incorporating the features discussed below can further enhance the system

This system can detect intrusion only at discrete points. This system detection

feature can be extended to scanning a complete area. Thus the intrusion into the

building can be detected with much more efficiently.

The redialing feature can also be incorporated such that if the call is not put forward

the first time, the auto dialer will dial the same number until the call is successfully

completed.

A pre-recorded voice message can delivered to the owner notifying him about the

intrusion into the premises.

The addition of the above discussed advancements certainly builds this project into a

much flexible and reliable security system.

Page 77: 48.Sound Detection System Document

REFERENCES

1. The 8051 Microcontroller and Embedded Systems By Muhammad Ali Mazidi

2. Fundamentals Of Embedded Software By Daniel W Lewis

3..www.howsstuffworks.com

4. www.alldatasheets.com

5. www.electronicsforu.com

6. www.knowledgebase.com

7.www.8051 projectsinfo.com 8.Datasheets of Microcontroller AT89C52

9. Datasheets of 555 timer

10. Datasheets of TSAL 6200

12. Datasheets of BC 547

APPENDIX

Page 78: 48.Sound Detection System Document

Datasheets of 89c52

Datasheets of UM 95089

Datasheets oftsop 1356

Datasheets of tsal 6200