ADAU1467 using aux adc for volume

Good afternoon. I made volume control on ADAU1467 in Sigma Studio.

I used:

- 5000 ohm potentiometer.

- AUXADC pin 7 to connect to the potentiometer.

-ADAU1467's pin 9 to get 3.3 volts (also i tried supply power 3.3V)

I have the following problem - the numbers are constantly changing, running around. There are no stable numbers. I used different potentiometers, but the result is the same.How to fix that problem?

 v07-tonecomp.rar

Thanks

  • 0
    •  Analog Employees 
    on Jul 22, 2021 3:27 PM

    Hello Nynasty,

    There are a number of things that can cause this. One possibility is a noisy pot but you have replaced it and I assume all the pots you are using are new pots so not likely to have a lot of noise. 

    Thinking through this... There is noise getting into the AUXADC, so where could it be coming from?

    If the pot is on a different PCB from the DSP then you have several ways how noise can get in. 

    If you are using long cables or wires then that can be a source of the problem.

    If you do not have a good ground connection between the two boards it can cause issues.

    You can be getting interference from an outside source. This could be 60/50Hz from power wires, it can be clocks from other circuits, it can be Bluetooth RF interference, it can be radio stations etc. Many reasons. 

    So how to mitigate some of these causes?

    Power and ground to the pot is important. If it is a long wire then twist the wires together. You may need to have a cap near the pot between the top and the bottom. Then you will probably also want to have a small cap to ground near the AUXADC input. I suggest you include a small series resistor on the wiper of the pot to limit any charging currents on the wiper of the pot for the case where the pot is at max and you turn on the device. 50 or 100 ohms would be enough. Note that we do not use any filters or caps on the eval board but then the wire runs are very short and the pot and DSP are on the same PCB. 

    You can add in the software debounce cell which will clear this up most likely but I always try to get the signal input as clean as possible before resorting to software solutions. This block is located in the GPIO Conditioning folder of the Tree Toolbox.

    I also would like to point out that you have the ReadBack cell set to 8.24 format. This makes the dithering seem worse than it is because there is math being done to the data to make it into a fixed point format before displaying it. Set it to HEX and you will see that the dithering is only one or two bits of the 10 bits out of the converter. 

    When I test this using the ADAU1452_RevB eval board I only see one bit dithering and not as often as I see in your video. In your video it looks like more than one bit so I think there is noise coming in. 

    It is good to take the 3.3V from pin 9 but not right on pin 9. If you do that you may be injecting noise onto the AUXADC power rail internally. You want to take it a little further away from the pins so the bypass cap on the pin can do its job of filtering the DC going to the pin. 

    Also, taking ground from close to the AGND, pin 8 is also good. 

    - AUXADC pin 7 to connect to the potentiometer.

    I think you are meaning AUXADC7 which is pin 17? Pin 7 is an MP pin so I think this is a typo. 

    We normally use a 10K pot which is a higher impedance than the 5K you are using. So if anything you should have less noise. 5K is still fine to use, it will draw less than 1ma of current so it is not a huge issue and should be well below the power rating of the pot. I calculated ~2.2mW so I do not see an issue with you using the 5K pot. 

    Dave T

  • Thank you! I will study your answer and will be back soon

  • Hi, I'm Viktor, we are building stuff together with Nynasty.

    We had no luck with DaveThib's suggested debouncer block, so we rolled our own like this:


    custom-debouncer.zip

    It works by storing the last seen value of the input, comparing it with the new one, and updating if the difference is big enough.

    We have tried cleaning up the signal in hardware. It does help, but doesn't eliminate the noise completely (that isn't surprising). A software debouncer is a must anyway, as any adc will sometimes jump between adjacent readouts even with very clean signal. I'm really surprised that we couldn't find a built-in debouncer in register configuration like in adau1701 for example.

  • 0
    •  Analog Employees 
    on Jul 29, 2021 8:52 PM in reply to Invendelirium

    Hello Victor,

    This means there are still some significant hardware issues that need to be solved. Many customers have used these AUXADCs in many products successfully without have to resort to even software debouncing. So without all the details it is difficult to know where the problems are. So I am glad you have come up with a solution that works for you. 

    Dave T

  • to be honest, we did not yet notice any audible problems without the debouncer. Though unlikely to be a problem in practice, i can imagine an artificial test that might reveal this noise in the audio - feeding a full-scale very low frequency tone for example.