Microphone for music display on WS2812

I am looking to light up a strip of WS2812 in response to music picked up by a microphone.
I have found a simple youtube:

It seems to use this microphone: https://tinyurl.com/2xvbj7h7.
There is another microphone available: https://tinyurl.com/5n74d99d.
I am not concerned about the price - the accuracy and reliability are more important. Which one do you think is better?
Also, this project seems so simple compared to so many other visualizers. Sure, it doesn't have many light sequences like others. I am speaking of the capture and interpretation of the sound signal. Is it because here we are simply slicing up the analog signal with the if/then statements? Whereas many others convert the analog signal to digital?

Accuracy, reliability.. Please express in technical terms how You measure them.

I just want it to work. This is not a highly scientific project. Just for fun and grins.
Worst case I buy bought.

I think you are confused. ALL the Arduino sees after the AD conversion is a single digital value between 0 and 1023.

Yes, I am the first to admit that I am in over my head.
Do you have any thoughts on either microphone?
Can I use one of those microphones and get other visuals such as shown in:
Arduino Nano stereo Vu Meter - YouTube?

Yes. Both links are sales ads, not technical details. Even so, you did not spend much time studying the information. The second link says it is a sound sensor that gives a digital signal when the sound level reaches a value that causes a digital signal to be sent. NOT an analog signal. Be more careful of what you search for.

The first link might work or it might not work for your project, The key is in the technical details which are missing.

The first link in the original post appears to be the module used in your project link.

Explaination:
Both of these modules are "sound sensor modules". The primary application is to have a digital signal active when the instantaneous sound level exceeds a threshold set by the potentiometer (the thing with a screw head adjustment).

The first link is a KY-034 module and the other is an FC-04 module. Note that the KY-034 has 4 pins while the FC-04 has only 3. The additional pin on the KY-034 is an analog output from the microphone before the level detection circuitry. It is this output that is used in your project link. The FC-04, lacking an analog output is not usable for your project.

The KY-034 is not very sensitive, that is, it requires pretty loud sound to get much of an output. For most audio projects I like the MAX9814 microphone module which has much higher gain, but that's not what was used in the project link.

You need a microphone board (or "sound sensor") which has a microphone, a preamp, and usually the output is biased output (because the Arduino can't directly read the negative-half of the audio waveform).

I have the Sparkfun BOB-12758. It works fine if the sound is loud enough. When I'm listening to my TV at normal volumes I don't get a usable signal.

There are (at least) 4 "kinds" of sound sensors:
The most common (like the one I have) puts-out a biased analog audio signal. From that signal you can get the volume and/or you can "extract" the frequency information in software (using FFT or FHT) or in hardware with the MSGEQ7 chip.

There are similar boards that put-out a digital audio signal. (I think they usually use an I2C interface.)

Another type has a pot to set a threshold and it simply puts-out a logic 1 when the sound is above the threshold and a logic 0 when it's quieter than the threshold.

Or there are some that put-out a varying DC voltage depending on the loudness. (You loose the frequency information).

And, some sound sensors have a combination of the above so you can choose which one to use.

I've made some sound activated effects but I use a direct line-level audio connection instead of picking-up the sound in the room. That just requires a bias circuit. (There is a schematic for the "standard" bias circuit here,)

When you get your sound sensor it's probably worthwhile to connect it and then run the code from the Analog Read Serial Example to see what numbers you are reading. (Take-out the delay.)

The readings will "look random" because you are sampling a waveform but you should be able to see the difference between loud sounds and quiet sounds and you can get an idea if you need to modify the if-statements in your code.

With a biased signal, silence should read around 512 (jumping around depending on background noise and electrical noise).

The louder the sound the more the readings will deviate above and below that toward 0 and 1023. Even with a constant loud-sound you'll get some readings near 512 (actually zero if you subtract-out the bias) because it's a constantly-changing "wave" that crosses-through zero twice per cycle.

The sensor probably won't go all the way to 1023 or all they way down to zero.

Thanks for the info.
I can't use line-in, it must be via microphone.
I have ordered a Sparkfun Sound Detector, SparkFun Sound Detector (with Headers) - SEN-14262 - SparkFun Electronics.
I'll be sure to do the Analog Read Serial Example.

That looks good. It says you can add a resistor if you need to increase the gain.

The "envelope" output should work best (since you are not analyzing frequency) but you can also try the "audio" output.

The graphs they show for the "envelope" don't seem to follow the peak loudness as I would expect but it's still worth a try.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.