Computer Microphone as Analog Input

Hello everyone,

I want to use my computer's microphone to get analog input into an arduino. I have already looked at this post: http://forum.arduino.cc/index.php?topic=147063.0 but it is quit hard for me to understand how that works.

Can you please tell me how I can do that? I am using a windows 10 computer and a regular headset (it can be both jack or usb). I have an arduino mega. Please let me know if you need any other information.

In short: Microphon connected to computer -> analog input -> arduino mega -> LED output

Thank you for your time, Akam

In short: Microphon connected to computer -> analog input -> arduino mega -> LED output

More like this...

Microphone -> Soundcard input

Soundcard output* -> Arduino analog input

Arduino outputs -> LEDs

  • You'll have to configure your computer so you can hear the mic through the computer speakers.

  • If you want to listen to your computer speakers or headphones with the Arduino connected, you'll need a Y-adapter so you can plug them both in at the same time.

  • Make sure to [u]bias[/u] the Arduino's analog input.

  • Line output or headphone output.

DVDdoug: More like this...

Microphone -> Soundcard input

Soundcard output* -> Arduino analog input

Arduino outputs -> LEDs

  • You'll have to configure your computer so you can hear the mic through the computer speakers.

  • If you want to listen to your computer speakers or headphones with the Arduino connected, you'll need a Y-adapter so you can plug them both in at the same time.

  • Make sure to [u]bias[/u] the Arduino's analog input.

  • Line output or headphone output.

Thank you very much for your info, I will try to write it here and break it down as well for others like me who want to do the same thing :

You'll have to configure your computer so you can hear the mic through the computer speakers.

1) Right click on speakers 2) Recording devices 3) Right click on your microphone 4) Properties 5) Listen 6) Tick Listen to this device 7) Playback Through this Device (Choose your device) 8) Apply and ok

If you want to listen to your computer speakers or headphones with the Arduino connected, you'll need a Y-adapter so you can plug them both in at the same time.

So if you already have a microphone and a speaker connected to your computer (Microphone through USB, SPeakers through the jacks), I am guessing that we don't need this, right?

Make sure to [u]bias[/u] the Arduino's analog input.

Can you please explain this a little bit? Explaining the parts that I need as I am using the computer's microphone, and the purpose of doing so.

Thank you very much for your time, Akam

If you want to listen to your computer speakers or headphones with the Arduino connected, you'll need a Y-adapter so you can plug them both in at the same time.

So if you already have a microphone and a speaker connected to your computer (Microphone through USB, SPeakers through the jacks), I am guessing that we don't need this, right?

Yes, because without a Y-adapter you'd have to unplug the speakers and plug-in the Arduino. If you use USB speakers/headphones, no signal comes out of the analog jack. And if you plug something into a laptop's headphone output, the laptop's internal speakers turn-off.)

Make sure to bias the Arduino's analog input.

Can you please explain this a little bit? Explaining the parts that I need as I am using the computer's microphone, and the purpose of doing so.

Audio signals are AC (they go positive and negative). The Arduino cannot read negative voltages. It can actually be damaged by negative voltages, and/or the negative half of the audio signal can be "damaged" (you'll hear distortion).

The two equal-value resistors (100k) create a voltage divider that puts 2.5V on the Arduino's analog input. The 10uF capacitor blocks the DC from leaking into the audio source while letting the AC audio signal through, and it keeps the audio source from messing-up the DC bias. You can ignore the other parts... The "amplifier" is your soundcard.

With the 2.5V bias the Arduino's ADC will read about 512 with silence, and you'll get higher & lower readings with audio. If necessary in your application, you can subtract-out the bias in software.

WOw!!! All of you so amazing!!!