Well you can choose either some IC or some simple transistor ones. At first I’ve tried LM386, but I found out that it’s not very good. The reason is that this IC is not meant to be used as a pre-amp. I’ve decided to use this single transistor setup with 2N3904. I’ve also bought big white board and drawn the circuit. It’s really cheap sound/noise detecting sensor and it work’s good.
Arduino code :
void setup()
{
Serial.begin(9600);
}
void loop()
{
int minimum = 1024;
int maximum = 0;
for(int i=0;i<1000;i++)
{
int value = analogRead(A0);
minimum = min(minimum, value);
maximum = max(maximum, value);
}
Serial.print("noise=");
Serial.print(maximum-minimum);
Serial.println();
}
Cool, I am going to build exactly this as well. Ia there any feedback on precision / linearity / frequency range / temperature distortion?
ReplyDeleteWould be highly appreciated if shared.
Jaroslav
Hi :) Well it's not very precise, so it could be used ideally for something like clap sensor.
Delete