jueves, 29 de julio de 2010


Telephone Dialler Module The module described here is a DTMF code generator, or more precisely, a telephone dialer. The heart of the module are the HT9200 used for DTMF generation, and the switching relay used to open and to close telephone line.
Telephone Line Basics
The telephone line carries both dc and ac (audio) signals at the same time. The dc is used to power the circuitry within the telephone during a conversation, and is derived from a large battery located at the Central Office (CO). This battery is a nominal 48V, traditionally made up from lead acid cells. 
The telephone line between the CO and the home may be several kilometers long, and has a resistance proportional to the length of the line.  The telephone line is made from a pair of copper wires and usually about 0.5mm in diameter. The resistance of the line varies from 90 ohms to 180 ohms per kilometer.
The telephone signals the CO when the handset is lifted, by completing the line circuit by closing a switch known as the hook-switch. The expressions off-hook and on-hook were derived from the days when you literally hung up the receiver on a hook and this operated a mechanical switch.
The circuit between the CO and the domestic phone is known as the local loop. When current flows in this loop (during the off-hook condition) it is known as the loop current or line current. Off-hook is sometimes referred to as the looped condition.
When on-hook, only a very small leakage current is permitted to flow in the loop. This is the current which would flow if a 1 mega ohm resistor were connected across the line. For a nominal 50V line voltage, the maximum leakage current can therefore be assumed to be 50uA. 
When the hook-switch closes, the loop current will flow and this will be in the order of several tens of milliamps. About 20mA may be assumed to be a typical value. The exact value will depend on the line resistance and the dc resistance of the telephone equipment. 
When a few mA of line current are drawn from the line, a detection circuit at the CO, recognizes that a telephone receiver has gone off-hook, and is effectively signaling the exchange, that it requires attention.  Traditionally a relay coil was connected in series with the battery and the telephone. When the telephone handset was lifted it closed the hook-switch, allowing current to flow through the relay and energies the coil thus closing a set of contacts. This then switched in a uni-selector to decode the dialed digits. 
The CO presents a dial tone to the line, and allocates a dial detection circuit, in readiness for the user to start dialing the number.  When this number has been received and decoded by the exchange, it can then start to switch in the correct voice circuits to enable the call to be set up.
In Summary, The telephone line has two conditions on-hook and off-hook. The current which flow in these conditions are referred to as leakage current and loop current.  Typical values are 50uA and 20mA respectively.
Audio Signals and Modulation.
Telephony works by superimposing an audio signal (voice or tones) of a few hundred millivolts amplitude onto the dc line voltage.  This can be achieved by producing a device that draws a current which varies at an audio frequency. The varying current sets up a varying voltage on the line.
DTMF Signaling.
Modern telephones use a pair of audio frequencies to encode the digits used in dialing.  The frequencies can be thought of as representing the rows and columns of digits on the standard telephone keypad. Thus if you press 3, you need to select the frequencies associated with row 1 and column 3 i.e. 697 Hz and 1477Hz.
The DTMF digit needs to be sent for a minimum of 65mS and there should be at least 65mS between the digits.
IC Devices known as DTMF decoder chips are used to decode the audio tones back into digits so that a micro can interpret them.
The DTMF Generator is used to generate tones, and thus dialing a phone number. The PIC will send the number as bits, HT9200 will convert them into tones, which are the same as pressing a digit-key from the telephone keypad. A relay is used in order to open the telephone line.
The HT9200A tone generators are designed for MCU interfaces. They can be instructed by a MCU to generate 16 dual tones and 8 single tones from the DTMF pin. The HT9200A provides a serial mode interface for various applications such as security systems, home automation, remote control through telephone lines, communication systems, etc. the table below shows a brief description of each pin.
The HT9200A employ a data input, a 5-bit code, and a synchronous clock to transmit a DTMF signal. Every digit of a phone number to be transmitted is selected by a series of inputs which consist of 5-bit data. Of the 5 bits, the D0(LSB) is the first received bit. The HT9200A will latch data on the falling edge of the clock (CLK pin). The relationship between the digital codes and the tone output frequency is shown in the table below. As for the control timing diagram, refer to the Figure below.

HT9200 Timing Diagram
When the PIC pull the CE down, the HT9200 activates the generator and waits for transition on the clock CLK line. Data are read on every falling edge of CLK. At the end of the fifth falling edge, the HT9200 generates the corresponding tone on the DTMF line.
In the end, a stop code '11111' should be sent indicating the end of the sending number process.
Separating the audio tones from the dc line current.
By connecting a simple 600 ohm resistor across the line, you will draw enough line current to trigger the circuits in the CO to present a dial tone to the line and to get ready to receive a string of DTMF digits.
However, any tone you put across the resistor will just be dissipated and very little will be detected by the CO.
Traditionally this would have been done using a transformer made of a coil of wire wound on an iron or ferrite core. 
The dc current would flow through the primary transformer inductor, thus drawing line current from the CO, and the DTMF signal can be send via the secondary coil to merge the signal to the telephone line. The resistor is connected in series with the secondary loop to match the impedance of the used transformer (120 ohm/5ohm). The value of the resistor may be changed in case of other transformer type.

DTMF signal amplification
The output of the HT9200 signal level is small to be detected by the CO, therefore the need of an amplifier. The amplifier is designed for this task is composed of two transistors with a gain of 100. The first transistor amplifies the DTMF signal with rejection of the DC components via the capacitor C3. The emitter of the transistor feeds the base of the second transistor with also a DC rejection. The value of the components was chosen by try since the level of amplification is not known neither the level that the CO needs to detect the DTMF signal. The second transistor drives the secondary of the transformer and the speaker where the DTMF tone can be heard.


C.I 18878408


No hay comentarios:

Publicar un comentario