[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Parallella Community • View topic - Acoustic Source Localization

Acoustic Source Localization

Any technical questions about the Epiphany chip and Parallella HW Platform.

Moderator: aolofsson

Acoustic Source Localization

Postby Error323 » Mon Aug 12, 2013 11:56 am

Hi Everyone,

With my parallella board, I would like to do as a hobby project. Now I'm a fairly experienced C/C++ programmer, but my knowledge on hardware is zero to none. My question is how would one best connect multiple (8-32) to the parallella board? Preferably using FPGA for the educational value.

Thanks,
Error323
Error323
 
Posts: 6
Joined: Mon Aug 12, 2013 11:38 am

Re: Acoustic Source Localization

Postby 9600 » Mon Aug 12, 2013 1:32 pm

Andrew Back
User avatar
9600
 
Posts: 997
Joined: Mon Dec 17, 2012 3:25 am

Re: Acoustic Source Localization

Postby Error323 » Mon Aug 12, 2013 4:01 pm

Hi Andrew, thanks for your reply. Indeed, I would really like to avoid a USB based solution. How would one go about prototyping an FPGA solution? Where would I start?
Error323
 
Posts: 6
Joined: Mon Aug 12, 2013 11:38 am

Re: Acoustic Source Localization

Postby hamster » Mon Aug 12, 2013 9:51 pm

Hi Error 323,

You could look at using a SPI ADC, maybe a http://www.ti.com/product/ADC128S102. It is an 8-channel 12-bit ADC, fast enough for multi-channel audio frequency work.

I've got example code on how to interface the DAC to the fabric at http://hamsterworks.co.nz/mediawiki/index.php/SPI_ADC - modify this to read all channels at your desired rate. You could use something like http://hamsterworks.co.nz/mediawiki/ind ... hum_filter to filter out the Mains hum, but rather than making it a 50/60Hz low pass, invert it to make it a 100Hz high pass filter.

Have a read of chapters 15 through 17 of the PDFs from http://dspguide.com/ to get your DSP filters nailed.

That would be the data acquisition sorted. You will then need to tag the samples with what channel they were collected on (eg '0' & channel & sample) and write them to a FIFO. Maybe you could use the high bit of the sample as a "sample available" flag - taking it up to 16 bits...

The magic bit will be presenting that FIFO through to the ARM cores, allowing you to stream the samples back from the DAC.

Within your app, the processing will then look a little like this:

// acquire up to buffer_size samples from the ADC in buffer
for(i=0; i < buffer_size; i++)
{
short sample = *IO_PORT_ADDR;
if(sample & 0x8000) = 0)
break; // have run out of data on the FIFO - process what I already have
buffer[i] = sample;
}

As long as your FIFO is large enough, your application's buffer big enough and you don't overwork the ARM core you should be able to make it all work.
hamster
 
Posts: 75
Joined: Mon Dec 17, 2012 3:23 am
Location: New Zealand

Re: Acoustic Source Localization

Postby Gravis » Tue Aug 13, 2013 12:44 am

@hampster
you are completely ignoring his lack of experience with electronics. expecting him to design a custom board for a chip you picked out is ludicrous.

@Error323
what is your budget for this project?
User avatar
Gravis
 
Posts: 445
Joined: Mon Dec 17, 2012 3:27 am
Location: East coast USA.

Re: Acoustic Source Localization

Postby hamster » Tue Aug 13, 2013 2:27 am

@Gravis, Good point. Yeah, sorry. Just started running away with the idea...

The problem with the USB audio modules is that they will be tricky to align the samples in time, which looks to be a key requirement. Even if you have some sort of reference (maybe a ticking clock in the sound field somewhere) the on-board oscillators crystals will not be in sync and will drift and be at slightly different rates, and all devices along the chain will buffer the data. I guess at +/- 20ppm between devices gives up to a couple of samples of 'slippage' every second @ 48kHz.

One solution could be to use stereo audio capture modules, and have a reference signal on the L channel, and the microphones on the R channel. That wouldn't be too bad...

There are a few ADC modules available such as (https://www.digilentinc.com/Products/De ... d=PMOD-AD1) - it is only two channels, but a couple could be used in a "Arduino huge mess of jumpers" sort of way, avoiding the need for custom PCBs.
hamster
 
Posts: 75
Joined: Mon Dec 17, 2012 3:23 am
Location: New Zealand

Re: Acoustic Source Localization

Postby 9600 » Tue Aug 13, 2013 6:58 am

Andrew Back
User avatar
9600
 
Posts: 997
Joined: Mon Dec 17, 2012 3:25 am

Re: Acoustic Source Localization

Postby tnt » Tue Aug 13, 2013 7:39 am

One thing that seem to be completely missing so far is a list of requirement ...

What kind of sample rate to you need, bit depth, max allowable synchronization error between dacs, what kind of microphone and sound level (to design input stage), ...

Once you have requirements, then you can move on ...
tnt
 
Posts: 408
Joined: Mon Dec 17, 2012 3:21 am

Re: Acoustic Source Localization

Postby 9600 » Tue Aug 13, 2013 8:56 am

Andrew Back
User avatar
9600
 
Posts: 997
Joined: Mon Dec 17, 2012 3:25 am

Re: Acoustic Source Localization

Postby ticso » Tue Aug 13, 2013 9:07 am

I think this is one of the examples where it could be usefull to have an adapter board for pmod modules.
There are lots of nice ADC and even microphone pmod modules available to select from.
ticso
 
Posts: 41
Joined: Mon Dec 17, 2012 3:22 am
Location: Germany, Moers

Next

Return to Epiphany and Parallella Q & A

Who is online

Users browsing this forum: No registered users and 100 guests