introduction
With the development of digital electronic technology and the emergence of microcontrollers such as microcontrollers, voice storage and automatic playback have become easy to implement. At present, voice storage and automatic playback systems have been widely used in daily life. Voice station announcers on buses, queuing systems in banks and hospitals, etc. are all applications of voice storage and automatic broadcast systems. This article introduces the design of a voice broadcast memo based on a voice storage and automatic playback system. The design is centered on ISD4004: voice chip and AT89S52 microcontroller, which well implements voice storage and automatic playback.
1 Hardware design principles
The main function of the voice broadcast memo is to realize voice storage and scheduled playback. There are many ways to implement voice storage and timed playback, and there are many devices to choose from. Due to the emergence of microcontrollers such as microcontrollers and the development of digital circuit technology, today's voice storage and automatic playback have become easy to implement. This design uses a single-chip microcomputer as the microcontroller. The word length of microcontrollers has developed from 4 bits, 8 bits, and 16 bits to 32 bits. At present, these types of word length microcontrollers exist in the market at the same time, and users can choose according to different needs. This system uses the AT89S52 microcontroller with a word length of 8 bits as the controller.
There are currently many voice chips that can be used with microcontrollers, many of which have very superior performance. The ISD4004 voice chip produced by the American ISD Company is one of them. The ISD4004 chip uses CMOS technology and contains an oscillator, anti-aliasing filter, smoothing filter, audio amplifier, automatic squelch and high-density multi-level flash memory array. The pins include power supply, clock, voice signal analog input/output terminal, and MCU interface (SPI interface). The chip uses multi-level direct analog storage technology, and each sample value is directly stored in the on-chip flash memory, so it can reproduce speech very realistically and naturally.
The ISD4004 series single-chip recording and playback time is 8 to 16 minutes, and the sampling frequency can be 4.0/5.3/*/8.0 kHz. The lower the frequency, the longer the recording and playback time, and the sound quality will decrease. The chip design is based on the fact that all operations must be controlled by the microcontroller, and operating commands can be sent 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 externally connected to the clock chip PCF8563, matrix keyboard LED display and E2PROM AT24C01. In order to improve the voice quality during recording, it is necessary to increase the signal-to-noise ratio at the input end. Therefore, a triode (9014) amplifier circuit is used as a single-ended input at the input end of the system. The output end of the system is amplified and output by the 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 electrical signal converted from the voice signal through the 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 to achieve better noise suppression. Since the acoustic-to-electrical conversion device uses an electret microphone, the post-amplification circuit uses a triode as the amplifying device to meet the requirements. The voice signal output from the voice chip in this design is very weak and cannot directly drive the speaker, so a power amplifier circuit must be added between the voice chip and the speaker. The power amplifier circuit uses the audio power amplifier LM386 produced by National Semiconductor and is composed of a few capacitors and resistors. The power 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 improve 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 a 5 V voltage. This design uses software lookup table output. When the system does not record or play sound, it needs to display the year, month, day, hour, minute, second, day of the week and other information; when the system does record or playback of sound, it needs to display information related to the recording or playback of sound. In this way, the entire system requires a total of 15 digital tubes. In order to save the I/O port of the microcontroller, 74LS154 is used in the display part, and the interface between the microcontroller and the LED adopts a dynamic interface. 74LS154 is a 4-line 16-line 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 playback is in progress, PCF8563 is used to time each segment of recording or playback, and all time information is displayed through the LED digital tube. Since PCF8563 is an open-drain circuit, a 5.1 kΩ pull-up resistor must be added. The interface circuit design of PCF8563 and AT89S52 is shown in Figure 2.
2.4 ISD4004 interface circuit design
This design uses the ISD4004-16M model voice chip. This voice chip can record for 16 minutes. It has a port as the RAC end, and RAC is the row address clock end. Each RAC cycle indicates that the ISD memory operation is performed on one line (the memory in the ISD4004 series has a total of 2,400 lines). , so the number of row addresses on the RAC side corresponds to the number of rows of 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, you only need to connect the RAC end to the counting end of the microcontroller, and only record the number of RAC row addresses to achieve the entire recording and playback operation, and the counter of the microcontroller does not need to be interrupted. Based on the above ideas, the interface circuit between ISD4004 and the microcontroller 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, and playback selection program , subroutine design. Figure 4 is the main program flow chart.
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. Afterwards, the digital tube will display information such as year, month, day, day of the week, hour, minute, second and so on. 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 segment; when the OK button is pressed, the recording of the voice segment ends and the digital tube will display the time information again. When the play button is pressed, the system starts to play, and the digital tube will display the word "PLAY" and the time information of the recording. After the playback is completed, the digital tube will return to the time display interface. When the time correction key is pressed, the time can be corrected; when the OK key is pressed, the time correction ends. This system can record for 15 minutes and can record 4 recordings. When you press the playback setting button, you can set the playback time of each recording; when you press the playback selection button, you can play any of the four recordings.
This system will produce a small amount of noise when playing recordings, which may be caused by the following reasons:
(1) The entire system is completely welded by hand, and there is interference between lines;
(2) The digital ground and analog ground of ISD4004 are not routed separately, but are all connected together, causing interference;
(3) The amplification factor of the voice input amplification 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 for debugging; the microcontroller has remaining I/O ports to facilitate system upgrades and expansions; all programs of the microcontroller are written using C-51, which is convenient for debugging and reading. The whole 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 some public places such as banks and hospitals that need to automatically broadcast voice information. A slight expansion on the basis of this design can meet the needs of practical applications.
Previous article:Research on digital electricity meter with remote meter reading function
Next article:How to correctly use the bit fields in C51 microcontroller
Recommended ReadingLatest update time:2024-11-23 11:42
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- STMicroelectronics discloses its 2027-2028 financial model and path to achieve its 2030 goals
- 2024 China Automotive Charging and Battery Swapping Ecosystem Conference held in Taiyuan
- State-owned enterprises team up to invest in solid-state battery giant
- The evolution of electronic and electrical architecture is accelerating
- The first! National Automotive Chip Quality Inspection Center established
- BYD releases self-developed automotive chip using 4nm process, with a running score of up to 1.15 million
- GEODNET launches GEO-PULSE, a car GPS navigation device
- Should Chinese car companies develop their own high-computing chips?
- Infineon and Siemens combine embedded automotive software platform with microcontrollers to provide the necessary functions for next-generation SDVs
- Continental launches invisible biometric sensor display to monitor passengers' vital signs
- 【Share】Choice of flyback chip
- Replace the foreign 2SK2837 field effect tube 500V, 24A model in AC-DC switching power supply!
- Program to control ad7708 with MSP430
- Who has done packaging modeling?
- Fundamentals of RF/Microwave Switch Test System Design
- Bluetooth is down: BIAS attacks threaten all mainstream Bluetooth chips
- Will there be conflicts between Wi-Fi and Bluetooth in the same frequency band?
- Analog signal isolation GP9303+GP8101 solution
- A heating unit power supply solution with constant and adjustable output power based on TPS61022
- Off-road vehicle modification 2