Audio Signal Detection in ADAU1772

Dear All,

We are using ADAU 1772 model codec in our hardware design, controlling it via I2C bus through  ESP32 processor. i would appreciate if you can help me on  how i can detect the presence of the signal in the  inputs or outputs of ADAU1772  to cancel the sleep function  and activate the amplifier?  I have seen only one dsp aritmetic function available which is absolute value available in ADAU1772 , will that dsp module work and how i can implement this on my code? or any other way to do the signal detection?

Thank you in advance. 

Regards , 

  • 0
    •  Analog Employees 
    on Nov 16, 2021 4:50 PM

    Hello vision4u,

    You almost had it figured out. Yes, use the absolute value to feed into a LPF then send that to a dBReg and read that register with your controller.

    Here is what it will look like:

    I set the filter to 2Hz so there would be a long integration time and longer release but it is still not very long. It will allow you to slow down the reads so you do not miss anything. Then you will have to setup the longer time constants in your controller code. You probably will want to keep the amp on for a fairly long period once there is no more audio. 

    0x000C is the address of the first of three dB Registers. 

    You will also want to engage the HPF in the ADC and set it for 1Hz. This will remove the DC offset of the ADC converter which can influence the level being read. 

    Dave T

  • Dear Dave,

    Thank you very  much for your detailed explanation. İt is very appreciated. 

    I will have a look at this and see how it works. 


  • Dear Dave,

    I have another question , I have done your suggestion  with Dbreg2 .  I  want to understand the mathematical logic on how to read/convert  the register of 8 bit dbreg2 to corresponding dB value.  ı will aprreciate if you can help me to understand this conversion


    My design is below ,i summed left and the right signal  and i read different values like -40dB from dbreg2 even if there is no signal in the path. 

    what can be   wrong?  Thank you in advance. 

  • +1
    •  Analog Employees 
    on Nov 24, 2021 7:19 PM in reply to vision4u

    Hello vision4u,

    There could be a couple of reasons. 

    1) There is no HPF in the signal from the ADC. It is very easy for an ADC to have -40dB of DC offset. 

    Since you are using 2Hz on the LPF make sure the HPF is set for <=1Hz. This will remove the DC content. 

    2) There is noise in the system. Try to put a mute before the ABS block to shut it off and get zero. The filters might not settle all the way to zero but should be close to zero. 

    Dave T

  • Dear Dave , Putting the  mute in front of ABS sorted the problem.  Thank you for your rapid response .

    Any suggestion for  making me understand how to convert bits of the register to dB  from my above question? 

    thank you in advance.