Post Go back to editing

CN0510 calibration reporting integers

Category: Software
Product Number: cn0510

Hi there,

I am not getting repeatable values from the BAT_IMPEDANCE example. this is the result after trying 12 consecutive runs. All over the place:

This is my test set-up:

The calibration results are giving integers and appear to be nonsense

Freq Vexcite Vcal
10.00 3.000 0.000
16.68 3.000 0.000
27.83 3.000 -1.000
46.42 -4.000 -7.000
77.43 0.000 -1.000
129.15 -1.000 -1.000
215.44 -1.000 0.000
359.38 2.000 1.000
599.48 -2.000 13.000
1000.00 2.000 13.000

What I've tried:

 - the basic sample here:

 - adding the extra params to the struct mentioned in fig here:

 - pasting in the code here:

I guess something is wrong with my ADC.  What options do I have to troubleshoot?

Thank you, take care,

  • Hi,

    Could you check with Sensorpal GUI as it has default AFE parameters ideal for battery measurement.

    By calibration output, do you mean the RcalVolt values displayed in the beginning as below:

    Rcalvolt gives Vrcal = current through Rcal X RTIA


    RTIA = feedback resistor of HSTIA 

    Vrcal is shown in Cartesian format.

    It is not clear what you meant by Vcal and Vexcite.

  • I shifted over to the embedded approach because we werent getting anything that looked reasonable from sensorpal

    Here's a result  I took just now using sensorpal on the same battery.  While not as messy, it still seems like nonsense.  Except for the first frequency measurement, the values all say -500milliohm.

    this battery has an open circuit voltage of 4.8V.  According to SensorPal, the DC bias cannot be set above 1200mV.  What is the DC bias referring to?


    For the calibration , yes, those numbers are what I was referring to.  Based on the description I read in the manual, I had the impression that it was doing some form of voltammetry.

    Can you send some kind of paper describing the maths behind the HSTIA calculation and polar coordinates you mention?

    I thought it was referring to the 50mohm calibration

  • If connected backwards, I guess that the calibration measurements should be 0,0 for all frequencies right?

    As can be seen in the above charts and data, the measurements are non-zero for most frequencies both for the calibration and actual data.

    So the polarity should be correct right?

  • Good morning Akila,

    In case you are still skeptical of the polarity, you can also check the pictures I posted above.

    Or perhaps a review via video call or similar?

    Thanks & take care

  • The pictures above didn't show battery polarity.

    Have you reversed the polarity and checked yet?

  • I thought it would be self-explanatory what the red wire and black wire signify.  But ok, you are going to dispute that point as well, here you go. The terminal with the red wire coming off it is positive.

    The pictures show in the posts above show the overall wiring, and then zoomed into the connections to the cell (with the alligator clips labelled).  What are you suggesting is ambiguous here?

    I will be in the lab tomorrow to show you what the data looks like when I reverse the polarity.

    Now please answer the original question.  What are these cartesian integer values in the reported calibration measurements referring to?

  • Hi Akila,

    As mentioned yesterday, here are a number of measurements using:

    - correct polarity,

    - reverse polarity, 

    - open circuit

     along with the video (showing correct polarity)

    and picture (showing revers polarity) to see the connections in better detail

    Sensor pal and the sample code are giving quite different resultsXLSX

  • Hi,

    Below is the circuit of AD5940BATZ board:

    As shown in the image, AIN2 and AIN3 are given as input to ADC mux.

    While doing RcalVolt measurement:

    -Voltage across RCAL is made to appear across AIN2 and AIN3.

    -(VAIN2 - VAIN3) is measured for all the excitation frequencies set in the sweep.

    -This measured value is passed to DFT block to obtain real and imaginary components of the measured voltage.

    - This DFT output is displayed as RcalVolt in the terminal.

    RcalVolt will have nonzero imaginary values because of the capacitances at the AIN2 and AIN3 inputs and capacitances in the measurement path.

    So, as mentioned above,

    VRCAL = RCAL* (current through RCAL)

    VBAT = ZBAT * (current through battery)

    Since current through RCAL and battery are same (they are in series),


  • Ok, thank you.  This is helpful.  So just to make sure I understand you:

    I believe that the excitation voltage is 600mV and the excitation current is 50mA. So at any given frequency, when the excitation signal passes through Rcal + Rtia (50mOhm + ???) then that implies a voltage drop of around 2.5mV (about 4.2% of the excitation signal).

    So, when the calibration run reports:

    Freq:42.68  RcalVolt:(-1.000000,0.000000)

    This means Real: -1.0mV Imag: 0.0mV (or uV?)

    I'm used to DFT output being a description of amplitude and phase (whether polar or cartesian).  In this context, we are measuring a voltage drop (which may or may not have a reactive component within the TIA). 

    I can reason about a 2 parameter calibration result in 3 ways:

     1. mV of voltage drop      &     time delay(advance) in milliseconds, relative to input

     2. amplitude as a % of input signal    &     phase in degrees of offset, relative to input

     3. option #2, expressed in cartesian coordinates (real     &       imag)

    Are any of these accurate? or am I missing something?

    In all of these cases, reporting the result in integers seems problematic.

  • Hi,

    In CN0510, the excitation signal does not appear across Rcal or battery. As shown in the figure, excitation signal at CE0 only controls the current through battery (and  RCAL).

    The RcalVolt displayed is just the DFT output (content of DFTReal and DFTImag registers).

    To see the RcalVolt output in Volts, conversion formula is below,

    Volt =  ((ADCcode - 32768)/32768)*(ADCRefVolt/ADCPgaGain)*kFactor


    ADCCode = measured ADC raw data, (content of ADCDAT register)

    ADCRefVolt = Measured voltage on VREF_1V82 pin,

    ADCPgaGain = ADC PGA gain set in code,

    kFactor = 1.835/1.82.

    Volt has the unit of Volts.

  • In CN0510, the excitation signal does not appear across Rcal or battery.

    Fair enough, is this signal available to read from a register? 

    If a DFT were done on the excitation signal, what would you expect the output of the DFTReal and DFTImag registers to read?

    I assume that it would be something like:

    DFTReal = 50mA converted into a signed 16-bits as per the formula you referenced above

    DFTImag = 0

    Is that correct?

    ADCPgaGain = ADC PGA gain set in code,

    I see this variable, but can't tell where this macro is set.  Is it supposed to be 1.5? Or is reading from a pin somewhere?

    The RcalVolt displayed is just the DFT output (content of DFTReal and DFTImag registers).

    So, for example, if DFTReal reports 8.0, then the amplitude of the measured signal is ~0.2mV? 

    If that's right, then I think I should be getting values around DFTReal = 80 when DFTImag = 0

    And if DFTReal reports 0.0, then I guess no signal has been measured at all?

    Here's the calibration data from I posted on Mar 13:

  • Here I've plotted the calculated the length of the resulting lines alongside the calibration values you posted in your first post above

Reply Children
No Data