April 26, 2024

Building a community emergency help system with public telephone network

Abstract: This paper introduces a residential community emergency help system based on public telephone network PSTN (Public Switch TelecommunicaTIon Network). The system takes the single-chip microcomputer as the core, and uses Dual Tone MulTIple Frequency (DTMF) as the communication method. The system provides emergency help services for residents in the community, and has the advantages of high reliability, low cost, and easy popularity. The system schematic diagram, main hardware circuit and program block diagram are given in the paper. Finally, the application prospect of the system is predicted.

introduction

With the continuous improvement of people's living standards, family safety services are gradually attracting people's attention. Many elderly people, especially sick patients, cannot be well cared for because of the work of the sub-women. When there is a danger, it cannot be dealt with in time, and there are great security risks. Therefore, setting up a networked emergency assistance system in a residential community enables the community property management center to timely deal with the dangers of the residents, which is what people expect. With the large-scale popularization of telephone devices, it has become simple to implement emergency help using a public telephone network. Here, this article will introduce a social emergency help system based on the public telephone network, which will greatly help to improve the living environment and achieve building automation.

1 System working principle

The system is based on single-chip microcomputer, and consists of four parts: DTMF dialing circuit, remote control transmitting and receiving circuit, telephone number storage circuit and hands-free calling circuit. When there is a danger, press the emergency button on the pager or remote control. After the MCU detects the signal, the stored circuit number is sent out. After the connection is made, the intercom can be realized. In addition, since the telephone number in the system is stored in an E2PROM chip with an I2C bus interface, the number can be modified at any time, which is extremely convenient. The system block diagram is shown in Figure 1.

figure 2

2 main hardware circuits

2.1 DTMF dial chip and microcontroller interface principle

Dual tone multi-frequency signal (DTMF), often referred to as a dual tone signal. It is a combination of two specific monophonic signals to represent a certain number or symbol. The frequencies of the two tones are different and the numbers or functions represented are different. In a dual-tone multi-frequency telephone, there are 16 buttons, of which 10 are numeric keys (0 to 9) and 6 function keys (*, #, A, B, C, D). Thus, according to the principle of combination, it must have 8 different single audio signals. According to the frequency combination proposal of the dual tone dialing proposed by CCITT (International Telegraph and Telephone Consultation Committee), four low frequency frequencies (697Hz, 770Hs, 852H2, 941Hz) and four high frequency frequencies (1209Hz, 1336Hz, 1477Hz, 1633Hz) are adopted internationally. Any frequency is combined and combined, there are 16 different combinations, representing 16 different numbers or symbols, as shown in Table 1.

Table 1 Dial tone code for dual tone multi-frequency

Low frequency group number or symbol 1209Hz 1336Hz 1477Hz
697Hz 1 2 3
770Hz 4 5 6
852Hz 7 8 9
941Hz * 0 #

In this system, the dual tone multi-frequency signal is generated by the DTMF signal generator dedicated chip UM95087. Its input terminals R1 ~ R4 (row), C1 ~ C4 (column) can be connected to the ordinary telephone keypad, but also for level input. The two input audio signals are linearly superimposed, and the resulting DTMF signal is output from pin 16 of the UM95087. One audio signal is selected from the low frequency group by the input terminals R1 to R4, and the other audio signal is selected from the high frequency group by the input terminals C1 to C4. When the (Ri) input is low, one of its low frequency groups is selected; when the column (Ci) input is level, one of its high frequency groups is selected. The output audio tone amplitude is 400~500mV, the harmonic distortion and audio distortion of the dual audio output is less than 10%, the frequency error is ±10%, the accuracy is less than 0.75%, and the high frequency is 2dB higher than the low frequency. The 15 pin of UM95087 is used to prevent single tone generation. When it is low level, the output will not produce mono tone output; 10 pin is squelch output terminal; 2 pin is transmitter switch control terminal; 7 pin is on-chip oscillator Input; 8 is the on-chip oscillator output. When applied, the 3.57954MHz crystal oscillator can be connected between the 7th pin and the 8th pin. The DTMF generator UM95087 is controlled by the single-chip AT89C51 to realize channel coding. The interface circuit is shown in Figure 2.

According to the combination principle of the dual audio signal (DTMF) and the above interface circuit, the correspondence between the DTMF signal and the binary coded signal can be obtained, as shown in Table 2.

Table 2 Correspondence between DTMF signals and binary codes

Key number R1R2R3R4 C1C2C3C4 Hexadecimal Low frequency / Hz High frequency / Hz
1 0111 1000 78H 697 1209
2 0111 0100 74H 697 1336
3 0111 0010 72H 697 1477
4 1011 1000 B8H 770 1209
5 1011 0100 B4H 770 1336
6 1011 0010 B2H 770 1447
7 1101 1000 D8H 852 1209
8 1101 0100 D4H 852 1336
9 1101 0010 D1H 852 1477
0 1110 0100 E4H 971 1366

2.2 hands-free calling circuit

The hands-free calling circuit requires clear and loud sound, and does not interfere with each other due to receiving or sending words. Therefore, the technical requirements for the hands-free calling circuit are high, the sensitivity of the transmitting amplifier is high, and the output power of the receiving amplifier is large; the sidetone effect caused by the call can be effectively suppressed. The system uses a dedicated hands-free calling chip MC34018 to form a hands-free calling circuit. The MC34018 is a widely used, high quality hands-free calling integrated chip that uses voice-activated half-duplex hands-free calling, including transmit amplifiers, speaker power amplifiers, attenuation control systems, background noise monitoring systems, and transmit and receive attenuation. Device. Its attenuation control system is controlled not only by the corresponding transmit and receive levels, but also by the background noise level. The hands-free calling circuit composed of MC34018 is shown as in Fig. 3.

3 system software design

The software design includes the acquisition of the help signal of the single chip, the reading and sending of the circuit number, and the setting of the telephone number. Among them, the reading and setting of the phone number is the focus of software design. Since the telephone number is stored in an E2PROM with an I2C interface, and the microcontroller used in this system does not have an I2C interface, the timing of the I2C bus is simulated by software. On the microcontroller, an analog I2C bus interface is extended to implement communication between the microcontroller and the E2PROM chip.

After the reset and initialization of the MCU, when there is a help signal input, the MCU takes out the stored phone number and sends it to the UM95087 chip, so that the phone is connected and the call intercom function is completed. The program flow box is shown in Figure 4.

Conclusion

In recent years, China's investment in residential community construction has become more and more important. Taking 1999 as an example, the state's total investment in residential quarters is between RMB 170 billion and RMB 180 billion. According to the division of the real, medium and high levels of residential quarters by the Ministry of Construction, the community is intelligentized to 1% to 3% of the total investment of the residential community. Calculated in this proportion, the demand for intelligent districts in 1999 alone reached 17 to 5.4 billion yuan. With the continuous deepening of the housing system reform and the continuous improvement of the residential environment, this value will be greatly improved.

The community help system described in this paper has strong practicability, low cost and convenient promotion. It has passed comprehensive experiments and put into production. The continuous promotion of emergency assistance systems in residential communities will definitely have a positive impact on the construction and development of intelligent building systems and the improvement of people's living standards.