DIYstompboxes.com

DIY Stompboxes => Digital & DSP => Topic started by: markseel on November 21, 2010, 11:41:20 PM

Title: Simple Audio DSP Module
Post by: markseel on November 21, 2010, 11:41:20 PM
I posted a while back about a simple DSP platform.
Here's a link to the web page for it:
http://sites.google.com/site/nextaudiodsp/
Only the 10-pin boards are available.
If anyone's interested in getting a board you can email me at:
'mark.seel@gmail.com'
Title: Re: Simple Audio DSP Module
Post by: Ice-9 on November 22, 2010, 08:39:36 AM
Looks really good , I have had a quick look at the web page but will read it in full later when i'm at home
Title: Re: Simple Audio DSP Module
Post by: slotbot on November 23, 2010, 01:05:33 PM
Quote from: Ice-9 on November 22, 2010, 08:39:36 AM
Looks really good

+1
Title: Re: Simple Audio DSP Module
Post by: taang on November 23, 2010, 04:28:12 PM
This looks really cool.

Quick question though: from the standpoint of somebody completely new to digital circuits but not necessarily to programming, like me, how difficult would it be to set up a stompbox with some pots and start programming/testing?

Cheers
Title: Re: Simple Audio DSP Module
Post by: markseel on November 23, 2010, 11:58:16 PM
It would be easy to use in a stompbox.
The digital stuff is all contained on the board.
You just have to supply power, pots and the appropriate analog in/out cicuitry.
The web page shows hook-up examples for both guitar and line-level usage.
The board draws 50ma at 3.3 volts so you'd need to use a voltage regular if you're running off of a 9v battery.
To program it just hook up a USB to serial converter and use the Python script to assemble and download.
Title: Re: Simple Audio DSP Module
Post by: markseel on November 24, 2010, 12:03:35 AM
I'll put the gerber files for the four layer PCB and the firmware image for the microcontroller on the website soon in case someone wants to make their own boards rather than get them from me.
Title: Re: Simple Audio DSP Module
Post by: taang on November 24, 2010, 04:23:14 AM
that seems almost too good to be true!

are there any limits on the chip?

and how much would it cost from you?

Cheers
Title: Re: Simple Audio DSP Module
Post by: william on November 24, 2010, 08:50:03 AM
Do you have plans to release the 20 pin version?  I would like to build a dsp based eq with multiple patches and am curious if the 20 =%? 8&? 4" 3$&3.
Title: Re: Simple Audio DSP Module
Post by: markseel on November 24, 2010, 11:29:12 AM
There are limitations.

While the DSP architecture takes care of fixed point math it only supports a simple programming model in that the program consists of math operations and forward jumps. The program is executed one per audio cycle. This works really well for waveshaping algorithms, digital filters, delays, etc but it prevents you from writing loops and subroutines. This tradeoff seems worthwhile though. The AL3102 spec at Wavefront Semi's website describes the DSP in better detail

The Pyhon script supports a subset of the actual instruction set in order to simplify programming. You can use the Wavefront assembler if you want. The Python script can download the resulting object code.

The board requires a 3.3 volt supply. Therefore the analog signal should be limited toabout 3 volt pk-to-pk.
Title: Re: Simple Audio DSP Module
Post by: markseel on November 24, 2010, 11:38:22 AM
I'm posting these from an iphone so sorry for the typos!

It costs about $20 to make a board with parts purchased in low volume. Build and test time for a board is about one to two hours. Soldering those small parts is a real drag!  I was going to charge $30 to start so I can get the board out there. I'll have to raise that at some point though to $40.

The 20 pin board has two more pot connections, on-board voltage regulators and three gen purpose outputs. If there's enough interest I'll cad the four layer board and make some (the two layer board for the 20 pin prototype was too noisy).
Title: Re: Simple Audio DSP Module
Post by: taang on November 24, 2010, 04:05:00 PM
Depending on my workload from school this winter break, I would very interested in buying one of these.
Would this board be capable of note tracking and modulation effects? Like would it be able to perform a fourier transform and then modulate each resulting signal?

Also, where'd you get this box: http://picasaweb.google.com/111829367884437703386/NextAudioDigitalAudioSignalProcessor#5471967998824872354 (http://picasaweb.google.com/111829367884437703386/NextAudioDigitalAudioSignalProcessor#5471967998824872354) ? I's so amazing.

Cheers
Title: Re: Simple Audio DSP Module
Post by: armstrom on November 24, 2010, 04:36:29 PM
I was going to ask about the boxes too.. so spill it  :icon_mrgreen: Looks like its hogged out of solid billet aluminum so it's probably not cheap. Looks very good though.
Title: Re: Simple Audio DSP Module
Post by: markseel on November 24, 2010, 06:14:51 PM
Modulation effects are easy.  The DSP only has 1024 words so that only gives you 21 msec of delay. That works fine for chorus but it's not enough for echo.  This DSP would be a poor choice for frequency domain work which involve fft's and inverse fft's.
Title: Re: Simple Audio DSP Module
Post by: markseel on November 24, 2010, 06:33:28 PM
Yup. The cases were milled out of solid aluminum!  I was going to make some pedal prototypes so I CAD'ed the cases and had 10 cases milled, anodized and dyed.  Cost me $1200!!!  But in lots of 100's the cost goes down to $40 per box. Skip the anodizing and it's down to $30 per box. But to get that 'volume discount' I'd have to spend a lot of cash!  Still might do it someday.  Once you start milling you can do just about anything you want in terms of case details (recessed knobs, threaded holes for jacks, etc). 
Title: Re: Simple Audio DSP Module
Post by: mhelin on November 26, 2010, 06:34:48 AM
Quote from: markseel on November 24, 2010, 11:38:22 AM
I'm posting these from an iphone so sorry for the typos!

It costs about $20 to make a board with parts purchased in low volume. Build and test time for a board is about one to two hours. Soldering those small parts is a real drag!  I was going to charge $30 to start so I can get the board out there. I'll have to raise that at some point though to $40.

The 20 pin board has two more pot connections, on-board voltage regulators and three gen purpose outputs. If there's enough interest I'll cad the four layer board and make some (the two layer board for the 20 pin prototype was too noisy).


Looks excellent, like the python simulator/assembler especially! So you don't really depend to Wavefront tools at all?  I don't know what's happening with Wavefront, their site http://www.wavefrontsemi.com has been down for some time and that's never a good sign. Fortunately there are lot's of AL3xxx chips available, and chinese already make copies of them:

http://www.bdnc.com/productsaudiop.html
http://www.bdnc.com/datasheet/
http://www.bdnc.com/datasheet/bd3101_spec_V1.0.pdf

BTW. Can you sell the PCB and parts as kit (for how much)? Also could you order them ready-built from some company, I guess there are many such in China / HK (they copy your work propably, they do it anyway) that could do it for cheap.

Regarding the possible kit option, does the AVR Tiny need some special programming to be able to dl the code to 1KDSP?  If so it would be nice to get it preprogrammed (unless it's got preprogrammed bootloader already).

You could also send the gerbers to BatchPCB (make a project there and start selling the PCB's), see http://batchpcb.com/index.php/Faq

Title: Re: Simple Audio DSP Module
Post by: mhelin on November 26, 2010, 10:04:28 AM
Here are some other AL3101/2 projects that might be interesting:

http://www.axoris.be/index.php
http://members.wideband.net.au/gzimmer/Big%20DSP%20Filter/default.html

Also the Alesis ION, Micron and Akai Miniak synths use the 1KM DSP's (one chip / voice + one for FX).

One thing I would like to see was to have some pins (to solder connectors or wires) for the unused digital ins and outs. I mean you could for an example increase the delay time by routing the data via digital delay line made of shift registers (N*frame size bits) clocked by the sample clock. Another use would be the daisy chaining two units. Maybe the AL3101 would be better part considering the options.
Title: Re: Simple Audio DSP Module
Post by: markseel on November 26, 2010, 03:14:35 PM
Thanks for the ideas and links!

After reviewing the PCM layout I could easily add more pins for 2 digital ins and 2 digital outs to allow for daisy-chaining AL3101/AL3102 DSP's (or to hook up additional ADC's or DAC's).  It'd make the board wider by about 0.050" to 0.100" - no big deal.

I checked out the BatchPCB.  I'd like to find someone to actually build the boards so I don't have to.  Perhaps there's a cheap way to have someone flow the parts on a panalized PCB rather than individually solder?

Regarding the kits.  I'd be fine with selling PCB's, pre-programmed ATtiny84's and the other parts without assembly/soldering if that's what you mean.  Right now the work for me is in board assembly since the firmware for DSP control, program loading and pot value updating is pretty much done.

Not sure with what's up with Wavefront.  They haven't changed that website for years.  You might be right about using an AL3101 instead of a AL3102.  I liked the AL3102 since it was smaller.
Title: Re: Simple Audio DSP Module
Post by: mhelin on November 27, 2010, 06:53:11 AM
Quote from: markseel on November 26, 2010, 03:14:35 PM
Thanks for the ideas and links!

After reviewing the PCM layout I could easily add more pins for 2 digital ins and 2 digital outs to allow for daisy-chaining AL3101/AL3102 DSP's (or to hook up additional ADC's or DAC's).  It'd make the board wider by about 0.050" to 0.100" - no big deal.

I checked out the BatchPCB.  I'd like to find someone to actually build the boards so I don't have to.  Perhaps there's a cheap way to have someone flow the parts on a panalized PCB rather than individually solder?

Regarding the kits.  I'd be fine with selling PCB's, pre-programmed ATtiny84's and the other parts without assembly/soldering if that's what you mean.  Right now the work for me is in board assembly since the firmware for DSP control, program loading and pot value updating is pretty much done.

Not sure with what's up with Wavefront.  They haven't changed that website for years.  You might be right about using an AL3101 instead of a AL3102.  I liked the AL3102 since it was smaller.


You could quote for example MyroPCB:

http://www.myropcb.com/

They both produce PCB's and assemble them. I guess they can supply most of components as well (maybe the AL310x chips as well), and program the AVR. I have no experience with them but they claim to have a number of satisfied customers.

For stombox use the small size and limited number of IO's is fine, but on the other hand there are many more potential applications for with the DSP could be used like virtual analog synthesizers (you need larger MCU for handling MIDI and controlling the voice allocations and parameters, etc., and you need either MIDI UART of USB UART) and speaker crossovers (digital S/PDIF input would be nice, and for basic 2 way speakers you'll need at least 4 ch DAC outs, with subwoofer 6 ch DAC would be better). So it would be a good idea to fit some extra pin headers there so that you could for an example leave the tiny AVR out an use some external MCU kit to interface. On the other hand if you make the board much bigger like use four AL3101 chips on 6-bit parallel bus with some bigger CPU (like Coldfire or some ARM, an example is the Alesis ION/Micron, see http://www.statikcatstudio.com/ION-Q01-SCHEMATICS.pdf ) the product would become too expensive in small quantities. Besides if you need more processing power than AL3102 then it would be better to choose some other DSP.

Anyway what you have planned is fine, problem is letting people know your product, and maybe have the features they need added (if the space and costs will allow). There are some other forums like electro-music.com, prodigy-pro.com/diy and diyaudio.com where could be folks interested on what you are doing. Also regarding the software, the Python solution is fine for people who are coders themself, but for other folks some kind of  Axoris or even Faust (http://sourceforge.net/projects/faudiostream/) kind of environment would be easier. Guess it's easy in Python to expand the framework to include using some upper lever building blocks (library of preprogrammed DSP functions) that could be used to make an assembly (at work we use Robot testing framework such way, see http://code.google.com/p/robotframework/ ).

- Mikko

Title: Re: Simple Audio DSP Module
Post by: ExpAnonColin on November 27, 2010, 10:08:27 PM
I think Mark's using Python simply as a front-end for writing the assembly... almost a coding-based IDE.  It's just a simple way to wrap the serial functionality and allow the assembly code to be written as normal.  Compiling Faust down to assembly code of this kind would be a headache, if not impossible!  It's compiled to C++ as it is, and this kind of assembly programming is both limited in instructions as it is in program layout.  Would be an interesting exercise I guess though.  I think it would be much more useful to compile Faust down to ARM C++ which allowed the use of the ADC/digital IO for control pins.  That's another thread though.

-Colin
Title: Re: Simple Audio DSP Module
Post by: markseel on December 01, 2010, 09:30:18 AM
Quote from: ExpAnonColin on November 27, 2010, 10:08:27 PM
I think Mark's using Python simply as a front-end for writing the assembly... almost a coding-based IDE.

That's the idea.  The Python code is minimal and is meant to take care of emitting the proper DSP object code while allowing the programmer to create reusable blocks of code implemented as Python functions that can accept arguments (so that the emitted code can  be parameterized in some way).

For example; if you wanted to insert a sine wave generator (maybe for an LFO or for a quick audio test) into your program you could use this Python function (in the example source code on the NextDSP website):


# Generate DSP object code for a 500 Hz sine wave (sample rate is 48000 kHz)
# The sine value for each sample is placed in the accumulator
# Memory locations 0x400 and 0x401 are used for calculations and to store sine generator state for each pass
import SineGenerator
for i in SineGenerator( "LFO1", 48000, 500, 0x400, 0x401 ): yield i


You could use the same technique to create reusable code generators for low and high pass filters where the agruments specify filter type, filter order, cut-off frequency, etc.

See 'http://sites.google.com/site/nextaudiodsp' for some coding examples.

The Python code generates a text file with 40-bit opcodes in ASCII-HEX format - same output as the Wavefront assembler.  So you can use any assembler you want to use for this board since the Python downloader uses the same ASCII-HEX format.

Mikko also pointed out a couple of other assembler options:
- AL3101 assembler by Bret Victor: http://bkasm.sourceforge.net/
- Axoris VirtuAL3101: http://sourceforge.net/projects/virtual3101/

Personally, I like the Python script :icon_lol:
Title: Re: Simple Audio DSP Module
Post by: markseel on December 02, 2010, 02:00:05 PM
Just curious.  What's the biggest barrier to usage of a board like this:

1) Knowledge and available parts for hooking up external analog circuitry
2) General knowledge of programming (Python, 'C', etc)
3) Knowledge of DSP algorithms and signal processing
4) Limitations of the AL3102
5) Generally small numbers of people interested in DIY digital effects

Any other reasons?
Title: Re: Simple Audio DSP Module
Post by: mhelin on December 03, 2010, 11:57:45 AM
Wavefront Semiconductors web pages are available again (don't know for how long, you better grab everything you need from there and arcive):

http://www.wavefrontsemi.com

Regarding those questions I'd say 5), 3) and 2) in that order are the biggest barriers, but it's just a guess. I think very many people (most, >90%) in DIY prefer analog solutions over digital. But that will change I'll guess. Many pop/rock groups use just digital stuff (like POD's)  either in studio or live. Line6 just updated their line on POD's and that will sure help increasing the number of users. Another thing is that grasping DSP stuff like how digital distortion should be implemented right (avoiding aliasing) is not easy for people who can do some other programming.

So the other things like the limitations of the AL3102. Yes it's quite limited, and main problem is that you cannot add RAM. On the other hand you could use the AL3201 chip for effects needing a longer delay line and to implement reverb, it's got 32K samples DRAM providing 0.68s of delay.Guess it would be quite easy to control the delay.

Personally I'd like to see some kind of modular system built using AL310X's: a single DSP board should have just two DSP's daisy chained and just with headers (no converters). There should be also a jumper or DIP switch for selecting the board address for chip select signals for MCU. By daisy-chaining several board you could more prosessing power. Then you could have one additional "simple" CPU/MCU board which might have also converters (a CODED like part) with the analog circuit (op-amps for buffering/filtering). Then there could be a board with just converters together with the analog stages -  a 6-channel DAC for an example PCM1602A from TI: (http://focus.ti.com/docs/prod/folders/print/pcm1602a.html ) - that would be fine for digital crossovers (active loudspeakers). Then a digital input board with S/PDIF would offer purest quality (no extra A/D conversion). If you can design the stuff and make easy to use software modules then sell the product through Sparkfun (for an example) so it gets visibility and large number of resellers. Just some thoughs, would be interested to hear what other people here think.

- Mikko
Title: Re: Simple Audio DSP Module
Post by: ExpAnonColin on December 03, 2010, 01:12:15 PM
Quote from: markseel on December 02, 2010, 02:00:05 PM
Just curious.  What's the biggest barrier to usage of a board like this:

I think it's probably the understanding of using assembly for DSP algorithms and the fixed number of possible control inputs.

-Colin
Title: Re: Simple Audio DSP Module
Post by: markseel on December 10, 2010, 04:11:35 PM
Thanks for the feedback so far guys.  I just received a bunch of DSP's from Asia but before I pull the trigger on building  boards I want to make sure the board(s) are meeting the interests of as many people as possible.  Here's a list of three options.

Option 1 is the all-in-one board.  Options 2 and 3 consist of a set of three boards.

Thoughts anyone?

Option 1: One 1.0" x 0.6" Board
   * All-In-One Board
       - WM8731 CODEC + AL3102 DSP + AtTiny84 MCU
       - One Serial Input (Control/Programming) Pin
       - Two Analog Inputs
       - Two Analog Outputs
       - Three Potentiometer Inputs (Four with some trickery)

Option 2: Set of Three 1.0" x 0.6" Boards
   * Board #1 - CODEC+DSP Main Board
       - WM8731 CODEC + AL3102 DSP + AtTiny85 MCU
       - One Serial Input (Control/Programming) Pin
       - Two Analog Inputs and One Digital Input
       - Two Analog Outputs and One Digital Output
       - One Digital Clock Input Pin (to Board #2)
   * Board #2 - Dual DSP Expansion Board
       - Two AL3102 DSPs and Two AtTiny85 MCUs
       - Two Serial Inputs (Control/Programming) Pin
       - Two Digital Inputs (One for Each DSP)
       - Two Digital Outputs (One for Each DSP)
       - One Digital Clock Input Pin (from Board #1)
   * Board #3 - Potentiometer Input Board
       - One Serial Output Pin to Control Boards #1 and #2
       - One AtTiny84 MCU
       - Seven Potentiometer Inputs

Option 3: Set of Four 1.0" x 0.6" Boards
   * Board #1 - Audio CODEC Board
       - WM8731 CODEC + AtTiny85 MCU
       - One Serial Input (Control) Pin
       - Two Analog Inputs and One Digital Input
       - Two Analog Outputs and One Digital Output
       - One Digital Clock Output Pin (to Board #2)
   * Board #2 - Single DSP Board
       - AL3102 DSP + AtTiny85 MCU
       - One Serial Input (Control/Programming) Pin
       - One Digital Input
       - One Digital Output
       - One Digital Clock Input Pin (from Board #1)
   * Board #3 - Potentiometer Input Board
       - One Serial Output Pin to Control Boards #1 and #2
       - One AtTiny84 MCU
       - Seven Potentiometer Inputs

Hope that wasn't too confusing.  I'd appreciate feedback!
Title: Re: Simple Audio DSP Module
Post by: MetalGuy on December 10, 2010, 04:24:32 PM
I'm interested in DSP modules but as a user. I'm not going to do any programming at all - my head is simply not wired for that and I hate mathematics and stuff.
So here's a stupid question for you: I need an FX module that can do 3 to 5 effects simultaneously with adjustable parameters of course. Is your module going to be able to that?. Thanks.
Title: Re: Simple Audio DSP Module
Post by: mhelin on December 13, 2010, 04:35:20 AM


Hopefully I'm not confusing you more, but what I think could be nice system is the one like drawn below. I know AL3102's haven't got Chip Select pins but you could use for and example AND gate for CS and CLK signal in control bus so a single DSP could be updated at a time (instruction RAM filled, parameters update etc.).

I have a question: are those AVRTiny's needed on DSP cards as well? Couldn't you simply use a larger MCU with bigger flash to store the DSP code and also take care of the parameter and coefficient calculations for EQ's and such?  Then you would propably need a bigger (16 or 32 bit) MCU, with hardware multiplier preferably (AVR32 would meet the requirements, though AFAIK also ATMega16L comes with the multipier and has 8 ch A/D for controls). On the other hand if you have already bought a batch of AVRTinys it makes sense to use them.

(http://img17.imageshack.us/img17/5838/dsp.png)

Title: Re: Simple Audio DSP Module
Post by: markseel on December 13, 2010, 02:18:32 PM
Quote from: MetalGuy on December 10, 2010, 04:24:32 PM
I'm interested in DSP modules but as a user. I'm not going to do any programming at all - my head is simply not wired for that and I hate mathematics and stuff.
So here's a stupid question for you: I need an FX module that can do 3 to 5 effects simultaneously with adjustable parameters of course. Is your module going to be able to that?. Thanks.

So you would be interested in using these boards if they were pre-programmed with an effect?  That's possible.

Each DSP can execute 50 MIPS where an instruction can consist of a 28-bit multiply-accumulate using a constant and sample value from RAM.  Fixed-point math is handled automagically (as opposed to having to use multiple instructions in a general purpose DSP to implement fixed-point math using integer operations.

In my experiences so far a single module is capable of one of the following: 

1) Multi-stage distortion algorithm consisting of non-linear wave-shaping using logarithms.  4 or 5 stages of 'overdrive'.  Each stage followed by low-pass filtering.  Aliasing reduction (aliasing is due to the increase of internal signal bandwidth due to non-linear math and math error).  Each 4 or 5 stage chains are repeated 4 times per oversampling.  16th order filters (32-tap IIR) for interpolation and decimation.

2) Tone Control with bass, mid and treble control.  Bass and treble have adjustable gain/attenuation and selectable cut-off frequency.  Midrange control has adjustable gain/attenuation and selectable center frequency.  Each gain/attenuation adjustment has approx 15 steps while the frequency adjustment has 3 steps.  This assumes that all of the coefficients have been pre-calculated and placed in DSP RAM as part of the DSP code.  The alternative is calculate the filter coefficients on the MCU.

3) Multi-voice chorus.  Delay is modulated by sine LFO's.  Each LFO computes sine using an approximation function.  Can get about a max of 31 milliseconds of delay.  Easy to add low-pass filters to the feed-back path if desired.
Title: Re: Simple Audio DSP Module
Post by: markseel on December 13, 2010, 02:27:09 PM
Thanks for the feedback.  The comments all make sense to me.

Quote from: mhelin on December 13, 2010, 04:35:20 AM
you could use for and example AND gate for CS and CLK signal in control bus so a single DSP could be updated at a time (instruction RAM filled, parameters update etc.
Good idea!

Quote from: mhelin on December 13, 2010, 04:35:20 AM
I have a question: are those AVRTiny's needed on DSP cards as well?
The MCU contains the DSP program in FLASH and loads the DSP program to DSP RAM by synthesizing the AL3102's two-wire serial protocol using a couple of GPIO's.

Quote from: mhelin on December 13, 2010, 04:35:20 AM
Couldn't you simply use a larger MCU with bigger flash to store the DSP code and also take care of the parameter and coefficient calculations for EQ's and such?  Then you would propably need a bigger (16 or 32 bit) MCU, with hardware multiplier preferably (AVR32 would meet the requirements, though AFAIK also ATMega16L comes with the
Yes, I agree.  I could use a larger device with more FLASH but the boards would then have to expose pins for AL3102 serial comm.  Good point regarding the multiplier.  I've not calculated how the MCU would handle on-the-fly filter coefficient calculations so not sure if the HW multiplier is crucial. 
Title: Re: Simple Audio DSP Module
Post by: markseel on December 13, 2010, 03:00:15 PM
After all of the feed back I think I'll start a new DSP board.

I'm going to keep the 10-pin board as is (power, ground, stereo in, stereo out, programming pin, three pots).  Some people have expressed interest in this board so I'm going to continue to build and test them and send them out to who's contacted me so far.

Rather then change the 10-pin board or add more small boards as part of a modular system I started working out a new board yesterday.  

Let me know what you think!

1) Analog: 8 Analog Inputs, 8 Analog Outputs (four 24-bit 48 kHz stereo DACs, four 24-bit 48 kHz stereo ADC's).
2) Digital Stages 1,2,3: Three AL3102's daisy chained using all four digital audio inputs/outputs
3) Digital Stage 4: XMOS XS1-L1 (same device used for control) for up to 680 msec of delay
4) Control: XMOS XS1-L1 to generate ADC/DAC clocks, route ADC data to DSP's and DSP data to DAC's
5) Other: USB to serial converter, 64 KByte EEPROM, clock generation, power-on-reset, etc.
6) Programming: Same as for the 10-pin board (Python or Wavefront assembler) except that the USB/serial converter is on-board.
Title: Re: Simple Audio DSP Module
Post by: MetalGuy on December 13, 2010, 04:32:49 PM
QuoteSo you would be interested in using these boards if they were pre-programmed with an effect?  That's possible.

Yes, but only in case one board can do several effects in a row for example chorus+delay+reverb. FV-1 for example can do 2 effects.
Title: Re: Simple Audio DSP Module
Post by: mhelin on December 14, 2010, 02:14:01 AM
Quote from: markseel on December 13, 2010, 03:00:15 PM
After all of the feed back I think I'll start a new DSP board.

I'm going to keep the 10-pin board as is (power, ground, stereo in, stereo out, programming pin, three pots).  Some people have expressed interest in this board so I'm going to continue to build and test them and send them out to who's contacted me so far.

That's good decision, even though it's targeted more to stompbox applications. There are many things you can do with just single AL3102 you can't in analog domain, at least with limited component count.

Quote
Rather then change the 10-pin board or add more small boards as part of a modular system I started working out a new board yesterday.  

Let me know what you think!

1) Analog: 8 Analog Inputs, 8 Analog Outputs (four 24-bit 48 kHz stereo DACs, four 24-bit 48 kHz stereo ADC's).
2) Digital Stages 1,2,3: Three AL3102's daisy chained using all four digital audio inputs/outputs
3) Digital Stage 4: XMOS XS1-L1 (same device used for control) for up to 680 msec of delay
4) Control: XMOS XS1-L1 to generate ADC/DAC clocks, route ADC data to DSP's and DSP data to DAC's
5) Other: USB to serial converter, 64 KByte EEPROM, clock generation, power-on-reset, etc.
6) Programming: Same as for the 10-pin board (Python or Wavefront assembler) except that the USB/serial converter is on-board.


That's a good plan, just be sure to use good quality converters, the people like on diyaudio.com who could be interested are very picky. Also the opamp selection is important saleswise. I like TI converters, they have some 8 channel DACs available like PCM1690 with 113 dB SNR (should be ok for multichannel stuff) to keep component count and cost down. OPA2134 (http://focus.ti.com/docs/prod/folders/print/opa2134.html) should be good enough opamp for DAC filters. For ADC's the 4-channel PCM4204 (http://focus.ti.com/docs/prod/folders/print/pcm4204.html) would be perfect match. OPA1632 diff amp (http://focus.ti.com/docs/prod/folders/print/opa1632.html) would be perfect frontend for ADCs (see the schematics here for an example: http://koti.mbnet.fi/jahonen/Audio/DIY/DSP56371TestBoard/DSP56371TestBoard_Schematics.pdf, note also the use the protection diodes). Power supplies are important factory to sound quality as well, and to keep the signals clean and the EMC down keep the PCB traces short and narrow and separate the analog and digital planes well (and continue using the 4-layer design). I think you did excellent job with the 10-pin board already.

Interesting choice that XMOS device, got to study it more. Sparkfun has a board with XS1-L available (for low price as well).

Also don't forget MIDI interface (mean UART based, though USB might be ok for most people except in live use on stage).
Title: Re: Simple Audio DSP Module
Post by: markseel on December 14, 2010, 01:12:35 PM
Wow, great suggestions - thanks mhelin.
Sounds like a lot of work though - this might put me in over my head :icon_eek:
Title: Re: Simple Audio DSP Module
Post by: Joecool85 on December 17, 2010, 08:29:02 AM
Ok, I've not gotten into DSP boards at all yet, but am very interested.  I've built a few pedals, a couple amps (tube and chip) and I am a web developer so I'm not newbie to code.

Here's what I'm looking for:

A kit I can solder together, plug into my computer and program.  I really just want this to be able to do different types of overdrive.  Three pots necessary, tone, gain, level.  I just don't know how many analog or digital inputs the board needs and all that stuff and I don't want to for now.  Let me know if this is possible, and if it is, please PM me with a price.
Title: Re: Simple Audio DSP Module
Post by: markseel on December 17, 2010, 04:44:27 PM
This 10-pin board should work great for that, and it'is easy to use.
See http://sites.google.com/site/nextaudiodsp/
Cost is around $35.  Email me at mark.seel@gmail.com
There has been some people interested and I'm getting ready to build a batch (sorry it's taking so long)

The 10-pin DSP board has:

- Stereo analog inputs and outputs (unbuffered, direct path to ADC and DAC)
- Power supply, ground and programming pin
- Three pins for pots.

There will also a 10-pin companion board (doing the PCB right now!) with:

- Mini Type-B USB connector and USB/Serial converter
- Voltage regulators
- Buffering for guitar input and outputs

These two boards together give you a complete system.  Both boards are both 10-pin SIP's and are 1.0" x 0.6" allowing both to be mounted up-right close together in tight spaces.  The micro-usb connector allows you to plug in a USB cable even after the boards have been soldered or plugged into your setup.  That way you can build your pedal and download new DSP algorithms at any time even after it's been built (you have to of course open your stompbox up to do this though).

Using these boards you could make a 4 knob pedal; one knob for volume/output level, three knobs for effects control (hook up to three pot inputs in DSP board), guitar input and effect output (hook up to companion board that already has the buffers and low-pass filters), expression input using the other analog input, true bypass, and battery connection (hook up to companion board since the 9 volts are divided to 4.5 volts using a switched-cap network).  Current drain on the battery would be around 25 mA not counting current for your bypass LED.


Title: Re: Simple Audio DSP Module
Post by: markseel on December 30, 2010, 11:51:31 PM
I updated this site See http://sites.google.com/site/nextaudiodsp/ with:

1) The DSP main board and companion board Gerber files (4-layer PCB's) are available if you want to fab your own boards.
2) Component lists and component placement pictures for each board.
3) More information on the companion board that contains the USB/Serial converter, voltage regulators and audio buffers.
4) Updates to Python code (more updates to come)
5) Firmware source code for the Atmel part on the DSP board

I'll be updating this site with more corrections and info in the next few days.
Title: Re: Simple Audio DSP Module
Post by: mhelin on January 03, 2011, 03:22:45 PM
Quote from: markseel on December 30, 2010, 11:51:31 PM
I updated this site See http://sites.google.com/site/nextaudiodsp/ with:

1) The DSP main board and companion board Gerber files (4-layer PCB's) are available if you want to fab your own boards.
2) Component lists and component placement pictures for each board.
3) More information on the companion board that contains the USB/Serial converter, voltage regulators and audio buffers.
4) Updates to Python code (more updates to come)
5) Firmware source code for the Atmel part on the DSP board

I'll be updating this site with more corrections and info in the next few days.


Wow, you've been busy!  I quickly tried uploading the first set of gerbers (after renaming the files with .top, .tsm, .bot, .bsmetc. extensions) to BatchPCB for DRC but the check failed, complained about too small tracks or gaps - 8 mil is the limit. The png's the DRC bot emailed me looked ugly, not like the images after upload. Maybe there are some incompatibilityies with FreePCB provided gerbers and BatchPCB. Also installed Eclipse, AVR-Eclipse plugin and WinAVR and started to wonder how to program these chips. Nice code btw, the firmware I mean. Maybe you could also add a bootloader there to make reprogramming of the AVR code itself easier for people who don't own AVRISP etc. programmer.

Title: Re: Simple Audio DSP Module
Post by: MetalGuy on January 03, 2011, 04:26:41 PM
As I already said I'm interested in similar modules as a user. Definitely not interested in any distortion and/or overdrive (which even the big companies still can't get it right). I'm interested in modulation/echo effects. Previously I asked a question about your module but didn't get any definitive answer so here it is one more time: Is this module going to be able to do 3 to 5 effects in a row like chorus - delay - reverb for example?
If not what product or chip will be able to do that?
Thanks.
Title: Re: Simple Audio DSP Module
Post by: jasperoosthoek on January 03, 2011, 04:47:50 PM
I would be most interested in a finished PCB that I can put in a box immediately. Connect analog inputs/outputs to the bypass switch, connect pots and all I need to do is program it. Connect the USB cable and I can begin. Maybe have a simple program to get sound and take it from there.

So, it's the programming part I would like to discover myself. I've done PICs before but never DSPs. I have no idea how they work and that bothers me a bit ;D. I don't feel I need them but I might like them so much that it's gonna be there to stay.

I wouldn't mind paying a few tens of dollars as long as I don't have to solder myself. I do that on a daily basis at work...
Title: Re: Simple Audio DSP Module
Post by: armstrom on January 04, 2011, 10:00:47 AM
Quote from: MetalGuy on January 03, 2011, 04:26:41 PM
As I already said I'm interested in similar modules as a user. Definitely not interested in any distortion and/or overdrive (which even the big companies still can't get it right). I'm interested in modulation/echo effects. Previously I asked a question about your module but didn't get any definitive answer so here it is one more time: Is this module going to be able to do 3 to 5 effects in a row like chorus - delay - reverb for example?
If not what product or chip will be able to do that?
Thanks.
This module is not really going to be useful for delay based effects... Mark addressed this earlier in the thread
http://www.diystompboxes.com/smfforum/index.php?topic=88301.msg745540#msg745540

1024 words / 48000 words per second (48kHz sampling rate) means you get 21.333 ms of delay time. Not enough for delay, echo or reverb... chorus and flanger, maybe...
It's tough to beat the FV-1 for delay based effects, if that's what you're after. It has 32,000 words of sample storage, which yields maximum delay times of 1 second with mono signals or .5 seconds with stereo signals. Plenty for delays, echo, reverb, whatever.

But, back on topic.. this module will be good for things like distortion, limiters, compressors and other signal-level based effects. Basically, anything where a 21ms "window on the world" is enough to accomplish your task. A digital EQ might be possible, but tough due to the limited space.

Title: Re: Simple Audio DSP Module
Post by: mhelin on January 04, 2011, 03:06:30 PM
It would be possible to use an I2S delay chip like MAD4868A with Wavefront DSP easily if the serial data pins on the pcb could be connected to delay chips inputs (maybe in next revision). Though I don't know about that chip if it's available or not. As well you could use the Wavefront reverb chip which also has 0.68 sec of RAM (http://www.wavefrontsemi.com/products/AL3201pop.html). I guess that would be easier and cheaper, but then you need a board with the reverb chip and converters on the same PCB (AL3201 is a master device unlike the DSP) and the DSP on the other one.

If you want to maximize the RAM on WF DSP you could use lower sample rates (32kHz is well enough for electric guitar) and divide delay words into two 12-bit one (enough for 72 dB dynamic range, and even more if delay samples were ADPCM encoded) though that would help much (64 ms isn't a lot as a delay). You could further lower the sampling rate (for downsampled delayed signal) to 24 kHz for 12 kHz bandwith and use 4-bit ADPCM encoding which would result as virtual 12 ksamples memory @48 kHz for 250 ms of delay, so it's doable.

MAD4868A datasheet (guess this chip is not manufactured any more but available from various stocks):
http://download.siliconexpert.com/pdfs/2005/02/02/c/2/mis/if%20ics/mad4868a_1pd.pdf

Also Texas Intruments makes Lip Sync Delay chips (quite small ones):
http://focus.ti.com/paramsearch/docs/parametricsearch.tsp?familyId=932&sectionId=630&tabId=2701&family=analog&uiTemplateId=AUDIO_PRDSRCH_T&familyAliasId=1100932&paramCriteria=no

There seems to be also one from NJR:
http://www.cn.njr.com/PDF/NJU26904_E.pdf
Title: Re: Simple Audio DSP Module
Post by: markseel on January 04, 2011, 04:44:04 PM
I'm going to add the option to configure the DSP board for either 32 kHz or 48 kHz sampling rate via the board's programming pin.  Both rates are possible with the current crystal (12.288 MHz) connected to the WM8731 CODEC.  This will allow for a little more delay time (~31 msec vs ~21 msec) for chorus effects.

The CODEC also allows for an 8 KHz sampling rate (would allow for up to 128 msec of delay) but I don't think this will work since the AL3102's PLL is driven by the I2S word clock from the CODEC.  Pretty sure the minimum word clock for the the AL3102's PLL is 32 kHz.
Title: Re: Simple Audio DSP Module
Post by: MetalGuy on January 04, 2011, 04:48:24 PM
QuoteThis module is not really going to be useful for delay based effects... Mark addressed this earlier in the thread
http://www.diystompboxes.com/smfforum/index.php?topic=88301.msg745540#msg745540

Thanks for making that clear!
I guess something more serious like an ADSP BlackFin or something will be necessary to do what I need.
Title: Re: Simple Audio DSP Module
Post by: mhelin on January 05, 2011, 08:41:57 AM
Quote from: markseel on January 04, 2011, 04:44:04 PM
I'm going to add the option to configure the DSP board for either 32 kHz or 48 kHz sampling rate via the board's programming pin.  Both rates are possible with the current crystal (12.288 MHz) connected to the WM8731 CODEC.  This will allow for a little more delay time (~31 msec vs ~21 msec) for chorus effects.

The CODEC also allows for an 8 KHz sampling rate (would allow for up to 128 msec of delay) but I don't think this will work since the AL3102's PLL is driven by the I2S word clock from the CODEC.  Pretty sure the minimum word clock for the the AL3102's PLL is 32 kHz.

AL3102's minimum sample rate is 30 kHz.

Btw. I'm quite sure it would be possible to interface regular serial RAM or FRAM to WF DSP. One possible device could be Ramtron's FM25V series 1 Mbit (128 kB ->  max. 1.3 seconds delay time using 16-bits @48 kHz) device FM25V10:

http://www.ramtron.com/files/datasheets/FM25V10ds_r1.1.pdf
http://www.futureelectronics.com/en/technologies/semiconductors/memory/fram-mram/Pages/1995372-FM25V10-G.aspx

Just use the free serial data in/out pins of AL3102 as GP ports to access the F-RAM using SPI.

Title: Re: Simple Audio DSP Module
Post by: mhelin on January 05, 2011, 09:06:19 AM
Quote from: MetalGuy on January 04, 2011, 04:48:24 PM
QuoteThis module is not really going to be useful for delay based effects... Mark addressed this earlier in the thread
http://www.diystompboxes.com/smfforum/index.php?topic=88301.msg745540#msg745540

Thanks for making that clear!
I guess something more serious like an ADSP BlackFin or something will be necessary to do what I need.

Maybe you should check the Line6 ToneCore DSP developer kit first:

http://line6.com/tcddk/


Title: Re: Simple Audio DSP Module
Post by: Joecool85 on January 06, 2011, 06:09:54 AM
Quote from: mhelin on January 05, 2011, 09:06:19 AM
Maybe you should check the Line6 ToneCore DSP developer kit first:

http://line6.com/tcddk/

Cool!  $199, but still really neat.  I had no idea there was anything like that on the "regular" market.
Title: Re: Simple Audio DSP Module
Post by: jasperoosthoek on January 06, 2011, 06:50:39 AM
Very cool idea but I would prefer one of these boards. Nice and small and it fits in my own enclosure and it doesn't cost 199 bucks ::).
Title: Re: Simple Audio DSP Module
Post by: Joecool85 on January 06, 2011, 03:55:13 PM
Quote from: jasperoosthoek on January 06, 2011, 06:50:39 AM
Very cool idea but I would prefer one of these boards. Nice and small and it fits in my own enclosure and it doesn't cost 199 bucks ::).

I didn't mean it was a good alternative, just that it was neat that it was out there.
Title: Re: Simple Audio DSP Module
Post by: jasperoosthoek on January 06, 2011, 04:23:26 PM
;D It's not the kind of thing that gets people take their credit cards out when posted on a DIY forum...

Indeed I wouldn't have expected such a thing to be sold by a big company.
Title: Re: Simple Audio DSP Module
Post by: alparent on January 12, 2011, 08:49:24 AM
OK I might be off track? But anyways!

What I'm looking for is a platform that would teach me.
I read the thread and I'm lost ('cause I know zip about DSP)

I would like something like the Arduino board I've just started to play with.

Something that teaches you, a board, a guide, projects that builds up your knowledge.
Maybe you could offer more then one flavor.

Like a step-by-step introduction to DSP kit (like Arduino) for guys like me (low$, fun to learn with) :icon_redface:
And a full featured kit with all the bells and whistles for you more knowledgeable folks!   
Title: Re: Simple Audio DSP Module
Post by: markseel on January 12, 2011, 10:50:41 PM
I'm probably a minority on this one but I don't know what the Ardruino is all about - I've never used one or even looked into a kit  :icon_redface:  I should look as it seems to be the standard for fun, powerful and easy to use kits.  But I've been programming a long time and I think the DSP module I built is just about as easy as it gets when it comes to getting a DSP system up and running.

I'm a huge fan of the Wavefront and SpinSemi philosophy for Audio DSP's.  Simple architecture, simple instruction set.  Fixed point fractional math is done for you.  You don't have to learn all of the details of a general purpose DSP; no complicated development environment, no thick chip specification or thick user's guide, no CPU and peripheral configuration registers, no boot-loader or RTOS, no need for fixed-point math libraries, no need for commercial compilers, etc.

I think some people may under estimate the power of these audio DSP's.  The AL3102 is 50 MIPS.  But each 'MIP' optionally includes a load from memory, loading of constant, multiply, addition, decimal point adjustment (shift).  That equates to 100's of MIPS for some general purpose DSP's and MCU's.  The FV-1 has some instructions that are even more complicated, not to mention built-in LFO's.

One problem is that this board just a 10-pin SIP - no nice development kit with a board that contains jacks, pots, USB connector, etc.  Another problem is that programming the board involves both Python and assembly-like programming of a DSP.  And no GUI IDE.

But, all you have to do is give the board power, hook up some external parts for the analog stuff, connect a usb/serial adapter and you're on your way to making some noise!  DSP isn't always easy to do correctly but it's not hard to get going with wave-shaping and simple filtering.

There's a lot of smart people on this forum so perhaps others can add stuff to make this a more complete kit like a carrier board with the jacks and usb connector, example code, DSP tutorials, more friendly compiler or IDE, etc.


Title: Re: Simple Audio DSP Module
Post by: markseel on February 08, 2011, 09:23:17 PM
These boards are noisy :icon_frown:

The PCB has separate grounds and power planes and all devices are bypassed with 3 caps (0.1uF, 1.0uF, 10.0uF) at all power supply pins.  The Vmid reference for the CODEC is also bypassed using caps.  Both the analog and digital supply and grounds tie together at one point (at the Vcc and Ground pins on the board).  But it's still noisy  :icon_mad:

The layout is on the website so if anyone has tips on noise reduction through minor layout changes let me know.

Functionally these boards work fine.  I measured about 50 micro-volts RMS of noise at the CODEC analog output with the CODEC's analog inputs tied to ground via a 10K resistor.  So that's about an -90 dB noise floor (assuming 0db is 1 volt RMS) or 15 bits of noise-free ADC samples (from the 24-bit ADC).  Not nearly good enough.

I was interested in doing some distortion algorithms that have gains of around 1000 (60 dB) .  This raises the noise floor up to -20 db !!! and now only 3 or 4 of those 24 bits are noise free.   >:(

So ... what should I do?  I started working on the XMOS board since I thought this board was pretty much done.  I'd rather keep going with the XMOS board but if there's enough interest in the Wavefront-based board then perhaps I'll work out a new layout that included separate voltage regulators for analog and digital with complete separation of analog and digital grounds.

Any Thoughts?
Title: Re: Simple Audio DSP Module
Post by: g_u_e_s_t on February 09, 2011, 10:29:00 AM
what frequency bands is the noise in

im using the same codec
and it needs some heavy filtering at the output
and i dont think its actually good down to 24b anyways

the board looks cool
although its a really tight layout
it will be tough to get really low noise
without going to four layers

another thing i found
is that the codec is really sensitive to timing
of the lrclk pin
although those sorts of errros would probably have a higher noise
than what you are seeing
Title: Re: Simple Audio DSP Module
Post by: markseel on February 09, 2011, 11:57:05 AM
Thanks for the tips G U E S T.  I didn't look at the frequency distribution for the noise.  That would be a good place to start if I were to try to determine the noise source and decide how to quiet it down.  The CODEC has the oscillator and PLL on board and is the timing master (generates word clock) so I think the timing is fine.  The spec indicates that some high-pass filtering at the ADC inputs is present on the chip to lower anti-aliasing of noise into the ADC but I suppose external circuitry would help that if it were part of the problem.  Right, the layout is tight and so proximity to digital devices could be an issue.  Also, I could have used individual LDO's for digital and analog supplies rather than tying them together at the board's VCC pin - that would provide another 40 db of supply noise rejection.  But I'm not sure if supply noise is the issue.  Thanks for the ideas!
Title: Re: Simple Audio DSP Module
Post by: markseel on February 09, 2011, 12:09:58 PM
The ADC on the WM8731 has an SNR of 90 db.  I think that's my noise problem  :icon_eek:

So it seems that the dynamic range bottleneck is the due to the ADC's SNR rating and not to the board design (unless I don't understand the CODEC spec).

Good and bad news I guess.

If anyone wants a board then keep an eye on the web-site in the next week or so because I'll start building to order.
But caution; the SNR is going to be an issue if your 'effect' has really high gain (like a heavy distortion effect).

So ...

How are digital distortion effects implemented to be low noise?  Is there an analog pre-gain block (would require decent analog dynamic range in the signal chain before the CODEC's ADC)?  Noise gating would help but that just cuts out audio when the signal arrives at the noise floor - in this case the clean signal still only has 5 bits of representation.  Is there another way of simulating distortion without using so much digital gain?
Title: Re: Simple Audio DSP Module
Post by: g_u_e_s_t on February 09, 2011, 12:40:54 PM
most distortions are pretty noisey
its hard to avoid

lets say youre amplifying a guitar signal
and you have a pickup of 2k impedance
this gives almost 1uV of thermal noise from the pickup
and after a gain of ten
which is minimal for getting it to fill the ADC range
this is now 10uV without even considering the amplifier noise
which only gives -100dB noise floor
Title: Re: Simple Audio DSP Module
Post by: mhelin on February 09, 2011, 05:31:13 PM
Quote from: markseel on February 09, 2011, 12:09:58 PM
The ADC on the WM8731 has an SNR of 90 db.  I think that's my noise problem  :icon_eek:

Maybe a stupid question but have you initialized the codec to use the left justified mode the DSP uses (Audio Data Format Select register, value 01 = MSB-First, left justified, default is 10=I2S which is left-1 justified - using the I2S format would give 6 dB worse SNR).

Also you could use the common trick to get 6 dB more: sample hte mono (guitar) signal in stereo and sum the channels in DSP.

See http://www.cirrus.com/en/pubs/appNote/AN331REV1.pdf

That presents another trick which is to use the stereo input as differential input (just invert the signal for the other channel before A/D and later calculate the difference). That would also help reducing the common mode noise from converter clock signals on PCB.

Quote
So it seems that the dynamic range bottleneck is the due to the ADC's SNR rating and not to the board design (unless I don't understand the CODEC spec).

SNR of 90 dB is actually quite decent when compared to 1st generation CD players. Can you measure the in-out SNR (etc.) using a PC and RMAA software (http://audio.rightmark.org/download.shtml ). You should get results that are on the level of most onbord audio-codecs (AC97 and cheap HD audio).

- Mikko

Title: Re: Simple Audio DSP Module
Post by: jasperoosthoek on February 09, 2011, 06:54:16 PM
Nice trick sampling in stereo but it should only give 3dB better SNR. The correlated signal is doubled giving 6dB extra but the uncorrelated noise is increased too by sqrt(2) or 3dB so you gain the difference of the two as SNR.
Title: Re: Simple Audio DSP Module
Post by: mhelin on February 10, 2011, 03:32:22 AM
Quote from: jasperoosthoek on February 09, 2011, 06:54:16 PM
Nice trick sampling in stereo but it should only give 3dB better SNR. The correlated signal is doubled giving 6dB extra but the uncorrelated noise is increased too by sqrt(2) or 3dB so you gain the difference of the two as SNR.

Yeah, the paper told that as well, my eyes just locked into the 6 dB mentioned first.  So the 93 dB sampling SNR should be achievable using the stereo inputs mixed and averaged to mono. I would use the "differential mono" trick as well - at least I would test it properly, WM8731 inputs are single ended so I think it would really help reducing the common mode noise emitted from various sources.  Maybe there should also be some analog circuit preceding the A/D like a compressor (optical one is simple and matches the guitar signal well preserving the initial attack and lenghtening the decay nicely) to keep the analog level higher, and the noise gate on the output as well (used at least with high gain distortion and overdrive FX, implemented using an RMS level detector and transistor or FET to gate the signal off, THAT Corporation makes nice chips for that purpose like 4301P, see the app note DN100: http://www.thatcorp.com/datashts/dn100.pdf , that circuit maybe a little bit simplied could be implemented using single 4320 chip which includes RMS detector, VCA and couple of op-amps, see http://www.thatcorp.com/4320_Low-Voltage_Low-Power_Analog_Engine.shtml ).  
Title: Re: Simple Audio DSP Module
Post by: pruttelherrie on February 27, 2011, 06:01:54 AM
Quote from: markseel on February 09, 2011, 12:09:58 PMNoise gating would help but that just cuts out audio when the signal arrives at the noise floor - in this case the clean signal still only has 5 bits of representation. 

But in this case you sense at the input and then gate at the output.
Title: Re: Simple Audio DSP Module
Post by: markseel on March 20, 2011, 10:50:38 AM
I used op-amps to create differential inputs for the guitar, amplify by 20 db and soft clip if needed, and send the result and inverted result to both of the CODEC's stereo inputs.  If anyone wants the circuit I'll post it.  Noise performance seemed pretty good although I didn't measure it.

The DSP board works great except that I can't update the DSP RAM with pot values properly.  I'm able to load DSP programs over the DSP's serial bus but when I try to load data into it's RAM the values seem to get corrupted.  I'm writing to the area of memory that's considered the 16 user registers and not to the RAM that's used for sample memory.

I'm using hardware signal from the Atmel to the DSP (Atmel GPIO to DSP Input pin used as GPIO) to allow the DSP program to avoid accessing the memory when the MCU is writing to it (line is high while MCU is writing).  But this didn't solve the problem.  I don't think this is a collision or arbitration problem but rather an issue with how I'm using the serial I/O protocol.

So I'm stuck.  And I really like that XMOS chip!  I'll probably move on from this project on to the next (nextmos board posted in this forum).

I'll make sure the website mentioned in this post is updated within a few days with Gerbers and source code in case anyone wants to do more with this project.
Title: Re: Simple Audio DSP Module
Post by: mhelin on March 23, 2011, 07:01:49 AM
Quote from: markseel on March 20, 2011, 10:50:38 AM
The DSP board works great except that I can't update the DSP RAM with pot values properly.  I'm able to load DSP programs over the DSP's serial bus but when I try to load data into it's RAM the values seem to get corrupted.  I'm writing to the area of memory that's considered the 16 user registers and not to the RAM that's used for sample memory.

I'm using hardware signal from the Atmel to the DSP (Atmel GPIO to DSP Input pin used as GPIO) to allow the DSP program to avoid accessing the memory when the MCU is writing to it (line is high while MCU is writing).  But this didn't solve the problem.  I don't think this is a collision or arbitration problem but rather an issue with how I'm using the serial I/O protocol.

I think the errata here has some instructions related to external serial memory access:

http://www.wavefrontsemi.com/DataSheetsFolder/WavefrontEC3101-01.pdf
Title: Re: Simple Audio DSP Module
Post by: markseel on March 23, 2011, 09:31:28 AM
Thanks for digging that up mhelin.  I'll give that a shot this weekend and let you all know how it turns out.  Hope it works! :icon_biggrin:
Title: Re: Simple Audio DSP Module
Post by: markseel on April 11, 2011, 10:02:35 PM
A new revision/design of this board is about ready.  It's easier and cheaper to build but differs from the 10-pin board as follows ...

1) Two layer board with one component side (versus four layers with two component sides)
2) 16-pin DIP (600 mil wide at the pins) rather than a 10-pin SIP (board size is 0.8" x 0.7" rather than 1.0" x 0.6")
3) Uses the same AL3102 and ATtiny84 parts (minor changes to firmware though)
4) The WM8731 CODEC is gone (you hook up your own, up to four stereo DACs and four stereo ADC's)
5) The four ADC lines and four DAC lines of the AL3102's brought out to board pins
6) The I2S master clock, bit clock and left/right word clock are brought out to board pins
7) The board is the I2S master (provides all of the clocks in #6)
8) Uses the same Python script for compiling and downloading the DSP programs into FLASH memory
9) Allows writing to DSP RAM via serial line (board pin) for updating the DSP with pot values and such (same as previous board)
10) 3.3 volts @ 35 mA

Just like the previous board all you have to do is hook up a USB to serial adapter in order to download programs or update DSP memory with adjustment values.  But there's no low-speed ADC inputs.  But you could hook this up to another micro-controller that samples pots and write the values via the serial connection.

Title: Re: Simple Audio DSP Module
Post by: DSV on April 13, 2011, 09:32:52 AM
Wow, this has got me really interested!!!  :)

My project is to implement a FIR filter for cabinet and acoustic guitar emulation + some noise filtering for noise reduction.
I am fairly new to dsp: though I have some basic knowledge on how effects can be coded and some programming skills, it is the hardware part which I find pretty difficult to grasp. Therefore I am looking for boards with analog audio ins and outs, usb port for programming, and some cheap/free development tools to learn. What you presented seems to fit the bill, also considered that the 1024 instructions per cycle are probably much better than the 128 from the FV-1 for what I am planning to do!  :icon_idea:

If I understood well, you are selling the boards, though I did not find any info on http://sites.google.com/site/nextaudiodsp/ . I would like to have some more info on the price and shipping (Europe) for the boards, and if you still have some "older" ones, those with the ADC - DAC. And one last question: does pretty much any USB to serial converter work for the programming of the chips?

Many thanks for your answer and this nice project,

Daniele
Title: Re: Simple Audio DSP Module
Post by: markseel on April 13, 2011, 10:52:58 AM
The nice thing about the FV-1 is that the audio DAC, ADC and pot interfaces are part of the chip.  Simple and compact.  But the Wavefront part is more powerful.  I've written some distortion algorithms that use nearly all 1024 words of instruction memory - there's no way I could use the FV-1 for this application (non-linear wave shaping with up/down sampling and tone filtering).

I've made a few of the 10-pin boards shown on the website so far.  I'm almost ready to ship five more.  Three people have emailed me about them.  I've agreed to send them out for free just to get them in peoples hands in order to get some feedback!  You can have the other one if you want it.  The only downside is that it's taken me a long time to get these done since I'm busy and I don't like soldering  :icon_wink:  If you want it then email me your address and I'll ship it out there.

I should have one more available after that - if someone wants it send me an email.

With the info on the website anyone should be able to build one of these boards but it obviously takes some work (order PCB's and parts, solder, burn firmware, etc).  The files are out there.  If I had more time I'd build a bunch and start selling them for $30 or so.  That was the plan but I haven't been able to scale up to that.

Yes, any USB to serial converter/adapter will work as long as the adapter has a driver that creates a virtual COM port.  All board's I've seen use one of three IC's as the USB/Serial converter.  Most are either based on an FTDI part (FT232 or similiar) or the CP2101/CP2102.  All of these have the appropriate drivers for Windows, Linux and MacOS.

This next rev of the board omits the CODEC so that people can choose their own CODEC and even use up to four CODEC's if desired.  It's easier to assemble too.  If there's enough demand then I'll build more 10-pin boards that have the WM8731 codec, otherwise I'm going to phase that board out in favor of this 16-PIN DIP board that omits the CODEC.  The long term goal is to build these this summer and sell for about $20.
Title: Re: Simple Audio DSP Module
Post by: DSV on April 15, 2011, 05:03:15 AM
Hi!

Quote from: markseel on April 13, 2011, 10:52:58 AM
I've made a few of the 10-pin boards shown on the website so far.  I'm almost ready to ship five more.  Three people have emailed me about them.  I've agreed to send them out for free just to get them in peoples hands in order to get some feedback!  You can have the other one if you want it.  The only downside is that it's taken me a long time to get these done since I'm busy and I don't like soldering  :icon_wink:  If you want it then email me your address and I'll ship it out there.
That is a very kind and cool offer! I'll send you a PM!

BTW, I am checking the feasability of the project through software simulation. The acoustic guitar part is at a good point, and I should start the cab response next week ... progress is here:
http://www.diystompboxes.com/smfforum/index.php?topic=91062.0
Title: Re: Simple Audio DSP Module
Post by: markseel on July 31, 2011, 03:38:40 PM
Hi Everyone.  I've received some emails asking for some boards.  I'm having a hard time finding time to build these!  Does anyone have an interest in building some or having access to these boards only partially assembled?.  I could provide Atmel AtTiny84's programmed with firmware and soldered onto the board with the rest of the parts not soldered yet (WM8731 codec, AL3102 DSP, resistors and caps, 10-pin header) as a kit for cheap.  Any thoughts?
Title: Re: Simple Audio DSP Module
Post by: Hides-His-Eyes on July 31, 2011, 08:21:21 PM
I'd consider giving it a go.
Title: Re: Simple Audio DSP Module
Post by: derevaun on August 02, 2011, 02:05:55 AM
I'd go for a partially soldered kit form.