Design of automotive MP3 wireless transmitter based on single chip AT89C52 and MC145152 chips

Publisher:limm20032003Latest update time:2023-06-19 Source: elecfans Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

introduction

The car MP3 wireless transmitter can send the music stored in the MP3 player through FM broadcast, then receive it through the FM radio and play it through the car stereo. This article uses microcontroller AT89C52 and digital phase-locked loop MC145152 to design a car MP3 wireless transmitter. Judging from the simulation results and the operation of the target prototype, the expected results have been achieved.


System composition

Figure 1 is the system block diagram of the automotive intelligent MP3 wireless transmitter. It mainly consists of MC145152 and MC1648 to form a digital phase-locked loop frequency synthesizer, and uses a varactor diode MV209 for frequency modulation. Users can use simple buttons to control and monitor the transmission frequency through the microcontroller AT89C52, while using the LCD to display feedback information. In addition, the serial port can be used to realize communication between the microcontroller and the computer, so that the transmitter can be intelligently controlled through the computer. Audio sources can not only be obtained from car MP3 players, but can also be provided through computers or even using network resources.

Design of automotive MP3 wireless transmitter based on single chip AT89C52 and MC145152 chips

Figure 1 System block diagram

Design of each component module

Design of digital phase locked loop frequency synthesizer

This article uses MC145152, which integrates crystal oscillator, reference frequency divider, frequency/phase detector, programmable frequency divider and other circuits, simplifying circuit design. At the same time, the microcontroller is used to control the MC145152 to determine the corresponding relationship between the frequency division coefficients A, N and the transmission frequency.


The control of the frequency synthesizer is realized by the microcontroller, as shown in the formula f0 = (P × N + A) × fr (where f0 is the VCO output frequency, P is the frequency division coefficient of the high-speed frequency divider in Figure 1, and N and A are the microcontroller Programmable frequency division coefficient, fr is the frequency modulation step value). It can be seen that the output frequency can be controlled by A and N. The values ​​of A and N are respectively from P2.2~P2.7 (6 bits) and P0 port (8 bits) of the microcontroller. ) to MC145152. Originally, sending the N value requires a 10-bit data line, but because f0 belongs to the 88~108MHz frequency band, if the 10KHz frequency modulation step value fr is used, and calculated according to the formula f0 = (P×N+A)×fr, the highest bit of the N value can be obtained ( N9, N8) is always 0, which can save the output port of the microcontroller and connect the N9 and N8 pins of MC145152 directly to ground.

The voltage controlled oscillator is a key part of the frequency synthesis circuit. It uses the integrated VCO chip MC1648. Its operating voltage is 5V, the output frequency can reach up to 225MHz, and the output waveform distortion is small. It uses a parallel LC resonance composed of a varactor diode MV09 and an inductor. Tank circuit, the oscillation frequency will be controlled by the bias voltage of the varactor diode.


Design of high-speed frequency divider

Since the frequency of the transmitter is as high as 88MHz, MC145152 cannot directly divide it. It must first be pre-divided by a high-speed frequency divider of ECL (non-saturated logic circuit) to reduce the frequency, and then further divided by MC145152 to obtain a The frequency is equal to the reference frequency, and phase detection is performed. In order to make the frequency division coefficient continuously adjustable, the programmable frequency division circuit uses the swallowing pulse counting method, which is composed of ECL's high-speed frequency divider MC12022 and the ÷A subtraction counter and ÷N subtraction counter inside MC145152.


Control circuit design and frequency calculation

The functions of the control circuit include: responding to key input, controlling the liquid crystal display, calculating and outputting control signals to MC145152, and monitoring the transmit frequency. The microcontroller uses an 11.0592MHz crystal oscillator, which is connected from the X1 and X2 ports. The two pins of the crystal oscillator are connected to a 30pF load capacitor to ground.


Frequency measurement can be completed using a microcontroller. There are two timers/counters inside the microcontroller, one is used for timing and generates a standard time base gate signal, and the other is used for counting, counting the number of pulses input during the gate time, and then converting it to obtain the actual input frequency.


Similar to the MC145152, the microcontroller cannot directly measure at frequencies up to 88MHz. The transmit frequency must be pre-divided first, down to the frequency range that the microcontroller can measure, and converted into a universal TTL level, and then connected to the frequency measurement interface. The measured results are displayed on LCD. The output frequency of MC12022 is at least 88MHz/64=1.375MHz, which is higher than the frequency limit of the microcontroller and cannot be used directly. Therefore, it is necessary to connect another frequency divider with a frequency division coefficient of 100. This article uses the cheaper frequency divider 74HC390 .

The VCO output frequency range is 88 MHz ~108MHz. First, the reference frequency fc should be determined, and fr is the step size (frequency interval). fr can be determined by Equation 1.

Programming of the control and display parts of MC145152

Figure 2 is the software design flow chart. The crystal oscillator frequency is 10.2400MHz. First determine its frequency interval and divide it by ÷R. If R is 2048, the frequency interval is 5kHz. By changing the counting method, the frequency modulation step values ​​that can be obtained are 5kHz, 100kHz and 500kHz respectively. The calculation of A and N values ​​can be completed by the aforementioned formulas. However, in programming, the algorithm is not written as a program, but A must be found. , the changing rule of N. Table 1 shows the A and N values ​​corresponding to different step values ​​(only part of them are listed due to space limitations). When the step values ​​are 5kHz, 100kHz, and 500kHz respectively, the A value increases by 1, 20, and 36 respectively, because the A value range is 0~63, and N>A must be satisfied. In programming, there is no need to store every change in the microcontroller. Instead, a variable fa is used, whose values ​​correspond to different steps, and the values ​​are 1, 20, or 36. This saves system resources, and the A and N values ​​can be determined according to the set frequency and sent to MC145152.

Figure 2 Software design flow chart

Frequency measurement subroutine

Frequency measurement is to measure and display the set output frequency in real time. Programming is implemented in C language. The program includes four modules: frequency divider, frequency measurement controller, counter and latch. Finally, the measured data is latched and sent to the LCD display. The principle is to use a counter to count pulses of the measured frequency. When the clock period is Is, the number of pulses measured is the measured frequency. Frequency measurement control is designed to complete automatic frequency measurement. It controls the work of the counter so that its counting period is Is. It stops counting after Is, sends the count value at this time to the latch, and clears the counter at the same time. Zero, starts counting for the next cycle, and the count value is the measured frequency.


Conclusion

In the process of developing car MP3 wireless transmitters, several sets of frequency synthesis design solutions were used. After comparison, a digital phase-locked loop frequency synthesis circuit controlled by a single chip microcomputer and MC145152 as the core was finally selected to achieve automatic frequency tracking. The frequency stability meets the requirements. Designed as a CNC variable frequency, any frequency can be obtained. After testing, it has relatively high frequency stability and reliability.


Reference address:Design of automotive MP3 wireless transmitter based on single chip AT89C52 and MC145152 chips

Previous article:Detailed explanation of 80C51 microcontroller timer/counter (including working mode)
Next article:51 series microcontroller: 51 sub-series and 52 sub-series

Recommended ReadingLatest update time:2024-11-23 08:02

Design of contactless IC card prepayment watt-hour meter based on AT89C52
  The accuracy of the user's electricity consumption measurement method depends on the accuracy of the transformer and the meter. Contact IC card prepaid electricity meters have emerged, which have changed the past cumbersome manual meter reading and manual pricing to the user holding a card to purchase electricity, r
[Microcontroller]
Design of contactless IC card prepayment watt-hour meter based on AT89C52
51 single chip microcomputer (AT89C52) A/D conversion
#include reg52.h   #define uchar unsigned char   #define uint unsigned int   #define PORT P3   #define dula_h P2|=0x40   #define stay_l P2&=0xbf   #define temperature_h P2|=0x80   #define wela_l P2&=0x7f   sbit cs=P2^0;   sbit rd=P2^1;   sbit wr=P2^2;   fly read;   uchar table ={ //Common anode digital tube   0xc0,0xf
[Microcontroller]
51 single chip microcomputer (AT89C52) A/D conversion
Interface circuit and source code between AT89C52 microcontroller and DS18B20
This article will introduce the temperature measurement system composed of 51 single-chip microcomputer AT89C52 and temperature sensor chip DS18B20, and provide source code for readers' reference. The temperature measurement accuracy reaches 0.1 degrees, and the measured temperature range is between -20 degrees and
[Microcontroller]
Interface circuit and source code between AT89C52 microcontroller and DS18B20
Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号