reading analog input from signal with diff ground

Hey guys I have a small problem

I'm using the analog input pin to read the output of a 7-band audio equalizer. This works fine if the audio is coming from the computer and the arduino is also powered from the computer.

When I power the Arduino with external power or use an mp3 player for the audio source the analog reading is all off. I'm pretty sure this is because of the separate grounds. I know there's the AnalogReference function, but here's the problem. I can pull the ground out of the audio source... but AnalogRefernce() requires the top voltage.

Any idea how I can fix this?

I'm pretty sure this is because of the separate grounds.

You can't have different grounds it won't work (as you have found).

but AnalogRefernce() requires the top voltage.

I don't understand what you are saying here and nether do you.
See this:-
http://www.thebox.myzen.co.uk/Tutorial/Power_Supplies.html

By top voltage I mean if an ADC is 0-6 V you would give it 6V on aref.

I do have 2 grounds. 1 ground from the audio source which is the ground the 7-channel outputs relative to on the Arduino's analog input.

the other ground is coming from a 12 V wall wart powering the Arduino.

Also you need to find out if the audio signal is single ended (referenced to ground) or a balance signal. The solution required differs for which kind of signal you are dealing with.

Also you know that an Arduino analog input and memory resources is not very useful for processing audio signals? Maybe if you first told us what you want the Arduino to do with the audio signal rather then diving into details of electrical interfacing. That is what you may want to do with the signal may not be practical for an Arduino.

Lefty

Here is a site posting showing using that chip with his Arduino. Might be useful:

http://skoba.no-ip.org/msgeq7/

Lefty

Thanks for the help -- my grounds weren't connected. I'm not sure why, but I was thinking that because the grounds weren't the same "potential" (coming from different sources) that I would potentially expose the board to too high voltages on the input pin.

that I would potentially expose the board to too high voltages on the input pin.

There is an old saying "it takes two to tango" the same is true of electricity you need two connections to do anything. A voltage is just a measure of potential difference between two points. Indeed grounds can be at different potentials but that begs the question "with respect to what?" Suppose that two grounds are a different potential with respect to a metal steak hammered into the damp earth. The joining them together will make them into the same potential. Then the signals will be being measured with a common reference and you can be sure the signal voltages you measure will be meaningful for both circuits.