0 Introduction

  With the development of digital electronic technology and the emergence of microcontrollers such as single-chip microcomputers, voice storage and automatic playback have become easy to achieve. At present, voice storage and automatic playback systems have been widely used in daily life. The voice announcement device on the bus, the queuing system in banks and hospitals, etc. are all applications of voice storage and automatic broadcasting systems. This article introduces a design of a voice broadcast recorder based on the voice storage and automatic playback system. The design is centered on ISD4004: voice chip and AT89S52 single-chip microcomputer, and it realizes voice storage and automatic playback very well.

  1 Hardware design principle

  The main function of the voice broadcast recorder is to realize voice storage and timed playback. There are many ways to realize voice storage and timed playback, and there are also many devices to choose from. Due to the emergence of microcontrollers such as single-chip microcomputers and the development of digital circuit technology, voice storage and automatic playback have become easy to achieve. This design uses a single-chip microcomputer as a microcontroller. The word length of the single-chip microcomputer has developed from 4 bits, 8 bits, 16 bits to 32 bits. At present, these single-chip microcomputers with different word lengths exist in the market at the same time, and users can choose according to different needs. This system uses the 8-bit AT89S52 single-chip microcomputer as the controller.

  At present, there are many voice chips that can be used with single-chip microcomputers, and there are many voice chips with excellent performance. The ISD4004 voice chip produced by ISD Company in the United States is one of them. The ISD4004 chip adopts CMOS technology and contains an oscillator, anti-aliasing filter, smoothing filter, audio amplifier, automatic squelch and high-density multi-level flash storage array. The pins include power supply, clock, voice signal analog input/output terminal, and MCU interface (SPI interface). The chip adopts multi-level direct analog storage technology, and each sampling value is directly stored in the on-chip flash memory, so it can reproduce the voice very realistically and naturally.

  The recording and playback time of the ISD4004 series single chip is 8 to 16 minutes, and the sampling frequency can be 4.0/5.3/6.4/8.0 kHz. The lower the frequency, the longer the recording and playback time, and the sound quality is reduced. The chip design is based on the fact that all operations must be controlled by the microcontroller, and the operation commands can be sent in through the serial communication interface (SPI or Microwire). Due to the many advantages of ISD4004, this design uses it as a recording and playback device.

  The system is connected to an external clock chip PCF8563, a matrix keyboard LED display and an E2PROM AT24C01. In order to improve the voice quality during recording, the signal-to-noise ratio of the input end must be improved. Therefore, a single-ended input of a transistor (9014) amplifier circuit is used at the input end of the system, and the output end of the system is amplified and output by an audio power amplifier LM386 to drive the speaker. The system block diagram of the entire system is shown in Figure 1.


  2 Hardware Design

  2.1 Voice Input and Output Circuit Design

  The voice signal converted into an electrical signal by an electret microphone is very weak and needs to be amplified before being sent to the voice chip. The purpose of this is to improve the signal-to-noise ratio of the signal in order to achieve better noise suppression. Since the acoustic-to-electric conversion device uses an electret microphone, the post-amplification circuit uses a transistor as an amplifier to meet the requirements. In this design, the voice signal output from the voice chip is very weak and cannot directly drive the speaker, so a power amplifier circuit is added between the voice chip and the speaker. The power amplifier circuit uses the audio power amplifier LM386 produced by National Semiconductor Corporation of the United States and is composed of a few capacitors and resistors. The amplifier circuit has good amplification effect and low noise, which can meet the requirements of this design.

  2.2 Display circuit design

  The display part of this design uses LED digital tubes. In order to increase the brightness of the LED display, in this design, the a, b, c, d, e, f, and g pins are connected in series with 300 Ω resistors and then connected to 5 V voltage. This design uses software lookup table output. When the system does not record or play audio, it needs to display information such as year, month, day, hour, minute, second, and week; when the system has audio recording and playback, it needs to display information related to audio recording and playback. In this way, the entire system requires a total of 15 digital tubes. In order to save the I/O port of the microcontroller, the display part uses 74LS154, and the interface between the microcontroller and the LED uses a dynamic interface. 74LS154 is a 4-wire 16-wire decoder, which is used to decode the output of the microcontroller and use it as the chip select signal of the LED.

  2.3 PCF8563 interface circuit design

  PCF8563 is a low-power CMOS real-time clock/calendar chip produced by Philips and is an I2C bus interface device. In the design, PCF8563 is used to provide time and calendar information. When there is no recording or playback operation, this design is equivalent to a perpetual calendar; when recording or playing, PCF8563 is used to time each recording or playback, and all time information is displayed through the LED digital tube. Since PCF8563 is an open drain, a 5.1 kΩ pull-up resistor must be added. The interface circuit design of PCF8563 and AT89S52 is shown in Figure 2. [page]


  2.4 ISD4004 interface circuit design

  This design uses the ISD4004-16M model voice chip. This voice chip can record 16 minutes. It has a port called RAC. RAC is the row address clock terminal. Each RAC cycle indicates that the ISD memory operation has been performed for 1 row (the memory in the ISD4004 series has a total of 2,400 rows). Therefore, the number of row addresses at the RAC end corresponds to the number of rows in the memory in the voice chip, that is, the initial and end addresses of each recording stored in the voice chip correspond to the unique number of RAC row addresses. Therefore, it is only necessary to connect the RAC end to the counting end of the single-chip microcomputer, and only record the number of RAC row addresses to realize the entire recording and playback operation, and the counter of the single-chip microcomputer does not need to be interrupted. Based on the above ideas, the interface circuit between ISD4004 and the single-chip microcomputer is designed as shown in Figure 3.


  3 Software Design

  The program design in this design includes the following parts, namely keyboard processing program, ISD4004 playback driver, ISD4004 recording driver, time correction program, recording subroutine, playback subroutine, playback time setting subroutine, playback selection program, and subroutine design. Figure 4 is the main program flow chart. [page]


  4 System Test

  After the system is powered on, all 15 digital tubes will light up for about 3 seconds to detect the quality of the digital tubes. After that, the digital tubes will display information such as year, month, day, week, hour, minute, and second. When the recording button is pressed, the system starts recording. During recording, the digital tube will display the word "SAVE" and the time information of the recording; when the confirmation button is pressed, the recording of the voice segment ends, and the digital tube re-displays the time information. When the playback button is pressed, the system starts playing, and the digital tube will display the word "PLAY" and the time information of the recording. After the playback ends, the digital tube will return to the time display interface. When the time correction key is pressed, the time can be corrected; when the confirmation key is pressed, the time correction ends. This system can record 15 minutes and can record 4 recordings. When the play setting key is pressed, the play time of each recording can be set; when the play selection key is pressed, any of the 4 recordings can be played.

  This system will have a small amount of noise when playing recordings, which may be caused by the following reasons:

(1) The entire system is completely hand-welded, and there is interference between the lines;
(2) The digital ground and analog ground of ISD4004 are not routed separately, and they are all connected together, which causes interference;
(3) The amplification factor of the voice input amplifier circuit is not enough, and the noise is not sufficiently suppressed.

  The design of the entire system is reasonable, the peripheral circuit structure is simple, and it is convenient to debug; the microcontroller has a remaining I/O port, which is convenient for system upgrades and expansions; all programs of the microcontroller are written in C-51, which is convenient for debugging and reading. The entire system works stably and is easy to operate. The design principle of this design can be used on buses as a voice station announcer, and can also be used in public places such as banks and hospitals that require automatic voice broadcasting of voice information. A slight expansion on the basis of this design can meet the needs of practical applications.