Audio Input from Electret Mic
#1
Posted 22 March 2011 - 05:54 AM
#2
Posted 22 March 2011 - 08:34 AM
#3
Posted 22 March 2011 - 05:07 PM
#4
Posted 22 March 2011 - 06:44 PM
The problem is not only the signal amplitude, but also the offset: the mic outputs a signal AC-coupled, above and below 0.0V (i.e. negative respect ground). The ADC input should not tied below ground, that is you must add a polarization (e.g. 1.5V)Contrary to the post above, that mic should be fine, provided Vcc is 3.3V, which looks like it will work.
The problem is that the Netduino+C# is really slow: that is the worst side of any kind of signal processing with a similar device.As for DSP, NETMF is NOT very DSP friendly (It is not a realtime OS), but if you used some form of native interopt you would be fine, or you could also use a native coprocessor to capture input and process it, then send only what's required to the Netduino.
I am trying to process some analog signal, but even a basic filtering needs dozen of milliseconds. The best FFT I was able to do (64 points) takes over 80ms to give the result. By adding some extra work, I really cannot sample a signal higher that 4-5Hz.
An external DSP would be a solution, but how Netduino could fit in that way?
Cheers
#5
Posted 22 March 2011 - 07:46 PM
An external DSP would be a solution, but how Netduino could fit in that way?
Would you mind elaborating on this? Is that like using my computer as a DSP, then passing the important info to the Netduino?
#6
Posted 22 March 2011 - 11:54 PM
#7
Posted 23 March 2011 - 12:32 AM
That's not true either - look at the schematic - this is a mic circuit specifically designed for this application.but also the offset: the mic outputs a signal AC-coupled, above and below 0.0V
Why are you being so negative?
Is real-time analysis a requirement? If not then obvioulsy the Netduino will be capable - if you are prepared to wait.
If simple (single) frequency detection is all that's required then you don't need to do FFT's on the signals. There are other much less computationally expensive techniques available (eg, peak detection).
#8
Posted 23 March 2011 - 04:49 AM
By using native code is relatively easy to make the MCU working as a DSP, but where's the beauty of the managed code? Why just Netduino and not Arduino (or whatever else)?When I said native interopt, I meant NOT C#. I meant native code running on the Netduino.
I mean using "pure" C# only (read my first answer).
From my viewpoint, the native solution is the same as using an external hardware/coprocessor, then sending data to a Netduino.
I apologize for my mistake! The mic-shield includes the level-adapter, using a op-amp as level-shifter. I was considering a normal mic, without any additional circuitry.That's not true either - look at the schematic - this is a mic circuit specifically designed for this application.
Why are you being so negative?
I don't know what exactly you are going to do, but an easy task using a normal PC is to collect audio samples from the PC microphone, then make any kind of computation on it. Even on a "slow" PC, you may use managed code to make computations.Would you mind elaborating on this? Is that like using my computer as a DSP, then passing the important info to the Netduino?
Again, from my viewpoint, the "Netduino device" is a MCU with the .Net Microframework where you can program managed code like C#. As soon you cut some of these features, you are not using a "Netduino" anymore.
I didn't know the "peak detection", but it seems like a spline interpolation across the sampled data. What could be fit a similar algorithm to find a frequency?If simple (single) frequency detection is all that's required then you don't need to do FFT's on the signals. There are other much less computationally expensive techniques available (eg, peak detection).
#9
Posted 23 March 2011 - 05:11 AM
If simple (single) frequency detection is all that's required then you don't need to do FFT's on the signals. There are other much less computationally expensive techniques available (eg, peak detection).
In fact could you not do this with hardware using a bandpass filter? Not 100% accurate but maybe good enough.
Regards,
Mark
To be or not to be = 0xFF
Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life
Follow @nevynuk on Twitter
#10
Posted 24 March 2011 - 06:50 PM
You could even get remotely operated capacitors and potentiometers so you could actively tune the circuit. The problem is it will be slow. There are several easy mathematical formulas for finding frequency of simple waveforms but they generally rely on getting an accurate peak to peak time, which appears to be difficult in c# without having to write a special piece of external c++ code. Wikipedia has a fairly good page on it.In fact could you not do this with hardware using a bandpass filter? Not 100% accurate but maybe good enough.
Regards,
Mark
#11
Posted 26 March 2011 - 12:24 AM
#12
Posted 25 March 2012 - 07:01 AM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users