Control through Telephone Line Using Microcontroller

To be in-charge of something afar has always been a fascination and an enthrallment to man. To control any machine from a far distance (many Miles away from it) through an electronics device is possible by use of various techniques. Here we will develop a project through this wish will be fulfilled. This project is control of anything like any industrial machine or any home appliances through use of telephonic network. It is going to be very interesting. In recent years the use of remotely controlled devices has been on a constant rise. Right from the very inception of these devices till the present contemporary age, there have been unswerving and swift technological advancements in the interfacing paraphernalia and remote communication techniques. These devices are now being engaged in a wide variety of milieus including hospitals, telephone exchanges, industries, weapon detonation, ballistic missiles and the like.

This microcontroller project has its basis on the same grounds, that is, the manipulation of distant appliances. The key functionality incorporated into the system is to remotely control devices through telephone. As a consequence, the user of the system acquires the potent capability to switch on or off any remote device through a mere telephone call. The system has been designed using a combination of hardware, schematic capture, and software.

Project Description

The Telephone Remote Control Device (TRCD) is a device that interfaces with a standard telephone system and allows a set of devices to be turned ON and OFF from a remote location which could be as far as hundreds of miles. This TRCD will answer a phone call and decode a set of Dual Tone Multiple Frequency (DTMF) signals into logical signals that will be used to turn ON and OFF the controls of any specific machines where this system is applied for its automation.

Advantages of Telephone-based Control Over Wireless Remote Control System

An instantaneous question that springs to minds is: Why it is using the telephone-based control when there are other alternatives like wireless remote controls systems? The telephone-based system offers following prodigious advantages over the wireless system:

  • The Telephone is used almost everywhere in the world even it is available in very remote areas of under developing countries. It is very easily accessible with inherent robust features and work smoothly independent of signal quality or network problems.
  • A naïve user would find it much easier and would be far more comfortable to use a telephone than a sophisticated wireless remote control.
  • Perturbations related to frequency may crop up in wireless remote controls.
  • A telephone-based system can be used to switch appliances from any distance, overcoming the limited range of infrared and radio remote controls.
  • A significant reduction in cost is also a plus point.
  • Wireless mode of communication has an inherent vulnerability to errors.
  • The telephone can be used to control the appliances and at the same it will be available for normal conversation as it is usually done on it.

Project Requirement Specifications

 This TRCD is designed so that it has to fulfill the following Project Requirements Specifications as discussed below one by one.

  • TRCD must have the mechanism for answering and hanging up the Telephone line.
  • TRCD must be able to display the code that is sent from the remote location to this telephone line.
  • The TRCD should turn each switch ON or OFF only when the specified code is sent from the remote location meet certain criteria.
  • Each switch should stay ON until the TRCD receives the same code that actually  turned ON the switch alternatively ON then OFF.

Sequence of events during the execution of tasks:

The operation of project as whole can be understand by following example discussion. Consider a system in which two telephones T1 and T2 are connected by virtue of an ordinary telephone cable through any kind of exchange wherever these are located. Let us suppose that the device to be controlled is attached with T2 and the user is at T1. So, evidently, there is no human intervention at T2. Moreover, a microcontroller and a DTMF decoder are used in conjunction with the device. The following sequence occurs: 

  • The user at T1 dials the telephone number of T2. The T2 needs to identify this call. For this purpose, a ring detection circuit is used (explained in detail later).
  • As soon as 3 consecutive rings are detected, the microcontroller forces T2 to shift to ‘off-hook’ mode. This is done in order to initiate a sort of communication session between T1 and T2.
  • Once the communication has been established, the user presses any button provided on the T1 keypad. Each of these buttons has a dedicated, pre-defined function.
  • Once the button is pressed, a tone of a certain frequency is created. This frequency is encoded by the DTMF encoder present in T1.
  • The encoded frequency is sent to T2 along the telephone line.
  • Decoder present at T2’s side decodes the frequency and generates a digital output. These digits actually represent logical signals which can be utilized in decision making.
  • Next, this output is sent to the microcontroller as its input. This is done by providing interrupt-based mechanisms between DTMF and microcontroller.
  • Microcontroller processes this digital data and as a result, makes decisions regarding controlled devices.
  • Devices controlled in our case comprise of:

    1. A 7-segment display. 
    2. On the 7-segment display, the digit pressed by the user appears.
    3. A bulb. The bulb is initially OFF due to the state of the relay circuit attached to it. 
    4. On appropriate time, the microcontroller turns on the relay, the circuit is completed and the bulb turns ON.
    5. 8 LEDs which represent the different devices.

  •  If the user doesn’t press any button for up-to 10 seconds after the communication has been established, the device is turned off.

 Telephone System

This project uses a standard telephone and telephone line to send the correct signals to the remote-control device. Because of this, knowledge about the operation and components of the telephone is needed.

Operation of a telephone

A telephone uses an electric current to convey sound information from one place to another (person A to person B, say). While the call is in progress, a steady current is being sent through the telephones by the telephone company. The phones share this steady current. But as A talks into the telephone’s microphone, the current that his telephone draws from the telephone company fluctuates up and down. These fluctuations are directly related to the air pressure fluctuations that are the sound of A’s voice at the microphone.

Since the telephones are sharing the total current, any change in the current through A’s telephone causes a change in the current through B’s telephone. Thus, as A talks, the current through B’s phone fluctuates. A speaker in B’s telephone responds to these current fluctuations by compressing and rarefying the air. The resulting air pressure fluctuations reproduce the sound of A’s voice.

The current which powers a telephone is generated from a 48V battery in the central office. The 48V voltage is sent to the telephone line through some resistors and inductors (typically there is some 2000 ohms to 4000 ohms in series with the 48V battery).  In the on-hook state the voltage is 48Von the telephone line. During off hook 8-9 Volts of DC voltage is present on the line.

 Reason for using 48V in telephone systems 


The 48V voltage is high enough to get through kilometers of thin telephone wire and still low enough to be safe. Moreover, it is easy to generate from normal lead acid batteries (4 x 12 car batteries in series). Batteries are needed in telephone central to make sure it continues its operation even if the main voltage is cut. Also, batteries give very stable output which is needed for reliable operation of all the circuit in the central office.

The line feeding voltage is selected to be negative to make the electrochemical reactions on the wet telephone wiring to be less harmful. When the telephone wires are at negative potential difference as compared to the ground then the metal ions will move from the ground to the telephone wire. On the other hand, the positive voltage will cease the metal ions from the metallic wire to leave which causes quick corrosion at the wires.  

Some other countries use other voltages in typically 36V to 60V range. PABXes may use as low as 24V and can possibly use positive feeding voltage instead of the negative one which is used in a normal telephone network. Positive voltage is more commonly used in many electronic circuits, so it is easier to generate and electrolysis in telecommunications wiring is not a problem in typical environment inside office buildings.

Ring signals and ringers

                      

A ring signal is an AC waveform that is sent across the phone line. When the central office wants to make a telephone ring, it sends an AC ringing voltage to the line which then rings the bell of the telephone. Normally frequencies in the range 20-40 Hz and voltages in the range 40V-150V are used. The ringer is built so that it will not pass any DC current when it is connected to the telephone line (traditionally a capacitor in series with the bell coil is used for this purpose). So only AC ring signal can through the bell and make it ring. The bell circuit is either designed so that it has high impedance in audio frequencies or it is disconnected from the line when the phone is picked off-hook. This signal is usually sent out with pauses in between. The timing is generally two seconds on and four seconds off.

Dialing

`There are two methods of telephone dialing used around the world

Ø  Pulse Dialing: It is the oldest form of dialing and it is accomplished with a rotary dial. This type is not very popular now a days.

Ø  Tone Dialing: Tone dialing is more modern method and has replaced the pulse dialing in most parts of the world. It is usually called with the names Touch Tone, Dual Tone Multiple Frequency. This type of dialing method is supported in RCD.

Tone dialing was opted for since it has several advantages over pulse dialing, like: Good enough speed, proper impregnability to errors, The ability of to travel across microwave links and work rapidly with computer-controlled exchanges.

In our case, there are several buttons on the telephone keypad, each one of which is coupled with a different frequency or in other words, pressing each one of them generates a tone of a certain frequency.

There is no guaranteed way to determine when the call is terminated at the far end. Different methods such as loss of loop current, change of Direct Current (DC) polarity or silence on the line is used to detect the termination of call. The next component is the telephone ringing tone detector and answering circuit. The ring-detector part of this circuit takes the signal described above, and causes the telephone to ring. When the telephone is answered, a relay (or switch) closes and creates a loop between the two telephone wires. Loop is established between the wires by completing the circuit between two wires of the line via circuit whose impedance matches with the impedance of telephone line wires. This impedance is usually of 200-400 ohms. Once this loop is created, the two phones can communicate with each other.

As it was discussed in the preceding section the tone dialing is the modern dialing method which is used around the world. This type of dialing is also called Dual Tone Multiple Frequency (DTMF) or Multiple Frequency (MF). DTMF dialing produces the signals that can be sent around the world via telephone lines and can be used to control answering machines and other devices. Each digit on the phone keypad is transmitted in the form of two separate audio tones of different frequencies that are mixed together thus getting the name of Dual Tone Multiple Frequency DTMF. The four vertical columns on the keyboard are known as high group and four horizontal rows as low group. This four-by-four array produced 16 different combinations as shown in the table below. 

DTMF IC CM8870 is used both as encoder and decoder. Standard DTMF encoder will produce a tone, corresponding to each digit on the key pad, as long as the key is pressed. This signal will be transmitted and the DTMF decoder on the receiver side will decode the signal again into the digit. No matter how long the key is pressed, the tone will be decoded as the appropriate digit. The shortest duration in which a digit can be sent and received is about 100 ms.

A single tone or frequency could have been used providing that no voice was present. If voice was present it could and would certainly at times conflict with the control tones. Also, it would have required ten different tones, one for each digit. The engineers choose instead two tones or frequencies for each number. Generating two separate tones, not related harmonically to each other, will eliminate a voice accidentally producing a valid pair.

By combining only seven tones in a four by three array produces 12 combinations. This is enough for all ten numbers with two to spare. The modern tone dialing phone today uses these seven tones with all 12 combination for numbers 0-9, the asterisk * and pound sign #. Thus, the name Dual-Tone-Multiple-Frequency (DTMF) was coined.

The detailed table of  DTMF frequencies and corresponding digits is shown below. 

DTMF Frequency decoder
DTMF Frequency Table for various Switches on keypad

Keyword research:

Home Security and Automation using Phone Line, Remote control system as serial communications mobile, Smart Home Microcontroller, Telephone Interfacing, Microcontroller Based Telephone Remote Control  Circuit, An Introduction To Telephone Line Interfacing Using The PIC, Remote control using telephone,CN1649375A,Power supply circuit for far distance telephone, Home appliance control system via telephone line, Remote Control Of Microcontrollers With A Telephone, Telephone operated remote control using PIC16F84A, development of a microcontroller based digital telephone ,Smart Home Microcontroller: Telephone Interfacing, Design and Construction of Microcontroller- Based, Remote control via telephone line using microcontroller AT89C51,Tele-Control System with Intelligent Switch, Domestic Electrical Control Through Telephone Line,Microcontroller51.blogspot.com

This project is consist of three part, each is as below:


No comments:

Post a Comment

Please ask if you have any question regarding the programming of MCU, or have any problem in development of your electronics project. microcontroller51.blogspot.com

Popular Post (All Time)