Design and Circuit of Auto Station Reporter Based on MP3

Design and Circuit of Auto Station Reporter Based on MP3

With the rapid development of the city, the bus lines are adjusted from time to time, and the station name changes, and the car advertisements are more and more valued by merchants. Therefore, one can easily replace voice messages and play high-quality voice messages The car stop is becoming more and more important. Traditional car station stoppers are made with special speech synthesis chips. The speech synthesis chip is limited by the information capacity and voice quality, and the replacement of information requires professional equipment and personnel, so it is extremely important to develop a new type of car stop. The stopper designed in this article can be very convenient to change the playback content, and can play high-quality music.

1 Stop station function

The station stopper has the following functions:

Can be used as a USB drive to connect to a computer. Users can download the broadcast content of the station recorder by themselves, and can also easily change the broadcast content. You can change the file to be played by editing the playlist file. There are 16 16 × 16 dot matrix Chinese characters, and the Chinese characters can be used to prompt the playback content during voice playback. Play high-quality music, can be used as an MP3 player when there is no station to improve the quality of bus service.

2 System working principle

This system adopts AT89C51SNDlC single-chip microcomputer (internal integrated MP3 decoder) as the main control CPU and decodes MP3 data to realize the control of USB and PC connection when the station information is played, dot matrix character display, file storage and USB disk function. The system uses FATl6 to realize the file system on K9F1208

, Forming a 64MB addressable area that Windows can recognize and access. Combined with the USB controller, the system can be used as a USB drive under Windows, so as to achieve file management and data storage functions under Windows. The system uses the FATl6 file system to set up a name named SCHEDULE on K9F1208. LST list file. The different lines of the list file take different MP3 file names in the root directory, and the different keys on the keyboard correspond to the MP3 file names in different lines of the list file; when a key is pressed, the program finds the MP3 corresponding to the corresponding line in the list file File to play. In this way, through the setting of the program, the bus can realize the announcement of the MP3 format sound signal and the broadcast of various information through the keyboard. The list file is generated when the system initializes the flash memory, and the system generates the name sCHEDULE while formatting the flash memory. LST list file. The list file can be opened under Windows using Notepad, edit the name of the MP3 to be played. Simultaneously broadcast the station information and display the corresponding content through 16 16 × 16 LED dot matrix. The system block diagram is shown in Figure 1.

System Block Diagram

3 Partial circuit

AT89C51SNDlC is an integrated MP3 hardware decoder and USB revl launched by Atmel. 1 microcontroller of the controller. It is based on 8-bit C51 MCU core (the highest clock frequency is 20 MHz), built-in 2304 bytes of RAM and 64KB Flash program space, with 4KB boot flash memory, providing more than 44 available general I / O ports and multiple interfaces. Among them, the very convenient design is a 4-bit interruptible keyboard port and an I2S format audio interface. The 4-bit interruptible keyboard port can form a 4 × 4 keyboard matrix, and the I2S interface simplifies the system circuit. The DAC used in this design is UDAl330. UDAl330 is a DAC with an I2S interface and an internal integrated headphone operational amplifier launched by Philips. Using UDAl330 can further simplify the system circuit, and provide L3 mode and static control two control methods, can provide up to 20-bit high-quality sound, is an ideal choice.

The system schematic diagram is shown in Figure 2.

System schematic

3.1 Voice processing

The decoding circuit inside the AT89C51SNDlC chip supports the hard decoding of the third layer format of the MEPG I / II sound format, which can handle MP3 audio signals with sampling frequencies of 48 kHz, 44.1 kHz, 32 kHz, 24 kHz, 22.05 kHz, and 16 kHz. 31-level low, medium and high balance control and independent volume control of left and right channels, the sound quality effect is significantly better than the speech synthesis chip.

MP3 files are stored in flash memory K9F1208. When broadcasting station information, MCU according to the current state of the system and the keys pressed, according to the program settings from the list file SCHEDULE. Find the name of the MP3 file that should be played in IST. After searching and opening the file, detect each frame of the MP3 data of the file, and check whether the information carried in the frame header is consistent with the frame. If the entire error is found to be within the tolerance range, the file is deemed playable. The MCU controls the decoder through nine special function registers related to the MP3 decoder. The decoder can only start playing when there is already a complete frame in the input buffer. The decoder realizes the handshake signal for MP3 input buffer management through the MP3 decoding status registers MP3STA and MPREQ, MPFREQ, and MPBREQ bits in the MP33TA1. During playback, the MCU takes the MP3 data frame from the MP3 file and sends it to the MP3DAT register. When the decoder needs data, the handshake signal is triggered and a corresponding interrupt is triggered to notify the MCU to input data into the MP3DAT. The decoder also supports functions such as CRC check and frame synchronization error check, which will not be repeated here.

In connection with UDAl330, the I2S interface pins of AT89C51SND1C are respectively connected to the corresponding pins of UDAl330. In order to improve the audio signal sound quality, UDAl330 adopts L3 mode, APPSEL is grounded. In this mode, APPL0 is used as a test pin, APPL1 is used as a clock in L3 mode, APPL2 is used as a control in L3 mode, and APPL3 is used as a data input in L3 mode. O connected.


The station recorder does not need the recording function, so the MIC circuit does not need to be connected to the MP3 circuit. The audio signal of the MIC circuit is connected as another input of the car amplifier, as shown in Figure 3.

Voice input circuit

3.2 USB flash drive function part

This function involves the implementation and management of the FAT16 file system on the K9F1208, and the communication between the USB slave and the host. K9F1208 is a 64 MB Flash chip launched by Samsung. The chip storage area is divided into 4096 blocks, each block is divided into 32 pages, and each page has 512 KB + 16 bytes. Flash read / write has the following characteristics: it must be read and written in units of pages, and the original content must be erased before writing; the erase operation must be performed on the Block, that is, at least one Block at a time. Therefore, the realization of FATl6 can define one page of Flash as 1 sector and its 2 blocks (64 sectors) as one cluster. In this way, the capacity of the cluster is exactly 512 bytes × 64 = 32KB, which meets the requirements of FAT16 for the cluster size. When FAT16 allocates space, the conversion of its logical block address (LBA) and the actual physical address of Flash can be performed according to the following formula:

F1ash block address = logical block address / 0x20

Flash page address = logical block address% 0x20

According to this structure and the requirements of FATl6

, Realize DBR, FAT, DIR and DATA four areas on K9F1208, can realize the disk management function in USB. AT89C5lSND1C chip integrates a USB controller. Due to the more complicated Mass Storage protocol and endpoint configuration, enumeration, and communication process, it will not be repeated here. Please refer to Figure 2 for hardware connection.

3.3 Display circuit

As shown in Figure 4, the display circuit is composed of IDT7132, AT89C51, 74LS154, 74HC573, and a 16 × 256 LED dot matrix screen. IDT7132 is a dual-port RAM with a capacity of 32 KB. Since the 16 × 256 LED dot matrix display buffer requires a total of 512 bytes of storage space, the circuit uses it to interface with AT89C5SSNDlC and store Chinese character display information. The 16 × 256 LED dot matrix screen can display 16 16 × 16 dot matrix Chinese characters. The display screen is divided into 32 pages, and each page is divided into 16 lines. This design uses two 4--16 decoder 74LS154 combined into a 5-32 decoder, as a page decoder; using a 74LSl54 as a row decoder. Each page corresponds to a 74HC573, which is used to latch the content displayed on one line of the page; 32 74HC573 can latch the content of one line of 16 × 256 LED dot matrix screen, and the display screen is driven by 7407. AT89C51 takes out the display content from the specified area of ​​the dual-port RAM, controls the page decoder to send the data into the current line of each page, and then controls the line decoder to wrap, thus forming a dynamic display in a loop. The display circuit is used as an independent module. When the annunciator displays information, it only needs to send the Chinese character font to be displayed to the storage area corresponding to the dual-port RAM.

Display circuit

Conclusion

As the hardware cost of the MP3 player decreases, the performance and cost advantages of the MP3 radio station become more and more obvious, and it has broad application prospects; and the MP3 radio station can easily replace broadcast information, and has high use value and promotion value.

Electric Linear Actuator for Machinery, Agriculture Machine, Construction Equipment, Vehicles , Ships, etc.

This series Linear Actuator is compact, quiet and powerful. It is designed to fit in an area specifically requiring a right angle motor and can be equipped with a Hall sensor for feedback. Industry certifications for the linear actuator include IEC60601-1, ES60601-1 and RoHS. In addition, thees products are available with an optional IP54 or 66 rating.


Industry Actuator

Industry Actuator,24V Industrial Actuator,Electric Industrial Actuator,Industry Linear Actuator

TOMUU (DONGGUAN) ACTUATOR TECHNOLOGY CO., LTD. , http://www.tomuu.com