hi every one,
in the last couple of days i've been searching the web about info about Mic's & Arduino. but i couldn't find somthing simple as i need.
i want to have a sound sensor that give the arduino an input - could be low range = i need to recognize an explosion, shattering... etc.
i found this circuit: http://www.josepino.com/circuits/index?mini_amplifier_lm386.jpc
it uses LM386 as a preAmplifier, But can i use the exact same circuit for my purpose? instead of connecting to a speaker i'll connect to an Arduino analog input pin.
Thanx
I assume you want to use an electret mic and not a condenser mic.
I already have the condenser Mic
the only thing i need from the sensor is to give me input if there is loud sound (explosion like i mentioned), i'll be happy for explanation to how can i use a transistor for it (i'v NPN & PNP)
AND I FORGOT TO MENTION THAT I'M NEWBIE SO BE EASY WITH ME
THANX
Are you sure you have a condenser microphone ?
One that costs more than 100 dollars ?
With an XLR plug and one that requires 48V ?
Or do you have an electret mic that costs about 1 dollar ?
ADDED: While I was typing this post, you found the same schematic (use it without C2). Yes, you can use the Arduino 5V pin to power it. I don't know how to connect the mic, can you upload a photo of it ?
It is an electret mic.
One pin has connections (under green paint) to the outside metal. That is the GND.
The schematic we found uses a resistor from the collector to the base of the transistor. That results in a more or less automatic adjustment of the base current. There is almost no disadvantages with it, so that's why I like that schematic.
A condenser mic can be the very expensive mics in a studio and it can be an electret mic. To avoid the confusion, the electret mic was called "electret condenser mic". However, that is not completely true.
Wikipedia writes: "An electret microphone is a type of condenser microphone...", but that is also not completely true.
Some people like the confusion and call them condenser mics.
10k is too low. The best resistor could be 47k to 1M.
Yes, the right pin is connected to the metal outside. That is GND.
Edrin you are Great. but i'm having problems.
i connected everything like here:
and when i'm connecting to 3V i get the range of 697-702. while connecting to 5V i get 1023. it seems like there is no change if there is noise or not. i also tried changing the 100k to 47k - but same results. i tried at first without C2 (the second capacitor) and then with - still no change.
this is the code i wrote:
void setup(){
Serial.begin(9600);
}
void loop(){
int mic = analogRead(A0);
Serial.println(mic);
delay(65);
}
It seems as if the transistor is doing nothing.
The voltage without C2 should be somewhere in the middle, but anything between 1 and 4V is okay.
If you read 1023, you are reading 5V.
Did you connect the transistor properly ?
If you use a breadboard, it might have bad connections.
You can use "analogRead(0);", with a "0" (a zero).
The term "A0" is used if the analog pin is used as a digital pin.
Can you measure the voltages of the circuit ?
You could also use the analog input to measure the voltages.
The base of the transistor should be between 0.4 and 0.8 Volt.
The voltage on the electret mic is perhaps between 1.5 and 2.5 volt.
i did connect the transistor properly. i'm using breadboard, and i just moved it to another bread board-SAME results :
i've changed the code to: "analogRead(0);"
yes i can measure, but i'm not sure where should i plug the probs to measure what u said....
Base/gnd cannot be 3V when emitter is on gnd
Check your transistor wiring..
For best setting change the R2 such you get Collector/gnd the half of the battery voltage (when silent)..
Yes it should so if there is a voltage between emitter and ground you have not connected it up like your diagram. This is because the emitter and ground are connected up together so there can not possibly be any voltage between them. If there is a voltage then they are not connected together.
The emitter is the one with the arrow on it.