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

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'

Ice-9

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
www.stanleyfx.co.uk

Sanity: doing the same thing over and over again and expecting the same result. Mick Taylor

Please at least have 1 forum post before sending me a PM demanding something.

slotbot


taang

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

markseel

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.

markseel

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.

taang

that seems almost too good to be true!

are there any limits on the chip?

and how much would it cost from you?

Cheers

william

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.

markseel

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.

markseel

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

taang

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 ? I's so amazing.

Cheers

armstrom

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.

markseel

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.

markseel

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

mhelin

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


mhelin

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.

markseel

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.

mhelin

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


ExpAnonColin

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

markseel

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: