Pages

Telephone Line based Control of device Part-3

Electronic Circuit Designing of Remote-Control System

The circuit diagram of the Telephone based remote control using microcontroller 8051 is shown below:



Telephone line device controller
Circuit diagram of Telephone line base controlling device from a remote location

The components shown in the circuit diagram of the project are interconnected each other as explained below. 

Pin Connections


peripheral components connection
The peripheral components connection with microcontroller At89S51

The Pin Connection of microcontroller AT89C51 with peripheral components to accomplish the project for described task are explained below. The pin to pin connection along with the function pin connection is also provided.

  1. P1.0 to P1.3 to DTMF pins 11 to 14: Microcontroller will receive the data from DTMF for decoding frequency etc P2.0 to P2.7 LEDs are connected These are supposed to be the Devices attached with microcontroller to be controlled. The LEDs (08Nos) are attached at Port2 of microcontroller. When any of this is OFF, it means that device switched OFF accordingly.
  2. P0.0 to P0.7 Seven segment connected: The Seven Segment Displays is attached to Port 0 of microcontroller, to display the device number when required to control it. The number corresponds to devices at remote location will be the digit on seven segment, that is pressed at other side.
  3. PIN12 of MCU(INT0) to DTMF: The interrupt generated by DTMF will be sensed immediately by microcontroller at INT0 to count the pulse to determine the frequency generated by DTMF in response with the key pressed on telephone set at other side.
  4. PIN13 of MCU(INT1) to Ring detect circuit: The Microcontroller will receive the interrupt regarding the reception of ring on the telephone line. The ring detector circuit will generate the interrupt on valid receipt of ringing bell on this telephone.
  5. PIN17 of MCU to Call Answering circuit: The Call Answering  or termination circuit  is attached with this PIN of microcontroller to close the loop for the function to hang the phone or to terminate the call automatically when required according to the program sequence.
  6. PIN20 of MCU is connected to GND: The DC grounding voltage PIN of MCU.
  7. PIN40 of MCU is connected to Vcc: The Vcc or +5V DC PIN for power supply of Microcontroller.
  8. PIN9 of MCU connected to Reset circuit: The Reset circuit of the microcontroller consisting of a resistor, a capacitor and push switch, to accomplish reset function for microcontroller.
  9. PIN18 to 19 of MCU connected to Oscillator: The Oscillator circuit consisting of two capacitors and a crystal required to generated crystal frequency to be used by microcontroller to perform various  tasks of MCU. 

Testing and Conclusion at the end of Project Construction

Development of TRCD system was a challenging task and there was many hardships during its implementation, but at the end it was assembled  and tested successful and we achieved our goal. Some of the problems that hindered the development of TRCD are as under.

The use of optocoupler in ring detection circuit proved to be the most difficult one. We were of the view that phototransistor of the optocoupler would saturate easily for each ring on the telephone line, but it proved fruitless as the transistor saturated 20 or more times in a second corresponding to the 20 Hz frequency of the ring signal. This voltage fluctuation was not going to be detected by conventional devices such as LEDs , multimeter etc. in this way manual checking failed every time and there was no way  out .

So we were not able to detect the saturation of optocoupler. This problem paralyzed us for more than 15 days, as the output read on standard multimeter never fell below 2.6V not sufficient to be used with CMOS microcontroller. As microcontroller can detect the external interrupt with maximum frequency of 500 KHz. In these circumstances’ microcontroller was directly used to detect the voltage changes in optocoupler. This method worked and the ring signal was detected at last after great effort.

The unavailability of appropriate function generator was also a major problem as for testing.

The PABX exchange was also a big problem to cater, as the voltages and other parameters of standard telephone system were often found to be absent on the local system.

After achieving the much awaited ring detection and call answering facility the specifications of DTMF were hard to understand. Especially signal sent from remote location was very weak to be decoded by the DTMF decoder. The first stage in the internal circuitry of DTMF is a differential amplifier.

 With the study of various datasheet specification it was believed that the unity gain adjustment of amplifier will be enough but it did not happened so, the signal from remote location was not powerful enough to be detected, therefore it require more amplification then usual. So, we have to sort out some way to adjust the gain of the amplifier to strengthen the signal to an appropriate level. This difficulty was second in the list after the resolution of optocoupler crisis as described above.

Possible enhancements:

As with any design, there are several improvements that would make this TRCD more efficient and impeccable. For instance: The TRCD system can be made more efficient and more easy to use by introducing an acknowledgement mechanism. This will inform the caller on the remote location about the current status of different device attached and acknowledge every signal sent to ensure correct transmission. The TRCD system can be interfaced with computers to utilize it in different specialized fields such as, industry, inquiries regarding different matters, traffic control, telephone messaging etc. Enhancements and improvements can be made depending upon the utility. The development of a prototype Telephone Remote control Device (TRCD) has been described which could be used to control any device from the remote location by just pressing a button. The test system has been designed in such a way that the end user can easily use the system without much difficulty and indulging in technical details.    

Software of the Automation project: 

The software or program of the automation project is written in c51 language and compiled using Uvison keil c51. The program coding is as under:
 

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
#include<At89x51.h>		// The library header file the Microcontroller 8051 family
unsigned char ring_count;   	// declaring the variable count number of rings
unsigned char dtmf=0;	// declaring initialization of variable for Data from DTMF
unsigned int count=0;		// Count time to disconnect
unsigned char mask=0x0f;	//declaring the masking variable
bit flag=0;			// The bit type or Boolean variable
void ring_detect() interrupt 2   //Start of function to detect the ring through the use of
{				// interrupt service routine
ring_count++;
	if(ring_count==60)
	{
		P3_7=1;
		ring_count=0;
		TR0=1;
	}	
}
void dtmf_data() interrupt 0		// DTMF data will be read at this intrrupt
	{				// using this function
		dtmf=P1;
		dtmf=dtmf & 0x0f;
		count=0;
		flag=1;
	
}
void timer_0() interrupt 1			// Timer 0 ISR
{
count++;
	if(count==40000)
	{
		P3_7=0;
		TR0=0;
	}
}
void main ()	// The main function starts here
{
	
	IE=0x87;		// Initialization of various registers of 8051
	TMOD=0x02;		// To achieve the interrupts, timers, external 
	TH0=6;		// event counting etc
	TL0=6; 	// Timer zero reload in its upper and lower bytes
	IT0=1;		// enabling the Timer 0 interrupt
	IT1=1;		// enabling the Timer 1 interrupt
	P3_7=0;	// PIN P3.7 at logic level 0
	P3_6=0;	// PIN P3.6 at logic level 0
	P2=0;		// Port 2 of MCU at logic level 0
	P0=0x79;	// Port 0 initialize to hex number 79
			// While One mean do this function until power is ON
	while(1)
	{	
			if(flag==1)
			{
				flag=0;
				switch(dtmf) // select the case based on the value of DTMF
				{
				case 10:			// case for input decimal 0
					P0=0x40;
					P3_6=!P3_6;		// bulb activation	
					break;
		
				case 1:				// case for input decimal 1
					P0=0x79;
					P2_0=!P2_0;		//LED#1 activation
					break;
		
				case 2:				// case for input decimal 2
					P0=0x24;
					P2_1=!P2_1;		//LED#2 activation
					break;
		
				case 3:				// case for input decimal 3
					P0=0x30;
					P2_2=!P2_2;		//LED#3 activation
					break;
		
				case 4:				// case for input decimal 4
					P0=0x19;
					P2_3=!P2_3;		//LED#4 activation
					break;
		
				case 5:				// case for input decimal 5
					P0=0x12;
					P2_4=!P2_4;		//LED#5 activation
					break;
		
				case 6:				// case for input decimal 6
					P0=0x02;
					P2_5=!P2_5;		//LED#6 activation
					break;
		
				case 7:				// case for input decimal 7
					P0=0x78;
					P2_6=!P2_6;		//LED#7  activation
					break;
		
				case 8:				// case for input decimal 8
					P0=0x00;
					P2_7=!P2_7;		//LED#8  activation
					break;
		
				case 9:				// case for input decimal 9
					P0=0x10;
				
					break;
			}
		}
	}
}

 

Microcntroller based Remote control circuit diagram Remote control circuit diagram using telephone line simple on/off remote control circuit diagram with help of landline telephone line simple on/off remote control circuit diagram using MCU and phone Remote control circuit for toy car using micrcontroller ardino Remote control circuit for toy car using mobile phone channel remote control circuit diagram Remote control car circuit diagram how to make a wireless remote control transmitter and receiver wireless remote control circuit how to make wireless remote control circuit 10 uses of remote control 1970 tv remote control remote control car who invented the remote control remote desktop universal remote control remote control buttons explained

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