PDA

View Full Version : Programmable headphones sound equalizer interface/amplifier?



Rolfus
01-25-2012, 07:08 PM
Please excuse if I am in the wrong forum for my question but I have to begin somewhere. I just happened to get a Sparkfun kit including an arduino UNO board and I immediately began fantasizing about what has been my dream project for may years: I suffer from loss of hearing the upper frequency spectrum of sound. Cutoff probably at just a few thou Hertz, and I believe the downward slope starts at a rather low frequency. Grasshoppers and birds disappeared man years ago, and the highest octave on a piano is unaudible, I hear just the noise of the hammer mechanism. I use headphones before falling asleep, or when I wake up during the night and prefer listening to the BBC world service instead of music. But even on the Sony world receiver with a qoite well designed audio system, using modern headphones have a much better bass response than suits me. In short, I want to be able to create my own response curve by inserting an equalizing device between the phones and the radio. With the power available from most radios I suppose a passive circuit would do the job; amplification ought not be required. After this long winded intro: Any suggestions on how I could design a circuit for doing the job? I haven't done much C-programming, and that was 25 years ago. But I have Assembler, Pascal and Visual Foxpro experience and believe I can handle the software bit. Design of microprocessor controlled devices too, with ham radio most of my life, and that's quite a long time! I guess in the good old times that never will be coming back I would have whipped up a useful design with analog signal processing circuitry using resistive carbon potentiometers, vacuum tubes and whatever to make a usable device. But all my junk boxes are gone, all I have left is a soldering iron. I dont' have any wire wrapping tools left either but I suppose it would be possible with the help of a friend and a prototyping board to complete a usable assembly. The problem is finding a more or less complete circuit diagram using easily obtainable components. I don't have any clue about where to start. (A future project might be a controller for persian blinds, both up/down and shutters angle.) (Sorry about no spacing between paragraphs after upload, is that because I am using Win2k?)

Leon
01-25-2012, 07:22 PM
Here is an audio processor of mine using a dsPIC and Si3000 codec:

http://webspace.webring.com/people/jl/leon_heller/dspic.html

The Si3000 includes a pre-amp and a headphone amp.

I can supply Gerber and drill files.

Phil Pilgrim (PhiPi)
01-25-2012, 07:43 PM
Rolfus,

Welcome to the forum! The Parallax Propeller chip can also do what you want, using a FIR filter. See this thread for possible ideas: http://forums.parallax.com/showthread.php?133173

-Phil

Rolfus
01-25-2012, 10:16 PM
Thanks a lot! Great forum, two promising replies in a short time. I'll check them out tomorrow.

Rolfus
01-25-2012, 10:24 PM
Hi, I overlooked youur signature. Mine is LA9JG, and I bought a Yaesu transceiver quite a few years back but I just haven't been able to get back on the air because of so many other things in my life. I was very active building RX and TX gear in the 50's, even built a complete all band SSB transceiver. Didn't spend much time on the air though; construction was so much fun, especially striving for excellence. Getting (RS)T 9x using a VFO ws so nice. 73, HPECUAGN if you are familar with oldtime CW slang.

Phil Pilgrim (PhiPi)
01-25-2012, 10:57 PM
I'm the same way with the ham stuff. I love the technical challenges but hate ragchewing. As a young novice, I was totally clueless about what to say after I got on the air; so my uncle, who had a general class license, wrote out a script for me for each part of a typical exchange: "QTH ES ...", "WX ES ...", "PSE UR QSL TNX 73", etc. I don't think I ever deviated from that script as long as I was doing CW. :)

-Phil

Rolfus
01-26-2012, 11:33 AM
Hi Phil, Reading that brought a big grin to my face, we do have something in common! 73, Rolf

Rolfus
01-26-2012, 12:06 PM
Here is an audio processor of mine using a dsPIC and Si3000 codec: http://webspace.webring.com/people/jl/leon_heller/dspic.html The Si3000 includes a pre-amp and a headphone amp. I can supply Gerber and drill files. That looks as if it might be a good starting point for me. I understand that there is a circuit board available, what about parts/parts list, where to order from? I may have some trouble building a kit like that but I hope to get some help from my friend LA1WI, he can't get enough of micro stuff, the smaller the better. Like soldering surface mounted chips, I wouldn't even dream of attempting that. But what about the next step, programming the unit? Will the finished unit have a fixed program only or can it be equipped with whatever it needs to adjust the response curve as required? I don't have a clue about "Gerber and drill files". Except for understanding what audio processing is about, I am a real newbie WRT the technology and vocabulary of the art. Rolf

Leon
01-26-2012, 12:42 PM
You'll have to get the board made yourself from my files. I had 20 made when I first designed it, but they all went a long time ago. Some of the connectors are difficult to get outside the UK, but I've got some you can have. The other components are available from the usual suspects such as Digi-Key. There are some very cheap PCB suppliers now, and the whole thing could be built for about $30. I actually made the PCB for the prototype at home.

You'll also need a PICkit 2 or 3, for programming and debugging the dsPIC. You will need to learn something about DSP techniques, of course.

Software is available for designing digital filters. I have MSD for the dsPIC, which is quite expensive, but Scilab (free) works just as well, with a bit more work. It doesn't generate dsPIC code, though.

I keep meaning to redesign that board with one of the newer dsPIC33F devices - cheaper and more performance.

Rolfus
01-26-2012, 07:02 PM
Rolfus, Welcome to the forum! The Parallax Propeller chip can also do what you want, using a FIR filter. See this thread for possible ideas: http://forums.parallax.com/showthread.php?133173 -Phil I had a look at it and it looks like it might be sufficient for the performance I need. But what do I do about hardware? There's got to be a process for getting the required code into the device? I am hoping to find a design that is suitable for building on a Vero board instead of a PCB. I am confused about "propeller".The only propellers I know are used for propelling air, or boats and aeroplanes.

Rolfus
01-26-2012, 07:06 PM
You'll have to get the board made yourself from my files. I had 20 made when I first designed it, but they all went a long time ago. Some of the connectors are difficult to get outside the UK, but I've got some you can have. The other components are available from the usual suspects such as Digi-Key. There are some very cheap PCB suppliers now, and the whole thing could be built for about $30. I actually made the PCB for the prototype at home. You'll also need a PICkit 2 or 3, for programming and debugging the dsPIC. You will need to learn something about DSP techniques, of course. Software is available for designing digital filters. I have MSD for the dsPIC, which is quite expensive, but Scilab (free) works just as well, with a bit more work. It doesn't generate dsPIC code, though. I keep meaning to redesign that board with one of the newer dsPIC33F devices - cheaper and more performance. Looks like I have a long way to go. Am afraid it would take me many months. Want it the day after tomorrow.

Phil Pilgrim (PhiPi)
01-26-2012, 07:22 PM
But what do I do about hardware? ... I am confused about "propeller".The only propellers I know are used for propelling air, or boats and aeroplanes.
The Propeller is a microcontroller made by Parallax. You can read about it here:


http://www.parallax.com/tabid/407/Default.aspx

There are many development boards available for the Propeller chip:


http://www.parallax.com/Store/Microcontrollers/PropellerDevelopmentBoards/tabid/514/CategoryID/73/List/0/Level/a/Default.aspx?SortField=ProductName,ProductName

-Phil

Leon
01-26-2012, 07:39 PM
Looks like I have a long way to go. Am afraid it would take me many months. Want it the day after tomorrow.

Yes, you have got a lot of learning ahead of you.

It can be useful to do the initial design on a PC using the DSP facilities that are built-in, with the microphone and headphone input/output. Suitable software is available.

Rolfus
01-26-2012, 08:53 PM
You mean using the mic/phones in/out on the pc - and the rest is a simulation? I'd like to try that, what software would I need?

Leon
01-26-2012, 08:57 PM
Not a simulation - write DSP code for the PC. We did something like it where I used to work and programmed our tracking software using Visual C++. I then rewrote it for the DSP chip we were using.

Rolfus
01-28-2012, 09:02 AM
Yes, I realize I should write DSP code, but wouldn't that mean the computer would simulate the hardware? Nevertheless, I wonder if maybe http://www.minidsp.com/onlinestore/browse/7-minidsp-kits?sef=hc

might be a more practical solution for me, both cheaper and with much less work to do?
(http://www.minidsp.com/onlinestore/browse/7-minidsp-kits?sef=hc)

Leon
01-28-2012, 11:04 AM
The PC will simply be running the DSP algorithm, which can be run on any suitable hardware.

Those MiniDSP boards are far more expensive than mine. My board can be built for around $25.

Rolfus
01-28-2012, 04:55 PM
Yes, $99 and still the need for programming.

But wrt boards I don’t see any available, and still having to buy a picKIT, study DSP, get the parts, learn & do the programming, that didn’t seem like an easy route to me.

But
http://www.amazon.com/gp/product/B000MJ406Y/ref=ox_ya_os_product
looked like it might be what I wanted although the additional costs really are horrendous.

Item(s) Subtotal: NOK 394,06
Shipping & Handling: NOK 318,13
-----
Total NOK 891,97
Import Fees Deposit NOK 179,78
-----
Total for This Shipment: NOK 891,97

I don’t understand what the fees are for but adding a 25% VAT I will have parted with over 100.

It hurts but I hope I can get over it. It will be here soon!

Leon
01-28-2012, 05:43 PM
Microchip has this dsPIC equaliser library:

http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2680&dDocName=en537918

average joe
01-30-2012, 12:10 AM
I believe the propeller chip is an excellent candidate for this project. I have been experimenting with it recently and it would be fairly simple and require few external components. I "THINK" you might be able to use the propeller's sigma-delta Analog to Digital conversion as well Digital to Analog conversion. This means you don't need ADC or DAC chips. Just a few resistors and capacitors. Using 2 cogs for ADC and 2 cogs for DAC *stereo* you still have 4 cogs. I would imagine you could implement the FIR "filter" in one cog per channel. That would leave you 2 cogs, one you could use for user interface, etc. I think this would be your most cost effective solution because Propeller chips are not just CHEAP but very powerful. I think most DSP's are overkill for this project, and they tend to be expensive.

Leon
01-30-2012, 01:13 PM
An equaliser actually requires several FIR filters, the one I mentioned uses eight. I don't see how eight FIR filters can be implemented on a Propeller. That will probably inspire someone to go ahead and do it! :)

The dsPIC I used costs under $6, and is now obsolete. The much more powerful dsPIC33FJ128GP802 which I'd use for a current design costs about the same.

average joe
01-31-2012, 07:34 AM
From my limited understanding of DSP, each FIR is 1 band of eq. Or do I need to go back and hit the books again? It's been a few years so I very well could be wrong.

Leon
01-31-2012, 09:13 AM
It's one FIR filter for each band, of course. See the Microchip library description:

http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2680&dDocName=en537918