Pages: [1]   Go Down
Author Topic: issues in making a clap switch  (Read 348 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley-cry
« Last Edit: June 20, 2014, 10:29:56 am by PRIYA_RAGHURAMAN » Logged

Narvik, Norway
Offline Offline
Edison Member
*
Karma: 24
Posts: 1042
electronics engineer, teacher.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: June 20, 2014, 10:57:22 am by knut_ny » Logged

Ny

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pittsburgh, PA, USA
Offline Offline
Faraday Member
**
Karma: 99
Posts: 4836
I learn a bit every time I visit the forum.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

Pages: [1]   Go Up
Jump to: