Go Down

Topic: Microphone Speaker Module (Read 662 times) previous topic - next topic


Hi I made a Microphone Module that when I blow into the mic, it produces a simple tone. Problem is that when I blow into the mic it doesn't consistently makes a proper sound when I blow, it makes spiky or jammed sounds and only makes a proper note when I blow into it hard. How do I avoid getting this output?

Here is my code by the way:

Code: [Select]

int senseMic = 0;
int speakerPin = 22;

void setup(){


void loop(){

  int val = analogRead(senseMic);

  if (val > 540 || val < 490)
tone(speakerPin, freq);


Hope you guys can help me. Thanks. Merry Christmas and a Happy New Year to you guys. :)


I would change

if (val > 540 || val < 490)


if (val > 540)

Try that to see if it doesn't work as you would expect. Lower the number if you wish it to be more sensitive to your blowing or raise the number if you wish it to be less sensitive to your blowing.

Without seeing the electrical schematic of your mic circuit and how it wires to the analog input pin it's hard to nail down if your sending the input pin a proper signal or not.



Here is the attachment for the schematics of my Mic Module sir lefty, I tried doing what you said but it is still not consistent :(


How about printing the values read from the module to see what you are working with in terms of thresholds?


You probably need more gain out of the op-amp circuit. Change the 10k ohm resistor (from pins 1 to 2) to 20K or 30K and see if you don't have to blow less hard to make it work.


Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131