10 Replies Latest reply on Apr 30, 2019 9:59 AM by user_1669321

    Sequencing ADC offset and/or gain

    user_1669321

      Hi,

       

      I'm using a sequencing ADC offset in differential mode, with internal ±1.024V as reference, running at 1000KHz, 8 channels, and 12 bits resolution.

       

      What is the best way to calibrate the gain and/or offset? I read in the datasheet that the gain is computed with adcGain = adcCounts * 10 / Volts, but this value I get varies largely from one input to the other. By doing an average, I get an offset on some channels up to 40mV. At low levels, though (~100mV), the offset is ~1mV. The large offsets are when the input is at 0.9V.

       

      For the offset, the datasheet says to "short all inputs together". Should I also connect them to ground?

       

      What's the best way to go about this problem?

       

      Thank you,

       

      Fred

        • 1. Re: Sequencing ADC offset and/or gain
          BoTa_264741

          Fred,

          isn't 1000kHz (1MHz aggregate) sampling rate is too fast for sequencing ADC? Keep in mind that cross-talk between channels will be huge at this sample rate. Resulting accuracy will likely be less than 8-bit.

          /odissey1

          • 2. Re: Sequencing ADC offset and/or gain
            user_1669321

            Hi odissey1,

             

            1000KHz is the minimum for the Sequential ADC component.

            • 3. Re: Sequencing ADC offset and/or gain
              LePo_1062026

              Fred,

               

              Are you talking about a one-time calibration that has a required user-input or a run-time auto-recalibration?

               

              Note: Many times you can get away with one gain and offset calibration for the entire ADC as long as the output impedance of the signals you're measure is at least 100 ohms or lower.  If the signal has a higher impedance then the routing resistance to the mux and input to the ADC becomes significant.  If this is the case, then you may have to perform a gain and offset on each channel.

               

              Len

              • 4. Re: Sequencing ADC offset and/or gain
                user_1669321

                I was talking more about a one-time calibration.

                 

                I'm measuring the voltage of 4 Li-ion batteries (4.2V) through a voltage divider of 75k/24k. Would the voltage divider be the reason of the offset because of the high impedance?

                 

                Moreover, with Odissey1's comment, I tested that when disconnecting/reconnecting a battery, it affected the voltage read on the adjacent channels, so there is probably crosstalk as well. Would the solution be to use a non-sequencing ADC with a mux controlled manually?

                 

                Thank you,

                 

                Fred

                • 5. Re: Sequencing ADC offset and/or gain
                  BoTa_264741

                  Fred,

                  Keep in mind that input impedance of the ADC_SAR is low (approx. 20k), which is comparable with your voltage divider. You may consider adding  buffer Opamp in front of ADC_SAR. (FYI, PSoC5 Opamps have inp impedance approx. 1M - not much room either).

                  /odissey1

                  • 6. Re: Sequencing ADC offset and/or gain
                    user_1669321

                    This is not possible as the analog resources are maxed out (1 Sequential ADC with 8 differential channels + 1 sequential ADC with 4 single-ended channels).

                    • 7. Re: Sequencing ADC offset and/or gain
                      LePo_1062026

                      Fred,

                       

                      I haven't checked the code of the Sequencing SAR component.  It might be not maximizing AMUX isolation during the switch.

                       

                      Two suggestions:

                      1. Use a separate Amux component in front of the ADC with maximum isolation.

                      2. Lower the sampling frequency.  Determine if you REALLY need that fast of a sampling.

                       

                      /odissey1 is correct that the Opamp input is a significantly higher impedance. Caution: Opamp have their own potential gain and offset issues.  The nice thing is that if you have the Opamp between the AMux and the ADC, then when you perform a gain and offset calibration, this should take the Opamp and ADC G&O into account at the same time.  You are effectively calibrating the entire chain.

                       

                      Len

                      • 8. Re: Sequencing ADC offset and/or gain
                        user_1669321

                        Hi Len,

                         

                        I don't need 1MHz (I need one sample per second), but 1MHz is the minimum frequency allowed for the ADC component.

                         

                        I cannot add an op-amp as the analog resources are maxed out and the analog placement routine doesn't converge when I add an op-amp.

                         

                        I guess my only option is to use a non-sequencing ADC and manually mux the input.

                        • 9. Re: Sequencing ADC offset and/or gain
                          BoTa_264741

                          Fred,

                          why not to use DelSig_ADC with AMux to measure all voltages in the system (batteries, thermistors, etc.)? DelSig_ADC has high-impedance input buffer, high accuracy, 10kHz in 16-bit single point measurement. I see that you are using it for Thermistor measurement already. I would measure all voltages in a simple loop, e.g. at 100Hz repetition rate (per channel). Quite enough for thermistor and batteries.

                          /odissey1

                          • 10. Re: Sequencing ADC offset and/or gain
                            user_1669321

                            Great idea, I will try it!