DIY Digital Parametric EQ

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Hi macboy
Thanks for asking. I haven't worked on it for a few weeks. I was still having a difficult time with the coefficients, then I had to change jobs so I took a short break from it.

Thanks for the spreadsheet. It was a huge help. It allowed me to verify that I was calculating everything properly and getting the correct coefficients. The chip isn't behaving the way I would expect though. The center frequency seems way off (to my ear) and Q is quirky. It takes extremely low values of Q for it to work at all. I've tried many other formulas (cookbook etc) and get the same results with them. I'm just missing something.....I'll get to the bottom of it eventually.

The rest of the chip is up and running perfectly. The mixers, bass/treble and all other modules seem to behave properly. Once I get the biquads worked out I can bring the rest of it online including the spectrum analyzer.

Thanks again

MarkE
 
Macboy (and others)

I’ve finally gotten around to working on the parametric EQ project again. I’m hoping that you might be able to help with a snag that Im in. First, here are pictures of the prototype unit sitting in a rack case….

An externally hosted image should be here but it was not working when we last tested it.


An externally hosted image should be here but it was not working when we last tested it.




I am still having substantial problems with the biquad coefficients. The rest of the design seems to work fine. Macboy, first let me thank you for your help on this. Your spreadsheet was extremely helpful. I have recreated it in C code and can adjust the input parameters ( G, Fc and Q) via rotary encoders. My problem is that the sound cuts out when I take Fc below about 5khz. Above that it seems to work properly.

Image 1 shows the unit in case you are curious. The second image is a zoom on the screen showing a setup causing the audio to cut out. On the upper right you can see G=+6db, Fc=5K and Q=1. On the left are sliders that helped me troubleshoot the encoders along with their internal values.

The middle section shows the results of the computations. They agree perfectly with your spreadsheet.

Below that are the coefficients for the biquad (in base 10 format) displayed in the same order. 255 is represented as 15 because the upper nibble is stripped off.

Your name is at the top because I have a lot of other computations that can be selected including all of the usual cookbook filters. Your’s is selected here.


I have checked, and rechecked everything. I have read values back out and they are exactly as written. Im convinced that the TAS3103 is set up properly. By the way, I2S, Fs=48000, 24 bit.

I was wondering if you might have any thoughts as to what might be going on. I know that Im still missing something here. Any help or thoughts would be appreciated.

Mark
 
Mark,

Is there schematics and project details on your website? Cuz I went looking and didn't find any. I am really interested in what you are doing. I've only recently discovered the TI TAS3103 and TAS3108 dsp chips.

It's unclear to me, are the development tools free to download or does TI expect you to pay for them? I am a proficient PIC and micro programmer as well as audiophile. This project looks interesting to me.

Hey, is that an aging Sabtronics multimeter that I see on your bench? Good kit in it's time. I used to have one of those ...

Carl
 
Carl
You have a keen eye! yes, thats a Sabtronics meter from about 1979. I keep it around for sentimental purposes.

I plan on writing articles for the Hawk website in the future but for now I just have hand drawn schematics. If you care to you can look back in this thread for more detailed info about what Im trying to do.
Once I get most of the firmware worked out I will be changing the codec out for different chips and also completing the analog section. Right now Im stuck on this biquad business and cant really proceed forward until I get it worked out.

This is all just a hobby project for one of my studio racks. Its based around a dsPic 30F6014A. If you need any help just ask. As far as I know there are no free development tools for the TAS, except of course the fine people on this board and others like it.

Mark
 
Here are some links to the hand drawn schematics. They probably wont be very useful as Im just using them to keep track of what Im doing. I'll do something more formal when I get further along.

Codec Schematic

DSP Schematic

Encoder Board Schematic

Processor Schematic


I'll do a pcb when the design is finalized. I'm also thinking of adding a low voltage tube front end as an instrument input. Thats what you see to the left of the DSP in the top picture.
 
Someone here can correct me if I'm wrong but I don't believe that there are any free development tools available. I've looked high and low for one but to no avail.

Programming the chip is pretty straight forward. You will need to communicate with the various mixers in the chip using I2C in either 5.23 or 25.23 format. macboy provided plenty of help in that regard in this thread and also with the spreadsheet he posted here. If you have any trouble there I can help also.

The real trick is computing the correct coefficients for the biquad filters. This is the part that Im stuck on. If you manage to locate something please let me know.

You will have to plan out a clocking scheme and set register f9 accordingly. Word length, sample rate and other clocking parameters are set there. I'm painfully familiar with that so I can help there also.
 
Mark,
I am glad to see that you are making some progress.
I am afraid that I probably won't be of much help. I did double-check your coefficients, and they look fine to me. The only thing that comes to mind right now, is to make sure that you are performing the I2C transactions properly. Make sure to transfer the full 32 bits and not just 28 bits (see section 3.1.1 in the datasheet), and transmit all 5 32-bit coefficients in one shot, in the right order. That means that you will transmit 22 bytes in a single shot. Don't forget the stop bit.
 
Thank you. I am pretty sure that I am communicating with the chip correctly. I can even read out the same values that I wrote to it. Also, my communications with all other areas on the chip are working flawlessly and as expected.

I'll get it worked out eventually. In the meantime I decided to go ahead and complete the firmware by writing a pleasing user interface. This is going to be pretty nice when I complete it. I'll be using just about all of the chip's resources including a fully configurable DRC, reverb, treble/bass, soft volume and loudness function.

The interface has a screen to setup each section, and each group of setups can be saved in eeprom as a named preset. I'm also adding a single channel low voltage tube front end to process either active or passive pickups from a guitar or bass in addition to the normal line inputs. This should give me the flexibility to do just about anything with it.

I'm thinking about using the dsPICs internal resources for the spectrum readout. The TAS is currently setup to give me a VU readout. The dsPIC has power to spare so I may go with that setup or vice-versa. I already have a nice FFT spectrum readout from a previous project, I just need to copy the code in.

Anyway...back to the fight! Thanks again.
 
Hi Carl
Thank you for taking an interest in the project. I know that you might start one too so I'm sure that we can crash heads on this.

About the FFT, it is part of MicroElectronika's C compiler library and I don't remember too much about it at this point. its been about a year since I've played with it. I'll get more detailed when I start experimenting with it again. If it doesn't work out I can always drop back and use the SA in the TAS3103, thats assuming I ever get the biquads working. :)

I started a thread on my site giving a blow by blow with a lot of detail on what I'm trying to do and accomplish. This is my band's web site but feel free to register and post comments there if you like.

Hawk Studio DSP thread

If you have any ideas or comments I love to hear them, especially where biquads are concerned. I've been programming micros since the late 70's doing digital control stuff. This is my first dip into digital audio and I'm learning along the way.

Mark
 
mark,

It sounds as tho you and I have similar backgrounds I started coding embedded machine control in the late 70's myself. I too have only recently gotten serious about embedded DSP. In the past the closest that I have come to building a digital parametric EQ was a half hearted attempt at using digital pots in place of pots (under PIC control) in a traditional 'British' analog parametric EQ circuit. That was a fun project that for no good reason I never quite completed.

I'll take a look at your web page.

Carl
 
I'm still having considerable difficulty with the biquad operation of the TAS3103 and was hoping that someone could shed some light on the issues that Im having.

With the generous help of macboy and others I am convinced that I am computing the biquad coefficients correctly. I am also convinced that my transmission to and from the chip is working perfectly. If you have been following the thread you'll know that I stated that the biquads do not operate properly and the audio simply cuts out when I bring Fc below about 10khz. It also isnt filtering properly.

I have some interesting additional information that might help. I was working on other sections of the firmware installing code to allow me to change SAP format, Fs and bit length at will and I discovered that if I kick Fs up from 48000 to 96000 the audio cuts out at around 15khz rather than 9 or 10khz.

I also now have the VU meters up and running and noticed tonight that when the audio cuts out the VUs get pinned at max. I guessing now that the audio isnt cutting out but instead the biquad is saturating. After some internet research I learned a bit about scaling the coefficients to prevent that. The TAS is a fixed point system. I've read some where they say to simply divide all coefficients (a1,a2,b0,b1,b2) by a constant (usually a power of 2). Others have given long drawn out math for scaling.

I tried just dividing the coefficients, first by two, and then every power of 2 up to 256. The results were that the audio no longer cuts out but gets severely attenuated as Fc goes down. Also, the filter still isnt behaving properly.

I was wondering two things...has anyone here actually worked with the TAS3103 and successfully had the biquads operating properly? Also, any advice on scaling these coefficients would be helpful.
 
Hi all,

First of all, well done to Mark on the DSP project! It looks very professional and well engineered.

Sorry to hijack the thread a bit, but I've been searching for literally months for an affordable DSP unit, DSP board, or DSP project for doing Digital Room Correction (not to be confused with Dynamic Range Compression.)

The question is, would something like the TAS3103 have enough power to do FIR filtering (using impulse responses) on one or more channels, and if so, for how many milliseconds at say 48KHz?

I have a fair amount of experience with PIC programming, but mainy in assembly language. I've also had some experience with FPGAs, but limited knowledge of C programming / DSPs. I also don't know a great deal about digital filters, taps needed, and the maths involved would fry probably my brain....

How powerful would a DSP / FPGA need to be for 8-channel convolution? Would it be very expensive to do multi-channel convolution in a standalone box rather than just using a PC?

The ideal would be to make a stand-alone unit which would be an affordable and permanent addition to any home theater or hifi setup, and would rival much more expensive units.

(you can read more of my ramblings on DRC here: http://www.diyaudio.com/forums/showthread.php?postid=1131872#post1131872 )

I've downloaded the service manual for my Denon AVC-A11SR amp (yes I know, it's not exactly audiophile) so I now have the pinouts for the I2S connections between it's two main DSP chips....

The amp (and most other digital amps) could now be modified to put the DRC / DSP unit in the loop so that room correction / EQ would be done digitally on any source material while still utilizing the amp's own DPLII / DD / DTS / THX processing. The sound quality improvement should be massive.

I'm also looking into modifying the amp with a muxit input to take uncompressed multi-channel digital audio from a similarly modified DVD / SACD player or sound card. This idea was from Brian Brown's fantastic thread.... http://www.diyaudio.com/forums/showthread.php?threadid=22741

I'm currently using DRC with an Audiotrak Prodigy 7.1 HiFi and a Behringer FBQ2496 on the sub. I'm only really using the FBQ because 1) I wanted to see how much of an improvement the FBQ would make to the sub response with and without DRC, and 2) It's still a pain to work out the best way of using the PC with all source material, but the FBQ is in use all the time for taming the room modes.

Having the FBQ running on the sub all the time has reinforced my aim of having a separate unit for full-range room correction on all channels. The unit could completely replace the FBQ / BFD that people are using on their subs with something far more advanced. The unit could be almost infinitely tweakable and could possibly perform crossover / driver alignment / speaker delay / speaker repositioning duties as well.

I'm fully prepared to invest into this project and start making some PCB prototypes if only only it would be feasible to do this on 6 or 8 channels without the unit costing more than say £250 to build.

If it would be costly to do full DRC filtering, then I would still be very much interested in a basic mutli-channel parametric EQ.

I look forward to your replies and any help or suggestions.

OzOnE.
P.S. If this post could be better placed in another thread, please let me know.
 
Interesting Thread!

First of all hello everyone, this is my first post to this forum.:) I was very happy to find this thread because I'm planning a project of this type myself. I haven't even entered the design phase yet because I'm in the middle of a speaker project (TL, another great reason to be a member here) and well... the busy Christmas season will be here soon anyway.

OzOne: is this something you'd be interested in?
http://pcazeles.perso.cegetel.net/acxo.htm
It's for a PC but could help you get started. Near the bottom are links to digital filter generators and other useful stuff.

Mark, good progress! Hope you get the bugs worked out soon. Anyone else completed or currently working on a digital crossover/EQ project? I'm looking for collaborators. A year ago I took a job with a company specializing in embedded processing (which has taken me back to all the schooling in DSP that I've forgotten).:rolleyes: This is primarily why I'm interested in pursuing a mostly digital signal path, I've now got the tools to do it effectively. When (and if) I finish I plan to post all my info, code, schematics and PCB artwork online for anyone interested to see. I'm a firm believer in sharing knowledge.

Kevin
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.