| Electronics > Beginners |
| Making a sound camera |
| << < (4/13) > >> |
| daslolo:
@Sparker and @hamster_nz you're both describing the same thing in your own words. I have no idea to do that at the moment but it looks like FFT is the key anyway. The good thing is I don't need much visual resolution in term of displaying the frequencies so a 128 bin FFT should be enough. And this is very fast @3ms on an esp32. And earlier I was thinking of using i2s mems to bypass ADC conversion time ... it seemed like a good idea but how long will transfering the i2s stream take? I think it'll take long than the instant voltage read and it equates to moving the time delay from conversion to data transfer. Maybe someone can confirm? |
| MasterT:
Don't know about esp32, but as any digital bus I2C trasfer time is defined by clock rate * number of bits. I2C standard AFAIK supports 100k, 400k, and 3.4M clock. See what is the clock of your esp32 driver. For myself, I usually measure arduino speed performance using any spare digital pin and a scope, setting high/low at the start and the end of time critical function. millis() also does same thing, in software. Regarding size of the fft, depends on lower frequency range & bandwidth. For example, 10 k sampling and 128 bins provides just 10000/128 = 78.125 Hz freq. resolution. It means, you can't measure below this value, and what is more important, error 100% at 78 Hz, and 10% or so (not sure if it's linear, but you get an idea, and do math work to verify ) at 780 Hz, that may not be acceptable. Cross correlation is the same thing as DFT. Has very little or zero practical value, since FFT about thousands time faster. |
| Marco:
--- Quote from: daslolo on April 30, 2018, 11:27:42 pm ---Is it possible to do that without resorting to programming, maybe even using analog components? --- End quote --- If you limit the frequency of the signals and then clip them, you could probably do a phase detector a 4046 ... as long as the delay is smaller than the inverse of the highest frequency it can determine the delay. That would only work in a tiny cone though. Doing more than that discretely would quickly get very hard AFAICS. |
| ogden:
--- Quote from: MasterT on May 01, 2018, 07:10:31 pm ---Don't know about esp32, but as any digital bus I2C trasfer time is defined by clock rate * number of bits. I2C standard AFAIK supports 100k, 400k, and 3.4M clock. --- End quote --- I am afraid that you confused I2S with I2C which is totally different animal: --- Quote from: daslolo on May 01, 2018, 06:18:08 pm ---And earlier I was thinking of using i2s mems to bypass ADC conversion time ... it seemed like a good idea but how long will transfering the i2s stream take? --- End quote --- Any ADC will delay signal for some time, so it does not matter - it is i2s ADC or not. Mems microphones with i2s will be fine indeed. |
| ogden:
--- Quote from: Marco on May 01, 2018, 08:05:35 pm --- --- Quote from: daslolo on April 30, 2018, 11:27:42 pm ---Is it possible to do that without resorting to programming, maybe even using analog components? --- End quote --- If you limit the frequency of the signals and then clip them, you could probably do a phase detector a 4046 ... as long as the delay is smaller than the inverse of the highest frequency it can determine the delay. That would only work in a tiny cone though. Doing more than that discretely would quickly get very hard AFAICS. --- End quote --- Such clipping approach would work only in textbook example for single signal source of clean sine tone, not real world application where various complex sounds are coming from multiple sources. This application indeed needs DSP processing, thus programming. |
| Navigation |
| Message Index |
| Next page |
| Previous page |