You are reading a single comment by @RandyHarmon and its replies. Click here to read the full conversation.
  • If it was me, I'd probably put a tone-generator/tuning-reference-pitch sorta app on my phone and put that right next to the mic, to get a fairly constant high-input signal to test with the voltmeter. Realize that the mic has to represent sound waves electrically, so you won't get (average) values in the 9V range.

    I'd also probably generate an e.g. 440Hz tone, sample it as fast as possible for around 1s/220 or 5ms using a simple Espruino program (triggering the capture on button press, for example), and examine that data stream, hoping to see it vary through 0.0 - 1.0 (of 3.3V) and back down to 0.0 on a fairly smooth curve, then repeating. I'd spit out that data to the console and plot it on a graph to see things like:

    1. How much headroom you have (if you don't reach near 1.0) for extra-loud noises,
    2. Your average voltage, which should correspond to your Voltmeter's reading from the same signal
    3. Whether you're getting clipping (many samples at ~1.0) to suggest you didn't voltage-divide it sufficiently or that you're just feeding it a signal too close to the mic, and/or
    4. Whether you're getting any positive bias that prevents you from getting low-range values (at the bottom of the waveform) near 0.0 - a possible source of signal-quality problems.

    Once you're able to see some of these attributes in the signals you sample by direct examination, you should then be able to write some logic to process the signal in a way meaningful to your application.

    For instance, you could detect a large stream of measurements above a threshold like 0.95 and turn on the LED to indicate clipping. When not clipping, you could detect signals in the 80-95% range and use partial intensity on the LED to indicate the signal strength. Or you-call-it, because I have no idea how you're wanting to use the mic for your project. :)

About

Avatar for RandyHarmon @RandyHarmon started