ΣSigmaStudio Ask AI Русский Log in

ADAU1452 adjust bass gain by AD pot

SigmaDSP & SigmaStudio UlfH Jan 8, 2023 00:00 5 replies Original on forum ↗
Subscribe
UlfH Question
Jan 8, 2023 00:00

Hi

I'm using ADAU1452 and have tried the superbass module in Sigma Studio.

Is there a way to control the bass gain with an AD pot?

/Ulf

Audio Signal Processors

adau1452

software

sigma studio 4.7

SigmaDSP Audio Processors

Harishgowtham Reply
Jan 9, 2023 00:00

Hello ulf,

Please try this attached project.

First compile the project then click 'select' on the parameter update block. A window will open and then select DM1 in the radio button. Then select the block and the parameter like in the below screenshot.

The Bass gain is a linear value and not expressed in dB. The full rotation of the pot which is connected to the AUXADC will give you the value of 3.0, this is highest value you will get, and the least value will be 0.1. In the schematic also you can't go above 3.0 and can't go below 0.1. This part was done in the look up table.

Project:bass controlling pot.dspproj

I hope this would help.

Kindly do reply if you have any queries.

Regards,

Harish

pot-cntrl.png
pot-cntrl.png
UlfH Reply
Jan 13, 2023 00:00

Thank you Harish

I will try and see what happens .

/Ulf

awestenb Reply
Feb 16, 2023 00:00

Harish this is quite useful for my project, thanks for sharing it. I'm coming from an analog world and am not clear what function the readback cells perform in your program. Is it for converting between number formats, or something else?

I am using some legacy potentiometers in vintage equipment to control volume and two filters to mimic the existing bass/treble controls. Is it necessary to use a lookup table like in your example, or is it possible to go from the ADC through a readback and then to the filter?

Any explanation you can offer is much appreciated.

Harishgowtham Reply
Feb 17, 2023 00:00

Hello awestenb,

The readback block is just to read what value the DSP is processing at a certain point in the program. You can read values between any blocks to know what's happening there. The readback cell is updated every 10ms by the DSP. This is used as a debugging tool to verify an expected value is shown. It has two formats; you can read the value in either 8.24 or 32.0 formats and you can also read a hex value. You have to connect the hardware to use this. I will explain the use case with an example.

In the example that I gave above, you can see the value after AUXADC block is 1023 in the readback cell. This is because the AUXADC outputs a 10 bit number. My AUXADC is connected to a pot. So, a full rotation of the pot will give you 1023 (max value for 10 bits).

Then I scale it by multiplying 1023 by 0.03225 to get a value between 0 to 32. so, now my full rotation of the pot will give me 32 that you can see in the readback cell.

My LUT has a table of 33 values, which is 0.1 to 3.0 in the step of 0.1. if I tune the pot then my signal will be interpolated among these 33 values of the LUT and outputs a value between 0.1 to 3.

My full rotation of my pot will give me 3.0. You can see that the base gain parameter of that superbass algorithm can go between 0.1 to 3. So, by tuning my pot, I can control the base gain parameter by using parameter update block.

You can certainly control the volume control and other controls from a pot by using the AUXADC and parameter update block like above. LUT will give you good precision over the signal.

you can directly go from AUXADC to parameter controls if you want. You have to scale the auxadc's outputs to a parameter value's range. I can help you with that. Please share your project or design and an explanation of how you want it, so that I can modify it and sent it you.

Note: The AUXADC's range is based on the IOVDD line.

Which DSP you are using? Is this a custom board or an eval board?

Kindly do reply if you have any queries.

Regards,

Harish

awestenb Reply
Feb 17, 2023 00:00

6332.GE Console.dspprojHey Harish, thanks for that explanation, very helpful.

I'm using a Wondom JAB4 with the AU1701 and have just realized that the Param Update block doesn't seem to be available in the toolbox when using this DSP, so this all may be a moot point. Hopefully there is a way around that - I tried adding via copy/paste from your project but it didn't work.

My project is to preserve some vintage hi-fi gear from the 1960s that's full of germanium transistors which have begun to fail and for which there are no viable replacements. I'll be using the Wondom board to replace the preamplifier and output stages of this equipment, but retaining the original user controls, which means the legacy potentiometers because they no longer make new ones. You can see in the attached project that the controls are either 25KΩ or 250KΩ, it seems that these values work OK to vary between 0.1 and 3.0V at the input of the ADC. The pots are meant to be linked to the User tone controls in the project.

I'm interested in any suggestions. Thanks again.

EDIT: I found a pretty good document from Parts Express that explains how to do something similar with a DC reference and multiplier block, so I think I have a solution that will work. Updating the project file in case you have any other comments. Thanks.