News:

SMF for DIYStompboxes.com!

Main Menu

Simple Audio DSP Module

Started by markseel, November 21, 2010, 11:41:20 PM

Previous topic - Next topic

markseel

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?

mhelin

#21
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

ExpAnonColin

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

markseel

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!

MetalGuy

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.

mhelin



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.




markseel

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.

markseel

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. 

markseel

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.

MetalGuy

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.

mhelin

#30
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).

markseel

Wow, great suggestions - thanks mhelin.
Sounds like a lot of work though - this might put me in over my head :icon_eek:

Joecool85

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.
Life is what you make it.
https://www.ssguitar.com

markseel

#33
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.



markseel

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.

mhelin

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.


MetalGuy

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.

jasperoosthoek

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...
[DIYStompbox user name]@hotmail.com

armstrom

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.


mhelin

#39
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