Audio input to arduino

Hi all, i have a sound detector manual hooked up to my arduino, i want to replace it with an audio jack, which should be better MSGEQ7 or LM3915!!

What are you trying to do? The MSGEQ7 breaks the signal into frequency bands (one for the bass, one for the highs, and 5 in-between).

You don't need the LM3915 with the Arduino. Or, you can make a VU meter with the LM3915 and no Arduino.

...In general, you just need to bias the input at 2.5V so it can accept the negative half of the AC audio waveform (2 equal-value resistors) and then add a capacitor to block the bias from your audio circuit.

(Negative voltages can damage the Arduino and/or the Arduino can "damage" (distort) the negative-half of the audio signal.)

Sorry dont mean to get on your nerve, am not from this field an i really want to make a sound visualiser, so basically i got the arduino nano with me, i was thinking of getting the MSGEQ7 breakout module, do i need to buy anything else (i mean resistors,capsitors) for a newbie like me, i gess the breakout board would be the best buy, unless and untill it has the MSGEQ7 IC irrespective of whoever sells it be ut sparkfun, dfrobort or diki jey it dosent matter right!!

i really want to make a sound visualiser,

I assume you want to make a spectrum analyzer effect? A spectrum analyzer is like an array of VU meters with a separate meter for each frequency band. A “real” spectrum analyzer is an expensive piece of measurement equipment but you can make a fun effect with the Arduino. If you search YouTube you can find lots of Arduino Spectrum Analyzer effects to get an idea of what you can do.

I’ve done several lighting effects without frequency analysis, just using “loudness” or “the beat”. For example, "The worlds simplest lighting effect makes a light come-on whenever the sound is louder than average an off whenever it’s below average. That gives you lots of “lighting action” and it automatically adjusts to the average with quiet or loud songs. A simple variation is a second light that’s on whenever the 1st one is on. My version sets-up a random pattern (4 or more lights) and then toggles to the opposite state whenever it’s louder than average.

Assuming you want frequency analysis the MSGEQ7 is the easiest way to go. The frequency filtering is done automatically by the chip. The one tricky thing about it is that the 7 outputs are multiplexed (shared) so it takes some clock signals to read the right frequency band at the right time. (You can find examples of the software to do that.)

If you want more than 7 frequency bands you can use FFT or FHT to do it in software. The algorithms are complex but there are libraries so you don’t have to write the code yourself. But, you have to figure-out how to use it and you should do some studying to understand what it’s doing.

, i was thinking of getting the MSGEQ7 breakout module, do i need to buy anything else (i mean resistors,capsitors)

If you buy a “module” or “board” it should come with everything you need. If you buy the raw chip the [u]MSGEQ7 datahseet[/u] shows you what you need.

Of course, you’ll need some hardware on the output (LEDs & LED drivers) relays, etc. The Arduino itself can only drive a handful of LEDs. Some LED strips (i.e. NeoPixels) have drivers built-in.

And, in addition to whatever software you’re using to read/analyze the input you’ll need software to drive the outputs.

Ohk your post made quite sense!! The example u said of the simplest lightning affect of the lights getting lit on loudness and beat i have got it done on my arduino nano with a microphone sound fetector module!! But i wanted to raise the bars, grt more visual affects like a sound visualiser, dasy i thought of getting a MSGEQ7 module to fine tune the frequencies, so if i just get the MSGEQ7 module i would be all set right!!

I think the problem is that you know what you mean when you say "sound visualiser" but we are not so sure. Can you show us an example of what you're trying to produce, perhaps on Youtube or similar?

An MSGEQ7 module on its own is not going to visualise anything. It just provides signals that with some programming you could use to control some LEDS or something similar.

Steve

For as much i understand i wont be able to get such perfect visual affects with a microphone because of noise n distortion, n all
I want direct audio input to my arduino, via a audio jack which can be achieved with a MSGEQ7 breakout module,(the module as its equipped with everything and i just need to plug it in)
Pls temme im right till now!!
Now my main qustion apart programming the MSGEQ7 with arduino what else do i need to do!!

DVDdoug:
...In general, you just need to bias the input at 2.5V so it can accept the negative half of the AC audio waveform (2 equal-value resistors) and then add a capacitor to block the bias from your audio circuit.

(Negative voltages can damage the Arduino and/or the Arduino can "damage" (distort) the negative-half of the audio signal.)

Or, because audio quality is, probably, not at issue, you can do things like, rectify the audio signal and/or amplify it to a 5V squarewave. Then you can use "digital filtering" techniques to do whatever kind of "sound visualization" you desire...
BUT, that's the rub...you haven't really made it clear what, exactly, you're after. You seemed to start off with two, separate questions:

  • How to replace a "manual connection" with an "Audio Jack". Not clear if this is a question of "types of audio jacks" or "how an Audio Jack is electrically connected" or ... is this a monarial connection? ...or Stereo? ...does it work the way you want it to with the manual connection?
  • Which of the two are "better": MSGEQ7 or LM3915. Better for what? What is it you are trying to achieve?

Sound-reactive LED Light Strip - short clip - YouTube

That is simply loudness. There is no frequency/pitch information being used. The color sequencing is running independently of the audio signal and it's simply running red, yellow, green, blue over-and-over. (If it was me, I'd randomize the colors and the timing of the colors.)

And it looks like a [u]Neopixel[/u] LED strip. Neopixels are individually addressable RGB LEDs.

A "regular" LED strip simply has 1 or 3 colors and you can control the brightness of the colors... You can't turn-on/off an individual LED... All of the red LEDs come-on together, etc.

Of course, you can wire-up individual LEDs and make them addressable or you can use various addressable LED driver circuits.

For as much i understand i wont be able to get such perfect visual affects with a microphone because of noise n distortion, n all

A microphone doesn't necessarily create distortion... Every rock band uses microphones and most music is recorded with microphones. (There is electronically-generated music, or you can record an electric guitar "direct" without a mic.)

The biggest downside to a mic is that it picks-up talking and other room noise.

If you use a mic, I recommend a [u]microphone board[/u] which has the necessary electronics built-in. (A microphone requires a preamp. Electret mics have to be powered, and the output has to be biased for the Arduino... The microphohe board takes care of all that.)

[url=http://[**[u]Here[/u]**](https://www.google.com/search?q=Arduino+audio+input+circuit&newwindow=1&tbm=isch&source=iu&ictx=1&fir=ZFehnEDiJF2gdM%3A%2C603zwCEHvCSErM%2C_&usg=AFrqEzcaum-scDfmYEEnXgOnMVodVOxDig&sa=X&ved=2ahUKEwi5pILyiNTcAhUF-6wKHRyMCn4Q9QEwA3oECAIQCA#imgrc=ZFehnEDiJF2gdM:) is a circuit that biases the input so you can directly connect a headphone-output or a line-level output.

IMO - The audio input side is the "easy" part of the project. Controlling the LEDs is the "hard part". The other "hard part" might be the software that "connects" the audio to the lights/LEDs, but that's also the fun part.

You can start with one or the other. For example, run the Analog Read Serial Example to see what kind of "numbers" you're getting from the audio.

Or you can start by blinking/sequencing LEDs under software control (with no input).