I use the D21G board and I have an analog input signal that is in the range of 0-0.5V. I want to measure with the best accuracy this signal so I have set the ADC resolution to 18 bits.
According to the code the ADC is the MCP3422/3/4 and which has 4 programmable gains that can be configured by setting properly the last two bits of the I2C reguest byte. So, in order to increase the accurasy and reduce the quantization noise I tried to increase the gain. But every gain setting except the x1 seems that returns only one constant value regardless the input voltage. Even the 0-5V setting of the Indio library seems to return the same constant value.
Do I miss something?
Hi Manolis, i can confirm that there is a problem with the V5 setting (and other PGA settings in the library): the input voltage is compared to a reference voltage of around 5V (zero point for the raw values), and when we switch on the PGA, this reference point remains the same, meaning that e.g. with a PGA of 4, we can only measure in the range 5V +/- 1.25V (1.25V being 5V / 4).
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!