Pages

Implementation of Control of Machine with Telephone Part-2

 Project Implementation Goal

As the name TRCD implies, the basic endeavor of the whole system is the control of any device located at a far-away spot through the use of Telephone line and Telephone Sets. We aimed at the provision of the means a user needs to manipulate the very crux functionality of wide ranged remote devices, and more importantly, enabling him to do so in a reliable, prompt, easily accessible, and an non-erroneous way. The use of telephone line for this purpose will solve the goal of the project. Of course it will be using some electronics component for its construction which will be discuss later section of this post. Lets first discuss the construction plan of the controller project.

Project Construction Plan

As during the development of any important microcontroller based system or embedded system, the construction plan of that project is of main importance. Therefore the construction plan of this project is prepared. Project construction plan includes the following main points:

  1. Extensive study to acquire a detailed understanding of the basic operation of a telephone line system. 
  2. Extensive study regarding the design of Ring Detection Circuit and understanding of DTMF functionality. 
  3. The whole project is divided into multiple tasks which will be worked out sequentially and at the end all parts will be combined to work inline with each other.

The major milestones during the construction of this project will be achieved as below: 

  1. Designing of call detection circuit and 
  2. Designing of hanging up of the telephone circuit.
  3. Decoding of the signals sent from the remote location through the telephone lines.
  4. Processing of the decoded signals to perform the specific task i.e. switching of the devices in our case.
  5. Disconnection of the call.

Implementation

The implementation of the Project is based on the principle which involves the same techniques as used in standard digital telephone system. The TRCD system consists of the following components.

  1. Call detection and answering circuit.
  2. DTMF decoder.
  3. Microcontroller A89C51. 
  4. Interfacing circuitry.
  5. Devices to be controlled.

BLOCK DIAGRAM OF THE SYSTEM:

First of we will design the system using the main components, for this flow diagram is prepared which is here expressed as block diagram. Below is the Block Diagram of the control System showing various parts of the project interconnected with each other and flow of data and information is also presented in it.

Telephonic Control System
Block diagram of the Telephonic Control System


Call Detection and Answer Circuit

The purpose of this circuit is to detect the call on the telephone line and hang the telephone automatically. The hanging of the telephone will allow the caller to communicate with devices with the help of predefined codes. The basic principle of the call detection is the same as it is present in actual telephone. The circuit as shown in two figures below and it is composed of two parts: 

  1. Ring Detection Circuit.
  2. Answer Circuit

Ring Detection Circuit

As shown in fig. above, the ring signal at the AC voltage of 40-150V, as discussed earlier, comes from the line and goes through the 470nF capacitor (C1), which filters the DC offset voltage if any has been added to phone. Then the two 6.2V Zener diodes (D1 and D2) cut off the peak voltages on both side of AC voltage waveform. Zener diodes are used so that after the hanging up of phone the voltages due to voice and signals sent from the remote location could not energize the opto-coupler; it also provides an inherent feature of protecting the circuit from any noise signal. After going through the capacitor and Zener diodes, current flows into the major component of the circuit is the optocoupler.

 The optocoupler consists of two hardware components: one photodiode and one Phototransistor. As soon as the voltage at the photodiode goes above 1.5V, the photodiode lights up and the emitted photons strike the base of the phototransistor and the transistor is activated. The function of the optocoupler is to protect the local circuitry from the outside, higher voltage, ring circuit. The regular, backward-biased, 4148 diode (D3), which in parallel with the optocoupler, limits the voltage drop across the LED to avoid any possible damage. Next, the ring signal goes through the current-limiting resistor (R2) and flows into the wire of the phone line. 

Ring Detection Circuit Diagram
Ring Detection Circuit Diagram


On the other side of optocoupler, the hardware is an open-collector configuration. The collector is connected to a pull-up resistor (R1) and the emitter is connected directly to ground. Once the transistor gets on it goes into saturation and logic low signal is provided to the external interrupt 1 (INT1) of the microcontroller, which will then answer the call.

Answering Circuit

Answering circuit below is used to hang the telephone automatically so that communication will be established between the caller and receiver. In order to establish the communication between the two telephones the loop is to be created between two telephone lines as it is discussed in section The external interrupt informs the microcontroller about the ring on the telephone line. After three rings an active high signal is generated by the microcontroller. 

Answering Circuit
Telephone Line Answering Circuit Diagram
When this signal is received, turning on the relay, via 330-ohm resistor, closes the loop and the phone is answered. 330-ohm impedance creates the loop between two lines as it matches with the impedance of telephone lines. The ring detection circuit as showed in fig 2.2 offers the impedance of 13 k-ohm so it cannot create a loop between the two telephone lines. The impedance of 13 k-ohm produces current of 1-2 mA for voltage of 25v on PABX system. In order to turn on the relay, at least 25mA are required. Since the microcontroller cannot drive that much current, a transistor is used to switch on the relay. When the relay is turned off after being on for an extended amount of time, there will be a significant amount of current that has been produced by the coil inside the relay flowing towards the microcontroller. In order to avoid any damage, a reversed-biased Protective diode is inserted in parallel with the coil.

The Functionality of DTMF Decoder 

Once the loop is closed, as discussed earlier and the phone is answered, the signals are sent from the caller on the telephone line by pressing the keypad keys to produce DTMF pulses as described above. The DTMF decoder decodes the DTMF pulses into the correct four-bit hexadecimal value on pins 11-14 of DTMF IC 8870 along with a data valid signal on the pin 15 (St) of DTMF IC  8870 to indicate the validity of the data. Those five signals are all sent to the microcontroller.  

The St Pin of DTMF is attached to external 0 pin (INT0) of microcontroller which informs the microcontroller about the valid data through interrupt. According to the sequence of the pulses, the microcontroller turns on /off the appropriate devices. Finally, a 3.58 MHz crystal is required for proper DTMF decoder functionality. DTMF Decoder and interfacing circuitry with microcontroller is shown in figure below.

The 8051 Microcontroller utilization

The microcontroller is the mastermind of the whole TRCD system and provides key functionality. In this TRCD project Atmel 89C51 microcontroller is used. The microcontroller’s basic functions are highlighted below:

Answering the telephone.

Microcontroller will switch on the relay, attached to pin #17, to complete the loop and hang the telephone automatically after receiving three rings on the telephone line as discussed in section 

Control of Devices.

Microcontroller upon reception of valid data, from the DTMF decoder, control the different devices attached to it. Microcontroller switches the appropriate device on/off according to the signal received from the caller, thus providing a remote access to the devices, and thereby provides a basic functionality. Connection of microcontroller with devices is shown in figure below. A detailed description of pin connection is already provided.

Termination of Call.

As the phone is answered automatically by microcontroller, there must exist a proper mechanism to terminate the call automatically at some appropriate time. This will protect the line from being hung for an indefinite period of time. 

Microcontroller will keep track of the signals that are originated from the caller side and if there is no signal sent in 10 seconds then microcontroller will switch off the relay (which was previously switched on for closing the loop ). Timer 0 is used to get the delay of 10 seconds. In this way the communication will be terminated and telephone line would be free for future use.

Devices Required to Control 

The main purpose of the whole TRCD system is to provide access to remote devices through telephone. So, the devices to be controlled form the backbone of the whole system. Many devices can be controlled using the pre-defined set of codes but in this TRCD system total of 9 devices and a 7-segment display is controlled from the remote location as shown in figure below.

Devices are initially in the off state by default. A specific device would be switched on, on reception of the valid signal. Once the device is switched on then it can be turned off only on the reception of the same code, which actually switched it on.

If the call is terminated after some time, then the final state of the devices would be preserved thus fulfilling the original requirements.  the devices  include an electric bulb(attached to pin 16) and 8 LEDs (attached to  pins 21-28) representing  remaining 8 devices. Devices are shown in figure below.

A common anode seven segment (attached to pins 32-38) will display the same digit that is pressed at the remote location. This will ensure the reception of actual data and controllability of the system on the receiver side.

Keywords research: 

electrical appliance control with android and telephone line, cell phone signal activated led

mobile phone detector circuit diagram through use of direct line or landline phone, mobile phone detector project report cell phone detector circuit using ca3130 cell phone detector circuit simulation electric circuit project ideas mobile phone detector circuit using 555 timer

implementation of control system control system using machine learning machine learning for optimal control control policy machine learning deep learning for control systems

control theory and machine learning control learning control theory neural networks

How do you implement a control system? Why implement a control system?

What are the methods of control system? What is control system in measurement and control? What is the working principle of telephone system? How is the telephone line used in computer? What is the use of telephone lines for communication? What are the main components of the telephone system? telephone circuit components telephone switching system pdf types of telephone lines telephone switch box analog telephone circuit 

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