I am using the AtMEGA 2560. One of the options for my 10bit ADC differential measurements is to have the same pin (ADC0 in this case) as the positive and negative differential input with a X10 gain? Why would we ever do this? Wouldn't this cause the read or binary value to be zero?
I'm sorry! It looks like I asked this same question in the wrong sub-topic.
We were given an assignment where we needed to use a differential voltage measurement for our ADC but have the two inputs (plus and minus) be the same. it does look like there is an option in the multiplexer setup to have the plux and minus on the ADC be the same with a gain of x10. What I don't understand is WHY would you ever do this? Wouldn't your value always be zero?
If supporting documentation is needed please let me know. But I'm more looking for a general concept. I'm not sure it makes a difference, but just in case, we're using the ATmega 2560.
Bhysjulien:
We were given an assignment where we needed to use a differential voltage measurement for our ADC but have the two inputs (plus and minus) be the same. it does look like there is an option in the multiplexer setup to have the plux and minus on the ADC be the same with a gain of x10. What I don't understand is WHY would you ever do this? Wouldn't your value always be zero?If supporting documentation is needed please let me know. But I'm more looking for a general concept. I'm not sure it makes a difference, but just in case, we're using the ATmega 2560.
The supporting documents (or the link there to) would be helpful. I have not see plus or minus designation on the ATMega 2560 ADC, nor have I seen a built in gain for the ADC. I know the external ADS1114/1115 line has an internal gain, but haven't seen that on the '2560.
Thank you for responding. I have attached the documents in my first post.
The Arduino can't read negative voltages (it can be damaged by negative voltages) and the ADC always reads relative to the Arduino ground. So, it can't directly read a differential without a ground reference.
But of course, you can subtract (in software) to find the difference between two (positive) analog inputs.
A voltage is always a "difference" but most of the time we measure the "difference" from ground (i.e. ground is the "reference"). If you look at a multimeter you rarely see a "ground" connection. You just have + & - (or red & black) and you are reading the difference.
You probably wouldn't do this... But if you have a project with 5V & 12V supplies (and a common ground) you can put the - meter lead on 5V and the + lead on 12V, and the meter will read 7V (the difference).
What I don't understand is WHY would you ever do this? Wouldn't your value always be zero?
Stage & studio microphones use differential connections. In audio terminology it's called a [u]balanced connection[/u]. Any hum or other noise picked-up in the wires is equal in both signal wires so it get's subtracted-out of the differential signal. Microphone signals are just a few millivolts and any noise is amplified along with the signal so it's very important to minimize the noise. The line-level signal coming out of the preamp (or mixer) may be balanced or unbalanced. Pro setups use balanced signals. Home audio is unbalanced.
Strain gauges also put-out very-low voltage signals and they are often connected to a differential amplifier.
Here in the U.S., 120VAC in your house is measured relative to neutral.* There are two "phases" with (about) half the house on one phase hand half on the other. 240V appliances are connected "differentially" across the two opposite-phases.
- Neutral is connected to ground at the electrical box, so its effectively ground, but no current is supposed to flow through the ground wire unless there is a fault.
I haven't studied the datasheet in detail but its not uncommon to have combinations of settings that are useless, in order to have many more that are useful...
adwsystems:
The supporting documents (or the link there to) would be helpful. I have not see plus or minus designation on the ATMega 2560 ADC, nor have I seen a built in gain for the ADC.
[ATmega 2560 datasheet p.6:
ADC with optional differential input stage with programmable gain
1x, 10x and 200x gain are available (see p.269).
I have seen the same in other ATmega datasheets, and even ATtiny datasheets. Not sure if the ATtiny line also offers differential input, though.](https://ww1.microchip.com/downloads/en/devicedoc/atmel-2549-8-bit-avr-microcontroller-atmega640-1280-1281-2560-2561_datasheet.pdf)