Go Down

Topic: LM358 module - how to connect? (Read 3867 times) previous topic - next topic

Sand_HK

Jul 21, 2013, 09:26 am Last Edit: Jul 21, 2013, 09:34 am by Sand_HK Reason: 1
Hi,

can anybody help me connect a condenser mic to a LM358 module to the Arduino.

I have a LM358 module like the one at
http://www.wayengineer.com/index.php?main_page=product_info&products_id=2981

I have the VCC and GND connected and the power led comes on but no matter how I connect the IN and OUT connectors I do not get a proper signal to the Arduino.

At the moment:
I have the mic connected to IN and GND (GND on the mic to GND) (I have tried the other way as well).
I have the OUT connected to pin A2 on the Arduino

I get a reading of around 500 (the value fluctuates between about 490 and 520). Changing the onboard pot does not effect the value.
EDIT - just found out I get the same reading when the mic is not connected.

I have contacted the company I purchased it from and they don't know. Even though they sell it as Arduino compatible.




Runaway Pancake

Provide a schematic of what you've done.
Doing this stuff verbally, and with all that back-and-forth, is a waste of time.
Draw a picture of your circuit, take a decent picture of that and upload it as an attachment.

A condenser (electret) mic requires power.
It's not like a crystal mic.

In my dwg, attached, there are some biasing resistors and coupling caps.
"+V" should not be greater than 3V.
If you don't like it, google for others.

"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

DVDdoug

Quote
I get a reading of around 500 (the value fluctuates between about 490 and 520). Changing the onboard pot does not effect the value.
EDIT - just found out I get the same reading when the mic is not connected.
That's sort-of a good thing...   With no signal the Arduino ADC should by biased at 2.5V (half of the full-scale 1023 reading with the default 5V reference).    ...I didn't see anything in the amplifier modual discription saying that.

Now, you just have to get a signal from your mic to the amp, and the readings shoul jump-around, centered around approximately 512.

AmbiLobe

Get a "dynamic microphone".
The condensor mic needs up to 48 volts to provide static electricity. Or maybe 5 volts... Read this...

http://en.wikipedia.org/wiki/Phantom_power
I am going to get going.

Sand_HK

#4
Jul 22, 2013, 02:54 pm Last Edit: Jul 22, 2013, 02:59 pm by Sand_HK Reason: 1
Hi,

here's the circuit:




Here's the sketch I am using to test:

Code: [Select]

int micPin = 1;
int micVal = 0;
int oldMicVal = 0;
int micMax = -9;
int micMin = 9999;

int ledPin = 13;


void setup()
{
 Serial.begin(9600);
 while (!Serial)   {  ; // wait for serial port to connect. Needed for Leonardo only
                      }
 pinMode(ledPin, OUTPUT);                  
}



void loop()
{
 micVal =  analogRead(micPin);  
 if (micVal >560)            {  digitalWrite(ledPin, HIGH);  delay(100);   digitalWrite(ledPin, LOW);    }
 if (micVal > micMax )     {  micMax = micVal;  }
 if (micVal < micMin )      {  micMin = micVal;   }
 
 Serial.print("\nmicVal = ");Serial.println(micVal);
 Serial.print("micMax = ");Serial.println(micMax);
 Serial.print("micMin = ");Serial.println(micMin);
 delay(10);
}




and here is the output I am getting:

Code: [Select]

micVal = 515
micMax = 529
micMin = 502

micVal = 514
micMax = 529
micMin = 502

micVal = 527
micMax = 529
micMin = 502

micVal = 511
micMax = 529
micMin = 502

micVal = 513
micMax = 529
micMin = 502

micVal = 513
micMax = 529
micMin = 502

micVal = 508
micMax = 529
micMin = 502




I get the same values when I remove the mic.



janost

#5
Jul 22, 2013, 10:05 pm Last Edit: Jul 22, 2013, 10:15 pm by janost Reason: 1

Get a "dynamic microphone".
The condensor mic needs up to 48 volts to provide static electricity. Or maybe 5 volts... Read this...

http://en.wikipedia.org/wiki/Phantom_power


WTF!

http://www.epanorama.net/circuits/microphone_powering.html

Don't post if you don't know anything!

Go Up