Converting the RAW values obtained by the openDAQ’s Analog-to-Digital and Digital-to-Analog converters into real voltage values is a fundamental issue for most applications.
The low-level libraries available in openDAQ repository handle these operations, reading the factory built calibration coefficients and using them to make the operations.
In this article we will explain to users how the reverse process is made: how these calibration coefficients are calculated. To illustrate this, a new example application has been released in our Python repository: “calibration.py”.
If you run the script, a graphical application will be launched. It has two tabs: one for ADC calibration, and the second one for the DAC calibration. For this article, we will refer only to this last one.
As you can see in the figure, you have some buttons and controls on the left side of the screen, which will be used to calculate the Slope and Intercept values that are displayed in the right side.
You will need a precision instrument, like a multimeter, to read the actual voltage values on the device.
Here is a list of explanation about the meaning of the different controls:
- Number of points: This control sets how many points will the software use to calculate the line interpolation, enabling the controls below to accept input values.
- Set DAC: Sets a voltage value in the DAC, without calibration correction.
- Fix: These buttons assign the actual voltage value (read with a external instrument) to the default value selected with “Set DAC” button.
- Get Values: Once enough points have been fixed to get the linear approximation, this button makes the calculations to obtain a line functions. The linear coefficients will be displayed in Slope and Intercept indicators, and they will also be stored in the openDAQ memory.
- Reset: clear all the points already fixed, to be written again.
- Check DAC: This button may be used to check if the calibration that was calculated is good enough. It sets a voltage value in the DAC but already corrected with the calibration coefficients.
The steps are basically equivalent either using openDAQ [S] or [M], with the only difference of the output voltage range.
In next entry of our blog, we will check out how ADC calibration is done.