Fantasma25

Recommended Posts

Hello. Some time ago I posted a topic about a DAC Wing that I made (using the MAX5556), and well... So far it has been a total failure. I don't know if I damaged the chip while soldering or what is happening, but it simply does not respond (I soldered 2 and none of them seem to work). That's why I decided to try a different chip. This time I chose a PCM1754 from Texas Instruments. And since I also decided to manufacture the PCB with Elecrow (last time it was with OSHPark), I had some room left, so I decided to throw in an ADC as well, making it a CODEC Wing :P. The ADC is a PCM1808, and to generate the proper clock signals for standard sampling rates (44.1kHz, 48kHz, etc.) I used a PLL1705.

Here is the render of the PCB

 
post-37202-0-71013800-1409687690_thumb.p

 

I'll attatch the schematic as well. What do you think?

Here is the link of the github of the deisgn files and stuff https://github.com/DiegoRosales/PCB_Designs/tree/master/CODEC%20Wing

post-37202-0-71013800-1409687690_thumb.p

CODEC Wing Schematic Rev 1.0.pdf

Link to comment
Share on other sites

Hi,

 

there are some ready-made modules: I've used this (codec)

https://mbed.org/cookbook/RS-Audio-Codec

and this (DAC)

http://numato.com/cs4344-audio-expansion-module

The Numato board is mechanically not very robust, as there are thin traces ending at the connector, and tear easily when connector pins are stressed.

 

Both work as expected.

The advantage is maybe that they occupy fewer GPIOs than if you build it from individual DAC+ADC+PLL.

Link to comment
Share on other sites

Man,

 

I've got my head down while I'm working like a madman on the Papilio DUO and somehow this post slipped by me. Sorry for the slow response!

 

It looks really cool and it is definitely something we need for the Papilio. 

 

One thing I notice is that it looks like the Papilio Wing header needs to be rotated 180 degrees. But besides that I don't see anything else jumping out at me.

 

When it comes time to solder it up I'd be happy to help out with any tips or techniques needed to get the job done. Just ask if you have any difficulties.

 

Best of luck and keep us posted.

 

Jack.

Link to comment
Share on other sites

Man,

 

I've got my head down while I'm working like a madman on the Papilio DUO and somehow this post slipped by me. Sorry for the slow response!

 

It looks really cool and it is definitely something we need for the Papilio. 

 

One thing I notice is that it looks like the Papilio Wing header needs to be rotated 180 degrees. But besides that I don't see anything else jumping out at me.

 

When it comes time to solder it up I'd be happy to help out with any tips or techniques needed to get the job done. Just ask if you have any difficulties.

 

Best of luck and keep us posted.

 

Jack.

 

Lol, you're right about the orientation, I should have noticed that before I ordered it... :P anyway It's just a prototype. I'll upload pictures when the PCB arrives (hopefully next week). Maybe next time I could use a single CODEC chip like offroad suggested and make it a little bit smaller

Link to comment
Share on other sites

  • 2 years later...

I'm intrigued, i'm working on something similar but haven't quite put as much effort in designing a real wing with high quality audio.

Basically an audio-in wing is what I feel is i missing in the Gadetfactory wing-section, something to acompany the current sigma-delta dac AudioWing. 

I know it's gone a couple of years since you originally made this post, but did you make any progress or found something else to fill the function? 

 

I really liked the specs of this module:

On 9/3/2014 at 6:47 AM, offroad said:

there are some ready-made modules: I've used this (codec)

https://mbed.org/cookbook/RS-Audio-Codec

It even had a built in preamp for microphone/passive audio emitters,  but to be frank, it's not a Papilio wing and that is a huge obstacle for newcomers who want to focus on the software-design of their applications.

It took me atleast a year of on-and-off project shelving to just get the audio to flow through the papilio, if I only had access to such a wing back then... :) 

Link to comment
Share on other sites

Hi,

just a hint, audio DSP on FPGAs is harder than it looks.

Take a single biquad stage as an example, which could be one block in a parametric EQ.
I need ~ five multiplications per audio sample (~10 if stereo) and a usable EQ has at least low/mid/high sections => x3
The XC6LX9 has 16 hardware multipliers. With a single EQ, I'm already using the whole FPGA!

Now how's that possible? FPGAs are supposed to be powerful!
The catch is that properly pipelined, this EQ will run at 150 MHz when the audio sample rate is only 50 kHz. That means, the expensive full-FPGA EQ could (in theory) process no less than 3000 independent signals, all at the same time. And if I could trade performance for floorspace, the scaled-down EQ would shrink to 1/3000 of my FPGA, which is suddenly a very impressive number.
An optimized design could squeeze some serious guitar effects processing out of a fairly cheap chip. But, unfortunately, doing the optimized design is challenging (e.g. use bit-serial multipliers), and writing non-trivial fixed-point algorithm implementations leads to a crazy amount of work before that.
That's why DSPs are usually preferred for audio. For example, Axe FX II (guitar effect) uses DSP processor floating point math internally. FPGAs exist but I think they are an exception in rock'n'roll (some synths, mixing consoles).

Interesting here is that the XC6LX9 has enough horsepower for a serious convolution reverb (which is currently not typically found in sub-1k$ effect boards): According to the math above, a single multiplier (!) could handle a standard-size, e.g. 2000-point cab model. In addition, I need 4x18kBit block RAM for coefficients / delay line, but most of the FPGA remains unused...

 

 

Link to comment
Share on other sites

Wow great insight @offroad!

So basically the reason I ever found Papilio was that I realized that no matter what pocket-sized diy-device I work with theres going to be problems with latency as long as the actual audio-processing takes place in software, so FPGAs felt like a natural step.

Well I've already kindof realized that frequency analysis is quite a pain and there are quite a few limits compared to the retail guitar sound solutions.

But regardless of fact, It's been a great learning experience and even if I never achieve HiFi sound modeling, I believe that because of the size,price and the connectivity/interfacing potential you get, you should still be able to explore some interesting new venues as far as musical-toys go. 

The current goal is to implement volume based effects like tremolo, and next step is to explore the delay based effects like Echo and Looper, which i think shouldn't require more than the ability to store away samples that can be replayed later.

I haven't yet done my research if there are any cheap external IC's with filtering capabilities that could offload the FPGA.

But still the main Idea is to let the actual audio-stream flow through realtime-logic while the non-vital control-logic can run on the soft-processor - Basically a revamp of the Retrocade Synth for guitarists

What do you think? :)

 

Link to comment
Share on other sites

Sounds like a good plan. You should be able to fit about one second of audio into FPGA block RAM (enough to be useful), much more if you use an external memory chip.
Audio on FPGAs seems mostly like uncharted waters (maybe because of the architectural issues I mentioned), I'm sure the XC6LX9 can be made to do many amazing things. It's very well suited for an 18-bit audio path, not strictly pro quality but probably more than enough if a bit of "retro" is OK :-)

Link to comment
Share on other sites

Thanks! I was actually quite impressed with the audio-quality I got out of the cheap 12bit ADC i'm currently experimenting with but the wing that fantasma designed should produce an even more intresting bitstream.

Ah! Actually I've been meaning to find out how much samples I'd be able to store using BRAM alone. The papilio pro comes with an 64mbit Sdram as well which i've been trying to figure out how to access.

Offtopic: I figured from some other threads that It should be possible to store/read samples in SDRAM by interfacing to the bus denoted as "VGA DMA" on wishbone slot 14 on the ZPUino schematic, the reason for including the ZPUino in my project instead is to separate the complexity into 3 different areas of expertise -  someone to design the wings, someone to engineer effects in vhdl and someone to create avantgarde user-interfaces from sensors :rolleyes:. But yeah as you said trying to accomplish a complete FPGA-DSP solution in one go would probably require a tremendous effort, and it might not even be portable or adaptable enough to gain popularity.

Having said all that I feel a bit silly because I often feel myself quite lacking in all three areas, hehehe.  But hey, it's always fun to learn something new. :)

 

Link to comment
Share on other sites

21 hours ago, Tony Ivanov said:

Thanks! I was actually quite impressed with the audio-quality I got out of the cheap 12bit ADC i'm currently experimenting with but the wing that fantasma designed should produce an even more intresting bitstream.

Ah! Actually I've been meaning to find out how much samples I'd be able to store using BRAM alone. The papilio pro comes with an 64mbit Sdram as well which i've been trying to figure out how to access.

Offtopic: I figured from some other threads that It should be possible to store/read samples in SDRAM by interfacing to the bus denoted as "VGA DMA" on wishbone slot 14 on the ZPUino schematic, the reason for including the ZPUino in my project instead is to separate the complexity into 3 different areas of expertise -  someone to design the wings, someone to engineer effects in vhdl and someone to create avantgarde user-interfaces from sensors :rolleyes:. But yeah as you said trying to accomplish a complete FPGA-DSP solution in one go would probably require a tremendous effort, and it might not even be portable or adaptable enough to gain popularity.

Having said all that I feel a bit silly because I often feel myself quite lacking in all three areas, hehehe.  But hey, it's always fun to learn something new. :)

 

It's fairly easy to use the SDRAM, once you understand the basics of how our controller works. You can use the controller separately, no need for ZPUino at all.

Let me know if I can be of some assistance. We may eventually even come up with a decent how-to :)

Alvie

Link to comment
Share on other sites

No need to feel silly here... except for one thing, maybe: Judging audio quality by ear will make a fool out of you. Every single time, unless you know exactly what to look for (and then it's not pretty).

12 bits (even 8 bits) will sound OK in casual listening but it'll put you into four-track territory of days long gone by. You have to listen with neutral speakers at at concert volume _and_ know what to look for. Even cheap modern amateur equipment will outperform this by orders of magnitude.

For recording quality audio, we need much wider dynamic range than for the mastered final product (We can squeeze anything into ~8 bits for FM radio quality at the mastering stage, but what comes out of a typical guitar is most likely closer to 20+ bits than to 8.)

 

Link to comment
Share on other sites

2 hours ago, alvieboy said:

It's fairly easy to use the SDRAM, once you understand the basics of how our controller works. You can use the controller separately, no need for ZPUino at all.

Let me know if I can be of some assistance. We may eventually even come up with a decent how-to :)

Alvie

Wait you mean i can use this https://github.com/alvieboy/ZPUino-HDL/blob/dcache/zpu/hdl/zpuino/boards/papilio-pro/S6LX9/sdram_wrap.vhd directly?

I was under the impression that I couldn't use the controller directly as it was already assigned to the ZPUino-core, I don't quite yet understand all the factors but my guess was that I had to go through the DMA channel in

order to reserve a few bytes of memory for my VHDL-module and avoid overwriting sections used by ZPUino. But maybe i got it wrong and the DMA-interface is only needed if i want to access the same memoryspace with C/C++ and VHDL at the same time? 

 

2 hours ago, offroad said:

No need to feel silly here... except for one thing, maybe: Judging audio quality by ear will make a fool out of you. Every single time, unless you know exactly what to look for (and then it's not pretty).

12 bits (even 8 bits) will sound OK in casual listening but it'll put you into four-track territory of days long gone by. You have to listen with neutral speakers at at concert volume _and_ know what to look for. Even cheap modern amateur equipment will outperform this by orders of magnitude.

For recording quality audio, we need much wider dynamic range than for the mastered final product (We can squeeze anything into ~8 bits for FM radio quality at the mastering stage, but what comes out of a typical guitar is most likely closer to 20+ bits than to 8.)

 

Hehe yeah you're completley right, great input! I think with real codec wing it shouldn't be that much more of a problem to widen the audio bus to 20+ bits? 

Link to comment
Share on other sites

>> Hehe yeah you're completley right, great input! I think with real codec wing it shouldn't be that much more of a problem to widen the audio bus to 20+ bits? 

Well, depends on your RTL of course (are you using any specific 18- or 16-bit blocks). For a non-trivial design with fixed-width memory paths it might mean going back to the drawing board.

Don't get me wrong, for experiments 12 bit is OK but building anything serious on top of that is a dead end. Once you feed the output into a real distorted amplifier (hi-gain types à la Mesa Boogie would be the worst) it'll become painfully obvious what the dynamic range is needed for...

For some real-world data: I've got a Boss ME-70 under my pedal steel that is outdated and never claimed to be "pro" equipment in any case. Now if I have a bad day and set the thing to "rectifier" mode, it'll bring out microphonics from the pedals - with all strings muted - that are absolutely inaudible in any conventional / sane setup, with otherwise comparable volume. So much about dynamics in a guitar effect...

 

Link to comment
Share on other sites

23 hours ago, offroad said:

>> Hehe yeah you're completley right, great input! I think with real codec wing it shouldn't be that much more of a problem to widen the audio bus to 20+ bits? 

Well, depends on your RTL of course (are you using any specific 18- or 16-bit blocks). For a non-trivial design with fixed-width memory paths it might mean going back to the drawing board.

Don't get me wrong, for experiments 12 bit is OK but building anything serious on top of that is a dead end. Once you feed the output into a real distorted amplifier (hi-gain types à la Mesa Boogie would be the worst) it'll become painfully obvious what the dynamic range is needed for...

For some real-world data: I've got a Boss ME-70 under my pedal steel that is outdated and never claimed to be "pro" equipment in any case. Now if I have a bad day and set the thing to "rectifier" mode, it'll bring out microphonics from the pedals - with all strings muted - that are absolutely inaudible in any conventional / sane setup, with otherwise comparable volume. So much about dynamics in a guitar effect...

 

What do you think of this module? http://www.mikroe.com/add-on-boards/audio-voice/audio-codec-proto/

I just quickly eyed the specs and it looked to provide up to 32bit sound?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.