Pages: [1]   Go Down
Author Topic: LM358 module - how to connect?  (Read 3695 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 1
Posts: 34
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.



« Last Edit: July 21, 2013, 02:34:40 am by Sand_HK » Logged

Offline Offline
Faraday Member
**
Karma: 65
Posts: 2530
Now, More Than Ever
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.



* electret_mic_2.JPG (7.39 KB, 311x178 - viewed 37 times.)
Logged

"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?"

Offline Offline
Edison Member
*
Karma: 34
Posts: 1321
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

New England
Offline Offline
Sr. Member
****
Karma: 7
Posts: 295
Natural Semiinductor
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

I am going to get going.

Offline Offline
Newbie
*
Karma: 1
Posts: 34
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

here's the circuit:




Here's the sketch I am using to test:

Code:
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:
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.


« Last Edit: July 22, 2013, 07:59:19 am by Sand_HK » Logged

Offline Offline
God Member
*****
Karma: 6
Posts: 524
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
« Last Edit: July 22, 2013, 03:15:27 pm by janost » Logged

Pages: [1]   Go Up
Jump to: