I am using the differential channels on the mega 128 and am having trouble getting a useful result.
I have two solar cells connected + against + and wish to obtain a differential reading from the minus ends to determine the direction of incoming sunlight. The differential signal is about +/- 20 mV, so I thought, great, I'll just plug the minus ends into the differential channels, add 200x gain and get the -512..+512 signal out...not so easy.
There are obviously some requirements for the ADC inputs that I have missed. I have read a lot of information in the forums and manual, but am still having trouble putting it all together.
My questions are in 3 main areas:
1) Input current,
2) Voltage ranges, and
3) Offset error.
At present, the minus ends of the solar cells are connected directly to the pins. i.e. I have practically no current flow an am measuring open circuit voltages.
The manual specifies an input resistance of less than 10k. Does this imply a minimum short-circuit current for the source in order to drive the ADC input?
I would have assumed that a differential voltage signal is a differential voltage signal, however... the input voltage must be between 0 and Vcc. What is the input voltage? Is this at the pins, or after the amplifier, or a bit of both?
More specifically is the relative voltage between differential source and uC important? Do I need some sort of common ground?
The magnitude of the signal (as well as the sign) is also different, depending on which way around I connect my wires. Is there any obvious reason for this apparent offset error?
I have noticed that there is ADMUX setting for measuring channel 0 against channel 0 that "Can be used for offset calibration." Calibration of what? Does the offset refer to the amplifier, or to some sort of parasitic voltage on the pins? Where can I throw this factor in to correct the offset?
I hope I have not missed anything really obvious here.
Grateful for any responses!