This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LMP90080: Offset and gain calibration procedure

Part Number: LMP90080
Other Parts Discussed in Thread: ADS114S08, LMP90100

Hi,

I'm trying to do a system calibration on my LMP90080, following the procedures described on specifications document, page 26.

It seems that the description is incomplete, there is no mention about how to prepare the calibration process, no information on preliminary requirements.

I'm trying to calibrate CH0, than immediately CH1. The process sometime succeeds, but I have no control on it.

Did anyone try a system calibration?

Below are some code sequences that I'm using:

// CALIBRATION PREPARATION

// Reset LMP
 SPI_Send(0x10);
 SPI_Send(0x00);
 SPI_Send(0x00);
 SPI_Send(0xC3);
 
 Delay(1000);
 
 // Set channel CH0 configuration
 SPI_Send(0x10);
 SPI_Send(0x02);
 SPI_Send(0x01);
 // 26.83 SPS, GAIN=1, no buffer in path
 SPI_Send(0x41);
 
 // Set channel CH1 configuration
 SPI_Send(0x10);
 SPI_Send(0x02);
 SPI_Send(0x03);
 // 26.83 SPS, GAIN=1, no buffer in path
 SPI_Send(0x41);
 
 // Set clock
 SPI_Send(0x10);
 SPI_Send(0x01);
 SPI_Send(0x02);
 // Internal clock
 SPI_Send(0x20);

// CH0 SYSTEM CALIBRATION (CH1 SYSTEM CALIBRATION SEQUENCE IS THE SAME)

 SPI_Send(0x10);
 SPI_Send(0x01);
 do {
  data = SPI_Send(0x8E) & 0x2;
 } while(data != 0x0);
 
 // Set channel scan mode
 SPI_Send(0x10);
 SPI_Send(0x01);
 SPI_Send(0x0F);
 SPI_Send(0x00);
 
 // ZERO CALIBRATION
 //------------------
 // Set channel CH0 to VIN7(GND)
 SPI_Send(0x10);
 SPI_Send(0x02);
 SPI_Send(0x00);
 // VINP:VIN7, VINN:VIN7(GND)
 SPI_Send(0x3F);
 
 Delay(100);
 
 // Set SCALCN to Offset Coefficient Determination mode
 SPI_Send(0x10);
 SPI_Send(0x01);
 SPI_Send(0x07);
 SPI_Send(0x01);
 
 // Wait calibration end
 do {
  data = SPI_Send(0x87);
 } while(data != 0x0);
 
 // SCALE CALIBRATION
 //------------------
 // Set channel CH0 to VIN6
 SPI_Send(0x10);
 SPI_Send(0x02);
 SPI_Send(0x00);
 // VINP:VIN6, VINN:VIN7(GND)
 SPI_Send(0x37);
 
 // Enable IB1 source current
 SPI_Send(0x10);
 SPI_Send(0x01);
 SPI_Send(0x02);
 // 1000uA current -> expect 1.0V read out
 SPI_Send(0x2A);
 
 // Put 1.0V value to CH0_SCAL_GAIN (0x67A5)
 SPI_Send(0x10);
 SPI_Send(0x03);
 SPI_Send(0x03);
 //SPI_SendData(0x67);
 SPI_Send(0x7F);
 
 SPI_Send(0x04);
 //SPI_SendData(0xA5);
 SPI_Send(0x67);
 
 Delay(100);
 
 // Set SCALCN to Gain Coefficient Determination mode
 SPI_Send(0x10);
 SPI_Send(0x01);
 SPI_Send(0x07);
 SPI_Send(0x02);
 
 // Wait calibration end
 do {
  data = SPI_Send(0x87);
 } while(data != 0x0);

Another this is related to the expected value of 1.0V on the ADC entry. The calculated value for gain calibration was 0x67A5, but the desired result was obtain by using instead 0x7F67.

Please advice!

Thanks,

Cristian

  • Cristian


    I don't think there needs to be any additional preparation for the calibration process or any other preliminary requirements. In general, it is really just putting in what you think will be an input 0, and then running the offset calibration; and then putting in an input full-scale and then running the gain calibration. You should run the offset calibration first, and gain calibration second, doing one channel at a time.

    Based on your description, it seems like your offset calibration is working. If you want to check, I'd read back the offset calibration coefficients and make sure your values aren't off. You can read back the coefficients and the read back ADC data to make sure it's close to 0x0000.

    For your gain calibration coefficients, I'm still a bit unsure of what you're getting as an error. You mentioned that you're getting a calculated of 0x67A5, when you expected to get 0x7F67. That's an error of about 23%, so it's something that you should be able to track down.

    First, what are you using for your reference and what are you using for your input full scale when you run the calibration? Is the reference a reference resistor being driven by IB1 or IB2? Is the full scale input another resistor that sees this same current? When you do run a calibration, I would definitely try to measure both the input and the reference value with a precision multimeter just to make sure that the values aren't far off from the expected value. My guess is that you of these voltages is incorrect during the calibration process.

    Regardless, read through my comments, let me know how you're setting up the calibration, measure the voltages, and post back to follow up.


    Joseph Wu
  • Hi Joseph,

    Thank you for your quick reply!

    I have read carefully your comments and after that I have done an extensive review of my design and source code.

    For the calibration I'm using IB1 set to 1mA and a resistor of 1Kohm 0.1% connected between VIN6 and VIN7. In fact my design is exactly as the one described in documentation at page 45, figure 66, 3-wire PT-100 using 1 current source.

    The reference voltage is 1.235V and it is connected to VREFP1, with VREFN1 connected to the ground.

    I have measured the voltage across the reference resistor and reads 1.0112V. Based on reference voltage I have computed the gain register value at 0x68CE.

    I have performed the system calibration following these steps:

    - channel 0, offset calibration: VINP=VIN7 (GND), VINN=VIN7 (GND), 26.83 SPS, gain=1, no buffer in path, BGCALCN = offset correction/gain correction. The offset register reads back 0xFFFF;

    - channel 0, gain calibration: VINP=VIN6, VINN=VIN7, IB1=1mA, 26.83 SPS, gain=1, no buffer in path, BGCALCN = offset correction/gain correction. The gain register set to 0x68CE, after calibration reads back 0x7FCE;

    - channel 1, offset calibration: VINP=VIN7 (GND), VINN=VIN7 (GND), 26.83 SPS, gain=1, no buffer in path, BGCALCN = offset correction/gain correction. The offset register reads back 0xFFFE;

    - channel 1, gain calibration: VINP=VIN6, VINN=VIN7, IB1=1mA, 26.83 SPS, gain=1, no buffer in path, BGCALCN = offset correction/gain correction. The gain register set to 0x68CE, after calibration reads back 0x7FCB;

    After calibration I have performed temperature measurements. I have 2 identical PT100 sensors, one connected to the electronics and one connected to my digital multimeter. They are positioned very close one to the other.

    The problem is that the electronics reads a value for the PT100 resistance and the multimeter shows something different for the other PT100. They have the same resistance, I have checked that before I have installed one of them to my design.

    For example: multimeter reads 109.17 ohm for one PT100 and the electronics reads 111.57 ohm for the other PT100. I have switched the sensors, the problem remains exactly the same.

    I have no ideea from where this difference appears. I could say that the self-heating could be an issue, but the difference equivalent in Celsius degrees is grater than 4'C, which is too much.

    I have read back the voltage across the reference resistor and is the same with the one read by multimeter.

    Please advise!

    Best regards,

    Cristian

  • Cristian,


    I still have a few questions about your calibration and measurement.

    First, I don't think that your calibration method is correct. You run a calibration, get a value, but then overwrite the value with a new calibration. As an example. If VREFP1 is 1.0000V and VREFN1 is connected to ground and then the input were 1.0000V, then you would have a theoretical gain register value of 0x8000, which you would have overwritten after your calibration. The calibration is there to match the sampling between the input voltage and the reference voltage. The Value you get for the first calibration is 0x7FCE which means that the input and reference are off by about 0.15%, which I don't think you are incorporating into your new value.

    Instead of converting the gain register value to 0x68CE, I would leave the calibration register alone. Then measure the reference resistor. It should be approximately 1kΩ, but measure it with a multimeter as precisely as possible. Then take the ADC result and calculate the RTD value with a ratiometric measurement. The RTD resistance should be:

    RTD value = (ADC result/2^15) * Gain * RREF

    This way, you don't need to scale values back and forth with the 1.235V reference and you don't need to convert to a voltage.

    I had two other questions about your setup. First, With the 1 current source topology, you need to take two measurements. First you drive the current source through VIN0 and take measurement 1. Second you drive current source to VIN1 and take measurement 2. Subracting 1 from 2, you remove the effect of RLINE1 and RLINE2. I just want to make sure that you are making both measurements, or you may have an error from RLINE1. Second, do you have any input filtering on VIN0 and VIN1? Series resistance might add some error into the measurement.

    I will say that the error that you see is rather large. It would help to know what gain you are in and what the ADC data is. At this point the error could be a function of line resistance, reference resistance, or some offset or gain error coming from the calibration that you use.


    Joseph Wu
  • Hi Joseph,

    I have figure it out, the problem was related to the fact that I considered the wrong reference.
    The 3-wire PT100 sensor is connected directly to the VINs with very short PCB trace lines, there are no series resistors.
    I have removed the system calibration part. Now, as you suggested, I'm computing the RTD value directly from the ADC values (VIN0/VIN1 and VIN1/VIN6).

    Cristian
  • Cristian,


    I'm glad you were able to solve your offset problem. While I realize that you're using the LMP90100, I did want to point out that we have another similar part in the ADS114S08. In the datasheet, for the ADS114S08, there is an example design for a 3-wire, two current source design, with a high side reference.

    While this design is very different from yours, there are a lot of example calculations that show how to determine that the design is within the range of operation of the device. The equation and designs will be different, but what you need to consider will be very similar.

    If you have any further questions, please post back.


    Joseph Wu
  • Hi Joseph,

    Could you point me to some application notes that deal with DC/DC (boost topology) power supply ripples attenuation?
    My design is battery powered and consumes very low power, 90% of time stays in standby mode which consumes about 600uA, there are some spikes in running mode about 16mA. The input voltage is 3.6V, lithium battery and the output voltage is 5.0V. Do you have any suggestions on what DC/DC convertors should I use?

    Thanks,
    Cristian
  • Cristian,

    I'm sorry, but I don't think I have enough experience to advise you on specific power devices to reduce ripples. My suggestion would be to post the question in the Non-Isolated DC/DC forum. Just explain that you're wanting to reduce the ripple from a DC/DC converter powering a precision data converter device. You can find the forum at the following link.

    In general, I've recommended an LDO to smooth out ripples after a switching converter. It is likely the cleanest way to get power for the data converter.

    Joseph Wu