This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Setting the TPA2028D1 AGC, Volume and Mute

Other Parts Discussed in Thread: TPA2028D1, TPA6130A2

Hi Folks,

I'm hoping these are a simple questions; I've just started working with the TPA2028D1 and there are a few things the datasheet isn't clear on:

1.  How do you disable the AGC?  This is mentioned prominently in the datasheet, but I can't find an explanation of how this is done.  

2.  How do you set the volume output?  It seems to be done using the "Fixed Gain", but I don't seem to be able to get the kind of changes in volume that I would expect.  

3.  Is there a way to "mute" the output?  I would like to turn off the amplifier - is the "EN" bit of the IC Function Control register the right way to do this?  

I do have a couple of the the TPA2028D1YZEVM's, and have wired them into prototype circuits (I can peek and poke the I2C registers and verify that I'm making changes) but I can't get the software to work - looking in the forums, there seems to be a "5100.drivers.zip" download, but I can't access that.  

Thanx for your help!

myke

  • Hi, Michael,

    Welcome to e2e, and thanks for your interest in our products!!!

    I don't know what happened to that driver file, so I just uploaded it again. You can find it on this thread.

    Your first question is addressed in the section titled, "AGC CONTROL (Address: 7)" on page 28 of the d/s.

    If you have AGC active, that will screw up the volume "setting." You need to disable the AGC in order to get that to work (otherwise, the AGC AGCs...)

    You can use the EN bit, OR you can use the EN terminal. Your choice.

    Let me know if the drivers don't work for you, or you have any other questions.

    -d2

  • Hi Don,

    Thanx for getting back to me on my question.  

    First off, the 0728.drivers.zip file (which brings up TPA6130A2_win7 and ..._xp) don't seem to work for the TPA2028D1YZFEVM.  When I plug in the EVM, I get a USB fail message and when I look in Device Manager under "Other devices" I get a "TIAudioI2C" device with a flag, when I open the "Properties" for this device I get:

    "The drivers for this device are not installed. (Code 28)

    There is no driver selected for the device information set or element.


    To find a driver for this device, click Update Driver."

    The "TPA2028D1 Interface" software still runs but doesn't seem to communicate with the EVM.  

    Secondly, As to shutting off the AGC, I must be particularly thick - when I look at Page 28 of the datasheet, I get Registers 6 & 7 and I don't see anything that suggests that it can disable the AGC.  You seem to say that resetting (making zero) the EN bit (or the EN pin) will disable the AGC?  Sorry, I've been staring at this for too long.

    In any case, even with the AGC disabled, shouldn't you get a volume range of 40dB+ with the "Fixed Gain" control (as shown in Figures 6-8 of the datasheet)?

    One more point, in the EVM schematic, shown in the EVM datasheet, it looks like the EN bit of the TPA2028D1 is tied to R1 with it's voltage coming from the USB 3.3V rail - shouldn't it be connected to VDD?  

    Is there any sample code with I2C communications to show how the program should work?  

    Thanx and sorry for all the questions, problems and misunderstandings,

    myke

  • HI Don,

    Did a bit more playing around and, with your help, I think I understand one answer to my questions above:

    3.  Is there a way to "mute" the output?  Pull either the "EN Pin" or "EN Bit" in Register 1, (IC FUNCTION CONTROL) low to halt the output.  I have demonstrated this operation by both by pressing "S1" on the EVM and by clearing the EN bit of Register 1 via I2C.  

    I should point out that I can demonstrate that I am talking to the TPA2028 from my prototype application and I have verified it using:

    - Software

    - Oscilloscope

    - Change in functionality (most positively demonstrating by setting and resetting the "EN" bit to implement the "mute" function)

    But that still leaves my other two questions:

    1.  How do you disable the AGC?  Going along with that, is there:

        a) a series of I2C commands to do this (or at least a sequence of which values to write to which registers) to disable the AGC?  

        b) how is the volume controlled when the AGC is turned off?  Do you use the "Fixed Gain" bits in Register 5 (AGC FIXED GAIN CONTROL) for this purpose?  (I tried emulating the conditions set out in Figure 5 of the datasheet, but there was no change in volume.)

    2.  How do you set the volume output?  The previous question really asks it from the AGC disabled perspective, but I would like to understand how to change the volume (power output) with the AGC enabled.  I have tried to emulate the conditions in Figures 6-8 of the datasheet with marginal change in volume (certainly not the up to 60dB change shown in Figures 608).  Going further: 

        a) could I get a series of I2C commands which demonstrate how to change the volume output with the AGC active?  

    - I should point out that the first operation of the amplifier (I'm sending a 200ms sound) seems louder than the subsequent ones which seems to validate what is written in the datasheet.  

    Finally, if you can get a working USB driver for (a Win 7 PC running) the TPA2028D1YZFEVM PCB, I would appreciate trying it out - chances are I can figure out the answers to questions 1 and 2 myself by playing around with it.

    Thanx again,

    myke

  • Hi Don,

    One last post with data:

    I tried to change the volume (using Register 5, (FIXED GAIN CONTROL) after clearing bits 1:0 in Register 7 (which says that the Compression ratio will be 1:1 and "(off)") with no luck and then set bit 8 of Register 6 (Output Limiter Disable) to see if that would help.  

    So, please let me know what I'm doing wrong when I am trying to disable the AGC and trying to change the volume with the AGC on and off.

    Thanx,

    myke

  • Hi,

    With the changeover of the site, I just wanted to ping anybody who has worked with the TPA2028D1.  

    I'm looking for:

    1.  A working USB Driver for the TA2028D1YZFEVM code so that I can try out different settings on my own easily.  

    2.  An understanding of how to shut off the AGC and once it is disabled, control the volume of the output.  

    3.  With the AGC active, how do I control the volume of the output.  

    The TPA2028D1 is working to amplify the signal in my application very well, people would say too well and I need a way to control the volume output.  

    Thanx!

    myke

  • Hi Myke:

    I will get some stuff together for you and update you soon.

    Rgds,

    Fred

  • HI Myke:

    A few things:

    EN pin is 1.8V compatible, so you can tie it to a voltage from 1.8V up to the Vdd supply for the amplifier.

    To turn off AGC, set the compresson ratio to 1:1.  You will then have gain control using Fixed Gain from 0dB to 30dB.

    With AGC on, 2:1, 4:1, etc, Fixed Gain becomes the initial value of the gain before the AGC becomes operational.

    Maximum Gain is the maximum of gain the amplifier will apply while doing AGC.

    You can use the Limiter to limit the amplifier's power output.l

    I have posted a zip file for you.

    Put it into a directory of your choice and un-zip it.

    Then use your device manager as you were doing to update the ITAudioI2C driver.

    Rgds,

    Fred

    TIAudioI2C.zip
  • Hi Fred,

    Thank you for the drivers - I have installed them and I seem to be able to communicate with the TPA2028D1 BUT I still don't hear the dynamic range that I expect.  To test the amplifier, I am sending it a signal from my application which consists of multiple tones over 0.2s.  I can also try it with a number of other sounds with the same result.  

    I have attached a png of a screen shot of the high volume setting, I set the compression ratio to 1:1 (which should turn off the AGC) and then pull all three sliders high.  Maybe I'm still not setting something right.  Maybe you can see something in it that I am not setting right.  

    At the other end, I pull the three sliders low and I do hear a noticeable change (I have no way of quantifying this) but I would not put it at a 58dB (19x change in sound volume), 12dB (4x) or 15.5dB (5x) (depending on the slider) difference.  Maybe 3dB (ie 1/2) but that is pushing things.  

    I have to wonder if the AGC is actually getting turned off as when I go from low to high, the volume takes a 0.2s sound file or two to get to the final volume (which seems like the expected behaviour of the AGC when reading the datasheet).  

    This is exactly what I was getting with my application prototype, so in one way, I feel good and in another, I don't think we've solved the problem.  

    Any ideas?

    myke

  • Hi Myke:

    Thank you for the chat today.

    I am glad that we made progress by working with the limiter and compression ratio.

    I am going to close this case, but please contact me if you require further assistance.

    Rgds,

    Fred

  • Hi Fred,

    Thanx for taking the time for the call.  Just to review the action plan from the call:

    1. Get a sample of the speaker that is to be used in the final product and set it up as it would be used in the product to best tune the output levels.  
    2. Keep the amplifier in AGC mode and change the "Fixed Gain", "Maximum Gain" and "Limiter Level" together for controlling the volume.  
    I'll keep you apprised of what's happening as we get closer to product build.  
    Thanx again,
    myke
  • One last datapoint.  

    I purchased a $40 sound level meter and when held 1" (25mm) away from the speaker, I see a high volume output of 88-90dBA and a low volume output of 84-85dBA for one sound file and a 78-81dBA to 94-95dBA 

    So there is a quantifiable, repeatable change, just not in the range that I thought there would be and the selection of the sound affects the volume range available.  

    YMMV and I'm interested in anybody else's observations.

    myke

  • Hi Mike:

    I ran a similar test with a 28mm speaker in a small case and at 25mm I saw a low output of 97.6 dBA at 61mW at a high of 107.8 dBA at ~900mW.

    Rgds,

    Fred

  • Thanx Fred.  

    It looks like our readings are in line.  It also looks like the sounds to be output should be chosen with care to get the best volume changes - I'm sure there's some research out there that quantifies this.  

    Have a Great Easter!

    myke