Measuring the Sound by Using the Microphone of Circuit Playground

by Vy Tran in Circuits > Sensors

286 Views, 0 Favorites, 0 Comments

Measuring the Sound by Using the Microphone of Circuit Playground

circuit_playground_microphone.jpg

How to make the microphone of the circuit playground can measure the sound?

Supplies

computer.png
circuit playground.png
USB cable.jpg
  • Computer
  • Circuit playground
  • USB cable

Download the "library"

step 1.png

https://circuitpython.org/libraries - where we download the "Library"

Choose "adafruit-circuitplaypython-bundle-7.x-mpy-20230307.zip".

Unzip the "Lib"

step 2 - 1.png

Go to file and see this!

Unzip the "Lib" (continue)

step 2 -3.png

Click on the left mouse, then pick the 7-zip

Unzip the "Lib" (Continue)

step 2 - 4.png

Choose 'Extract to "adafruit-circuitplaypython-bundle-7.x-mpy-20230307" '

Unzip the "Lib" (Continue)

Screenshot 2023-03-07 141703.png

IT'S UNZIPPING!

Unzip the "Lib" (Continue)

Screenshot 2023-03-07 141745.png

Then you got the file that unzip!

Click on the file! Until.......

Move Some File That Necessary to Another "Lib"

Screenshot 2023-03-07 143003.png

Click on "Lib"

Move Some File That Necessary to Another "Lib" (continue)

Then you can see a bunch of file of adafruit.

Move Some File That Necessary to Another "Lib" (Continue)

Screenshot 2023-03-07 143457.png

FOLLOW THE LIST! Then move it to the "lib" of the one called "CIRCUITPY (F:)"

Code for Active the Microphone

Explain Some Code

“CURVE = 2” influences how reactive the circuit is to sound, the higher the value, the more leds activate to sound 


input_ceiling = input_floor + 500 is the code for the max sounds value. When the sound level hits this ceiling all the leds will be lit. To have a lower sound level activate all the leds, lower the value 500


input_floor = normalized_rms(samples) + 10 is the value for “quiet”. When the circuit starts it takes in the sound level and sets that +10 as the quiet level where no leds will be lit. To increase the quiet bar where no leds will be lit, increase +10 as needed