Understanding "calibration.py" demo (II)

25 septiembre 2013

In this article we are going to see how to calibrate the analog input ports. The procedure is somewhat different between the [S] and [M] models of openDAQ. 

[M] version uses analog multiplexers between all the inputs to select the analog channel which will be digitalized. These analog multiplexers do not affect the signal, so the calibration will be the same whatever analog input that is being selected. On the other hand, the signal amplification is carried out through resistor ladders connected to the instrumentation amplifier. These resistors have not exact values, so each gain setting will have a different calibration curve.

[S] version has a independent resistors bridge on each analog input, with different error values, so each input has to be calibrated by separate. Moreover, the calibration will be different if differential mode is selected, so each analog input will have a couple different calibration curves. On the other hand, PGA amplification in openDAQ [S] is carried out directly by the ADC converter, TI ADS7871. This device comes factory calibrated and compensated, so there is no need for a specific calibration for each PGA setting.

More information about how ADC calibration works, and about how it is stored in the devices can be found in the manuals (see Support page).

Here you can see a screen capture of the “calibration.py” demo:

ADC calibration for openDAQ [M]


We can identify the following controls:

  • Number of points: sets the order of the linear regression calculations used to calculate the calibration line. The more number of points, the more accurate the calibration will be.
  • Channel/Gain selector: This control selects which analog input (openDAQ-S) or gain setting (openDAQ-M) is being calibrated. 
  • Set DAC: This control allows user to set a specific value at the DAC output of openDAQ. This utility may be helpful to calibrate the analog inputs.
  • Update buttons: Returns the readed raw value in the device at the selected channel/gain setting. User must manually edit the numeric input on the left of each control, to assign an input voltage value to the readed raw value. 
  • Get Values: Once all the numeric values have been filled, this button should be used to calculate the calibration coefficients for the selected channel/gain. That coefficients will be shown on the right of the screen (slope and intercept values, for the selected channel).