Post Go back to editing

10 Band Equalizer controlled with potentiometers

Hi everyone!

I'm trying to build a 10 band equalizer with an ADAU1701 (no µC). Because there are only 4 Aux ADCs, I want to link the analog signals from the 10 potentiometers through one ADC with an external Multiplexer (CD74HC4067) controlled with the GPIOs.

Now I tried:

The EQ in the figure is not finished yet. Only three filters are built. But I do not know if it finally works out the way I want it. 

Is there a way to improve my design? (It is one of my first designs in SigmaStudio)

I know there will be a time delay between 'GPIO outputs are valid' and 'the analog signal will be present at the input'. But that should not be a problem to solve at the end.

Parents
  •      Hello John,

         Welcome to the forum.  It's quite possible to expand an Aux ADC with an external analog multiplexer, so your idea is sound.  Here's a few suggestions to consider:

         The Counter block advances its count each sample interval until it reaches its max setting, holding there until reset.  Thus it won't continuously scan your sliders.  You could replace this with a low-frequency ramp or triangle oscillator with appropriate scaling.  Since the Signal Cross blocks work on both rising and falling inputs, a triangle wave would scan the sliders both ways without risking any glitch at a ramp "flyback."

         Since you're using decimal (5.23 format) for the scanning functions, be sure to set the Lookup Tables which establish the GPIO binary outputs to Fractional Input by clicking their topmost tiny button to the left of their Table buttons.  I could not tell from your screenshot how these are set.  BTW, those who need to view another member's diagram can see a better view by right-clicking the image, then selecting "Save image as..."  Open the saved image with Windows Paint or another suitable graphics program.   Where possible, attaching your project rather than a screenshot 

         The control indexes for your EQ Filters are strictly integer (28.0 format), so be sure that their reconstituted control inputs are of this format.  Because the Value Holds ignore their signal inputs unless pulsed by their associated Value Cross blocks, you may not need the DeMUX blocks -- just parallel all the Value Hold signal inputs.

         Finally, it looks like your audio input isn't from the ADCs (inputs 0 and 1), but rather you're using I2S. Since the -1701 has no ASRCs, it won't accept a casual  I2S input -- the source and the -1701 must have synchronized MCLKs.  Search the forum for more info on this.

         Best regards,

         Bob

  • Thanks for your suggestions

    I realized the counter with a pulse counter and it works fine, tested it with an Oscilloscope. Additionally, the LUT is replaced by multiplicate the signal with an integer as seen on other pages on this forum. The I2S input will work with the external hardware, I tested this already. In the screenshot below the in and outputs are connected to the analog ports to test the design with headphones.

    The last problem is the analog channel through the Hold components.

    GPIO 8 and 9 are connected to an oscilloscope and the signal looks as it should. But I have no success connecting either 'DSP Readback' or 'Real Time Dispaly' to the analog signal path for debugging. Sometimes it works with 24.4 format but that is not the final format 28.0 used to control the ISF...

    If the Signal from T6 is connected directly to the ISF500 it doesn't work either. Tested with a 500Hz input signal from a frequency generator.

    Best regards

    John

  •      Hello John,

         The DSP Readback and the Real-Time Display both suffer from a limitation in the ADAU1701 itself -- its readback register is only 24 bits wide (5.19 format), thus it truncates the lowest 4 bits.  As a result, the readback of an integer signal is sixteen times lower than it should be, while integers 15 and below don't show up at all.  There's an easy fix:  Multiply the integer signal you wish to look at by 16 using two gain blocks of 4.0 each before the readback or Real-Time Display.  For a more complete explanation, please see:

    https://ez.analog.com/dsp/sigmadsp/f/q-a/65486/readback-block-data-format/114127#114127

         The following laundry list of possible errors isn't meant to insult your intelligence -- it's just that the schematic alone doesn't convey all the info, and thus the possible problems, in a given project.  Thus I list all the reasons I can think of for an index filter not working:

         Is your Aux ADC 1 working (that is, purring out a zero to 1.0 level consistent with its 0 -- 3.3V analog input)?  You can test this statically with a constant DC at the 1701's MP2 pin and a readback directly at the  Aux ADC.  Or you can temporarily wire the Aux ADC to an unused DAC and view this signal on a scope to see how it scans your sliders (note that the DACs invert their signals)..  If this isn't working, the number one cause is (and I've done this lots of times) forgetting to set the Register Settings for Aux ADC as shown below.  Since you're already setting I2S stuff there you likely haven't forgotten this, yet I say this for the benefit of others who may run into this problem.

    You can separately test the filter with a 28.0 DC source connected directly to its control index input.  Using readbacks with the times-16 fix for integers as well as scope viewing via DAC should provide more clues for troubleshooting the overall system.  As you continue to work with SigmaDSP, you'll find many amazing ways you can have your projects test themselves, by connecting additional blocks.

         Your screenshots don't show the sample rate in use, so I need to ask:  Is it other than 44-48K?  If so, remember you need to set this up in two places -- the window atop the schematic, and the Program Length register setting.  Otherwise, your 500 Hz filter will really be a 250 Hz or 125 Hz filter, and have little measurable effect on a 500 Hz signal.  For more info, see:

    https://ez.analog.com/dsp/sigmadsp/w/documents/5214/faq-how-do-i-change-the-sample-rate-of-my-sigmastudio-system

        This is one of a number of tutorial topics and FAQs which no longer appear in a forum search.  Find them by searching for "documents."  Click on the top result, "documents," and do a control-F search on the resulting page.

         Best regards,

         Bob

  • Thanks Bob!

    There was a strange error that the analog AUX input signal didn't get through the multiplication. Only when the value in the DC2 source was changed after downloading, the analog value got through. But this is gone now. I can't reproduce this error anymore.

    I hade no success with the ISF so far, therefore I tried it with the general filter 2nd order and it works!

    My last problem:

    When I add a gain block to the audio channel, the design stops working. Even when controlled with a DC block and even when bypassed with an Add block as seen in my screenshot. Is it possible that there is not enough memory left? With a Linear Gain block it works.

    Best Regards,

    John

  •      John,

    To see how many instructions you're using, follow the method shown here:

    https://ez.analog.com/dsp/sigmadsp/f/q-a/66406/processor-horsepower-instructions-x-cycle-load-percentage/247414#247414

    You have about 1010 instructions at 48 K sample rate (proportionately less at higher rates).  A few instructions are needed for overhead..  Sometimes the compiler flags "Ran out of MIPS" when attempting to compile a larger than allowable schematic -- but this only works at 48 K sample rate, and it may not catch marginally oversize programs.

    A spreadsheet I made some time ago lists how many instructions are used by each block.  You'll ind it here:

    https://ez.analog.com/dsp/sigmadsp/f/discussions/65644/adau1701-instruction-usage-table

    This will help when evaluating different ways to accomplish a desired function while economizing on instructions.

         Best regards,

         Bob

  • Hey Bob thanks

    Couldn't fix the gain yet but the equalizer works so far. I will order the designed PCB with the ADAU1701 on it and then try the whole system with the external I2S components.

    You can close the question now.

    Best regards.

    John

  • hello would like to make a 7 band eq because I can control with external potentiometer if there is already a topic I would be happy about the link because I unfortunately haven't found one, thank you and merry christmas

  • Hi Lorenzo, you can use multiple INA1701, a different DSP with more analog aux inputs or try to realize my idea with an external multiplexer. For instance, the CD74HC4067SM from TI should work.

  • Hello Lorenzo4711,

    The 1701 Graphic EQ example I suppled above in my earlier post uses 472 instructions. It only has four bands of EQ and each EQ has only two levels of boost and two levels of cut. Clearly not enough for most applications. So if you increase the number of levels in each EQ and add three more bands then that will probably exceed the MIPS available. Then you will have to incorporate a GPIO switch along with sample and hold blocks to switch banks for your AUX ADC pots. This will use more instructions again and you have not done hardly anything else like compression or bypass logic etc. So unless you plan on using more than one ADAU1701 I think you need to go to the ADAU1467 devices that have 88 pins and have 8 AUX ADC pots. 

    Then you can use the Holter's EQ that it is available in that part that allows easy interfacing and building of a graphic EQ. If you use the ADAU1452 then you only have six AUX ADC inputs so you would have to use the bank system again but you have many more MIPS and more GPIO so it is not an issue, just a detail. 

    If you want to go this route then start a new thread asking about the Holter's EQ and I will post it there. It is not very relevant to this thread. 

    Dave T

Reply
  • Hello Lorenzo4711,

    The 1701 Graphic EQ example I suppled above in my earlier post uses 472 instructions. It only has four bands of EQ and each EQ has only two levels of boost and two levels of cut. Clearly not enough for most applications. So if you increase the number of levels in each EQ and add three more bands then that will probably exceed the MIPS available. Then you will have to incorporate a GPIO switch along with sample and hold blocks to switch banks for your AUX ADC pots. This will use more instructions again and you have not done hardly anything else like compression or bypass logic etc. So unless you plan on using more than one ADAU1701 I think you need to go to the ADAU1467 devices that have 88 pins and have 8 AUX ADC pots. 

    Then you can use the Holter's EQ that it is available in that part that allows easy interfacing and building of a graphic EQ. If you use the ADAU1452 then you only have six AUX ADC inputs so you would have to use the bank system again but you have many more MIPS and more GPIO so it is not an issue, just a detail. 

    If you want to go this route then start a new thread asking about the Holter's EQ and I will post it there. It is not very relevant to this thread. 

    Dave T

Children
  •      Hello Dave and Lorenzo,

         Yes if we're speaking of designing a product from scratch, a -1452 or better is the way to go.  Another advantage is these parts have ASRCs which enable digital I/O.

         Yet, if you're envisioning a hobby project running a SureDSP or similar ADAU1701 on a board, you could cobble something together to give you eight bands of EQ without additional chips -- just some diodes as shown below.  I must caution you that I have not tested this idea, but it should work well enough for such an application.

         Your SigmaStudio project would energize each of the two GPIOs alternately at a relatively slow rate (perhaps 20 Hz).  The diodes select the energized pots for the AuxADCs.  Your project will then latch these signals using Data Hold blocks, then route them to index filters to provide the EQ.  I expect all this to fit in a -1701 at 48K sample rate as long as you don't pile on additional features.

         We can help you with the project itself, yet that's the fun part.  So go ahead and try it yourself, make all the usual beginners' mistakes as everyone before you has done, and reward yourself when it finally works!

         Dave -- What's a Holter EQ?

         Best regards,

         Bob