Accelerate the response of TPA2028D1 to the bursting signal

Summary

This article refers to the address: http://

The TPA2028D1 is TI's low-power Class-D amplifier with AGC/DRC capability for portable devices. Due to its outstanding performance, it has been widely used in the industry. It can be configured by I2C itself, allowing designers to optimize chip settings for better results based on different applications.

This article discusses how to optimize the TPA2028D1 setup to better respond to sudden speech in devices such as smartphones, such as keyboard tones, tones, and more.

1 Introduction

The TPA2028D1 is TI's high efficiency Class D amplifier for mobile devices. The integrated DRC and AGC functions automatically adjust the gain of the amplifier according to the size of the input signal to prevent the amplifier from clipping distortion, and effectively improve the average output power, thus improving the playback of the music.

The TPA2028D1 is flexible and configurable. Designers can access their registers through I2C and configure multiple parameters such as amplifier enable, gain, and response speed to optimize for different application scenarios.

Since DRC and AGC adjust the gain according to the signal size, it is necessary to set a certain Attack Time and Release Time for continuous music signals to ensure excellent playback. However, the bursting signal is kept too short, and due to power saving, the TPA2028D1 needs to be enabled before playback and turned off after playback. Therefore, in some designs, when playing, for example, a keyboard sound or a photographing sound, there is a phenomenon that the sound is too small, or the sound is gradual.

This paper analyzes the causes of this phenomenon and discusses how to solve similar problems by optimizing the setting of chip parameters.

2. Two shutdown/enable modes of the TPA2028

The TPA2028 can be turned off and enabled in both hardware and software.

l Through the chip EN pin, the hardware is enabled to turn off;

l Software enable mode is disabled by chip register 0x01 bit6 EN and bit5 SWS

2.1 Hardware Shutdown/Enable

shut down:

l The EN pin is deasserted, the chip enters the off state, and all registers are cleared.

Enable:

l The EN pin is set high, the chip enters the enable state, and all registers enter the initial state, as shown in Table 1. Since the initial state register 0x01 EN=1 SWS=0, the power amplifier section is enabled and can be played directly;

Table 1. Initial Value of TPA2028D1 Register.jpg

Table 1. Initial Value of TPA2028D1 Register

The TPA2028D1 is designed so that the initial gain of the chip after the amplifier is enabled is determined by Fixed Gain. The initial value of the TPA2028D1 Fixed Gain register Reg5/bit5:0 is 00110, which is 6dB, so the initial gain of the amplifier is fixed at 6dB in this state. Since the initial value of the Max Gain register Reg7/bit7:4 is 30 dB, the signal played at this time is gradually increased from 6 dB to 30 dB at the initial value of the Release time register Reg3/bit 5:0 at a speed of 1.81 sec / 6 dB. As shown in Figure 1. Therefore, it will cause a significant fade-in effect, which is too small for signals that are too short-lived.

Figure 1. Hardware Enable TPA2028D1 gain increment.jpg

Figure 1. Hardware Enable TPA2028D1 Gain Increment

2.2 Software Off / Enable

shut down:

l EN=0 (Reg1/bit6) or SWS=1 (Reg1/bit5)

Enable:

l EN=1 (Reg1/bit6) or SWS=0 (Reg1/bit5)

EN and SWS do not clear the setting state of the registers. All register values ​​maintain the original settings, so the TPA2028D1 can be changed according to the set Fixed Gain and Max Gain and Release Time after the software is enabled. As shown in Figure 2. Therefore, you only need to set the appropriate Fixed Gain, Max Gain and Release Time to control this change, thus eliminating the fading problem caused by AGC and DRC.

Figure 2. Hardware Enable TPA2028D1 gain increment.jpg

Figure 2. Hardware Enable TPA2028D1 Gain Increment

It is worth noting that since the internal state of the chip requires time, a certain output delay is generated. The delay of the TPA2028 is around 6ms. Since the time relative to the Ramp up is relatively short, and the processor has a certain delay when playing the burst sound, the output delay can be neglected in the general design. However, if there is a delay in processor playback in the actual application, it can be solved by adding a 6ms delay before the processor plays the burst file.

Figure 3. Output delay.jpg

Figure 3. Output Delay

3. Use different application modes to select the appropriate parameter settings

According to the above analysis of the cause of the sudden fading in the pronunciation, in order to solve the TPA2028D1 response to the sudden pronunciation signal, the solution to the problem is:

l Use the software to enable TPA2028D1 instead of hardware enablement;

l Reduce the difference between the set Fixed Gain and Max Gain.

However, due to applications such as music playback, Fixed Gain and Max Gain still need to have some differences. So we can pass:

l Find a set of intermediate parameters to balance the continuous music playback and the sound playback effect;

l According to different applications, it is judged whether there is a sudden pronunciation playback, and two sets of different parameters are set for the playback of continuous music and the playback of the sudden pronunciation. In practical applications, the TPA2028D1 is enabled, the playback of the pronunciation is repeated, and the application is closed, and the application is performed under some specific applications. For example, when playing a photo sound, the device is generally in a photographing state; the keyboard sounds, and the device is in a keyboard input state. Therefore, we can determine the setting of the TPA2028 parameter according to the unused application, so that the effect of playing the music is not affected when the bursting effect is eliminated.

Since the existing smart portable device operating system application is at the UI layer, and the driver controlling the TPA2028D1 is at the driver layer, it is necessary to judge the application by driving the relevant log file of the operating system.

3.1 settings suitable for sudden pronunciation

Since the fast signal and music dynamic range and playback range are different, it is possible to select another TPA2028 parameter that is more suitable for fast signal playback than music playback.

Select the tone to play the gain. Since the gain of the TPA2028 is changed from Fixed Gain to Max Gain after the chip output is enabled, the difference between Fixed Gain and Max Gain is reduced (the gain change within 3dB generally does not cause significant changes in the auditory loudness), which can limit the large Gain Variety.

When selecting this gain, you need to pay attention to the relationship between the signal amplitude and the maximum volume to prevent problems caused by too small or too loud. For output signals with peak-to-peak values ​​around 500mV, the recommended gain is set between 18dB and 22dB.

Since the dynamic range of the fast signal is relatively fixed, the DRC intervention is generally not required, so it is recommended to set the compression ratio to 1:1.

When the change in gain is controlled within a small range of variation, the effects of parameters such as Attack Time, Hold Time, and Release Time on the gradient become relatively small, but it is recommended to minimize the values ​​of these parameters.

In addition, since the I2C portion of the chip is still enabled after the software is turned off, the power consumption of the chip is higher than that of the hardware. In the 3.6V to 4.2V range, the hardware turns off the chip and the quiescent current is between 0.2uA and 0.3uA. After the chip is turned off using software, the quiescent current of the chip is between 50uA and 65uA. Therefore, the TPA2028 can be turned off by hardware after the device enters standby.

3.2 Timing control of burst pronunciation setting

Because there is still a change in the EN pull-down state to the pull-up state when the power is turned on or the standby state is exited, all the register values ​​of the TPA2028D1 are in the initial state. Therefore, in the case of a sudden sound playback, we need to set the chip register parameters to make it suitable for the playback of the burst signal. Using the software to enable and disable the chip does not clear the state of the register. Therefore, after using the software to turn off the chip, it is not necessary to reset the register parameters before enabling it again.

First enable timing control:

l Pull the EN pin high to enable the chip;

l Set the SWS to 1 using I2C within 6ms, and the software closes the TPA2028;

l Set Fixed Gain and Max Gain, and Attack/Release Time;

l Set the SWS to 0 using I2C, and the software enables TPA2028;

l After 6ms delay, the playback of the pronunciation is started.

Turn off timing control:

l Keep the EN pin high and the chip is always enabled.

l Set the SWS to 1 using I2C, and the software closes the TPA2028.

Enable timing control again

l Set the SWS to 0 using I2C, and the software enables TPA2028;

l After 6ms delay, the playback of the pronunciation is started.

3.3 actual case

In the application of the Android smartphone, TPA2028D1, in the application of telephone dialing, the dialing button is continuously pressed, and the button prompt tone gradually becomes larger.

The process of checking the key tone playback is:

l After entering the phone dialing application, the EN pin of the TPA2028D1 is pulled low;

l After the processor obtains the key value, the button audio and audio file is read, and the EN pin is pulled up to play;

l Delay 1 second. If no other keys are pressed, pull down the EN pin to turn off the TPA2028D1.

The 1 kHz continuous signal is used instead of the button tone. The measured TPA2028D1 output waveform is shown in Figure 4. The signal is slowly increased and the volume is changed from small to large.

Figure 4. Before the actual case change TPA2028D1 output incremental waveform.jpg

Figure 4. TPA2028D1 output incremental waveform before actual case change

Change the playback timing as follows:

l After entering the phone dialing application, pull up the EN pin of the TPA2028D1;

l Set the chip through I2C:

I2CWrite(0xb0, 0x01, 0xe3); //SWS=1, disable TPA2028D1

I2CWrite(0xb0, 0x05, 0x1e); //Fixed Gain=30dB

I2CWrite(0xb0, 0x07, 0xc0); //Max Gain=30dB

l After the processor gets the key value, read the key audio and audio files, and set the chip through I2C:

I2CWrite(0xb0, 0x01, 0xc3); //SWS=1, enable TPA2028D1

Enable the TPA2028 to play the button sound;

l Delay 1 second, if no other keys are pressed, set the chip through I2C at the same time:

I2CWrite(0xb0, 0x01, 0xe3); //SWS=1, disable TPA2028D1

Close the TPA2028.

l After the phone launches the phone dialing application, or the phone enters the standby state, the EN pin of the TPA2028D1 is pulled low.

The measured waveform is shown in Figure 5. In actual use, press the button continuously, and the button sound is normal.

Figure 5. Output waveform after actual case change.jpg

Figure 5. Output waveform after actual case change

4 Summary

The TPA2028D1 incorporates an AGC/DRC that effectively improves the playback performance of the music. The delay settings included do not provide a fast response to transient signals such as bursts. In our practical application, if we can improve the design from the following two aspects:

l Determine the play mode, distinguish the application scenarios of music and sudden pronunciation, and optimize the parameter settings separately;

l Enable or disable the chip in software mode;

You can achieve better playback.

Connect Terminal

Wire female ,Wire Lugs Ring Terminal,Quick Connect terminal ,Connector Terminal Block

Dongguan Andu Electronic Co., Ltd. , https://www.idoconnector.com