Hi and Wha?

So... Hi. I have been lurking for a while, got my Arduino, built some stuff and now am headed towards my first true application. For the first bit, I am building a mic trigger (electret -> lm386 (1-8 bridged with 10uf cap for the 200x amplification)). I built the amp -w- cap inline on the output so I only get the half wave, and have a very nice (although rather clipped) waveform when sound is actually present (scoped). Where my issue starts is when I am not working off just the Arduino power supply and attach the USB. All the sudden I get a butt load of noise. I thought it was random at first, but if I dial up the time on the scope I can see something oscillating which was NOT there without the USB plugged in. If I jumper off of the PS and just go with straight USB power, it is still there. Oddly enough, when I am loading a sketch, it chills out for the 8 or 10 seconds while it is being uploaded.

Part 2 of said oddness, is that when I do a serial monitor of the values coming from the mic (analog pin) it is a constant stream of numbers that is like 299 300 299 300 300 300 299 299 298 298 and on and on. Never mind that the scope is jumping with a waveform that would be about equivalent to 1 volt which should send those numbers in one direction or another quite significantly. But no change. I am feeding the Arduino pin (19) off of the same line that I am monitoring on with the scope. Other symptoms are like when the sketch comes up, no matter what I set as a threshold level it always triggers the LED pin (13 for now), not because there is noise, but just because it feels like it. When I engage the serial monitor, it triggers again. The numbers start around 500 and slowly settle down like a cap being drained. Then I can clap my hands and yell and scream and hoot and holler, but to no avail. No trigger. In fact no change inn number stream at all. hmmmm?

So, I thought I would change the threshold to something closer to the displayed value. When I did this, the displayed numbers moved in value. Quite spooky frankly. So to make a long story short. Found out about Arduino. Bought the board. built some stuff to make sure it seemed to work properly (which it did... basic blinks, push button blinks....), But can not get this dag'um mic to work properly. Now a week later (about a half hour a night of messing with it after the kids are in bed and whatnot) I am stumped as to how to make this actually respod to what I have built. This seems to be more an Arduino issue than circuit issue.

I got excited once when trying a different pin to monitor on. I accidentally renumbered the LED Pin to 16 instead of the mic. Right on!!! something completely different...then realized that I just pulled the "analog" in high so I reprogrammed the LED (16) pin back to low, then back to 13, and then assigned the mic pin to it's proper place.

Any thoughts?

BTW, if I wrote this sketch (with a lot of stuff commented out due to the basic bits not working) should it really be sitting at around 2800k already? Seems like it is going to be budget programming to get something substantial built. True?

How much does the serial read (to computer) cost as far as time?

I'm having a similar problem. I'm working on building a camera trigger and have been unable to get the LM386 and electret microphone to cooperate. I have successfully built an electronic cable release for my D70s, and successfully built a laser trigger using a re-purposed laser pointer and photo-resistor.

I'd like to be able to trigger the camera with sound, say glass breaking or a balloon popping (like the Make Magazine shots) but am having no luck. I'm a beginner when it comes to electronics, but I figured I was doing alright, what with the laser trigger and all.

At most I've gotten the Arduino to respond to direct blowing on the microphone (with a simple val = analogRead(0); digitalWrite(ledPin, HIGH); delay(val);) by blinking an LED faster or slower. But it won't respond to loud noises like a hand clap from even a few inches away. And when blowing on the mic I noticed the power LED would dim a bit. Not sure exactly what that means.

I've tried various schematics I found online, including in the LM386 specs pdf. No luck. I've been stuck on this for two nights. Hopefully someone can help me out. Tomorrow I'll post photos of my set-up, too tired at the moment.

but just because it feels like it.

It's out to get you, it's all the pesky micros fault it's not you. ;)

On the other hand it does sound like you are feeding the signal into one pin and monitoring another. The way you talk of :-

I am feeding the Arduino pin (19) off of the same line that I am monitoring on with the scope

What do you mean by Pin 19, is it the chip pin in which case it is PIN 13 connected to the internal LED or is it Pin 19 the digital way of referring to analogue A6?

Best if you could post some of your code and a schematic because what you are seeing happen will not happen, if what you have, is what you think you have. :)

Sutro, If it works but from only a few inches you need an amplifier on your mike.

And when blowing on the mic I noticed the power LED would dim a bit.

This suggests you are wiring up things wrong and drawing too much current.

Check out this Site, they make similar circuit.

https://randomskk.net/projects/lightstrip/schematic.pdf http://www.youtube.com/watch?v=Km6ObG_xKm4 Arduino: microphone input http://www.youtube.com/watch?v=TEq0dNnmpcY http://student-kmt.hku.nl/~arne0/x/arduino_input_microphone.zip