Go Down

Topic: issues in making a clap switch (Read 363 times) previous topic - next topic

PRIYA_RAGHURAMAN

Jun 20, 2014, 05:25 pm Last Edit: Jun 20, 2014, 05:29 pm by PRIYA_RAGHURAMAN Reason: 1
hello,
i m a newbie and i began by making a clap switch. i used a CZ034A microphone for the same. but i dont know why the microphone is not able to pick up the sound signals and thus there is no change in the voltage even after a loud sound(clap) is made.I checked the change in voltage by connecting the analog pin to the microphone output, and i found no change whatsoever. :~My input voltage is 5 volts and used two 10k resistor before n after the microphone. This is the program i used

int value;
char pin=A0;
void setup()
{
  Serial.begin(9600);
  pinMode(pin,INPUT);
 
}
void loop()
{
  value=analogRead(pin);
 
  Serial.println(value);
  delay(250);
}

Please help. I m stuck =(

knut_ny

#1
Jun 20, 2014, 05:50 pm Last Edit: Jun 20, 2014, 05:57 pm by knut_ny Reason: 1
a mic needs an amplifier!

see https://www.youtube.com/watch?v=TQB1VlLBgJE
If u need to buy an opamp => select a single supply, rail-to-rail.
Ny

PRIYA_RAGHURAMAN

hello,
Thanks for such a quick reply.
i tried using an op amp 741 and I set the gain of the op amp at 10. I got a voltage at the output of around 15 volt AC(rms), but no change in the output when a sound is made at the microphone input..please suggest if there are any changes required. Thank you in advance.

GoForSmoke

You cannot allow -V on any input pin nor allow more than +5.5V!
A Schottky diode can cut all V below +0.3V, a regular diode takes +0.7V to pass.

Quote

I got a voltage at the output of around 15 volt AC(rms)


That sounds like signal, more signal than you need. Are you sure it is AC?

Without the opamp, try feeding the low current microphone output directly to an NPN transistor base pin.
Connect 5V through a 1k resistor to the collector and a led + lead to the emitter, and ground the other leg of the led. Noise should cause the led to light. Worst case, you lose the transistor but those are cheap.

Any circuit that can make a led light up even dimly should be detectable.
Nick Gammon on multitasking Arduinos:
1) http://gammon.com.au/blink
2) http://gammon.com.au/serial
3) http://gammon.com.au/interrupts

Go Up