Freescale D类放大器解决方案
作者: 时间:2008-10-07 10:42 来源:eaw
Freescales DSP5680x devices offer a combination of peripherals and software to enable Class D amplifiers to work at peak performance.From the perspective of wasted power, the best amplifier operates in pure switching mode-Class D. Normally, the amplifier has efficiency higher than 90 percent, meaning over 90 percent of the power is delivered into the load. In fact, a Class D amplifier works as a power D/A converter and can be used to realize high output power, 300W or more. The Class D amplifier is based on an analog technique of pulse width modulation (PWM).
Solution
As shown in the block scheme in Figure 1, an audio codec is connected to the SPI of Freescales DSP5680x, providing A/D conversion of the input signal. The audio codec may be bypassed and the SPI used directly as a digital input. Control components, such as display and buttons, are connected to GPIO pins. The most important component is the power stage connected to the PWM output of the DSP and includes power transistors, switchers of the output. The low pass filter is passive and cuts frequencies exceeding the maximum frequency of the input signal. Distortion and noise of the output signal are leveled by cutting these high frequencies, presented in the output signal because of the PWM modulation. The principle of PWM modulation, illustrated in Figure 2, is quite simple.
As shown in Figure 2, the input signal Vin is modulated with modulation signal Vmod. There is a modulated signal in the middle and the spectrum of the modulated signal is at the bottom in the figure. The original signal fin is selected with a low pass filter, cutting the higher frequencies around the modulation frequency fmod. The required frequency of PWM is 25 or more times faster than the bandwidth of the signal being reproduced. A PWM modulation frequency of 1MHz or higher should be used for 44,100Hz sampling frequency of the audio codec.
Figure 3 is a software model for an application designed to be interrupt-driven. The most important feature is the interrupt generated by the audio codec connected to the SPI. Inside the interrupt routine, the data sample must be read and processed. PWM Value Registers (PWMVAL) shown in Figure 2 are updated from the input sample using the following formula:
PWM Value = (Input Data Sample) x (PWM Modulus)
In the formula:
PWM Value = A new value of the PWM Value register (PWM VAL)
Input Data Sample = Current sample of input signal read from audio codec
PWM Modulus = A value read from the PWM Counter Modulo Register (PMCM)