device control using gsm mobile phone project electronics
DESCRIPTION
•The system operated by mobile phone connected to DTMF decoder IC and microcontroller ATtiny2313 which controls the operation of relays. The whole system built on single PCB board with on board 12V Power Supply further capable to provide 5V to microcontroller.•Used components are DTMF IC MT8870, ATtiny2313, ULN2003 IC, transformer etc.TRANSCRIPT
GLOBUS ENGINEERING COLLEGE, BHOPAL
Department of Electronics & Communication. Year -2011
Table of Content
1. Project Introduction ---------------------------------------------1
2. Literature Review ------------------------------------------ --2
3. Project Plan
3.1 Problem Statement ------------------------------------------ --4
3.2 Operating Environment ------------------------------------------ --4
3.3 Intended Users & Uses ------------------------------------------ --5
3.4 Assumptions ------------------------------------------ --5
4. Proposed Approach
4.1 Functional Requirements ------------------------------------------ --6
4.2 Constraint Considerations ------------------------------------------ --6
4.3 Technology Considerations ------------------------------------------ --7
4.4 Technical Approach ------------------------------------------ --7
5. Testing Requirements
5.1 GSM Receiver ------------------------------------------ --8
5.2 GSM to Microcontroller ------------------------------------------ --8
5.3 Decoding of Remote User’s commands ------------------------------------------- -9
5.4 I/O Command’s Voltage ------------------------------------------ --9
5.5 I/O Command Storage ------------------------------------------ --9
5.6 Circuit’s Power Surge Protection ------------------------------------------ --10
5.7 End Product Functionalities ------------------------------------------ --10
6. System Block diagram ------------------------------------------ --11
7. Circuit Diagram
7.1 Circuit Diagram ------------------------------------------ --12
7.2 Power Supply Section ------------------------------------------ --13
7.3 Relays ------------------------------------------ --14
8. PCB Layout ------------------------------------------ --15
9. Microcontroller Programming ------------------------------------------ --16
10. Component List ------------------------------------------ --17
GLOBUS ENGINEERING COLLEGE, BHOPAL
Department of Electronics & Communication. Year -2011
11. Component Description
11.1 Resistors -------------------------------------------18
11.2 Capacitors -------------------------------------------19
11.3 LED -------------------------------------------19
11.4 Transistors -------------------------------------------20
11.5 Transformer -------------------------------------------21
11.6 Diodes -------------------------------------------22
11.7 Relay -------------------------------------------22
11.8 Microcontroller ATtiny2313
11.8.1 Features -------------------------------------------23
11.8.2 Pin Out -------------------------------------------24
11.8.3 Block Diagram -------------------------------------------25
11.9 DTMF Decoder MT8870
11.9.1 Description & Features -------------------------------------------26
11.9.2 Pin Out Description -------------------------------------------27
11.10 ULN 2003 IC -------------------------------------------28
11.11 Voltage Regulator IC MC7812 & LM7805 -------------------------------------------29
11.12 Diode IN4007 -------------------------------------------30
12. PCB Manufacturing Process -------------------------------------------31
13. Design Specification
13.1 PCB Designing -------------------------------------------33
13.2 LAYOUT Design -------------------------------------------34
13.3 Etching Process -------------------------------------------35
13.4 Component Assembly -------------------------------------------36
13.5 Soldering -------------------------------------------38
14. Working -------------------------------------------39
15. Application -------------------------------------------40
16. Chronology --------------------------------------------41
17. Bibliography --------------------------------------------42
GLOBUS ENGINEERING COLLEGE, BHOPAL
Page 1
Department of Electronics & Communication. Year -2011
1. PROJECT INTRODUCTION
Our project Device Control Using GSM Mobile Phone is a setup or system
in which we can easily ON/OFF the appliances using in home. The
appliances are connected through a circuit which is connected to a GSM
mobile phone via a DTMF Tone Decoder IC.
It often happens that we forget to switch off some electric devices
while leaving home for a journey. This will result in wastage of energy and
even the device may get damaged due to overheating. Even if we remember
that we have not switched off some devices, it may be difficult for us to come
back and switch them off. Also, if we are away from home we may have to
turn on the lights at night. These are normally not possible in present
condition.
Our project offers a novel solution for this problem by using a
GSM mobile phone, a common electronic gadget. This device is build around
PSoC, a powerful system-on-chip. This uses DTMF (Dual Tone Multi
Frequency) signals from mobile phone keypad to attain its functionality. For
decoding the DTMF tones, we are using MT8870, CMOS Integrated DTMF
Receiver.
FEATURES
The main features of our device control system are:-
Easy control of devices through mobile phone
Can control (on/off) a maximum of 8 devices (by using decoder we can
increase this number to 256)
GLOBUS ENGINEERING COLLEGE, BHOPAL
Page 2
Department of Electronics & Communication. Year -2011
2. Literature Review
Smart home is one of the recent fields in the context of computer
science. The paper named as “Remote mobile control of home appliances”
by F. Meija, M. Nikolova and P. Voorwinden depicts on the home
controlling using WAP protocol. The architecture mentioned by them is
much complex but it gives an initial idea about the remote home appliance
controlling.
Smart home studies sometimes affected by the concern about the
possible harms to the humans’ health. A great research was done by Toril
Laberg, Directorate for Health and Social Affairs of the Delta Centre,
Norway. He later publish in his paper named “Smart Home Technology:
Technology supporting independent living - does it have an impact on
health?” that there is no harm on humans’ health by the technical setup
required to support smart home technologies.
Scott Davidoff, Min Kyung Lee, Charles Yiu, John Zimmerman,
and Anind K. Dey in their journal named “Principles of Smart Home
Control” describe the control that families want and suggest seven design
principles that will help end-user programming systems deliver that
control.
Tatsuya Yamazaki in his journal “The Ubiquitous Home”
suggests that automation should not become a goal of the smart home
technologies. In this paper he represents a real-life test bed, called the
Ubiquitous Home. In the Ubiquitous Home, a robot plays a role of
interface for the residents. Three kinds of context-aware services have
been implemented and a real-life living experiment was conducted. The
experimental results were also reported.
GLOBUS ENGINEERING COLLEGE, BHOPAL
Page 3
Department of Electronics & Communication. Year -2011
Recently some projects are organized for building the architecture of
controlling home appliance using voice commands. VoiceXML is used for
that purpose.
A smart house system named NETVOX [18] based on the ZigBee
standard is introduced recently. The system can use for home automation
and industrial controls. It provides security, temperature, humidity,
lighting, sensor, and multimedia control for comfort, convenience, and
safety wirelessly. The system may be accessed and controlled over the
telephone or over the Internet.
GLOBUS ENGINEERING COLLEGE, BHOPAL
Page 4
Department of Electronics & Communication. Year -2011
3. Project Plan
This section will state the basic problem, and the basic characteristics of
the project, such as operating environment, users, etc.
3.1 Problem Statement
The objective of this project is to develop a device that allows for a user
to remotely control multiple home appliances using a cellular phone. This
system will be a powerful and flexible tool that will offer this service at any
time, and from anywhere with the constraints of the technologies being
applied. Possible target appliances include (but are not limited to) climate
control systems, security systems, and lights; anything with an electrical
interface.
The proposed approach for designing this system is to implement a
microcontroller-based control module that receives its instructions and
commands from a cellular phone over the GSM network. The microcontroller
then will carry out the issued commands.
3.2 Operating Environment
The control system will include two separate units: the cellular phone, and
the receiving control unit. There will therefore be two operating
environments. The cellular phone will operate indoors and outdoors whereas
the receiving control unit will operate indoors within the temperature and
humidity limits for proper operation of the hardware.
GLOBUS ENGINEERING COLLEGE, BHOPAL
Page 5
Department of Electronics & Communication. Year -2011
3.3 Intended Users and Uses
This product is aimed toward average consumers who wish to control
household appliances remotely from their cell phones provided that the
appliances are electrically controllable. Example of feasible appliances and
applications under consideration include; enable/disable security systems,
fans, lights, kitchen appliances, and a heating/ventilation/air conditioning
system.
3.4 Assumptions
The following is a list of assumptions for the project:-
1. The user and receiver control unit will establish communication via
GSM.
2. The cell phone and service provider chosen will support calling service.
3. The user is familiar with the call process & IVRS on cell phone.
4. All service charges from service provider apply.
5. The controlled appliances will have to have an electrical interface in
order to be controlled by microcontroller.
GLOBUS ENGINEERING COLLEGE, BHOPAL
Page 6
Department of Electronics & Communication. Year -2011
4. Proposed approach
This section outlines the criteria that will be considered in the
development of the control system.
4.1 Functional Requirements
The following is a list of functional requirements of the control
unit/module.
The Cellular Unit will have the ability to connect to the cellular
network automatically.
The Cellular Unit will be able to receive call and will be able to send
DTMF tone to the DTMF Decoder IC.
The DTMF Decoder IC will decode the (pressed no. by user’s cell
phone & received on Cellular Unit) DTMF tone into the 4bit BCD
output signal.
The microcontroller connected to the DTMF decoder IC will receive
the BCD output.
The logic programmed in microcontroller drive the signal to the O/P
ports of microcontroller as per the BCD O/P.
Microcontroller will issue its command to the electrical appliances
through a simple control circuit.
4.2 Constraint Considerations
The following is a list of constraint considerations:-
The controlled appliances will need an electrical control interface.
This simple system is only capable of controlling electrical devices.
The control module will need to be shielded against electrostatic
discharges. This will increase reliability of the system.
GLOBUS ENGINEERING COLLEGE, BHOPAL
Page 7
Department of Electronics & Communication. Year -2011
4.3 Technology Considerations
The considerations for this system will include a choice of networks,
communication protocols, and interfaces.
1) Cellular Networks: The widely available networks are based on
GSM. This network provides a wide area of coverage and can be
utilized more cost-effectively for this project.
2) Communication protocols: The available communication protocols
are DTMF, GPRS and SMS. The DTMF is the most efficient
because this project requires a cellular communication and only by
pressing keys we can control appliances.
3) I/O interfaces between microcontroller and devices: Serial or
parallel I/O will be considered as options for connection between the
GSM receiver and the microcontroller. Using the microcontroller, a
control circuit will be implemented to control the electrical
appliances.
4.4 Technical Approach
Assuming that the control unit is powered and operating properly, the
process of controlling a home device will proceed through the following
steps:-
The remote user makes a call to the GSM cellular unit and
commands to the receiver.
GSM receiver receives call automatically from user cell phone by
auto answering mode.
After receiving call by GSM cellular unit user press the keys on
his cell phone.
GSM receiver receives the appropriate DTMF tone.
The DTMF decoder IC connected to GSM receiver detects the
pressed DTMF tone & converts it to the 4 bit BCD O/P.
DTMF decoder IC sends the BCD O/P to the microcontroller.
Microcontroller issues commands to the appliances via relays
connected to its O/P ports.
GLOBUS ENGINEERING COLLEGE, BHOPAL
Page 8
Department of Electronics & Communication. Year -2011
5. Testing Requirements The following testing requirements will be indicators that the system can
successfully be implemented.
1) The GSM receiver will be tested for successful communication with
network. This will test include automation and consistency of the
connection and will be conducted by team members in the following way:
The cellular phone will dial the GSM receivers’ number.
Once the connection is established a stream of data will be
send to the GSM receiver.
The GSM receiver will be given data to be transmitted to the
cellular phone.
Success/Failure criteria: The data received will be observed on both ends to
verify its consistency. The test will be considered successful if the integrity of
the sent and received data is maintained upstream. It will be considered a
failure otherwise.
2) The GSM to microcontroller driver will be tested by verifying the
integrity of command strings sent from the remote user. The following
procedure will be performed by team members for this phase:
The remote user will send a command to the control module.
The contents of the data stream will be observed at the GSM
communication port.
These contents will be compared with those received and
stored at the microcontroller’s corresponding communication
port.
Success/Failure criteria: The test will be considered successful if the
integrity of the data sent upstream is maintained. It will be
considered a failure otherwise.
GLOBUS ENGINEERING COLLEGE, BHOPAL
Page 9
Department of Electronics & Communication. Year -2011
3) Proper decoding of the remote user’s commands and issuance of the
equivalent commands to the controlled device will be performed by team
members using the following procedure:
A simulated instruction will be fed to the microcontroller
communication port.
The output command at the I/O interface with the
corresponding controlled device will be observed.
Success/Failure criteria: The test will be considered a success if the resulting
command issued from the microcontroller is sent to the right I/O address for
the desired controlled device and if that command is consistent with the
command which is expected. The test will be considered a failure otherwise.
4) The I/O command’s voltage will be tested to meet the levels required to
actuate the individual devices. The following procedure will be
performed by team members:
A simulated command from the microcontroller will be
written to its I/O port.
The output voltage at the desired device’s control interface
will be measured to verify its strength.
Success/Failure criteria: The test will be considered successful if the
simulated command from the microcontroller causes the proper voltage to be
observed at the desired device’s control interface.
5) The ability of I/O to detect an input voltage and store a value in the
microcontroller’s memory will be tested by team members:
Test voltages to the input of the I/O will be applied.
The contents of the memory shall be checked for validity.
Success/Failure criteria: The testing will be considered successful if the
values of the memory are as expected. The test will be considered a failure
otherwise.
GLOBUS ENGINEERING COLLEGE, BHOPAL
Page 10
Department of Electronics & Communication. Year -2011
6) The circuit’s power surge protection will be tested for acceptable
performance by EE team members using the following procedure:
The circuit’s power supply will be removed from the circuit
and connected to a dummy load.
A simulated voltage spike will be inputted by using a step
signal from a signal generator.
The output voltage and current will be measured at the load.
Success/Failure criteria: The success of the test will be determined by
verifying that the output signal to the dummy load falls with the tolerance
indicated by the microcontroller and the GSM chip’s manufacturers. The test
will be considered a failure if the measured characteristics of the power
supply’s output do not meet the manufacturers’ requirements.
7) The end-product functionalities will be tested by team members and
non-team members in the following way:
Team members will ensure that all subsystems function
properly together from remote user command to execution and
back to completion status notification.
Non-team members from the general public will be allowed to
access and use the control unit for a frame of time.
Afterward, the non-team member testing subjects will fill out
a survey on the end-product’s functionalities, ease of use,
difficulties, etc.
Success/Failure criteria: The testing will be considered a success if the
testing subjects find the end-product user friendly, and easy to figure out.
GLOBUS ENGINEERING COLLEGE, BHOPAL
Page 11
Department of Electronics & Communication. Year -2011
6. System Block Diagram
The block diagram of the system is given below:
ATtiny2313
Microcontroller
Receiving
Cell Phone
Unit
DTMF
Decoder
MT8870
RELAY1
RELAY2
RELAY3
RELAY4
RELAY5
RELAY6
RELAY7
DEVICE1
DEVICE 2
DEVICE3
DEVICE4
DEVICE5
DEVICE6
DEVICE7
GLOBUS ENGINEERING COLLEGE, BHOPAL
Page 12
Department of Electronics & Communication. Year -2011
7. CIRCUIT DIAGRAM
GLOBUS ENGINEERING COLLEGE, BHOPAL
Page 13
Department of Electronics & Communication. Year -2011
POWER SUPPLY SECTION
GLOBUS ENGINEERING COLLEGE, BHOPAL
Page 14
Department of Electronics & Communication. Year -2011
RELAYS
GLOBUS ENGINEERING COLLEGE, BHOPAL
Page 15
Department of Electronics & Communication. Year -2011
8. PCB LAYOUT
GLOBUS ENGINEERING COLLEGE, BHOPAL
Page 16
Department of Electronics & Communication. Year -2011
9. Microcontroller Programming
ATtiny2313 is programmed by the BASECOM-AVR IDE [1.11.9.5]. We have
used this Integrated Development Environment Software for program the 4 bit
input coming into microcontroller to drive the appropriate relays.
LOGIC
The basic logic used that configure the IC MT8870 through making the port D as
input. The 4 bit BCD input taken from PinD0, PinD1, PinD3, PinD4. The O/P port
is PORTB to drive the relays are port pins PORTB 1 – PORTB 7.
As depending on input signals we used the IF ELSE conditions to drive the relays
1-7, when signal input is 1. Whereas there is no signal input means no BCD input
to microcontroller.
GLOBUS ENGINEERING COLLEGE, BHOPAL
Page 17
Department of Electronics & Communication. Year -2011
10. COMPONENT LIST
Component Name Quantity Price(Amount)
GSM Mobile Phone 1 `1000 Transformer [0-15V, 750mA] 1 `190 Microcontroller IC ATtiny2313 1 `150 DTMF Decoder IC 1 `38 Driver IC ULN2003 1 `35 Regulating IC MC7812 1 `20 Regulating IC LM7805 1 `18 Relays [SPDT, 12V] 7 `126 Diode IN4007 4 `8 Capacitor [1000µF, 25V] 1 `25 Capacitor [100µF, 25V] 1 `20 Capacitor [10µF, 25V] 1 `15 Capacitor [0.1µF, 50V] 6 `30 Capacitor [22pF] 2 `4 Crystal Oscillator 11.0592 MHz 1 `15 Crystal Oscillator 3.57MHz 1 `15 Red LED 8 `16 Green LED 1 `2 Resistance 1kΩ 9 `4.50 Resistance 560Ω 1 `0.50 Resistance 330kΩ 1 `0.50 Resistance 100kΩ 2 `1 Wire main cord 1 `25 Connecting Wires bundle 1 `30 Solder Wire 50 gram `75 CCB -18 [6x6] 1 `40 FeCl3 50 gram `35 Soldering Iron 1 `100 Hand Drill 1 `120 0.8 mm bit 5 `30 1mm bit 1 `35 Total `2223.50
GLOBUS ENGINEERING COLLEGE, BHOPAL
Page 18
Department of Electronics & Communication. Year -2011
11. COMPONENT DESCRIPTION
11.1 RESISTORS: -
A Resistor is a heat-dissipating element and in the electronic circuits it
is mostly used for either controlling the current in the circuit or developing a
voltage drop across it, which could be utilized for many applications. There
are various types of resistors, which can be classified according to a number
of factors depending upon:
(I) Material used for fabrication
(II) Wattage and physical size
(III) Intended application
(IV) Ambient temperature rating
(V) Cost
Basically the resistor can be split in to the following four parts from the
construction viewpoint.
(1) Base
(2) Resistance element
(3) Terminals
(4) Protective means.
Resistors may be classified as
(1) Fixed
(2) Semi variable
(3) Variable resistor.
(4) In our project carbon resistors are being used.
GLOBUS ENGINEERING COLLEGE, BHOPAL
Page 19
Department of Electronics & Communication. Year -2011
11.2 CAPACITORS
The fundamental relation for the capacitance between two flat plates
separated by a dielectric material is given by:-
C=0.08854KA/D
Where: -
C= capacitance in pf.
K= dielectric constant
A=Area per plate in square cm.
D=Distance between two plates in cm
Design of capacitor depends on the proper dielectric material with
particular type of application. The dielectric material used for capacitors may
be grouped in various classes like Mica, Glass, air, ceramic, paper,
Aluminum, electrolyte etc. The value of capacitance never remains constant.
It changes with temperature, frequency and aging.
11.3 LED (Light Emitting Diodes)
As its name implies it is a diode, which emits light when forward biased. Charge
carrier recombination takes place when electrons from the N-side cross the
junction and recombine with the holes on the P side. Electrons are in the higher
conduction band on the N side whereas holes are in the lower valence band on the
P side. During recombination, some of the energy is given up in the form of heat
and light. In the case of semiconductor materials like Gallium arsenide (GaAs),
Gallium phoshide (Gap) and Gallium arsenide phoshide (GaAsP) a greater
percentage of energy is released during recombination and is given out in the form
of light. LED emits no light when junction is reverse biased.
GLOBUS ENGINEERING COLLEGE, BHOPAL
Page 20
Department of Electronics & Communication. Year -2011
11.4 TRANSISTOR: -
A transistor consists of two junctions formed by sandwiching either p-
type or n-type semiconductor between a pair of opposite types. Accordingly,
there are two types of transistors namely: -
(1) n-p-n transistor (2) p-n-p transistor
(NPN) (PNP)
An n-p-n transistor is composed of two n-type semiconductors separated by a
thin section of p type. However a p-n-p transistor is formed by two p sections
separated by a thin section of n-type. In each type of transistor the following
points may be noted.
1. There are two p-n junctions; therefore a transistor may be regarded as
combination of two diodes connected back to back.
2. There are three terminals taken from each type of semiconductor.
3. The middle section is a very thin layer, which is the most important
factor in the functioning of a transistor.
Transistor can be used as an Amplifier also.
A transistor raises the strength of a weak signal and thus acts as an
amplifier. The weak signal is applied between emitter base junction and
output is taken across the load RC connected in the collector circuit (in
common emitter configuration).
GLOBUS ENGINEERING COLLEGE, BHOPAL
Page 21
Department of Electronics & Communication. Year -2011
11.5 TRANSFORMER
Definition: - The transformer is a static electro-magnetic device that transforms
one alternating voltage (current) into another voltage (current). However, power
remains the same during the transformation. Transformers play a major role in the
transmission and distribution of ac power.
Principle: - Transformer works on the principle of mutual induction. A
transformer consists of laminated magnetic core forming the magnetic frame.
Primary and secondary coils are wound upon the two cores of the magnetic frame,
linked by the common magnetic flux. When an alternating voltage is applied across
the primary coil, a current flows in the primary coil producing magnetic flux in the
transformer core. This flux induces voltage in secondary coil.
Transformers are classified as: -
(a) Based on position of the windings with respect to core i.e.
(1) Core type transformer
(2) Shell type transformer
(b) Transformation ratio:
(1) Step up transformer
(2) Step down transformer
(a) Core & shell types: Transformer is simplest electrical machine, which
consists of windings on the laminated magnetic core. There are two
possibilities of putting up the windings on the core.
(1) Winding encircle the core in the case of core type transformer
(2) Cores encircle the windings on shell type transformer.
(b) Step up and Step down: In this Voltage transformation takes place according
to whether the Primary is high voltage coil or a low voltage coil.
(1) Lower to higher-> Step up
(2) Higher to lower-> Step down
GLOBUS ENGINEERING COLLEGE, BHOPAL
Page 22
Department of Electronics & Communication. Year -2011
11.6 DIODES
- +
It is a two terminal device consisting of a P-N junction formed either of
Ge or Si crystal. The P and N type regions are referred to as anode and
cathode respectively. Commercially available diodes usually have some
means to indicate which lead is P and which lead is N.
11.7 RELAY
In this circuit a 12V magnetic relay is used. In magnetic relay, insulated
copper wire coil is used to magnetize and attract the plunger .The plunger is
normally connected to N/C terminal. A spring is connected to attract the
plunger upper side. When output is received by relay, the plunger is attracted
and the bulb glows.
Features • Utilizes the AVR
® RISC Architecture
• AVR - High-performance and Low-power RISC Architecture
- 120 Powerful Instructions - Most Single Clock Cycle Execution
- 32 x 8 General Purpose Working Registers
- Fully Static Operation
- Up to 20 MIPS Throughput at 20 MHz
• Data and Non-volatile Program and Data Memories
- 2K Bytes of In-System Self Programmable Flash
Endurance 10,000 Write/Erase Cycles
- 128 Bytes In-System Programmable EEPROM
Endurance: 100,000 Write/Erase Cycles
- 128 Bytes Internal SRAM
- Programming Lock for Flash Program and EEPROM Data Security
• Peripheral Features
- One 8-bit Timer/Counter with Separate Prescaler and Compare Mode
- One 16-bit Timer/Counter with Separate Prescaler, Compare and Capture Modes
- Four PWM Channels
- On-chip Analog Comparator
- Programmable Watchdog Timer with On-chip Oscillator
- USI - Universal Serial Interface
- Full Duplex USART
• Special Microcontroller Features
- debugWIRE On-chip Debugging
- In-System Programmable via SPI Port
- External and Internal Interrupt Sources
- Low-power Idle, Power-down, and Standby Modes
- Enhanced Power-on Reset Circuit
- Programmable Brown-out Detection Circuit
- Internal Calibrated Oscillator
• I/O and Packages
- 18 Programmable I/O Lines
- 20-pin PDIP, 20-pin SOIC, 20-pad QFN/MLF
• Operating Voltages
- 1.8 - 5.5V (ATtiny2313V)
- 2.7 - 5.5V (ATtiny2313)
• Speed Grades
- ATtiny2313V: 0 - 4 MHz @ 1.8 - 5.5V, 0 - 10 MHz @ 2.7 - 5.5V
- ATtiny2313: 0 - 10 MHz @ 2.7 - 5.5V, 0 - 20 MHz @ 4.5 - 5.5V
• Typical Power Consumption
- Active Mode
1 MHz, 1.8V: 230 µA
32 kHz, 1.8V: 20 µA (including oscillator)
- Power-down Mode
< 0.1 µA at 1.8V
8-bit
Microcontroller
with 2K Bytes
In-System
Programmable
Flash
ATtiny2313/V
Preliminary
Rev. 2543I-AVR-04/06
Pin Configurations Figure 1. Pinout ATtiny2313
PDIP/SOIC
(RESET/dW) PA2 1 20 VCC
(RXD) PD0 2 19 PB7 (UCSK/SCL/PCINT7)
(TXD) PD1 3 18 PB6 (MISO/DO/PCINT6)
(XTAL2) PA1 4 17 PB5 (MOSI/DI/SDA/PCINT5)
(XTAL1) PA0 5 16 PB4 (OC1B/PCINT4)
(CKOUT/XCK/INT0) PD2 6 15 PB3 (OC1A/PCINT3)
(INT1) PD3 7 14 PB2 (OC0A/PCINT2)
(T0) PD4 8 13 PB1 (AIN1/PCINT1)
(OC0B/T1) PD5 9 12 PB0 (AIN0/PCINT0)
GND 10 11 PD6 (ICP)
MLF
(TXD) PD1 1 15 PB5 (MOSI/DI/SDA/PCINT5)
XTAL2) PA1 2 14 PB4 (OC1B/PCINT4)
(XTAL1) PA0 3 13 PB3 (OC1A/PCINT3)
(CKOUT/XCK/INT0) PD2 4 12 PB2 (OC0A/PCINT2)
(INT1) PD3 5 11 PB1 (AIN1/PCINT1)
NOTE: Bottom pad should be soldered to ground.
Overview The ATtiny2313 is a low-power CMOS 8-bit microcontroller based on the AVR
enhanced RISC architecture. By executing powerful instructions in a single clock cycle, the
ATtiny2313 achieves throughputs approaching 1 MIPS per MHz allowing the system
designer to optimize power consumption versus processing speed.
2
ATtiny2313/V 2543I-AVR-04/06
ATtiny2313/V
Block Diagram Figure 2. Block Diagram
XTAL1 XTAL2
PA0 - PA2
PORTA DRIVERS
VCC
GND
DATA REGISTER
PORTA
PROGRAM
COUNTER
PROGRAM
FLASH
DATA DIR.
REG. PORTA
8-BIT DATA BUS
STACK
POINTER
SRAM
INTERNAL
CALIBRATED
OSCILLATOR
INTERNAL
OSCILLATOR
WATCHDOG
TIMER
MCU CONTROL
REGISTER
MCU STATUS
REGISTER
OSCILLATOR
TIMING AND
CONTROL
ON-CHIP
DEBUGGER
RESET
INSTRUCTION
REGISTER
INSTRUCTION
DECODER
CONTROL
LINES
GENERAL
PURPOSE
REGISTER
ALU
STATUS
REGISTER
TIMER/
COUNTERS
INTERRUPT UNIT
EEPROM
USI
PROGRAMMING
LOGIC
SPI
USART
DATA REGISTER DATA DIR. DATA REGISTER DATA DIR.
PORTB REG. PORTB PORTD REG. PORTD
PORTB DRIVERS PORTD DRIVERS
PB0 - PB7 PD0 - PD6
3
2543I-AVR-04/06
ISO2-CMOS
Features
MT8870D/MT8870D-1 Integrated DTMF Receiver
ISSUE 3 May1995
• 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
Applications
• Receiver system for British Telecom (BT) or
CEPT Spec (MT8870D-1)
• Paging systems
• Repeater systems/mobile radio
• Credit card systems
• Remote control
• Personal computers
• Telephone answering machine
Ordering Information
MT8870DE/DE-1 18 Pin Plastic DIP
MT8870DC/DC-1 18 Pin Ceramic DIP
MT8870DS/DS-1 18 Pin SOIC
MT8870DN/DN-1 20 Pin SSOP
MT8870DT/DT-1 20 Pin TSSOP
-40 °C to +85 °C
Description
The MT8870D/MT8870D-1 is a complete DTMF
receiver integrating both the bandsplit 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.
VDD VSS VRef INH
PWDN Chip
Power
IN +
IN -
GS
Bias Circuit
Chip Bias
Dial Tone Filter
VRef Buffer
High Group Filter
Zero Crossing Detectors
Low Group Filter
Q1
Digital Code Detection Converter Algorithm and Latch Q2
Q3
Q4
to all Chip Clocks
St Steering
GT Logic
OSC1 OSC2 St/GT ESt STD TOE
Figure 1 - Functional Block Diagram
4-11
MT8870D/MT8870D-1 ISO2-CMOS
IN+ 1 18 VDD IN+ 1 20 VDD IN- 2 17 St/GT IN- 2 19 St/GT GS 3 16 ESt GS 3 18 ESt
VRef 4 15 StD VRef 4 17 StD
INH 5 14 Q4 INH 5 16 NC PWDN 6 13 Q3 PWDN 6 15 Q4 OSC1 7 12 Q2 NC 7 14 Q3 OSC2 8 11 Q1 OSC1 8 13 Q2
VSS 9 10 TOE OSC2 9 12 Q1 VSS 10 11 TOE
18 PIN CERDIP/PLASTIC DIP/SOIC 20 PIN SSOP/TSSOP
Figure 2 - Pin Connections
Pin Description
Pin #
18 20 Name Description
1 1 IN+ Non-Inverting Op-Amp (Input).
2 2 IN- Inverting Op-Amp (Input).
3 3 GS Gain Select. Gives access to output of front end differential amplifier for connection of feedback resistor.
4 4 VRef Reference Voltage (Output). Nominally VDD/2 is used to bias inputs at mid-rail (see Fig. 6 and Fig. 10).
5 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.
6 6 PWDN Power Down (Input). Active high. Powers down the device and inhibits the oscillator. This pin input is internally pulled down.
7 8 OSC1 Clock (Input).
8 9 OSC2 Clock (Output). A 3.579545 MHz crystal connected between pins OSC1 and OSC2
completes the internal oscillator circuit.
9 10 VSS Ground (Input). 0V typical.
10 11 TOE Three State Output Enable (Input). Logic high enables the outputs Q1-Q4. This pin is pulled up internally.
11- 12- Q1-Q4 Three State Data (Output). When enabled by TOE, provide the code corresponding to the 14 15 last valid tone-pair received (see Table 1). When TOE is logic low, the data outputs are high
impedance.
15 17 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 18 ESt Early Steering (Output). Presents a 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 19 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 frees 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 20 VDD Positive power supply (Input). +5V typical.
7, NC No Connection. 16
4-12
2003 2024
THRU
HIGH-VOLTAGE, HIGH-CURRENT DARLINGTON ARRAYS
Ideally suited for interfacing between low-level logic circuitry and multiple peripheral power loads, the Series ULN20xxA/L high-voltage,
1 16
2 15
3 14
4 13
5 12
6 11
7 10
8 9
Dwg. No. A-9594
Note that the ULN20xxA series (dual in-line
package) and ULN20xxL series (small-outline
IC package) are electrically identical and share a
common terminal number assignment.
ABSOLUTE MAXIMUM RATINGS
Output Voltage, VCE
(ULN200xA and ULN200xL) ... ........ 50 V
(ULN202xA and ULN202xL) ... ........ 95 V
Input Voltage, VIN ... ................................. 30 V
Continuous Output Current,
IC ... ...................................................... 500 mA
Continuous Input Current, IIN ... ............ 25 mA
Power Dissipation, PD
(one Darlington pair) ... ...................... 1.0 W
(total package) ... .................... .. See Graph
Operating Temperature Range,
TA ... .......................................... -20°C to +85°C
Storage Temperature Range,
TS ... .................................... -55°C to +150°C
high-current Darlington arrays feature continuous load current ratings to 500 mA for each of the seven drivers. At an appropriate duty cycle depending on ambient temperature and number of drivers turned ON simultaneously, typical power loads totaling over 230 W (350 mA x 7, 95 V) can be controlled. Typical loads include relays, solenoids, stepping motors, magnetic print hammers, multiplexed LED and incandescent displays, and heaters. All devices feature open-collector outputs with integral clamp diodes.
The ULN2003A/L and ULN2023A/L have series input resistors selected for operation directly with 5 V TTL or CMOS. These devices will handle numerous interface needs — particularly those beyond the capabilities of standard logic buffers.
The ULN2004A/L and ULN2024A/L have series input resistors for operation directly from 6 to 15 V CMOS or PMOS logic outputs.
The ULN2003A/L and ULN2004A/L are the standard Darlington arrays. The outputs are capable of sinking 500 mA and will withstand at least 50 V in the OFF state. Outputs may be paralleled for higher load current capability. The ULN2023A/L and ULN2024A/L will withstand 95 V in the OFF state.
These Darlington arrays are furnished in 16-pin dual in-line plastic packages (suffix “A”) and 16-lead surface-mountable SOICs (suffix “L”). All devices are pinned with outputs opposite inputs to facilitate ease of circuit board layout. All devices are rated for operation over the temperature range of -20°C to +85°C. Most (see matrix, next page) are also available for operation to -40°C; to order, change the prefix from “ULN” to “ULQ”.
FEATURES
TTL, DTL, PMOS, or CMOS-Compatible Inputs
Output Current to 500 mA
Output Voltage to 95 V
Transient-Protected Outputs
Dual In-Line Plastic Package or Small-Outline IC Package
x = digit to identify specific device. Characteristic shown applies to family of
devices with remaining digits as shown. See matrix on next page.
www.fairchildsemi.com
MC78XX/LM78XX/MC78XXA
3-Terminal 1A Positive Voltage Regulator
Features
• Output Current up to 1A
• Output Voltages of 5, 6, 8, 9, 10, 12, 15, 18, 24V •
Thermal Overload Protection
• Short Circuit Protection
• Output Transistor Safe Operating Area Protection
Internal Block Digram
Description
The MC78XX/LM78XX/MC78XXA series of three
terminal positive regulators are available in the
TO-220/D-PAK package and with several fixed output
voltages, making them useful in a wide range of
applications. Each type employs internal current limiting,
thermal shut down and safe operating area protection,
making it essentially indestructible. If adequate heat sinking
is provided, they can deliver over 1A output current.
Although designed primarily as fixed voltage regulators,
these devices can be used with external components to
obtain adjustable voltages and currents.
TO-220
1
D-PAK
1
1. Input 2. GND 3. Output
Rev. 1.0.1
©2001 Fairchild Semiconductor Corporation
1N4001 - 1N4007 Features
• Low forward voltage drop.
• High surge current capability.
DO-41 COLOR BAND DENOTES CATHODE
General Purpose Rectifiers (Glass Passivated)
Absolute Maximum Ratings* T
A = 25°C unless otherwise noted
Symbol Parameter VRRM Peak Repetitive Reverse Voltage
IF(AV) Average Rectified Forward Current, .375 " lead length @ TA = 75°C
IFSM Non-repetitive Peak Forward Surge Current
8.3 ms Single Half-Sine-Wave
Value
4001 4002 4003 4004
50 100 200 400
1.0
30
Units
4005 4006 4007
600 800 1000 V
A
A
Tstg Storage Temperature Range -55 to +175 °C
TJ Operating Junction Temperature -55 to +175 °C
*These ratings are limiting values above which the serviceability of any semiconductor device may be impaired.
Thermal Characteristics
Symbol Parameter Value Units
PD Power Dissipation 3.0 W
RθJA Thermal Resistance, Junction to Ambient 50 °C/W
Electrical Characteristics T
A = 25°C unless otherwise noted
Symbol Parameter VF Forward Voltage @ 1.0 A
Irr Maximum Full Load Reverse Current, Full Cycle TA
= 75°C
IR Reverse Current @ rated VR TA = 25°C
TA = 100
°C
CT Total Capacitance
VR = 4.0 V, f = 1.0 MHz
Device
4001 4002 4003 4004
1.1
30
5.0 500
15
Units
4005 4006 4007
V
µA
µA
µA
pF
2001 Fairchild Semiconductor Corporation 1N4001-1N4007, Rev.
GLOBUS ENGINEERING COLLEGE, BHOPAL
Page 31
Department of Electronics & Communication. Year -2011
12 P.C.B. MANUFACTURING PROCESS
It is an important process in the fabrication of electronic equipment. The
design of PCBs (Printed Circuit Boards) depends on circuit requirements like
noise immunity, working frequency and voltage levels etc. High power PCBs
requires a special design strategy.
The fabrication process to the printed circuit board will determine to a
large extent the price and reliability of the equipment. A common target
aimed is the fabrication of small series of highly reliable professional quality
PCBs with low investment. The target becomes especially important for
customer tailored equipments in the area of industrial electronics.
The layout of a PCB has to incorporate all the information of the board
before one can go on the artwork preparation. This means that a concept
which clearly defines all the details of the circuit and partly defines the final
equipment, is prerequisite before the actual lay out can start. The detailed
circuit diagram is very important for the layout designer but he must also be
familiar with the design concept and with the philosophy behind the
equipment.
GLOBUS ENGINEERING COLLEGE, BHOPAL
Page 32
Department of Electronics & Communication. Year -2011
PCB BOARD TYPES:
The two most popular PCB types are:
1. Single Sided Boards
The single sided PCBs are mostly used in entertainment electronics
where manufacturing costs have to be kept at a minimum. However in
industrial electronics cost factors cannot be neglected and single sided
boards should be used wherever a particular circuit can be
accommodated on such boards.
2. Double Sided Boards
Double-sided PCBs can be made with or without plated through holes.
The production of boards with plated through holes is fairly expensive.
Therefore plated through hole boards are only chosen where the circuit
complexities and density of components does not leave any other
choice.
GLOBUS ENGINEERING COLLEGE, BHOPAL
Page 33
Department of Electronics & Communication. Year -2011
13. DESIGN SPECIFICATION
(I) STEPS TAKEN WHILE PREPARING CIRCUIT
13.1 PCB DESIGNING
The main purpose of printed circuit is in the routing of electric currents
and signal through a thin copper layer that is bounded firmly to an insulating
base material sometimes called the substrate. This base is manufactured with
integrally bounded layers of thin copper foil which has to be partly etched or
removed to arrive at a pre-designed pattern to suit the circuit connections or
other applications as required.
From the constructor’s point of view, the main attraction of using
PCB is its role as the mechanical support for small components. There is less
need for complicated and time consuming metal work of chassis
contraception except perhaps in providing the final enclosure. Most straight
forward circuit designs can be easily converted in to printed wiring layer the
thought required to carry out the inversion cab footed high light an possible
error that would otherwise be missed in conventional point to point wiring
.The finished project is usually neater and truly a work of art.
Actual size PCB layout for the circuit shown is drawn on the copper
board. The board is then immersed in FeCl3 solution for 12 hours. In this
process only the exposed copper portion is etched out by the solution.
Now the petrol washes out the paint and the copper layout on PCB is
rubbed with a smooth sand paper slowly and lightly such that only the oxide
layers over the Cu are removed. Now the holes are drilled at the respective
places according to component layout as shown in figure.
GLOBUS ENGINEERING COLLEGE, BHOPAL
Page 34
Department of Electronics & Communication. Year -2011
13.2) LAYOUT DESIGN:
When designing the layout one should observe the minimum size
(component body length and weight). Before starting to design the layout we
need all the required components in hand so that an accurate assessment of
space can be made. Other space considerations might also be included from
case to case of mounted components over the printed circuit board or to
access path of present components.
It might be necessary to turn some components around to a different
angular position so that terminals are closer to the connections of the
components. The scale can be checked by positioning the components on the
squared paper. If any connection crosses, then one can reroute to avoid such
condition.
All common or earth lines should ideally be connected to a common
line routed around the perimeter of the layout. This will act as the ground
plane. If possible try to route the outer supply line to the ground plane. If
possible try to route the other supply lines around the opposite edge of the
layout through the center. The first set is tearing the circuit to eliminate the
crossover without altering the circuit detail in any way.
Plan the layout looking at the topside to this board. First this should be
translated inversely; later for the etching pattern large areas are recommended
to maintain good copper adhesion. It is important to bear in mind always that
copper track width must be according to the recommended minimum
dimensions and allowance must be made for increased width where
termination holes are needed. From this aspect, it can become little tricky to
negotiate the route to connect small transistors.
GLOBUS ENGINEERING COLLEGE, BHOPAL
Page 35
Department of Electronics & Communication. Year -2011
There are basically two ways of copper interconnection patterns
underside the board. The first is the removal of only the amount of copper
necessary to isolate the junctions of the components to one another. The
second is to make the interconnection pattern looking more like conventional
point wiring by routing uniform width of copper from component to
component.
13.3) ETCHING PROCESS:
Etching process requires the use of chemicals. Acid resistant dishes and
running water supply. Ferric chloride is mostly used solution but other
etching materials such as ammonium per sulphate can be used. Nitric acid
can be used but in general it is not used due to poisonous fumes.
The pattern prepared is glued to the copper surface of the board using a
latex type of adhesive that can be cubed after use. The pattern is laid firmly
on the copper using a very sharp knife to cut round the pattern carefully to
remove the paper corresponding to the required copper pattern areas. Then
apply the resistant solution, which can be a kind of ink solution for the
Purpose of maintaining smooth clean outlines as far as possible. While the
board is drying, test all the components.
Before going to next stage, check the whole pattern and cross check
with the circuit diagram. Check for any free metal on the copper. The etching
bath should be in a glass or enamel disc. If using crystal of ferric- chloride
GLOBUS ENGINEERING COLLEGE, BHOPAL
Page 36
Department of Electronics & Communication. Year -2011
these should be thoroughly dissolved in water to the proportion suggested.
There should be 0.5 lt. of water for 125 gm of crystal.
To prevent particles of copper hindering further etching, agitate the
solutions carefully by gently twisting or rocking the tray.
The board should not be left in the bath a moment longer than is needed
to remove just the right amount of copper. Inspite of there being a resistive
coating there is no protection against etching away through exposed copper
edges. This leads to over etching. Have running water ready so that etched
board can be removed properly and rinsed. This will halt etching
immediately.
Drilling is one of those operations that call for great care. For most
purposes a 0.5mm drill is used. Drill all holes with this size first those that
need to be larger can be easily drilled again with the appropriate larger size.
13.4) COMPONENT ASSEMBLY: -
From the greatest variety of electronic components available, which
runs into thousands of different types it, is often a perplexing task to know
which is right for a given job.
GLOBUS ENGINEERING COLLEGE, BHOPAL
Page 37
Department of Electronics & Communication. Year -2011
There could be damage such as hairline crack on PCB. If there are, then
they can be repaired by soldering a short link of bare copper wire over the
affected part.
The most popular method of holding all the items is to bring the wires
far apart after they have been inserted in the appropriate holes. This will hold
the component in position ready for soldering.
Some components will be considerably larger .So it is best to start mounting
the smallest first and progressing through to the largest. Before starting, be
certain that no further drilling is likely to be necessary because access may be
impossible later.
Next will probably be the resistor, small signal diodes or other similar
size components. Some capacitors are also very small but it would be best to
fit these afterwards. When fitting each group of components mark off each
one on the circuit as it is fitted so that if we have to leave the job we know
where to recommence.
Although transistors and integrated circuits are small items there are
good reasons for leaving the soldering of these until the last step. The main
point is that these components are very sensitive to heat and if subjected to
prolonged application of the soldering iron, they could be internally
damaged.
GLOBUS ENGINEERING COLLEGE, BHOPAL
Page 38
Department of Electronics & Communication. Year -2011
All the components before mounting are rubbed with sand paper so that
oxide layer is removed from the tips. Now they are mounted according to the
component layout.
13.5) SOLDERING: -
This is the operation of joining the components with PCB after this
operation the circuit will be ready to use to avoid any damage or fault during
this operation following care must be taken.
1. A longer duration contact between soldering iron bit & components
lead can exceed the temperature rating of device & cause partial or total
damage of the device. Hence before soldering we must carefully read
the maximum soldering temperature & soldering time for device.
2. The wattage of soldering iron should be selected as minimum as
permissible for that soldering place.
3. To protect the devices by leakage current of iron its bit should be
earthed properly.
4. We should select the soldering wire with proper ratio of Pb & Tn to
provide the suitable melting temperature.
5. Proper amount of good quality flux must be applied on the soldering
point to avoid dry soldering.
GLOBUS ENGINEERING COLLEGE, BHOPAL
Page 39
Department of Electronics & Communication. Year -2011
14. WORKING
HOW TO USE?
We have to maintain the uninterrupted power supply to the receiver unit. The
mobile phone is connected with the control unit via DTMF decoder IC by
means of Headphone of mobile phone.
The battery of mobile phone should regularly charge and mobile phone with
control unit is kept at the pace where the receiver gets perfect signal strength.
The appliances connected are also kept connected with power supply.
WORKING: -
The user dials the mobile number of the receiver unit cell phone by his
mobile phone.
Once the connection is established by the GSM service provider the
call is automatically attended by receiving unit cell phone because of
auto answering mode.
When the call connected user presses the key from 1-7 one by one &
send control to the receiving unit.
The receiving unit cell phone is connected with DTMF decoder
MT8870 hence received DTMF signals are decoded & converted into 4
bit o/p.
The 4bit converted O/P sent to microcontroller IC where it drives
appropriate relay & hence connected appliance.
The appliances connected are being ON/OFF by pressing same keys.
We could ON/OFF all appliances at once by pressing key * & 0.
GLOBUS ENGINEERING COLLEGE, BHOPAL
Page 40
Department of Electronics & Communication. Year -2011
15. APPLICATIONS
Our project is very useful in controlling home appliances. Some other
applications are listed below-
1. As a complementary option of Industrial Automation.
2. For security & other equipment control.
3. Military & Intelligence operations for switching equipments at
distance.
Advantages:
1. No need to go on field.
2. Higher reliability.
3. Cost effective.
4. Fast efficient.
5. Seven devices can be controlled by single key command
FURTHAR DEVELOPEMENT
The device can be used in very advance manner. It can develop the device
as data saving facility, remote applications & user authentication and with
smart biometric access services.
GLOBUS ENGINEERING COLLEGE, BHOPAL
Page 41
Department of Electronics & Communication. Year -2011
16. CHRONOLOGY
The following steps have been followed in carrying out the project.
1. Study the books on the relevant topic.
2. Understand the working of the circuit.
3. Prepare the circuit diagram.
4. Prepare the list of components along with their specification. Estimate
the cost and procure them after carrying out market survey.
5. Plan and prepare PCB for mounting all the components.
6. Fix the components on the PCB and solder them.
7. Test the circuit for the desired performance.
8. Trace and rectify faults if any.
9. Give good finish to the unit.
10. Prepare the project report.
GLOBUS ENGINEERING COLLEGE, BHOPAL
Page 42
Department of Electronics & Communication. Year -2011
17. BIBILIOGRAPHY
REFERENCE FOR TECHNICAL INFORMATION FROM FOLLOWING
BOOKS:
1. DTMF Based Remote Control System - R. Sharma, K. Kumar, and
S. Viq, IEEE International Conference ICIT, pp. 2380-2383,
December 2006.
2. A phone based Remote Controller for Home- I. Coskun and H.
Ardam IEEE Trans.Consumer , vol.44,no. 4,pp. 1291-1297,
November 1998
3. Electronics For You –
4. Integrated Electronics by Millman & Hawlkiwas.
5. Basic Electronics by J. B. Gupta
6. High Performance Printed Circuit Board – Charles Harper
7. Industrial automation Magazine
REFERENCE FOR ARTICLES & TECHNICAL INFORMATION ON
REMOTE ACCESS TERMINAL FROM FOLLOWING SITES:
http://www.google.co.in (Google search engine)
http://www.whereisdoc.com
http://www.electronicsforu.com
http://electrosofts.com/dtmf
http://www.electronicprojects.com
www.atmel.com/dyn/resources/prod_documents/doc2543.pdf
www.datasheetcatalog.net/