Você está na página 1de 52

INDEX

S.no CONTENTS PAGE NUMBERS


1. Index
2. Abstract
3. Chapter-1: Embedded System
1.1 Introduction
1.2 Microprocessor and Microcontroller
1.3 Introduction to Application of embedded system
1.4 Industrial functions of embedded system
1.5 Compared with commercial system
4. Chapter-2: Over view of the Project
2.1 Introduction of project
2.2 Block Diagram
2.3 Software used in Project
5. Chapter-3: Microcontroller
3.1 Description
3.2 Features
3.3 Architecture
3.4 Pin-Configuration of AT89S52
3.5 Pin-Description
6. Chapter-4: Hardware Description
4.1 Power Supply board
4.2 DTMF
i. Introduction
ii. MT8870 Introduction
iii. Features
iv. Block Diagram
v. Pin-Diagram
vi. Pin-Description
7. Chapter-5: Schematic Diagram
5.1 Schematic Diagram

5.2 Schematic Explanation

8. Coding
9. Conclusion
10. Future Aspects
11. Applications
12. Bibliography

2
ABSTRACT (Industrial device operating system using mobile)

Aim:

The aim is to control industrial device remotely by using DTMF signals.

Description:

In this project we use two mobile phones one is connected to the uC kit through DTMF
circuit other is to send control signal to first mobile. After receiving signals, the dtmf
decoder circuit decodes the signals and sends them to the uC. The uC will control the
industrial devices which are connected to it.

Hardware Implementation:
• Microcontroller

• Mobile phones

• Power supply

• DTMF circuit

• Industrial Devices

Software used:

• Keil uVision

• Embedded C

• Express PCB

3
CHAPTER-1

EMBEDDED SYSTEMS

Introduction

An embedded system is some combination of computer hardware and software,


either fixed in capability or programmable, that is specifically designed for a particular
function.
A general-purpose definition of embedded systems is that they are devices used to
control, monitor or assist the operation of equipment, machinery or plant. "Embedded"
reflects the fact that they are an integral part of the system. In many cases their embedded
ness may be such that their presence is far from obvious to the casual observer and even
the more technically skilled might need to examine the operation of a piece of equipment
for some time before being able to conclude that an embedded control system was
involved in its functioning. At the other extreme a general-purpose computer may be used
to control the operation of a large complex processing plant, and its presence will be
obvious.

All embedded systems are including computers or microprocessors. Some of


these computers are however very simple systems as compared with a personal computer.

The very simplest embedded systems are capable of performing only a single
function or set of functions to meet a single predetermined purpose. In more complex
systems an application program that enables the embedded system to be used for a
particular purpose in a specific application determines the functioning of the embedded
system. The ability to have programs means that the same embedded system can be used

4
for a variety of different purposes. In some cases a microprocessor may be designed in
such a way that application software for a particular purpose can be added to the basic
software in a second process, after which it is not possible to make further changes. The
applications software on such processors is sometimes referred to as firmware

The simplest devices consist of a single microprocessor (often called a "chip”),


which may itself be packaged with other chips in a hybrid system or Application Specific
Integrated Circuit (ASIC). Its input comes from a detector or sensor and its output goes to
a switch or activator which (for example) may start or stop the operation of a machine or,
by operating a valve, may control the flow of fuel to an engine.

As the embedded system is the combination of both software and hardware

Embedded
System

Software Hardware

ALP
C Processor
VB Peripherals
Etc., memory

Figure: Block diagram of Embedded System

Software deals with the languages like ALP, C, and VB etc., and Hardware deals with
Processors, Peripherals, and Memory.

Memory: It is used to store data or address.

5
Peripherals: These are the external devices connected

Processor: It is an IC which is used to perform some task


Processors are classified into four types like:
1. Micro Processor (µp)
2. Micro controller (µc)
3. Digital Signal Processor (DSP)
4. Application Specific Integrated Circuits (ASIC)

Micro Processor (µp):


It is an electronic chip which performs arithmetic and logical operations with
assistance of internal memory.

ALU

CU

MEMORY

Figure: Block Diagram of Micro Processor (µp)


Micro Controller (µc):
It is a highly integrated micro processor designed for specific use in embedded systems.

6
ALU

CU

Memory
EEPROM, ADC,
DAC, Timers,
USART, Oscillators
Etc.,

Figure: Block Diagram of Micro Controller (µc)

Applications of embedded system

Introduction

Embedded controllers may be found in many different kinds of system and are
used for many different applications. The list, which follows, is indicative rather than
exhaustive. An item in the list may be relevant to a particular company because either (a)
it is or involves a core process or product, (b) it is or involves an ancillary function or
service performed by the company or (c) it refers to a product or service provided by a
contractor under some form of agreement and the vulnerability of the supplier may need
to be considered.

List of applications of embedded systems

• Manufacturing and process control


• Construction industry
• Transport
• Buildings and premises
• Domestic service

7
• Communications
• Office systems and mobile equipment
• Banking, finance and commercial

• Medical diagnostics, monitoring and life support


• Testing, monitoring and diagnostic systems

Industrial functions of embedded systems

A manufacturing company has provided the following list of embedded systems

Multi-loop control and monitoring - DCS, SCADA, telemetry


Panel mounted devices - Control, display, recording and operations

Safety and security - Alarm and trip systems, fire and gas systems, buildings and facilities
security
Field devices - measurement, actuation
Analytical systems - Laboratory systems; on-line/ plant systems
Electrical supply - supply, measurement, control, protection
Tools - for design, documentation, testing, maintenance

Embedded systems compared with commercial systems

The Year 2000 problem in embedded systems differs from the problem in commercial /
database / transaction processing systems (often referred to as IT systems) in a number of
ways. Firstly the user's problem may much lie much deeper than packages or applications
software. It may lie in and be inseparable from systems and operating software and from
hardware, i.e. in the platform on which the application software is based. When users of
IT systems have hardware or operating software problems they can and should be made
the concern of the computer supplier: typically, this is not the case with microprocessors
and devices based on them.

8
Secondly in embedded systems the concern is often with intervals rather than with
specific dates: the need may be for an event to occur at 100-day intervals rather than on
the 5th day of each month. This has the implication that Year 2000 problems may reveal
themselves both before and for some time after 1 January 2000 and not at all on the date
itself.

The lifetime of embedded systems tends to be greater than that of commercial data
processing systems: they remain in use for longer without alteration to their software.
Because their software may therefore be older they are rendered more liable to Year 2000
problems.

CHAPTER-2
OVERVIEW OF PROJECT
Introduction of the project:
Computers along with other types of automation have been introduced in the production
process to increase industrial efficiency. The term automation refers to the automatic
handling of parts between progressive production processes. To achieve maximum
automation, a company must choose reliable software and hardware. In addition, both
software and hardware has to be as cheap as possible without being unreliable. This
further implies that companies should be particularly careful when selecting both
hardware and software. It is the aim of this paper to present a number of Operating
Systems that the authors think are of particular interest to the industrial community.

These “industrial devices operating system using mobile” can useful for the reducing
the power consumption, reduce the man power it will useful for the industrial owner
maintain easily.

9
Block Diagram of the Project:

10
Process to do the project (block diagram)
Power Supply:
In this power supply circuit we are using again four components. Step-down
transformer is used to step-down the AC 230v into 15v or 12v depending on the
transformer rating. This transformer output is connected to Bridge rectifier. It converts
AC 15v into pulsated DC 15v. Because finally we need DC voltage to our
microcontroller. Bridge rectifier output is fed to the filter circuit to remove the unwanted
components or ripples. From filter circuit output is fed to the DC voltage regulator. This
regulator converts this pulsated voltage into constant voltage. If we use 7805 regulator,
we will get DC 5v. If we use 7812 regulator, we get DC 12v output. This regulator output
is fed to the microcontroller and different components in the PCB depending on their
power requirement.

Microcontroller
Here we are using AT89S52 controller. This is used to interface and control all
the devices and operations to meet our requirements.
Mobile
The mobile is using here to receiver signal from other mobile phone and send to
DTMF decoder circuit.

DTMF Decoder

11
The DTMF decoder circuit is used to receive signal from mobile. And decode the
signals and sends the decoded digital data to microcontroller.

SOFTWARE USED:
KEIL Software

Installing the Keil software on a Windows PC


• Insert the CD-ROM in your computer’s CD drive
• On most computers, the CD will “auto run”, and you will see the Keil installation
menu. If the menu does not appear, manually double click on the Setup icon, in
the root directory: you will then see the Keil menu.
• On the Keil menu, please select “Install Evaluation Software”. (You will not
require a license number to install this software).
• Follow the installation instructions as they appear.

Loading the Projects

The example projects for this book are NOT loaded automatically when you install the
Keil compiler. These files are stored on the CD in a directory “/Pont”. The files are
arranged by chapter: for example, the project discussed in Chapter 3 is in the directory
“/Pont/Ch03_00-Hello”. Rather than using the projects on the CD (where changes cannot
be saved), please copy the files from CD onto an appropriate directory on your hard disk.
Note: you will need to change the file properties after copying: file transferred from the
CD will be ‘read only’.
Configuring the Simulator
Open the Keil µ Vision2
Go to Project – Open Project and browse for Hello in Ch03_00 in Pont and open it.

12
Go to Project – Select Device for Target ‘Target1’

13
Select 8052(all variants) and click OK

Now we need to check the oscillator frequency:


Go to project – Options for Target ‘Target1’

14
Make sure that the oscillator frequency is 12MHz.

15
Building the Target

Build the target as illustrated in the figure below

Running the Simulation

Having successfully built the target, we are now ready to start the debug session and run the simulator.

First start a debug session

16
17
The flashing LED we will view will be connected to Port 1. We therefore want to observe
the activity on this port

18
To ensure that the port activity is visible, we need to start the ‘periodic window update’
flag

19
Go to Debug - Go

While the simulation is running, view the performance analyzer to check the delay
durations.

20
Go to Debug – Performance Analyzer and click on it

21
Double click on DELAY_LOOP_Wait in Function Symbols: and click Define button

22
CHAPTER-3
MICROCONTROLLER

Microcontroller
Description of Microcontroller 89S52:

The AT89S52 is a low-power, high-performance CMOS 8-bit micro controller with


8Kbytes of in-system programmable flash memory. The device is manufactured

Using Atmel’s high-density nonvolatile memory technology and is compatible with the
industry-standard 80C51 micro controller. The on-chip Flash allows the program memory
to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By
combining a versatile 8-bit CPU with in-system programmable flash one monolithic http;
the Atmel AT89S52 is a powerful micro controller, which provides a highly flexible and

23
cost effective solution to any cost effective solution to any embedded control applications
to any embedded control applications

The AT89S52 provides the following standard features: 8K bytes of Flash, 256
bytes of RAM, 32 I/O lines, Watchdog timer, two data pointers, three 16-bit
timer/counters, full duplex serial port, on-chip oscillator, and clock circuitry. In addition,
the AT89S52 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
interrupt Or hardware reset.

Features:
• Compatible with MCS-51 Products
• 8K Bytes of In-System Programmable (ISP) Flash Memory
– Endurance: 1000 Write/Erase Cycles
• 4.0V to 5.5V Operating Range
• Fully Static Operation: 0 Hz to 33 MHz
• Three-level Program Memory Lock
• 256K Internal RAM
• 32 Programmable I/O Lines
• 3 16-bit Timer/Counters
• Eight Interrupt Sources
• Full Duplex UART Serial Channel
• Low-power Idle and Power-down Modes
• Interrupt Recovery from Power-down Mode
• Watchdog Timer
• Dual Data Pointer

24
• Power-off Flag
Architecture of 8052:

Fig10: architecture of 8052

25
Pin configuration of AT89S52:

Fig 9: pin configuration

PIN DESCRIPTION
VCC
Supply voltage.

26
GND
Ground

Port 0
Port 0 is an 8-bit open drain bi-directional I/O port. As an output port, each pin can sink
eight TTL inputs. When 1’s are written to port 0 pins, the pins can be used as high
impedance inputs. Port 0 can 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-up’s. 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 bi-directional I/O port with internal pull-ups. 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. 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 the following table. Port 1 also receives the low-order address bytes during Flash
programming and verification.

27
Port 2
Port 2 is an 8-bit bi-directional I/O port with internal pull-ups. 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. Port 2 emits the high-order address
byte during fetches from external program memory and during accesses to external data
memory that use 16-bit addresses (MOVX @DPTR). In this application, Port 2 uses
strong internal pull-ups when emitting 1s. During accesses to external data memory that
use 8-bit addresses (MOVX @ RI), Port 2emits 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 bi-directional I/O port with internal pull-ups. The Port 3 output buffers
can sink/source four TTL inputs. When 1s are writ 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 AT89S52, as shown in the
following table.
Port 3 also receives some control signals for Flash programming
And verification.

28
RST
Reset input. A high on this pin for two machine cycles while the oscillator is running
resets the device.

ALE/PROG
Address Latch Enable (ALE) is an 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 of1/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 a MOVX or MOVC instruction. Otherwise, the pin is weakly
pulled high. Setting the ALE-disable bit has no effect if the micro controller is in external
execution mode.

PSEN
Program Store Enable (PSEN) is the read strobe to external program memory. When the
AT89S52 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. A
should be strapped to VCC for internal program executions. This pin also receives the 12-
voltProgramming enables voltage (VPP) during Flash programming.

29
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 that
can be configured for use as an on-chip oscillator, as shown in Figure 1. Either a quartz
crystal or ceramic resonator may be used. To drive the device from an External clock
source, XTAL2 should be left unconnected while XTAL1 is driven, as shown in Figure 2.

Figure 11:. Oscillator Connections

Special Function Register (SFR) Memory: -

30
Special Function Registers (SFR s) are areas of memory that control specific
functionality of the 8051 processor. For example, four SFRs permit access to the 8051’s
32 input/output lines. Another SFR allows the user to set the serial baud rate, control and
access timers, and configure the 8051’s interrupt system.

The Accumulator: The Accumulator, as its name suggests is used as a general register to
accumulate the results of a large number of instructions. It can hold 8-bit (1-byte) value
and is the most versatile register.

The “R” registers: The “R” registers are a set of eight registers that are named R0, R1.
Etc up to R7. These registers are used as auxiliary registers in many operations.
The “B” registers: The “B” register is very similar to the accumulator in the sense that it
may hold an 8-bit (1-byte) value. Two only uses the “B” register 8051 instructions: MUL
AB and DIV AB.
The Data Pointer: The Data pointer (DPTR) is the 8051’s only user accessible 16-bit
(2Bytes) register. The accumulator, “R” registers are all 1-Byte values. DPTR, as the
name suggests, is used to point to data. It is used by a number of commands, which allow
the 8051 to access external memory.
THE PROGRAM COUNTER AND STACK POINTER:
The program counter (PC) is a 2-byte address, which tells the 8051 where the next
instruction to execute is found in memory. The stack pointer like all registers except
DPTR and PC may hold an 8-bit (1-Byte) value
ADDRESSING MODES:
An “addressing mode” refers that you are addressing a given memory location. In
summary, the addressing modes are as follows, with an example of each:
Each of these addressing modes provides important flexibility.
Immediate Addressing MOV A, #20 H
Direct Addressing MOV A, 30 H
Indirect Addressing MOV A, @R0
Indexed Addressing

31
a. External Direct MOVX A, @DPTR
b. Code In direct MOVC A, @A+DPTR

Immediate Addressing:
Immediate addressing is so named because the value to be stored in memory immediately
follows the operation code in memory. That is to say, the instruction itself dictates what
value will be stored in memory. For example, the instruction:
MOV A, #20H:
This instruction uses immediate Addressing because the accumulator will be loaded with
the value that immediately follows in this case 20(hexadecimal). Immediate addressing is
very fast since the value to be loaded is included in the instruction. However, since the
value to be loaded is fixed at compile-time it is not very flexible.
Direct Addressing:
Direct addressing is so named because the value to be stored in memory is obtained by
directly retrieving it from another memory location.
for example:
MOV A, 30h
This instruction will read the data out of internal RAM address 30(hexadecimal) and
store it in the Accumulator. Direct addressing is generally fast since, although the value
to be loaded isn’t included in the instruction, it is quickly accessible since it is stored in
the 8051’s internal RAM. It is also much more flexible than Immediate Addressing since
the value to be loaded is whatever is found at the given address which may variable.
Also it is important to note that when using direct addressing any instruction that refers to
an address between 00h and 7Fh is referring to the SFR control registers that control the
8051 micro controller itself.

Indirect Addressing:
Indirect addressing is a very powerful addressing mode, which in many cases provides an
exceptional level of flexibility. Indirect addressing is also the only way to access the extra
128 bytes of internal RAM found on the 8052. Indirect addressing appears as follows:

32
MOV A, @R0:

This instruction causes the 8051 to analyze Special Function Register (SFR) Memory:
Special Function Registers (SFRs) are areas of memory that control specific functionality
of the 8051 processor. For example, four SFRs permit access to the 8051’s 32
input/output lines. Another SFR allows the user to set the serial baud rate, control and
access timers, and configure the 8051’s interrupt system.
Timer 2 Registers:
Control and status bits are contained in registers T2CON and T2MOD for Timer 2.
The register pair (RCAP2H , RCAP2L) are the Capture / Reload registers for
Timer 2 in 16-bit capture mode or 16-bit auto-reload mode .
Interrupt Registers:
The individual interrupt enable bits are in the IE registe . Two priorities can be
set for each of the six interrupt sources in the IP register.

Timer 2:

Timer 2:

33
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 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. Timer2 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.

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


transition at its corresponding external input pin , T2 .When the samples show a
high in one cycle and a low in the next cycle, the count is incremented . Since
two machine cycles (24 Oscillator periods ) are required to recognize 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.

Capture Mode:
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. If EXEN2 =
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 and RCAP2L , respectively

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)

34
bit located in the SFR T2MOD . 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 . In this mode , two
options are selected by bit EXEN2 in T2CON . If EXEN2 = 0 , Timer 2
counts up to 0FFFFH and then sets the TF2 bit upon overflow . If EXEN2 =
1, a 16-bit reload can be triggered either by an overflow or by a 1-to-0
transition at external input T2EX.

Baud Rate Generator:

Timer 2 is selected as the baud rate generator by setting TCLK and/or RCLK
in T2CON . Note that the baud rates for transmit and receive can be different
if Timer 2 is used for the receiver or transmitter and Timer 1 is used for the
other function .The baud rates in Modes 1 and 3 are determined by Timer 2’s
overflow rate according to the following equation .

Modes 1 and 3 Baud Rates =Timer 2 Overflow Rate

16

The timer operation is different for Timer 2 when it is used as a baud rate
generator .Normally ,as a timer , it increments every machine cycle (at 1/12 the
oscillator frequency).As a baud rate generator , however, it increments every
state time ( at 1/2 the oscillator frequency ) .

Timer 0

Timer 0 functions as either a timer or event counter in four modes of operation .


Timer 0 is controlled by the four lower bits of the TMOD register and bits 0, 1,
4 and 5 of the TCON register. Mode 0 ( 13-bit Timer) Mode 0 configures timer 0
as a 13-bit timer which is set up as an 8-bit timer (TH0 register) with a
modulo 32 prescaler implemented with the lower five bits of the TL0 register .

35
The upper three bits of TL0 register are indeterminate and should be ignored.
Prescaler overflow increments the TH0 register. Mode 1 ( 16-bit Timer )Mode 1
is the same as Mode 0, except that the Timer register is being run with
all 16 bits .
Mode 1 configures timer 0 as a 16-bit timer with the TH0 and TL0 registers
connected in cascade. The selected input increments the TL0 register. Mode 2 (8-
bit Timer with Auto-Reload)Mode 2 configures timer 0 as an 8-bit timer ( TL0
register ) that automatically reloads from the TH0 register . TL0 overflow sets
TF0 flag in the TCON register and reloads TL0 with the contents of TH0,
which is preset by software. Mode 3 ( Two 8-bit Timers )Mode 3 configures
timer 0 so that registers TL0 and TH0 operate as separate 8-bit timers. This
mode is provided for applications requiring an additional 8-bit timer or counter.
Timer 1
Timer 1 is identical to timer 0, except for mode 3, which is a hold-count mode.
Mode 3 (Halt) Placing Timer 1 in mode 3 causes it to halt and hold its count.
This can be used to halt Timer 1 when TR1 run control bit is not available
i.e., when Timer 0 is in mode 3.
Baud Rates:
The baud rate in Mode 0 is fixed. The baud rate in Mode 2 depends on
the value of bit SMOD in Special Function Register PCON. If SMOD = 0
(which is its value on reset), the baud rate is 1/64 the oscillator frequency. If
SMOD = 1, the baud rate is 1/32 the oscillator frequency. In the 89S52, the baud
rates in Modes 1 and 3 are determined by the Timer 1 overflow rate. In case
of Timer 2 , these baud rates can be determined by Timer 1 , or by Timer 2 ,
or by both (one for transmit and the other for receive ).

Fig 12: TCON REGISTER: Timer/counter Control Register

36
Fig 13:TMOD REGISTER: Timer/Counter 0 and 1 Modes

37
38
CHAPTER-4

HARDWARE DESCRIPTION

The hardware modules of this project are:


• Power supply board
• DTMF

Power supply description:

As the microcontroller operating voltage is +5V DC. Through this power supply
circuit we have to create a +5V DC which is given to the micro controller. The below
components are used to create the power supply

230V AC Step down Bridge Regulator


supply transformer rectifier
Filter
Description:
230V AC supply is given to the step down transformer of 12A type. It may be a 230V to
9V or 12V step down transformer. The output of the step down transformer is given to
bridge rectifier. The bridge rectifier is formed with 1N4007 diodes. The bridge rectifier
converts the AC Voltage into DC Voltage. But the output DC Voltage contains some AC
component (ripples). So we use a capacitors-2200uF/25V, 0.1uF/D and resistor of 10K as
a filter for removing ripples. That output DC Voltage is given to the positive voltage
regulator LM7805 (i.e., 78 represents the positive series and 5 represent the output
voltage it can provide). So the output of the regulator will be the regulated +5V DC. To
indicate the condition of the circuit we place a LED at the end of the circuit.

39
DTMF

Introduction
Dual-Tone Multi-Frequency (DTMF) signaling is a standard telecommunication system
developed by Bell Laboratories. The DTMF signaling was proposed more than 30 years
ago to replace slower pulse dialing. Many things have changed since this time, but DTMF
has become the most popular addressing and messaging tool in telecommunications, and
it does not look as though it will fade away in foreseeable future. In this system, a matrix
is used to compose a signal, which consists of a lower frequency group containing four
distinguished frequencies which are below 1 KHz and a high frequency group also
containing four distinguished frequencies which are above 1 KHz (figure 2). Each
telephone key contains a pair of simultaneous low and high frequency tones.

40
Low frequency group
High frequency group

1209 Hz

1336 Hz

1744 Hz

1633Hz
697 Hz 1 2 3 A

770 Hz 4 5 6 B

852 Hz 7 8 9 C

941Hz * 0 # D

Figure 2. DTMF matrix

To detect DTMF signals by software in the digital domain, many algorithms,


including Fast Fourier Transform (FFT), Goertzel DFT, Modified Goertzel Algorithm,
Non-uniform Discrete Fourier Transform (NDFT), Sub band NDFT, and Adaptive
Frequency Estimation are proposed. The Modified Goertzel Algorithm is one of the most
accurate and computing-efficient technologies for limited frequency detection. In DTMF
tone detection cases, the Goertzel Algorithm only transforms 8 frequencies instead of
perform on an entire spectrum like FFT. This saves a lot computational resources, which
is critical for lower-power processors. Its non-complexity is easy to adapt into small
MCU and DSP.
We are using M8870 ic. The M-8870 is a full DTMF Receiver that integrates both band
split filter and decoder functions into a single 18-pin DIP or SOIC package.
Manufactured using CMOS process technology, the M-8870 offers low power
consumption (35 mW max) and precise data handling. Its filter section uses switched
capacitor technology for both the high and low group filters and for dial tone rejection. Its
decoder uses digital counting techniques to detect and decode all 16 DTMF tone pairs
into a 4-bit code. External component count is minimized by provision of an on-chip

41
differential input amplifier, clock generator, and latched tri-state interface bus. Minimal
external components required include a low-cost 3.579545 MHz color burst crystal, a
timing resistor, and a timing capacitor. The M-8870-02 provides a “power-down” option
which, when enabled, drops consumption to less than 0.5 mW. The M-8870-02 can also
inhibit the decoding of fourth column digits.

MT8870 (INTEGRATED DTMF RECEIVER)

The MT8870D/MT8870D-1 monolithic DTMF receiver offers small size, low power
consumption and high performance. It is a complete DTMF (Dual Tone Multiple
Frequency) receiver integrating both the band split filter and digital decoder functions.
The filter section uses switched capacitor techniques for high and low group filters; the
decoder uses digital counting techniques to detect and decode all 16 DTMF tone pairs
into a 4-bit code. External component count is minimized by on chip provision of a
differential input amplifier, clock oscillator and latched three-state bus interface.
Features:

• Complete DTMF Receiver


• Low power consumption
• Internal gain setting amplifier
• Adjustable guard time
• Central office quality
• Power-down mode
• Inhibit mode
• Backward compatible with MT8870C/MT8870C-1

42
Block Diagram:

Filter Section:
Separation of the low-group and high group tones is achieved by applying the DTMF
signal to the inputs of two sixth-order switched capacitor band pass filters, the
bandwidths of which correspond to the low and high group frequencies. The filter output
is followed by a single order switched capacitor filter section which smoothes the signals
Prior to limiting. Limiting is performed by high-gain comparators which are provided
with hysteresis to prevent detection of unwanted low-level signals.

Decoder Section:
Digital counting techniques to determine the frequencies of the incoming tones and to
verify that they correspond to standard DTMF frequencies. When the detector recognizes
the presence of two valid tones the “Early Steering” (ESt) output will go to an active
state. Any subsequent loss of signal condition will cause ESt to assume an inactive state.

43
Steering Circuit:
Before registration of a decoded tone pair, the receiver checks for a valid signal duration
(referred to as character recognition condition). This check is performed by an external
RC time constant driven by ESt. The steering circuit works in reverse to validate the
interdigit pause between signals. Thus, as well as rejecting signals too short to be
considered valid, the receiver will tolerate signal interruptions (dropout) too short to be
considered a valid pause. This facility, together with the capability of selecting the
steering time constants externally, allows the designer to tailor performance to meet a
wide variety of system requirements.

Crystal Oscillator:

The internal clock circuit is completed with the addition of an external 3.579545 MHz
crystal
Differential Input Configuration:

The input arrangement of the MT8870D/MT8870D-1 provides a differential-input


operational amplifier as well as a bias source (VRef) which is used to bias the inputs at
mid-rail. Provision is made for connection of a feedback resistor to the op-amp output
(GS) for adjustment of gain. The op-amp connected for unity gain and Vref biasing the
input at 1/2VDD.

Power-down Mode:
Logic high applied to pin 6 (PWDN) will power down the device to minimize the power
consumption in a standby mode. It stops the oscillator and the functions of the filters.

Inhibit Mode:
Inhibit mode is enabled by a logic high input to the pin 5 (INH). It inhibits the detection
of tones.

44
PIN Diagram:

Pin Description:

1. IN+ Non-Inverting Op-Amp (Input).

2. IN- Inverting Op-Amp (Input).

3. GS Gain Select. Gives access to output of front end differential amplifier for
Connection of feedback resistor

4. Vref Reference Voltage (Output). Nominally VDD/2 is used to bias inputs at


Mid-rail

5. INH Inhibit (Input). Logic high inhibits the detection of tones representing
Characters A, B, C and D. This pin input is internally pulled down.

45
6. PWDN Power down (Input). Active high. Powers down the device and inhibits
the oscillator. This pin input is internally pulled down.

7. OSC1 Clock (Input).

8. OSC2 Clock (Output). A 3.579545 MHz crystal connected between pins OSC1
and OSC2 completes the internal oscillator circuit.

9. VSS Ground (Input) 0.V typical.

10. TOE Three State Output Enable (Input). Logic high enables the outputs Q1-Q4.
This pin is pulled up internally.

Q1-Q4 Three State Data (Output). When enabled by TOE, provide the code
corresponding to the last valid tone-pair received (see Table 1). When TOE is logic low,
the data outputs are high impedance.
15. StD Delayed Steering (Output).Presents a logic high when a received tone-pair
has been registered and the output latch updated; returns to logic low when the voltage on
St/GT falls below VTSt.

16. ESt Early Steering (Output). Presents logic high once the digital algorithm has
detected a valid tone pair (signal condition). Any momentary loss of signal condition will
cause ESt to return to a logic low.

17. St/GT Steering Input/Guard time (Output) Bidirectional. A voltage greater than
VTSt detected at St Causes the device to register the detected tone pair and update the
output latch. A voltage less than VTSt free the device to accept a new tone pair. The GT
output acts to reset the external steering time-constant; its state is a function of ESt and
the voltage on St.

18. VDD Positive power supply (Input). +5V typical.

46
NC No Connection.

Applications:
• Receiver system for British telecom spec por 1151
• Paging systems
• Repeater systems/mobile radio
• Credit card systems
• Remote control
• Personal computers
• Telephone answering machine
Headset of Nokia
Wiring for the nokia 2.5mm 4-pole headset socket of Nokia 1100, 1101, 1110, 1600,
2100, 2300, 2500, 2650, 2652, 3210, 3310, 3330, 3410, 3510, 3510i, 3650, 3660, 5210,
6030, 6060, 6120, 6510, 6600, 7280, 7380 7650, 8210, 8310, 8800, 8850, 8890, 8910,
8910i cell phones (except some smart phones
Pin Name Direction Description
Pin Name Direction Description

1 Tip Speaker+
2 Ring1 Microphone+
3 Ring2 Speaker -
4 Sleeve Microphone-

The answer/end button should be connected across the microphone connections.


Microphone impedance should be 1k4. Speaker is 30 Ohm.

47
CHAPTER-5
SCHEMATIC
5.1 Schematic Diagram:

48
5.2 SCHEMATIC EXPLANANTION

In this project we are controlling three industrial devices. To control the devices
we are using 8051microcontroller which is 40-pin controller, Power supply, M8870 IC
for dtmf signal Decoding purpose and Relays.

The microcontroller is 40-pin DIP has divided into four 8-bit ports (P0, P1, P2
and P3), remaining are: reset (pin-9)-is connected to +5v power supply through reset
switch, a capacitor and a resistor. Pin-18(XTAL2) and pin-19(XTAL1) are connected to a
crystal circuit. The +5v is connected to 40th pin and 20th pin is connected to GND of the
controller. Pin-31of microcontroller is connected +5v Vcc. Port3 pins has different
functionality for each, we can use them for special purpose.

49
M8870 is 18-pin DTMF decoder ic takes one input from ears-phones and gives
five outputs. One of the five outputs is high whenever the data received and other are data
pins. The five output pins (11, 12, 13, 14 and 15) are connected to 5,4,3,2 and 1 pins of
the microcontroller respectively. Cristal oscillator (3.58MHZ) is connected to pin-7 and
pin-8 of the ic M8870.Pins 5,6 and 9 are connected to ground, pin 1 and 4 are shorted.
Input is connected through 104pf and 100KOhms to pin-2. The pin-3 is shorted to pin-2
through 100k resistor. Pin-17 is connected to +5v power supply. Pin-16 and 18 pins are
shorted to pin-17 through 300k resistor, 104pf capacitor respectively.

We are using three relays to switch on our house automation devices. The relays
are connected to port2.5, port2.6 and port2.7 pins of microcontroller. These relays are
operates on 12v poser supply, the power is taking form regulator 7812 output. The
regulator 7805 output is giving to microcontroller 40th pin. In place of the relay circuits
we are using readymade relay switches.

CODING

CONCLUSION

In this project “INDUSTRIAL DEVICE OPERATING SYSTEM USING


MOBILE” a system is designed through which we can control industrial devices by
using the mobile phones. Any devices lights, fans can be control by using mobile
phones by which power can be reduced and operating these device is easy than
operating the manually. Micro controller, relays, DTMF receiver helps us to
implement the simple working model.

50
APPLICATIONS

Home automatic can also implement by this method.


Hotel, restaurant also comes under this method.

BIBLIOGRAPHY

The 8051 Micro controller and Embedded Systems


Muhammad Ali Mazidi
Janice Gillispie Mazidi

The 8051 Micro controller Architecture, Programming & Applications

Kenneth J. Ayala

Fundamentals of Micro processors and Micro computers


B. Ram

Micro processor Architecture, Programming & Applications


Ramesh S. Gaonkar

Electronic Components
D.V.Prasad

51
References on the Web:
www.national.com
www.atmel.com
www.microsoftsearch.com
www.geocities.com
www.google.com

52

Você também pode gostar