Pages: [1]   Go Down
Author Topic: Problem reading data from microphone  (Read 687 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

My project is essentially triggering LEDs based on audio spikes(from drum hits) heard by a microphone wired in to an analog input on the arduino Uno.

I'm seriously at a loss here.

I've come to grips with the programming language and such and how it works, I can get LEDs to blink in various patterns so I know my LEDs work, but my problem is in reading the microphone.

I have been using the "analog Read serial" and "analog In Out Serial" example programs to get an Idea of the size of the spikes I'm looking to use before setting up the threshold stuff to get the LEDs to flash, but herein lies the Issue. There is no Spike.

Even at the point where the volume on my pre amp is clipping with every hit I see no change in the value, the serial monitor shows constant values around 200-300, which is the same as if the microphone isn't plugged in. Is there a problem with having an audio Jack wired into audio input like this?


Tl;Dr- Audio spikes on microphone don't translate to spikes in the Value read by microphone

I'm sure I'm leaving out some vital information, sorry.


http://imgur.com/cLhSQGb- Picture of this circuit. Signal into A0, ground into one of the grounds in the power section of the arduino.

The amp is a Behringer Mic100, Microphone is a GLS audio ES-57, I believe it is a dynamic microphone. I know with this combination I can output a usable signal signal.

http://pastebin.com/fdd13yd6- The code I'm using to try to get data. This is unmodified from the "Analog Read Serial" example program provided by arduino
« Last Edit: April 25, 2013, 02:06:10 am by niklaslarsson95 » Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 303
Posts: 26354
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I'm sure I'm leaving out some vital information,
I cannot disagree.
I'd go further - you're leaving out virtually all the information.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

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

What kind of information would be helpful?
I'm 100% new to arduino and programming, if that helps explain my incompetence
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 303
Posts: 26354
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, let's analyse.
You have a microphone and a pre-amp. You haven't put any performance data on these items.
They're wired to the analogue (I hope) input of an Arduino, but you didn't say how or provide a schematic.
The Arduino is running a program, but you didn't post it.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

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

I dumped some more info into my post
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 303
Posts: 26354
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is the mic connected directly to the analogue input, or through the pre-amp?
Your schematic isn't clear.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

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

The microphone is plugged into the amp, and the output of that is plugged into the audio jack which is wired into the arduino
Logged

Topsham, Vermont USA
Offline Offline
Edison Member
*
Karma: 33
Posts: 1925
... in The Woods In Vermont
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I have been using the "analog Read serial" and "analog In Out Serial" example programs

Are you seeing NO data from either of those?? If so, you have some connection problem...

What is the output level of your preamp?  Can you monitor that with a separate amps/speaker to be sure you have a signal there?  

Do you see data from a whistle or "ahhhhh" near the mike?  

The OldRadioSkool test signal is a spoken "One" as in "WaaaaaaaaaaaaNe"...  and often calling out the VU meter levels for the guy on the other end of the circuit, like "Waaaaaaane  - minus 5",  "Waaaaaaaane - Zero"..  I almost forgot about that test signal, but now I recall doing that setting up a remote broadcast from Yale to WTIC in Hartford in 1951.  Years later when I discussed working for WTIC, the Chief Engineer told me he remembered some "little kid voice" coming in from the "Yale Interprets The News" program setup.  (My Dad always had me "help").

But, surprise, I digress....

Added: Oh: BTW, do you have a DC blocking capacitor before the Arduino input?  I would suggest something like .1uF in series with 1000 ohms in series between the preamp output and the Arduino Analog Input.  You are trying to get an AC waveform into a DC - Ground Referenced input.

« Last Edit: April 25, 2013, 06:40:37 am by terryking228 » Logged

Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 303
Posts: 26354
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'd also be inclined to increase the serial speed to 115200 and lose the 1 millisecond delay.

Code:
void setup()
{
  Serial.begin(115200);
}

void loop()
{
  int sensorValue = analogRead(A0);
  Serial.println(sensorValue);
}

Quote
the serial monitor shows constant values around 200-300,
This constant DC offset is puzzling - it's around 1.25V.

Do you have access to a 'scope
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Norfolk UK
Offline Offline
Faraday Member
**
Karma: 69
Posts: 2557
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
the serial monitor shows constant values around 200-300,
This constant DC offset is puzzling - it's around 1.25V.
As there appears to be no biasing of the audio AC and the signal is from an amp could the analogue port be fried with to much -V
Logged


Pages: [1]   Go Up
Jump to: