Interpreting output of Electret microphone breakout board
i new arduino , i'm trying light strip of analog, non-addressable leds based on microphone input.
i driving leds n-channel mosfets in diagram:
i have made leds fade smoothly through roygbiv. have this sparkfun electret microphone breakout board , have wired aud analog 0, gnd breadboard alongside led grounds, , vcc 3.3v on arduino.
i unable comprehend input microphone. in relative silence, input reads @ approximately 330, fluctuating between 300 , 360. if connect vcc 5v, output approximately 512 fluctuations larger. read because 5v "noisier" input. code use read input.
my initial idea separate input bass, middle frequencies, , treble, since not have msgeq7 split spectrum, trying drive leds based on volume of input, , i'm stuck. how can normalized volume output?
i've tried subtracting apparent average (330) signal , taking absolute value, still don't readings. actually, i'm still unclear on actual output of microphone breakout board is. can shed light on me? i've looked on forums , tutorials seem missing key steps.
thanks -- first post!
i driving leds n-channel mosfets in diagram:
i have made leds fade smoothly through roygbiv. have this sparkfun electret microphone breakout board , have wired aud analog 0, gnd breadboard alongside led grounds, , vcc 3.3v on arduino.
i unable comprehend input microphone. in relative silence, input reads @ approximately 330, fluctuating between 300 , 360. if connect vcc 5v, output approximately 512 fluctuations larger. read because 5v "noisier" input. code use read input.
code: [select]
void setup() {
serial.begin(9600);
}
void loop() {
int sensorvalue = analogread(0);
serial.println(sensorvalue);
delay(10);
}
my initial idea separate input bass, middle frequencies, , treble, since not have msgeq7 split spectrum, trying drive leds based on volume of input, , i'm stuck. how can normalized volume output?
i've tried subtracting apparent average (330) signal , taking absolute value, still don't readings. actually, i'm still unclear on actual output of microphone breakout board is. can shed light on me? i've looked on forums , tutorials seem missing key steps.
thanks -- first post!
the microphone outputs voltage corresponding sound pressure level @ instant sampled.
you have print , delay in loop slow down sampling rate once every 20 milliseconds (about 50 hz), means won't able make sense of signals corresponding sounds frequency higher 20 hz. frequency below range of human hearing.
you have print , delay in loop slow down sampling rate once every 20 milliseconds (about 50 hz), means won't able make sense of signals corresponding sounds frequency higher 20 hz. frequency below range of human hearing.
Arduino Forum > Using Arduino > Audio > Interpreting output of Electret microphone breakout board
arduino
Comments
Post a Comment