STM 32 F4 Discovery and Audioweaver, anyone tried? - diyAudio
Go Back   Home > Forums > Source & Line > Digital Line Level
Home Forums Rules Articles diyAudio Store Gallery Wiki Blogs Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

Digital Line Level DACs, Digital Crossovers, Equalizers, etc.

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 13th November 2015, 08:05 AM   #1
diyAudio Member
 
Join Date: Aug 2011
Default STM 32 F4 Discovery and Audioweaver, anyone tried?

Audio weaver supports the cheap STM32 F4 Discovery.
Audio Weaver® - the Only Cross-Platform Audio Design Platform | DSP Concepts
STM32F4DISCOVERY Discovery kit with STM32F407VG MCU - STMicroelectronics

Has anybody tried it out as crossover or FIR filter?

As mentioned in other post:
Open Source DSP XOs
You need extra ADC or SPDIF in as the card only has mems mic and I2S in.
But in principle one could make a very cheap FIR filter for bass correction or I2S digital 2 way crossover.
I guess with clever downsampling the 12-bit, 2.4 MSPS A/D converters also could be used for audiosignals with only a AFE added. (Especially for bass applications)
SR 2 400 000 Hz
n 10
SR/(2^n) 2343,75 Hz
So about 22 bits at 2k SR.

I know the audio weaver software is very powerful and has quite OK learning curve.

The STM32F407 is 32-bit ARM Cortex-M4F. The F meaning it has extended DSP instructions
http://www.dspconcepts.com/sites/def...urnal_DSPC.pdf

Regards Torgeir
  Reply With Quote
Old 16th November 2015, 07:16 PM   #2
diyAudio Member
 
Join Date: Aug 2011
Nobody?
Had a little test myself.
The basic setup is fixed 48k SF USB out from PC. So a cheap USB soundcard.
The sound is OK. No annoying artifacts.

I was looking for cheap FIR for bass room correction. So high frequency resolution was required. And preferably low latency.
I have problem with getting the buffer up and down to work.

The workaround was subband coding, extracting lowest band and padding the rest.
Then I got the lowest subband (1500k SF) channel only FIR size up to 2048. So 0.75 Hz frequency resolution. Not bad for a 15$ card.

The problem is how to get to use the I2S inn and the free version of Audio weaver....
For experimeting it is excelent.

Enclose a the files + a basic FIR (short latency) also
Attached Images
File Type: jpg SubbandandFIR.JPG (172.1 KB, 333 views)
Attached Files
File Type: zip M4FIRtestmr2.zip (181.1 KB, 6 views)
File Type: zip M4FIRtest1.zip (143.0 KB, 4 views)

Last edited by torgeirs; 16th November 2015 at 07:27 PM.
  Reply With Quote
Old 17th November 2015, 07:17 AM   #3
diyAudio Member
 
Join Date: Aug 2011
Quote:
Originally Posted by torgeirs View Post
The workaround was subband coding, extracting lowest band and padding the rest.
Oops, no subband coding! Just the splitting of the signal in 32 bands with oversampling.
Ref 8. FilterBank Processing in
http://www.dspconcepts.com/sites/def...7s%20Guide.pdf

Made a mixer for MP2 encoded streams in 93 and got the terms mixed up 22 years later...

Last edited by torgeirs; 17th November 2015 at 07:22 AM.
  Reply With Quote
Old 17th November 2015, 11:41 AM   #4
diyAudio Member
 
Join Date: Aug 2011
Quote:
Originally Posted by torgeirs View Post
SR 2 400 000 Hz
n 10
SR/(2^n) 2343,75 Hz
So about 22 bits at 2k SR.

Regards Torgeir
Ouch, a lot of error here. Thanks for PM.
The correct is 3 dB better noise for each halving of samplerate.
http://www.atmel.com/images/doc8003.pdf

And I guess 2.4 Mhz SR is a little optimistic. Maybe 400k?

So 7 * 3 = 21 is more realistic. Ends up at about 90 dB SNR. Still an OK number for bass and this pricelevel. High harmonics under 150Hz is no problem in my opinion using ordinary (sub 200$) bass elements.

Another use of the tools is:
Testing filterslopes and making analog filters based on those slopes.
Making cheap fullband or "analog filtered" USB PC speakers with driverfrequency correction and some roomcorrection is another. (Manages about 1024 fir taps for 2 channel 48kHz, so 50Hz frequency resolution of FIR filter, IIR should be considered in bass when downsampling can't be done)

Cheap outboard DSP power is here.

If you need a filter program for passive speakers I have made one:
https://sites.google.com/site/passivefilter/

Last edited by torgeirs; 17th November 2015 at 11:55 AM.
  Reply With Quote
Old 18th November 2015, 07:59 AM   #5
diyAudio Member
 
Join Date: Aug 2011
And yet another kind of setback.
How to get audio to play on an ST Cortex-M4 Discovery Board? | DSP Concepts
Only USB in works for Audio weaver. So no standalone operation.
Still possible to prototype and test. But the coding must be done yourself in KEIL or similar to have full control of inputs and outputs. (Think DSP Consepts was involved in KEIL DSP C algorithms).

Another board that is supported but nor so well documented with Audio weaver is the 49$ 32F746GDISCOVERY Discovery kit with STM32F746NG MCU - STMicroelectronics

SPDIF in.

Guess the coding has to be done manually at that board also.
  Reply With Quote
Old 19th November 2015, 05:17 PM   #6
diyAudio Member
 
Join Date: Aug 2011
The block size can be changed on input and output HW to 1024.

Then it is possible to decimate with fir 64 times to 750Hz SR.
The filterbank FIRs can then be 2 x 2048.
So 2 cannels with filter LP filter at 148Hz 60dB/oct. Then FIR filters with frequency resolution of 750Hz/2048 = about 0.370Hz.
Now it should be possible to hit the room resonances below 148Hz quite precise.

A full xover and roomcorrection system run on a cheap mini PC and prosessing on that PC (ASIO out to normal soundcard of decent quality) can achive wild filtering performance, but I think it must be a dedicated PC so the price is 10x and up....
Attached Images
File Type: jpg AWFIR3CHM4F.JPG (154.6 KB, 286 views)
Attached Files
File Type: zip M4FIRtest4c.zip (202.7 KB, 2 views)
  Reply With Quote
Old 3rd December 2015, 08:22 AM   #7
diyAudio Member
 
Join Date: Aug 2011
This is like a blog...
The last audioweaver configuration supports 1024 tap FIR filter at 750Hz.
First try was only to sheck if the mcu could prosess the filter. So filter was 1,0,0,0,0,0,...,0
I used REW and RePhase to check if a real world bass eq for phase and EQ was possible. (Seeing is believing).

I got lot of time lag. And the microphone was always in same position.

Note that the divs are at 2 dB! I havent seen more linear bass.

But the simulations show that the ear does not have to move much to have different results...
Attached Images
File Type: jpg unfiltered.jpg (110.6 KB, 225 views)
File Type: jpg roomsimulation.JPG (144.4 KB, 221 views)
File Type: jpg EQfromrew.jpg (108.0 KB, 220 views)
File Type: jpg EQbassboostphaseeqbrickwalllpfilter.jpg (111.8 KB, 25 views)
File Type: jpg roomsimulationsidesandfront.JPG (136.2 KB, 22 views)
File Type: jpg rephasePhase.JPG (153.2 KB, 20 views)
File Type: jpg rephaseGain.JPG (153.9 KB, 23 views)
File Type: jpg rephaseport.JPG (53.0 KB, 20 views)
File Type: jpg rephasefilter.JPG (57.1 KB, 15 views)
  Reply With Quote
Old 5th December 2015, 07:03 AM   #8
jirm is offline jirm  Spain
diyAudio Member
 
Join Date: Dec 2014
Location: Catalonia-Spain
Hi torgeirs

Im very interesed in your reserches. Im in path of start learning trougth DSP stuff but for now im i totally newbye for that, but i think STM32F4 discovery eval board is a little gem for his price and power and only need some people make the work for a very cheap active xover system and maybe with some another addons like drc, etc...

I dont know if STM32F4 have enought power to manage a multichannel system because seems you only tested to one channel (for FIR, IIR, DRC filtering) and what would be his input source (a cheap spdif addon board ) and codec DAC to output to analog
I will be very satisfied if you keep posting your researches about that and

Audiowaver is a great (free) piece of software that for me is very interest to rsearch to make the design filtering to DSP and with a reasonable learning curve to anyone.

My congratulations for your work

I stay tuned to this , or in any other place would you write about.

PD: Excuse my poor english, im spanish speaking
  Reply With Quote
Old 6th December 2015, 05:33 AM   #9
diyAudio Member
 
Join Date: Aug 2011
Thank you jirm!
I think by using the STM32F4 and audioweaver you will learn a lot about digital signalprosessing. It is also great for prototyping to see what is possible.

I got it to run 2 x 1024 tap FIR filter or 1 x 2048 tap. Guess you can devide 2048 on number of channels to get FIR length for each channel. I only measured 1 of the channels, but the other cannel was running on the board.

Be aware that there are only 2x I2S + USB.
That is 2 audio channels out and 2 in using I2S or
4 audio channels out and 2 in using I2S and USB.
(That would be 4 x 512 tap FIR, with USB in)
The dac is using one of the I2S on the board. But, I think the DAC is decent.

The real time consuming part is going from audioweaver to code. Of course you could buy audioweaver Developer but I suspect it will not be DIY hobby friendly price.

The best would be if someone made software that:
Got I2S input data.
Implemented decimator algorithm
Implemented interpolator algorithm
Implemented FIR filter algorithm
Implemented IIR filter algorithm
Sent I2S output data.
CMSIS DSP Software Library
(I wil not be that someone unfortunately)

Then cheap FIR for bass or coarse drc (which is a FIR filter) could be implemented without need of a PC to run when programming is finished.

I did have a look at the STM32Cube and the STM32Cube MX software is great for visualizing the hardware posibilities.

A brief nonworking sketch for 96KHz I2S inn and 8kHz I2S to DAC out is enclosed as zipped .ioc file.
(Found no way to make high SF out based on input I2S clock, there might be one that i overlooked. Using internal clock is always possible)

Regards Torgeir
Attached Images
File Type: jpg STM32CubeMX.JPG (121.9 KB, 23 views)
Attached Files
File Type: zip teststm32f4hw2.zip (3.4 KB, 2 views)

Last edited by torgeirs; 6th December 2015 at 05:43 AM.
  Reply With Quote
Old 6th December 2015, 05:55 AM   #10
diyAudio Member
 
Join Date: Aug 2011
See now that dspconsepts themselves has tried about 2x3500 fir length.
No resampling but great for DRC.
Audio Weaver Tutorials | DSP Concepts
  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pair of ElectraPrint 10k/32+32/ 35mA for sale Abszero Swap Meet 1 6th March 2014 12:36 AM
FS NOS Ortofon STM-72 step up transformer analog_sa Swap Meet 1 9th May 2013 03:07 PM
My discovery Ric_LV Subwoofers 1 29th June 2006 10:10 PM
STM's SG2525A PWM...NOR logic? space Parts 0 17th June 2004 04:20 PM
Eton Discovery lumanauw Multi-Way 0 2nd June 2004 01:30 AM


New To Site? Need Help?

All times are GMT. The time now is 06:45 PM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Copyright ©1999-2016 diyAudio

Content Relevant URLs by vBSEO 3.3.2
Wiki