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.

[FAQ] PGA305: Is there specific information on how to use the PGA305?

Part Number: PGA305

Tool/software:

I'm trying to use the PGA305, but I have trouble understanding various aspects regarding the operation of the device.  For example, is there information on how to compute the coefficients and how the PGA305 uses the coefficients.  I also have issues with the OWI communication, especially if I do a 4P4T calibration.

  • The PGA305 is a 24-bit ADC using primarily a 14-bit DAC as output.  Linearization and temperature compensation is accomplished using a 3rd order polynomial equation of two independent variables and one dependent variable.  The independent variables are pressure (P) and temperature (T) which when computed through the polynomial provide a compensated output as provided at the DAC output.

    When 24-bit mode is enabled, the computation must be converted to a 16-bit value which is accomplished by right-shifting the outcome by 8 (which is the same as dividing by 256). The DAC output is an average of four measurement cycles, so division by 4 is the actual DAC output code.  The total division for the 24-bit computed value becomes 1024 when converted to DAC output. 

    One consideration with PGA305 is that the size of the computed values may require integer values greater than 64-bits (long,long), so floating-point values are used.  The issue with using floating-point is the M0 does not have a hardware floating-point peripheral which requires this do be accomplished via software.  This increases the total processing time for the final computation for the DAC output.

    Below are more specific details as they relate to the PGA305:

    • How the coefficients used?
      • The coefficients used are as shown in the PGA305 datasheet.  A total combination of 16 coefficients can be used, and all 16 are used in a 4P4T calibration.  The simplest combination would be 2P1T, where the two pressure measurements would determine the gain slope for the measurement and outcome is the equation of a line where Y = mX + B.  Y is the DAC output, m is the measured slope of the two pressure points which becomes the G0 coefficient.  B is the offset value which is the H0 coefficient.  Adding more Pressure and Temperature readings for the calibration increases the number of coefficients used.  See the device datasheet for more details on the coefficients and how they make up the 3rd order polynomial.
    • How are the coefficients computed?
      • This is accomplished by linear regression.  Solving by using a system of equations is accomplished using the two independent variables to solve for the dependent variable.  The system of equations utilize the same math as would be used when actually computing the values when solving the polynomial.  The total number of coefficients used is determined by multiplying the number of pressure values taken times the number of temperature values taken.  3P1T is 3, 3P2T is 6, 3P3T is 9, and 4P4T is all 16.  Other combinations would be calculated in a similar way.
      • The PGA305 also uses digital gain and offset.  The best dynamic range is with a digital gain of 1, which benefits by using the best PGA gain available prior to the ADC.  The digital offset is simply the mean between the maximum and minimum values of the ADC returned codes.  In the end the output of the DAC cannot be negative in value, so the digital offset pushes the outcome so that it will remain positive in value.  Within the firmware, any negative value computed will be set to zero.
    • How are the coefficients stored?
      • The values of the coefficients are normalized to 22-bits, so the maximum range of the coefficients generated will be in the range of +/-2.  In most cases the outcomes will be fractional, but the storage of the coefficients themselves must become integer values so that they will be in range for the 24-bit EEPROM space designated for this purpose.  The fractional coefficient values are first multiplied by 2^22, but before storing to the EEPROM and additional multiplication of 2^8 is required (or total of 2^30) so that the computation allows for the 24-bit values to be considered as the final outcome prior to a division of 256 that ends up being the final DAC output code for the 14-bit DAC.
    • Issues related to the OWI (one-wire interface) and communication
      • The biggest issue here is unlocking the EEPROM once locked.  Due to the computational time required for the compensation using floating-point math, it is possible that the unlock sequence cannot take place within the correct timing.  As additional coefficients are computed, the length of time required increases.  One option is to use I2C instead of OWI.  Another option is to verify operation prior to locking the EEPROM.
    • How can I read the compensated values digitally?
      • The compensation requires that the M0 be running the compensation algorithm.  The only way to read data is by using the COMBUF communication sequence listed in Table 9 of the datasheet.