-
2022-09-23 10:24:11
Voice Design of Fire Control System Based on AT89C52
Introduction In most modern control systems, light-emitting diodes, LEDs, digital tubes, liquid crystal displays, buzzers, etc. are usually used for status/result display and fault alarm. When the information is transmitted in language, the advantages of hearing can be brought into play to make up for the lack of completely transmitting information with visual signals. In recent years, with the rapid development of voice circuits, voice chips have become more and more widely used in single-chip control systems due to their advantages of being intuitive, vivid, and convenient to interface with single-chip microcomputers. interface.
1 Speech circuit analysis There are many speech processing synthesis chips, most of which use: speech signal - electret microphone - voltage - filter amplification - AD conversion digital signal storage. When playing, use: digital signal-DA conversion, output, which has the following shortcomings in actual use:
(1) To make the speech sampled without distortion, the sampling frequency fs ≥ 8 000 Hz is required. In a small system, sampling speech at such a speed can only be done for a short period of time. If it takes a longer period of time, it will inevitably take up a lot of storage space.
(2) The cost of the system is high, because ADC, DAC, special voice chip and related circuits are required.
(3) There are different degrees of distortion (signal sampling and recovery).
(4) The use is inflexible, only what to record and what to put, it is difficult to realize the combination of words, words and sentences.
The ISD1420 voice chip is a new high-quality single-chip recording and playback circuit produced by the American ISD company. It adopts the direct analog storage technology DAST. It is mainly composed of oscillator, voice storage unit, preamplifier, automatic gain control circuit, anti-interference filter and output amplifier. A minimal recording and playback system consists of only a microphone, a speaker, two buttons, a power supply, and a few resistors and capacitors. The recording content is stored in a permanent storage unit, providing zero-power information storage. This unique method is realized with the help of the patent of the US ISD Company - Multi-level Direct Analog Storage Technology (DAST TM). Using it, the voice and audio signals are directly stored, and enter the EEPROM memory and segmented output in their original analog form, so the distortion is small, and the voice effect can be reproduced very realistically and naturally, avoiding the general solid recording circuit caused by quantization and compression. quantization noise and "metallic sound". It is easy to use, does not need special voice development tools, and has low cost. Direct analog storage allows the reproduction of its original speech to be accomplished using a monolithic solid-state circuit approach. Not only the voice quality is superior, but also power-off voice protection. Therefore, it is widely used in modern technology. The main features are as follows:
(1) Easy-to-use single-chip recording and playback system with minimal external components
(2) Reproduce high-quality original sound without common background noise
(3) Information can be stored for 100 years and can be recorded and played back 100,000 times
(4) Strong segment location selection capability can process up to 160 segments of information
(5) Edge/level trigger playback
(6) No power consumption information storage, save backup battery
(7) With automatic power saving mode
(8) Enter the maintenance state immediately after recording or playback, only 0.5μA current is required
(9) Working voltage: 5 V
(10) Operating current: 15 mA typical, 30 mA maximum (16 ohms)
2 The system constitutes the voice circuit as a part of the fire control computer, mainly to report the target distance in real time, for the commander to provide observation and decision-making, so as to choose the best time to issue the firing order. The block diagram of the voice circuit is shown in Figure 1. The RS232 level signal is sent by the fire control computer host, and after level conversion, it is received by the 89C52 single-chip microcomputer 89C52 product parameters, documentation and supply information." target="_blank">AT89C52. information, and control the voice chip ISD1420 to report the target distance in real time, providing prompts for commanders.
3 Voice signal control
3.1 Voice circuit characteristics Select voice storage/regeneration chip ISD1420. The circuit uses the EEP-ROM storage method to directly write the analog voice data into the semiconductor storage unit, which has many advantages such as natural sound quality, repeatable recording and playback, anti-interference, and low power consumption. The playback time of ISD1420 is 20 seconds; it can be divided into 160 segments at most, each segment length is at least 125 ms; input sampling kHz; 100 000 recording cycles; 5 V single power supply, playback current 15 mA, maintaining current 0.5 μA. Fully meet the design needs.
The ISD1420 chip address pins (A0~A7) input have dual functions. The functions of A0~A7 are determined according to the level state of A6 and A7 in the address. If one of A6 and A7 is low level, A0~A7 inputs are all interpreted as address bits, which are used as starting addresses. The address bits are only used as input terminals and cannot output internal address information during operation. The address input is locked according to the falling edge of PLAYL, PLAYE or REC. If A6 and A7 are both high, they are mode bits (see Table 1).
There are two things to note when using the operational mode:
(1) All initial operations start from address 0, which is the beginning of the 1420 memory space, and subsequent operations can vary according to the mode. And start working from a different address. When the recording and playback switch in the circuit or enter the power saving state, the address counter is reset to 0.
(2) When PLAYL, PLAYE or REC change to low level and A6 and A7 are high level, the corresponding operation mode is executed. This mode of operation is executed until the next low level control input signal occurs, at which point the current address/mode signal is sampled and executed. The operating modes can be used with a microcontroller or by hardware wiring to obtain the desired system operation.
According to the above introduction, 160 segments correspond to 160 addresses, which are generated by the combination of A0~A7. To achieve segmented playback, you must first perform recording. For recording, you can use advanced sound processing software to pour the sound into the voice module at one time, or you can use the method of segmented recording for segmented recording. When using the ISD1400 series voice chip, it should be noted that a 0.1 mF capacitor should be connected between REC and VCC to prevent the recording operation during power-on and destroy the original recorded information.
According to the needs of the fire control computer system, the content of the playback is military digital pronunciation: "one, two, three, four, five, six, crutch, eight, hook, hole". We use the address function of A0-A7 pins to develop a recording and playback board combined with ISD1420 through sound processing software, and pour the sound into the voice module ISD1420 at one time. In this way, each digital pronunciation corresponds to an internal storage space. The appropriate data playback can be selected by adjusting the address of the voice chip (P2 port control).
Because it is used outdoors, the sound is required to have a certain loudness, that is, the voice circuit is required to have a large power output. The internal output stage of the voice chip ISD1420 has an amplifier, and its direct speaker driving power is 12.2 mW (16Ω load), which is very different from our actual needs. Usually, speakers below 1 W can use LM386 , D2283 , D2822, MC34119 , TA7368 , etc. Chip driver, 1 W ~ 10 w speakers are driven by TDA2003 and LA4440 chips, so the power amplifier must be able to output high-power signals at low voltage to promote the speaker to sound. Here we choose LA4440 chip driver.
3.2 The circuit design of the voice circuit is shown in Figure 2. In this circuit, the voice reading circuit with the single chip 89C52 as the core is designed. The P2 port of the 89C52 is used to realize the address selection. The address is the first address of a voice segment, and the address cannot be changed during this playback process; LA4440 is an audio power amplifier circuit, which amplifies the audio output of ISD1420 and pushes the speaker, and the volume can be controlled by adjusting the resistance value of resistor R1; voice The RC circuit around the chip ISD1420 is mainly to reduce the influence of noise; MAX813L is used as a watchdog circuit to provide power-on reset and operation monitoring for the microcontroller AT89C52.
MAX232 converts the RS232 level signal sent by the fire control computer host into TTL level and sends it to the single chip AT89C52. The single chip AT89C52 displays and reports the status information of the fire control computer host in real time. Play, the P2 port is used to adjust the playback address. Segmented playback can be achieved by time-sharing playback by address, and the biggest advantage of segmented playback is that it can synthesize a paragraph with only some basic sounds. This saves space for the voice module, improves product flexibility, and reduces production costs. Segmented playback can be used in places where there are not many basic elements of pronunciation, but there are many changes in combined pronunciation.
4 Software Design
The software design of AT89C52 is relatively simple. It mainly includes serial communication program (11.0592 MHz crystal oscillator, 4800 baud rate, 8-bit asynchronous mode) with fire control computer host, playback control program, display control program and watchdog program. According to the requirements of the fire control computer system and the actual situation, the sound playback control program only reports the target distance of the information transmitted by the fire control computer host in real time. The target distance is an important basis for firing and mastering the timing of firing. Its reporting principle is: "The long-distance reading interval is larger, the short-distance reading interval is smaller, and the firing report point is located." When reporting, according to the characteristics of the rapid movement of the target, the reading bytes can be omitted to improve the response speed and the clarity of the reading. The start address and playback time are also essential in level control playback, as long as these two parameters are controlled, the playback content can be determined.
5 Conclusions The voice circuit reporting circuit designed by the above method has been practically applied in a fire control system, and the practice has proved that the operation is reliable and accurate, and has a certain use value.