Post Go back to editing

Calibrating the ADC of the ADALM1000 for Voltage and Current Measurements

We are currently preparing a larger number of M1K for remote teaching our mechatronics students.


For this purpose, we have mostly received the revision D from our supplier (Farnell).
The ADC of the boards has an offset error of about +1 mV and a gain error of about 3.8%.
The DAC (SVMI, Shape: DC 5 V) has a gain error of only approx. 0.1 % - for the application in electrical engineering practical training this is "0 %".

There is something to be said against having the ADC calibrated by the students as follows:
They measure the offset error with GND as input and the gain error with the DAC activated in SVMI-Mode, Shape: DC 5 V).
They enter these two errors in the menu "Adjust Channel Gain and Offset" and calibrate the voltage measurement via the ADC.
With a 100 Ohm resistor (better 1% accuracy) you then calibrate the current measurement function of the ADC.

In the Analog Devices web pages I read that you should use external reference voltage sources for calibration. Is the procedure described here not sufficient if an overall measurement accuracy of 1 % is sufficient?

I think our students can learn a lot more about this calibration procedure than if they had state-of-the-art measuring equipment.

Parents
  • The "software" gain and offset adjustment capability was originally included back at the beginning times when the Rev D boards ( which lacked in factory calibration) for just that purpose, to "calibrate" the input measurements. It was retained because it can also provide the ability to scale the measurement results based on external voltage dividers (allowing voltages outside 0-5 to be measured).

    The problem remains that the AWG forced output voltage and current will not be accurate until an internal calibration is done.

    The user can perform a calibration procedure:

    https://wiki.analog.com/university/tools/m1k/alice/self-calibration-user-guide

    The problem is that the low level libsmu functions that read and write the on board calibration factors (when executed through Python) do not return with the board in a usable state and the power must be cycled between each operation. And then some times it still gets messed up. It is possible to use the calibration procedure in ALICE if you know about this issue and know how to do things exactly in the right order. That is why having non-EE students attempt this procedure is (was) not encouraged.

    Doug

  • Doug,

    Based on your response above to Stef, is it recommended I use Pixelpulse2 rather than Alice, to calibrate the m1k using an external precision 2.500 Vref as is described here: https://wiki.analog.com/university/tools/m1k/alice/self-calibration-user-guide (win10 Professional) -- or does this guide steps include the exact steps I can follow to prevent getting things "messed up"? 

    I'm using an AD780BNZ 2.50 external reference which measures 2.50007 VDC on my systems DMM.

    Thank you,

    Ronan

  • Pixelpulse2 has no way to adjust either the offset or slope (gain) of the voltage / current measurements and the Generator (source) outputs, voltage or current.

    Not to get too far into the weeds on how things work but the low level library functions in Libsmu "calibrate" the raw 16 bit  binary numbers into volts and amps. The calibration coefficients for each board are stored in EEPROM on the micro controller. The Rev D boards were manufactured before we had the means to measure and store the coefficients onto the boards.

    The Libsmu library (and Python bindings) have functions to read and write to these stored coefficients. The ALICE desktop uses these functions along with an external know voltage reference and the 1% (50 ohm) resistors in the hardware to measure and then store a set of calibration coefficients onto a given board. The ALICE Windows installer also includes a stand alone calibrator utility (written in Python).

    Unfortunately the steps needed to "calibrate" a board can be rather involved and if not done exactly right the board can be messed up to the point of being unusable and need to be set back to default (no calibration) settings using the smu command line utility. To do the calibration properly requires multiple power cycles of the board (essentially each time the calibration is reset or new values are written to the board). This means that the software also needs to be stopped and restarted each time as well. If this is not done right things can go very badly.

    The calibration software attempts to walk the user through these steps but it is still possible to accidentally miss or skip a step and mess up the board.

    I would recommend that you or your TAs go through the process a few times before having the students try to do it on their own boards.

    Don't know if that answered your questions or not.

    If you are asking if the AD780 is good enough or not I suggest you read the datasheet for that part and do the math.

    Doug

Reply
  • Pixelpulse2 has no way to adjust either the offset or slope (gain) of the voltage / current measurements and the Generator (source) outputs, voltage or current.

    Not to get too far into the weeds on how things work but the low level library functions in Libsmu "calibrate" the raw 16 bit  binary numbers into volts and amps. The calibration coefficients for each board are stored in EEPROM on the micro controller. The Rev D boards were manufactured before we had the means to measure and store the coefficients onto the boards.

    The Libsmu library (and Python bindings) have functions to read and write to these stored coefficients. The ALICE desktop uses these functions along with an external know voltage reference and the 1% (50 ohm) resistors in the hardware to measure and then store a set of calibration coefficients onto a given board. The ALICE Windows installer also includes a stand alone calibrator utility (written in Python).

    Unfortunately the steps needed to "calibrate" a board can be rather involved and if not done exactly right the board can be messed up to the point of being unusable and need to be set back to default (no calibration) settings using the smu command line utility. To do the calibration properly requires multiple power cycles of the board (essentially each time the calibration is reset or new values are written to the board). This means that the software also needs to be stopped and restarted each time as well. If this is not done right things can go very badly.

    The calibration software attempts to walk the user through these steps but it is still possible to accidentally miss or skip a step and mess up the board.

    I would recommend that you or your TAs go through the process a few times before having the students try to do it on their own boards.

    Don't know if that answered your questions or not.

    If you are asking if the AD780 is good enough or not I suggest you read the datasheet for that part and do the math.

    Doug

Children
  • Thanks much Doug,

    To summarize, is this document the latest/best source of the exact steps we'll need to follow (I'll do it myself first) or is there any other docs/procedures I've missed?

     https://wiki.analog.com/university/tools/m1k/alice/self-calibration-user-guide

    Rgds,

    R

  • Yes, but you need to know the calibration state of the board before you start.

    If it is a Rev D that has never been calibrated before it might be set with default calibration.

    Assuming that the board contains 0.0 for offset and 1.0 for gain for all channels then you can proceed with the process in ALICE but skip over the part where it asks if you want to reset the calibration. If you did have the program reset the board that is where you need to cycle power before proceeding.

    Given that you don't reset the board you should only need to cycle power once after it tells you that it successfully wrote the new calibration settings.

    A more fool proof but more time consuming way is to manually measure the actual input and output values (set using Pixelpulse or ALICE) and edit the cal text file.

    For example here is part of what the default settings should look like

    # Channel A, measure V
    </>
    <0.0000, 0.0000>
    <2.5000, 2.5000>
    <\>
    
    # Channel A, measure I
    </>
    <0.0000, 0.0000>
    <0.1000, 0.1000>
    <-0.1000, -0.1000>
    <\>
    
    # Channel A, source V
    </>
    <0.0000, 0.0000>
    <2.5000, 2.5000>
    <\>
    
    # Channel A, source I
    </>
    <0.0000, 0.0000>
    <0.1000, 0.1000>
    <-0.1000, -0.1000>
    <\>
    ...

    This file on GitHub is the full file:

    https://raw.githubusercontent.com/analogdevicesinc/libsmu/master/contrib/calib.txt

    The ALICE Windows installer also comes with a similar calib-default file.

    You can manually measure and edit the above file with pairs of numbers

    <expected, actual>

    Then use the smu command line utility to write the values in file to the board EEPROM

    C:\>smu
    smu: utility for managing M1K devices

    -h, --help print this help message and exit
    --version show libsmu version
    -l, --list-devices list supported devices currently attached to the system
    -p, --hotplug-devices simple session device hotplug testing
    -s, --stream-samples stream samples to stdout from a single attached device
    -d, --display-calibration display calibration data from all attached devices
    -r, --reset-calibration reset calibration data to the defaults on all attached devices
    -w, --write-calibration <cal file> write calibration data to a single attached device
    -f, --flash <firmware image> flash firmware image to a single attached device

    C:\>

    smu -w your-file.txt

    You need to make sure you cycle power on the board after writing before running either Pixelpulse2 or ALICE.

  • Perfect, thanks Doug!

    I should have mentioned previously I have the "F" version of the board.

    Thank you much for the details/options - as my systems DMM is accurate enough, I'll probably use the manual "more fool proof but more time consuming way".

    Cheers!

    RonanM

  • If you have a Rev F board why do you feel the need to calibrate it. The factory calibration is about as good as you can get in an absolute sense. that is offset and slope. The linearity i.e INL, DNL is inherent in the DAC and ADC can't be changed by calibration. The offset and gain (slope) drift a lot in an absolute sense with temperature and time.

    Doug

  • Thanks Doug,

    With this behind us, we can proceed now with our evaluation and without the need to calibrate the M1K board version "F".

    Unless I missed something, and without your help, it is not intuitively obvious there is no need to calibrate the "F" board.  I would not be surprised if I missed it in a release note.

    Regards,

    R