I'm kind of new to audio with arduino and I wanted to get data from my electret microphone. I tried using a basic circuit (picture posted below) that I found online. However, when I use this, all I get as an output is 1023. There is no fluctuation what so ever. I'm also using this code to test it.
int sensorPin = A0; //Microphone Sensor 'ANALOG' pin on Arduino
int aLED = 13;
Transistor is a 2N3906
Cpacitor is a .1 uF
2 of the resistors that have the same color bands are each 10 K ohm resistor
the final resistor is a 100 K ohm resistor.
2N3906 is PNP, but wiring looks for NPN,
Option: change to 2N3904 or 2N2222.
change wiring, you can get it works with reverse polarity and switching E - C compare what you have now
Thanks alot that's what did it! Also another question. on all forums i've read, when an input is given to the electret microphone, the value on the serial reader should go down (usually around 860 and the 750-800 when blown on) how ever with this set up, im getting about 136 when its in a silent room and it actually spikes up to about 900 when blown on lightly. When its receiving input, is it increasing it's impedance?
Alright thanks alot. One last thing. When i do get readings its not very consistent. If i blow into the mike it spike really high but if you look at the serial read it rapidly shifts from 900 to bewteen 30 and 40 so when i test it with the LED, it flickers. Any idea how to fix this? Also 130-900 is a huge jump for blowing on it lightly, how to i make it a little less sensitive so i can really control something with sound?