Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 12

Top of Form

Bottom of Form

Home Robotic Projects Microcontroller Projects Wireless Projects GSM Projects Other Projects Tools Open Source Projects

GSM Projects >

Device Control Using Mobile Phone

BLOCK DIAGRAM:

1 BLOCK DIAGRAM DESCRIPTION


2.1.1 Microcontroller 89C51: It is the heart of our system. It

is a single chip Microcomputer with I/O ports, timer, clock generator, data memory, program memory, serial ports, and external hardware interrupts. It is a 40 pin IC manufactured by ATMEL, which was developed by INTEL. It can be used for many control applications like motor speed control, waveform generation etc. The software can be implemented in assembly level language or high level language and entered into the program memory (flash memory) using programmer.

2.1.2 LCD Display: 16x2 LCD Display is used for the AFI
module. Each letter is in 7x5 matrix form. It is a low cost, low power device, capable of displaying text and images. ASCII values are used for displaying text and numbers.

2.1.4 Decoder: 74154 decoder is used. It is a 4x16 decoder. It


has two enable pins. Enable pins are active low.

2.1.6 Power supply circuit: Using a 0-12V transformer, a


bridge circuit, and a 6V-7806 regulator to get a DC power of 5V from 240V, 50Hz supply. Also 12V rechargeable battery is provided for microcontroller when there is power failure.

2.1.7 Mobile Circuitry: The MT8870D is a complete Digital


Tone Multiple Frequency (DTMF) 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.

CIRCUIT DIAGRAM:

The microcontroller used is 89C51 which is the flash version of 8051. It is a 40 pin IC. It requires 5 V and 250 mA, supported with a crystal oscillator [1]. Clock is provided by connecting 11.0592MHz crystal and two 33pf capacitors connected between XTAL1 (19) and XTAL2 (18) of the microcontroller. This will generate a clock frequency

of 11.0592 MHz. This frequency is selected because during serial communication, the internal counters will divide the basic clock rate to yield standard communication bit per second (baud) rates [1-2]. The microcontroller has 4 I/O ports. In the system port0 is used as input port, port1 & port2 as output port, port3 as both input and output port. At the initialization part of the code 00h is loaded for output and 0ffh for input port. To declare both load 1 to the pin which is input and 0 to the output pin [1]. The first (LSB) four bits of port0 (39 to 36) are connected to keypad and the next four (MSB) (35 to 32) to mobile circuit to get the data (inputs). The first four bits of port1 (1 to 4) are connected to keypad and next four (5 to 8) to decoder to send the appropriate data. Port2 is connected to LCD data pins. Port3 is I/O, p3.0, p3.2 and p3.3 are input, p3.1, p3.4, p3.5, p3.6, and p3.7 are output pins. P3.1 (11) is used to disconnect the mobile if the data entered by user is valid, P3.2 (12) is connected mobile circuit to get interrupt when the data is entered from mobile, P3.4 (14) is connected to enable pin of decoder. P3.5 (15), P3.6 (16), P3.7 (17) are connected to LCD control lines E (enable), R/W (Read or Write) and RS (Register Select) respectively [2]. Pin p3.2 and p3.3 are external interrupt pins of microcontroller [1].

External enable (EA) (31), Vcc (40) are connected to Vcc, Vss (20) is connected ground. Reset (9) is connected to power reset circuit as shown in figure [1].

Power supply circuit:

3.2.1 Transformer: A step down transformer of 230 V to 0-12


V, 500 mA is used. This gives AC voltage of 12 V, 50 Hz, 500 mA. In step down transformers the number of primary windings is more compare to secondary. The primary winding is connected to AC mains and secondary (transformer output) is connected to bridge rectifier.

3.2.2 Bridge Rectifier: It consists of four BY127 diodes


connected in a bridge form as shown above. This is used to convert AC signal to DC containing ripples. During positive half cycle diodes a & b are on and c & d are off where as in negative half cycle diodes c & d conduct and a & b are off. Two points of

the bridge is connected to secondary transformer while other two points are connected to ground and 7805 regulator.

3.2.3 Regulator: A 7806 is a 6 V regulator. This is used to

convert from 12 V to 5 V which is required for microcontroller, LCD, keypad etc. The regulator used is series voltage regulator which gives high current and low voltage regulation. Before connecting to rechargeable battery rectifier output is connected to microcontroller pin p3.0 used to detect the power fail. A diode is connected between regulator and battery so that during power fail the battery voltage will not drop across the pin P3.0, hence power fail is detected which is achieved by reverse bias property of diode

Decoder Circuit:

To increase number of outputs using limited microcontroller pins

decoder is used. Decoder used is 74154 which is a 4x16 decoder. In which only 10 lines are used. Decoder inputs are given from microcontroller using port1 MSB. A to D (23 to 20) of decoder is connected to p1.4 to p1.7 of microcontroller. Decoder having two active low enable pins, one is always ground (FE2-19) and the other (FE1-18) is used to control the output. When ever a valve is open this pin becomes low else it remains high. When this is low any one of the output line is low. Truth Table: Table 3.1 Truth table of decoder 74154 FE1 H X L L L L . . . L L FE2 X H L L L L . . . L L D X X L L L L . . . H H Input C X X L L L L . . . H H B X X L L H H . . . H H A X X L H L H . . . L H Output Q=L 0 1 2 3 . . . 14 15

The output of decoder is active low and driving capability of decoder is less to drive a relay for this reason buffer is used to enhance the current. 7407 buffer is used. It has six buffers in it., which are connected to output pins of decoder and output pins of buffer are connected to relay

Relay Circuit:

6 V sugar cube relays are used. The relay used in this project is a 230 V/ 2 A relay and it is an electro mechanical relay. The excitation voltage that is required is the inverting buffer IC 7407. The device is connected to the electro mechanical relay. When the relay is excited by applying the 6 V DC the relay gets activated and in the process turns ON the device and when the excitation voltage is stopped the relay gets deactivated and in the process Turns OFF the devices. Depending on the output of microcontroller as explained above respective relays are activated which intern turn ON the CONTROLLED DEVICES. 6 V DC. It is driven using

Mobile Interfacing Circuit:

The circuit shown in fig. 3.7 illustrates the use of MT8870 device in a typical receiver system. The signals less than -34 dBm has a non operating level. These conditions can be attained by choosing suitable values of R1 and R2 to provide 3 dB attenuation. The component values of R3 and C1 are used to vary the guard time request. The crystal oscillator frequency of 3.58 MHZ is used to provide the clock pulses to DTMF decoder. When a valid tone is detected the binary equivalent value is obtained at pins (11-14) which are connected to MSB of port0. For a valid tone pin 15 (std) goes high for a small time interval

depending on the value of R3 and C1.this is further drives the inverter whose output given to external interrupt (INT0) of microcontroller as shown in fig. 3.7.

10.3 DTMF BASICS


DTMF (Dual-tone Multi Frequency) is a tone composed of two sine waves of given frequencies. Individual frequencies are chosen so that it is quite easy to design frequency filters, and so that they can easily pass through telephone lines (where the maximum guaranteed bandwidth extends from about 300 Hz to 3.5 kHz). DTMF was not intended for data transfer; it is designed for control signals only. With standard decoders, it is possible to signal at a rate of about 10 "beeps" (=5 bytes) per second. DTMF standards specify 50ms tone and 50ms space duration. For shorter lengths, synchronization and timing becomes very tricky.

DTMF usage:
DTMF is the basis for voice communications control. Modern telephony uses DTMF to dial numbers, configure telephone exchanges (switchboards), and so on. Occasionally, simple floating codes are transmitted using DTMF - usually via a CB transceiver (27 MHz). It is used to transfer information between radio transceivers in voicemail application etc., Almost any mobile (cellular) phone is able to generate DTMF after establishing connection. If your phone can't generate DTMF, you can use a stand-alone "dialer". DTMF was designed so that it is possible to use acoustic transfer, and receive the codes using standard microphone.

Composition of DTMF signals


The table shows how to compose any DTMF code. Each code, or "beep", consists of two simultaneous frequencies mixed

together (added amplitudes). Standards specify 0.7% typical and 1.5% maximum tolerance. The higher of the two frequencies may have higher amplitude (be "louder") of 4 dB max. This shift is called a "twist". If the twist is equal to 3 dB, the higher frequency is 3 dB louder. If the lower frequency is louder, the twist is negative.

Frequency table:
Table 10.3 DTMF frequencies for each key pressed 697 Hz 770 Hz 852 Hz 941 Hz 1209 Hz 1 4 7 * 1336 Hz 2 5 8 0 1477 Hz 3 6 9 # 1633 Hz A B C D

This table resembles a matrix keyboard. The X and Y coordinates of each code give the two frequencies that the code is composed of. Notice that there are 16 codes; however, common DTMF dialers use only 12 of them. The "A" through "D" are "system" codes. Most end users won't need any of those; they are used to configure phone exchanges or to perform other special functions.

How to transmit DTMF


Most often, dedicated telephony circuits are used to generate DTMF (for example, MT8880). On the other hand, a microprocessor can do it, too. Just connect a RC filter to two output pins, and generate correct tones via software. However, getting the correct frequencies often requires usage of a suitable Xtal for the processor itself - at the cost of non-standard cycle length, etc. So, this method is used in simple applications only.

How to decode DTMF

It is not easy to detect and recognize DTMF with

satisfactory precision. Often, dedicated integrated circuits are

used, although a functional solution for DTMF transmission and receiving by a microprocessor exists. It is rather complicated, so it is used only marginally. Most often, a MT 8870 or compatible circuit would be used. Most decoders detect only the rising edges of the sine waves. So, DTMF generated by rectangular pulses and RC filters works reliably. The mentioned MT 8870 uses two 6th order bandpass filters with switched capacitors. These produce pure sine waves even from distorted inputs, with any harmonics suppressed. Sign in | Recent Site Activity | Terms | Report Abuse | Print page | Powered by Google Sites

You might also like