The 89C51 PABX

M.Shakeel Malik,  shakeel_mps@yahoo.com


Introduction

This project is basically an eight line intercom from which you can call 1 to 8 number. This system also support dialing and receiving telephone calls.

 


Figure 1:   Block Diagram of the 89C51 PABx

 

How to use

Pick your hand set, the dial tone will be listen now dial 1 to 8 number if the busy tone listen put back your hand set and wait for free system. For a telephone call dial first 0 “Zero” number the system will connect your phone with telephone line, here you will listen the dial tone from telephone exchange this dial tone is differ from system dial tone now dial your required number just like a normal telephone line.

From out side, when you dial PBx line number the system hold the call after two bells and a melody is listening as a instruction message then dial required extension number.

 

Figure 2:   Circuit Diagram of the PABx-1 Note:- Add 10k pullup resistor to PORT0

 

 

 

 

Figure 3:   Circuit Diagram of the PABx-2

 

 

Circuit Description


Circuit consists of following stages.

  1. Microcontroller

The heart of the system is Atmel AT89S51 microcontroller which is running on 12 MHz clock speed.

 

  1. Power Supply

The main power source is 220V AC, which is step-down into 24V and 72V. The18V DC is used for telephone system and 72V AC supply is used for ringing telephone bells which is controlled by RL10.

 

  1. Ring Detector

This stage converts the incoming bell signals into pulses. These pulses are counted by Timer1 in the micro controller. The system hold the (Outer) call after two bells, two bells have 37 pulses.

 

  1. Tone Generator

This stage consists of CD4093. The gate A oscillate on 440Hz and gate B oscillate on low frequencies then gate C  “AND” the output of A and B gate. This arrangement is done for generating dial tone and busy tone. Gate D generate dial tone, dial tone is controlled by P3.6 and busy tone is controlled by P3.4.Dial tone is provided to speech bus and busy tone is provide on standby bus.

 

  1. Call Holding Circuit

In this stage IC5 (Opto-triac) serves as hook switch, controlled by P1.6.This stage perform dual function. First hold incoming call (From out side) and second transmit recorded voice massage (Melody) on telephone line.

 

  1. Message Player

I decide to use “Voice recording/playing chip” but unfortunately this was not available in local market, so I have used UM66 (Melody IC) instead of Voice recording chip which is controlled by P3.7.This melody transmit to holding circuit through C10. If possible let you use any voice Recording/Playing module with some changes.

 

  1. Gyrator

There are two supply sources are used through gyrator, one for speech bus and other for stand-by bus. This arrangement was necessary to make sure complete privacy during speech. If the same source was used for both buses, it was possible the speech transfer to the stand-by bus.

 

  1. DTMF Decoder

The heart of this stage is IC2 (MT 8870). This IC decodes the DTMF input in the binary format. The output of decoder is provided to Port1 of the microcontroller. When a valid DTMF receive MT8870 strobe for 20msec to microcontroller on P1.4.

 

  1. Status Indicator

There are eight indicators are used, one for each telephone set, all indicator are attached to Port2.When some one is pickup the hand set of his telephone, the current is flow from the telephone via R26, some voltage are dropped on the resistance, which activate the relevant transistor hence logic low occur on his collector. This logic is read by microcontroller on Port 2.

 

Download

Block Diagram Block-dia.wmf

Schematic         PABx.pdf
Source Code    PABx.asm
HEX file           PABx.hex