0
\$\begingroup\$

I'm writing code to measure frequencies with a KY038 microphone sound sensor. It uses an LM393 voltage comparator.

How do I convert voltage to sound pressure level (SPL)?

\$\endgroup\$

2 Answers 2

0
\$\begingroup\$

The microphone outputs some amplitude at some SPL level.

If you don't know the specs of the mic then you need to measure how much voltage is output at which SPL level.

\$\endgroup\$
0
\$\begingroup\$

You need know both the sensitivity of the microphone and the voltage gain of the preamp. You can calculate the value from the combination of these two.

With the mic you have, you might not have that spec available. Also, gain on a trimpot is not ideal as you need to measure the gain after adjustment. You might be better trying to find a sound source which approximately know the level of (at, say, 1m) and using that. You can find tables of SPL which might help.

(EDIT) it turns out that there is no preamp, and this module really only has a comparator. You cannot do SPL measurement with this, other than saying that the momentary sound level was over some threshold, which is pretty much useless without some averaging. If you want to make some form of sound level meter, the KY038 module is not suitable.

\$\endgroup\$
5
  • \$\begingroup\$ The gain of preamp is assumed to be 1 as the module contains no preamp. \$\endgroup\$
    – Justme
    Feb 14 at 8:53
  • \$\begingroup\$ "This sensor has three functional components on its circuit board: The front sensor unit, which physically measures the environment and outputs it as an analog signal to the second unit, the amplifier. This amplifies the signal depending on the resistance set on the rotary potentiometer and sends it to the analog output of the module." \$\endgroup\$
    – danmcb
    Feb 14 at 8:58
  • \$\begingroup\$ ... which is expected, as without a preamp, the output would probably be about 5mV or so. \$\endgroup\$
    – danmcb
    Feb 14 at 8:58
  • \$\begingroup\$ That marketing talk is nonsense. There is no amplifier. All the trimpot does is set the DC bias to mic. The mic analog out is directly from the capsule and that analog voltage is simply compared with half-supply reference from resistor divider. The comparator output drives the digital output and the second comparator which drives a LED. The comparator is an LM393, so there is even no op-amp onboard. \$\endgroup\$
    – Justme
    Feb 14 at 10:34
  • \$\begingroup\$ OK I found a schematic, you are right. What a really stupid design. \$\endgroup\$
    – danmcb
    Feb 14 at 10:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.