Author Topic: DP821A calibration  (Read 500 times)

0 Members and 1 Guest are viewing this topic.

Online taydin

  • Frequent Contributor
  • **
  • Posts: 495
  • Country: tr
DP821A calibration
« on: December 22, 2019, 07:48:03 pm »
My DP821A stopped working exactly one week after the warranty has expired (now that's what I call a smart power supply  ;D ) It was getting stuck during boot, with a completely black screen.

I investigated it and the problem came out to be the main ARM controller had a BGA issue. While trying to desolder the BGA, I overheated the board and once the ARM was off the board, there were multiple traces damaged. So, I ordered a replacement digital board and installed it. The boot problem went away, but the power supply was completely out of calibration. I adjust the voltage to 8V, what comes out is 8.26V. Current measurement was also off by several hundred milliamps. I could have sent the unit back for calibration, but that would have taken a very long time (there are no places that can do that here, it would have to go to Germany and come back, with huge shipping expensese).
Real programmers use machine code!

My hobby projects http://mekatronik.org/forum
 

Online taydin

  • Frequent Contributor
  • **
  • Posts: 495
  • Country: tr
Re: DP821A calibration
« Reply #1 on: December 22, 2019, 07:53:05 pm »
So I researched DP800 calibration on the net. Rigol has a document that explains DP800 calibration, but it is based on the GUI of the unit, and it is EXTREMELY BUGGY and very hard to use. There are dozens calibration values to be entered and it would take foverer to get it done using the GUI. And there wouldn't be any guarantee that everything was entered correctly.

So I continued researching and came across a fellow EEVBlog member that has a calibration script for the DP832, using the SCPI protocol. This was very helpful for me. But there was one issue. The SCPI calibration document stated that it is important to do the calibration at specific, fixed voltages and currents. The script contained the values for the DP832, but I didn't know what those voltages and currents are for the DP821A. I tried to look them up for the GUI of the unit, but it is completely hopeless. It had a table that went up to 32V for the 8V output and to 8V for the 60V output  :D The current table was also completely off in terms of the outputs capabilities.
Real programmers use machine code!

My hobby projects http://mekatronik.org/forum
 

Online taydin

  • Frequent Contributor
  • **
  • Posts: 495
  • Country: tr
Re: DP821A calibration
« Reply #2 on: December 22, 2019, 07:58:09 pm »
So I continued research. Somebody had posted a program that can descrampe the firmware of the DP800 power supplies. I did that for the version that is installed on this card, and I tried to find a SCPI command that will give me the table of the calibration voltages and currents (the card has version 1.16). I couldn't find any such command.

But I found evidence that suggests that there is a 80 entry table for both current and voltage calibration constants. It seemed like the firmware maintain a table for arbitrary voltage/current reference values and their corresponding REAL values. And when a measurement is made (ADC) or when something is generated (DAC), it does some kind of lookup from this table to figure out what to use.

So I went with this theory and came up with a completely arbitrary list of calibration values, for both voltage and current. Here are those tables. One is for the voltage, starting from 0.01V and going up to 69V. The current table starts from 0.001A and goes up to 10.49A

Code: [Select]
VPOINTS=(
    0.0
    0.01
    0.03
    0.1
    0.2
    0.7
    1.0
    1.2
    1.7
    2.0
    2.3
    2.7
    3.0
    3.8
    4.2
    4.7
    5.1
    5.3
    5.6
    6.0
    6.5
    7.0
    8.0
    8.4
    9.0
    10.0
    11.0
    12.0
    13.0
    14.0
    15.0
    16.0
    17.0
    18.0
    19.0
    20.0
    21.0
    22.0
    23.0
    24.0
    25.0
    26.0
    27.0
    28.0
    29.0
    30.0
    31.0
    32.0
    33.0
    34.0
    35.0
    36.0
    37.0
    38.0
    39.0
    40.0
    41.0
    42.0
    43.0
    44.0
    45.0
    46.0
    47.0
    48.0
    49.0
    50.0
    51.0
    52.0
    53.0
    54.0
    55.0
    56.0
    57.0
    58.0
    59.0
    60.0
    61.0
    62.0
    63.0
    64.0
    65.0
    66.0
    67.0
    68.0
    69.0
)

CPOINTS=(
    0.0
    0.001
    0.002
    0.005
    0.01
    0.02
    0.03
    0.04
    0.05
    0.06
    0.07
    0.08
    0.09
    0.1
    0.2
    0.3
    0.4
    0.5
    0.6
    0.7
    0.8
    0.9
    1.0
    1.05
    1.2
    1.5
    1.7
    2.0
    2.2
    2.5
    3.0
    4.0
    5.0
    6.0
    7.0
    8.0
    9.0
    10.0
    10.49
)
Real programmers use machine code!

My hobby projects http://mekatronik.org/forum
 
The following users thanked this post: thm_w

Online taydin

  • Frequent Contributor
  • **
  • Posts: 495
  • Country: tr
Re: DP821A calibration
« Reply #3 on: December 22, 2019, 07:59:32 pm »
I also prepared the following bash script to implement the calibration process for both 60V/1A output and the 8V/10A output.

Code: [Select]
#!/bin/bash

VPOINTS=(
    0.0
    0.01
    0.03
    0.1
    0.2
    0.7
    1.0
    1.2
    1.7
    2.0
    2.3
    2.7
    3.0
    3.8
    4.2
    4.7
    5.1
    5.3
    5.6
    6.0
    6.5
    7.0
    8.0
    8.4
    9.0
    10.0
    11.0
    12.0
    13.0
    14.0
    15.0
    16.0
    17.0
    18.0
    19.0
    20.0
    21.0
    22.0
    23.0
    24.0
    25.0
    26.0
    27.0
    28.0
    29.0
    30.0
    31.0
    32.0
    33.0
    34.0
    35.0
    36.0
    37.0
    38.0
    39.0
    40.0
    41.0
    42.0
    43.0
    44.0
    45.0
    46.0
    47.0
    48.0
    49.0
    50.0
    51.0
    52.0
    53.0
    54.0
    55.0
    56.0
    57.0
    58.0
    59.0
    60.0
    61.0
    62.0
    63.0
    64.0
    65.0
    66.0
    67.0
    68.0
    69.0
)

CPOINTS=(
    0.0
    0.001
    0.002
    0.005
    0.01
    0.02
    0.03
    0.04
    0.05
    0.06
    0.07
    0.08
    0.09
    0.1
    0.2
    0.3
    0.4
    0.5
    0.6
    0.7
    0.8
    0.9
    1.0
    1.05
    1.2
    1.5
    1.7
    2.0
    2.2
    2.5
    3.0
    4.0
    5.0
    6.0
    7.0
    8.0
    9.0
    10.0
    10.49
)

get_device_ip ()
{
    local DEVICE="$1"
    local IPADDR=`lxi discover | grep "$DEVICE" | grep -oe '[0-9\.]*$'`
    echo $IPADDR
}

get_dmm_ip ()
{
    get_device_ip DM3068
}

get_ps_ip ()
{
    get_device_ip DP821A
}

DMM_IP=10.2.1.150
PS_IP=10.2.1.152

write_ps_cmd ()
{
    local CMD="$1"
    lxi scpi -a $PS_IP "$CMD"
}

write_dmm_cmd ()
{
    local CMD="$1"
    lxi scpi -t 10 -a $DMM_IP "$CMD"
}

read_dmm_vdc ()
{
    V_SCPI=`write_dmm_cmd ":meas:volt:dc?"`
    printf "%f\n" $V_SCPI
}

read_dmm_cdc ()
{
    write_dmm_cmd ":meas:curr:dc max"
    V_SCPI=`write_dmm_cmd ":meas:curr:dc?"`
    printf "%f\n" $V_SCPI
}

read_ref ()
{
    local POINT="$1"

    if [ "$MODE" = "V" ]; then
        REF=${VPOINTS[$POINT]}
    elif [ "$MODE" = "C" ]; then
        REF=${CPOINTS[$POINT]}
    else
        REF="somejunk"
    fi

    echo $REF
}

read_value ()
{
    if [ "$MODE" = "V" ]; then
        VALUE=`read_dmm_vdc`
    elif [ "$MODE" = "C" ]; then
        VALUE=`read_dmm_cdc`
    else
        VALUE="somejunk"
    fi

    echo $VALUE
}

ps_set_sense ()
{
    if [ "$SENSE" = "on" ]; then
        write_ps_cmd ":output:sense $CH,on"
    elif [ "$SENSE" = "off" ]; then
        write_ps_cmd ":output:sense $CH,off"
    fi
}

calibration_loop ()
{
    echo "CH = $CH, MODE = $MODE, DEV = $DEV, SENSE = $SENSE"

    ps_set_sense

    write_ps_cmd ":output $CH,on"

    for (( POINT = 0; POINT < $NUMPOINTS; POINT++ )); do
        local REF=`read_ref $POINT`
        echo "POINT = $POINT, REF = $REF"
        write_ps_cmd ":calibration:set $CH,$MODE,$POINT,$REF,$DEV"
        sleep 2
        local VALUE=`read_value`
        echo "VALUE = $VALUE"
        write_ps_cmd ":calibration:meas $CH,$MODE,$POINT,$VALUE,$DEV"
    done

    write_ps_cmd ":output $CH,off"
}

calibrate_ch1 ()
{
    local CH="CH1"

    write_ps_cmd ":calibration:start 11111,$CH"

    if [ -n "$VOLTAGE" ]; then
        local MODE="V"
        write_ps_cmd ":calibration:clear $CH,$MODE"

        local SENSE="none"
        local NUMPOINTS=79

        local DEV="1"
        calibration_loop

        local DEV="0"
        calibration_loop
    fi

    echo "SWITCH DMM to Current Measurement, press enter to continue ..."
    read

    if [ -n "$CURRENT" ]; then

        MODE="C"
        write_ps_cmd ":calibration:clear $CH,$MODE"

        local SENSE="none"
        local NUMPOINTS=24

        local DEV="1"
        calibration_loop

        local DEV="0"
        calibration_loop
    fi

    write_ps_cmd ":calibration:end `date +%d/%m/%Y`,$CH"
}

calibrate_ch2 ()
{
    local CH="CH2"

    write_ps_cmd ":calibration:start 11111,$CH"

    if [ -n "$VOLTAGE" ]; then
        local MODE="V"
        write_ps_cmd ":calibration:clear $CH,$MODE"

        local SENSE="off"
        local NUMPOINTS=24

        local DEV="1"
        calibration_loop

        local DEV="0"
        calibration_loop
    fi

    echo "SWITCH DMM to Current Measurement, press enter to continue ..."
    read

    if [ -n "$CURRENT" ]; then

        MODE="C"
        write_ps_cmd ":calibration:clear $CH,$MODE"

        local SENSE="on"
        local NUMPOINTS=39

        local DEV="1"
        calibration_loop

        local DEV="0"
        calibration_loop
    fi

    write_ps_cmd ":calibration:end `date +%d/%m/%Y`,$CH"
}

# put device into a known state
write_ps_cmd ":*RST"

VOLTAGE=1
CURRENT=1

calibrate_ch1

echo "SWITCH power supply output, press enter to continue ..."
read

calibrate_ch2
Real programmers use machine code!

My hobby projects http://mekatronik.org/forum
 

Online taydin

  • Frequent Contributor
  • **
  • Posts: 495
  • Country: tr
Re: DP821A calibration
« Reply #4 on: December 22, 2019, 08:01:40 pm »
Once this calibration process completed, I verified both outputs and both the generated voltage and the voltage that the DP821A reads back and displays are spot on to within a millivolt and a milliamp  :D So hopefully this will help somebody to do the same calibration.
Real programmers use machine code!

My hobby projects http://mekatronik.org/forum
 

Online taydin

  • Frequent Contributor
  • **
  • Posts: 495
  • Country: tr
Re: DP821A calibration
« Reply #5 on: December 22, 2019, 08:03:33 pm »
But there is one thing that I wasn't able to calibrate, and that's the SENSE support in the 8V/10A output. There is no documentation on how to do that, and when I tried doing that using the GUI, it's completely hopeless. And I don't know of any SCPI command that would be related to this. If anybody knows how to calibrate the SENSE support, please let me know and I can verify that the procedure works.
Real programmers use machine code!

My hobby projects http://mekatronik.org/forum
 

Offline Gandalf_Sr

  • Super Contributor
  • ***
  • Posts: 1126
  • Country: us
Re: DP821A calibration
« Reply #6 on: December 23, 2019, 11:10:10 am »
I think it's possible to adapt your script to a DP832A.  Please can you give more details on what software you used to run the script and how you measured the voltages.  Perhaps a view of what the GUI looks like as you run the script?

Looking at your script, I think it may run in a Windows Powershell (Command prompt) window?

[EDIT1] You say there's a user that's already done this for a DP832/A, please can you provide a link?

[EDIT2] I think the thread is here but my question is how to get set up with the PC so that I can run your script.  I think it should be possible to modify so that the value is set and then my Keysight 34461A is made to read the value but how to set up the current? Is that done using current limit?
« Last Edit: December 23, 2019, 11:22:36 am by Gandalf_Sr »
I'd like to make the world a better place but they won't give me the source code
 

Offline tv84

  • Super Contributor
  • ***
  • Posts: 1033
  • Country: pt
Re: DP821A calibration
« Reply #7 on: December 23, 2019, 11:25:34 am »
But there is one thing that I wasn't able to calibrate, and that's the SENSE support in the 8V/10A output.

These are the commands related to Calibration:

013E - SET              SET         :CALibration:SET
013F - MEAS             MEAS        :CALibration:MEAS
0140 - STORe            STOR        :CALibration:STORe
0141 - CLEar            CLE         :CALibration:CLEar
0142 - STARt            STAR        :CALibration:STARt
0143 - END              END         :CALibration:END
0144 - SENSE            SENSE       :CALibration:SENSE
 

Offline genghisnico13

  • Regular Contributor
  • *
  • Posts: 53
  • Country: cl
Re: DP821A calibration
« Reply #8 on: December 23, 2019, 11:28:04 am »
Please can you give more details on what software you used to run the script.....

Looking at your script, I think it may run in a Windows Powershell (Command prompt) window?
it's a Bash script, the Linux "[much better] equivalent" of Powershell (don't kill me for even comparing them).
Now with the Linux subsystem on Windows 10 you should be able to run it without problems, I can't help you with the how since I haven't used Windows in a couple of years.
 

Offline TurboTom

  • Frequent Contributor
  • **
  • Posts: 704
  • Country: de
Re: DP821A calibration
« Reply #9 on: December 23, 2019, 12:15:30 pm »
But there is one thing that I wasn't able to calibrate, and that's the SENSE support in the 8V/10A output. There is no documentation on how to do that, and when I tried doing that using the GUI, it's completely hopeless. And I don't know of any SCPI command that would be related to this. If anybody knows how to calibrate the SENSE support, please let me know and I can verify that the procedure works.

I don't think that a separate calibration of the sense function is necessary at all. The sense input is hardware-wise basically the same as the feedback input that's used during "normal" (i.e. not using the sense terminals) operation. Since the calibration takes place without any (considerable) output current flowing, there isn't any difference between the situation during the calibration and a possible later operation using the sense lines that eliminates the voltage drop across the power connection lines.

Cheers,
Thomas
 

Offline Gandalf_Sr

  • Super Contributor
  • ***
  • Posts: 1126
  • Country: us
Re: DP821A calibration
« Reply #10 on: December 23, 2019, 12:18:16 pm »
Please can you give more details on what software you used to run the script.....

Looking at your script, I think it may run in a Windows Powershell (Command prompt) window?
it's a Bash script, the Linux "[much better] equivalent" of Powershell (don't kill me for even comparing them).
Now with the Linux subsystem on Windows 10 you should be able to run it without problems, I can't help you with the how since I haven't used Windows in a couple of years.
Thanks. I do have a small laptop (pathetic Atom processor) that runs Ubuntu; what would be useful is step-by-step instructions on how to run the script on that laptop.
I'd like to make the world a better place but they won't give me the source code
 

Offline Gandalf_Sr

  • Super Contributor
  • ***
  • Posts: 1126
  • Country: us
Re: DP821A calibration
« Reply #11 on: December 23, 2019, 01:19:06 pm »
Please can you give more details on what software you used to run the script.....

Looking at your script, I think it may run in a Windows Powershell (Command prompt) window?
it's a Bash script, the Linux "[much better] equivalent" of Powershell (don't kill me for even comparing them).
Now with the Linux subsystem on Windows 10 you should be able to run it without problems, I can't help you with the how since I haven't used Windows in a couple of years.
I've just researched installing the Linux subsystem on Windows 10, it looks pretty straightforward.  I've also been reading up on creating and running bash scripts, that looks pretty easy too.  I'll play with it over the holiday and report back.
I'd like to make the world a better place but they won't give me the source code
 

Online taydin

  • Frequent Contributor
  • **
  • Posts: 495
  • Country: tr
Re: DP821A calibration
« Reply #12 on: December 23, 2019, 03:40:37 pm »
I think it's possible to adapt your script to a DP832A.  Please can you give more details on what software you used to run the script and how you measured the voltages.  Perhaps a view of what the GUI looks like as you run the script?

Looking at your script, I think it may run in a Windows Powershell (Command prompt) window?

[EDIT1] You say there's a user that's already done this for a DP832/A, please can you provide a link?

[EDIT2] I think the thread is here but my question is how to get set up with the PC so that I can run your script.  I think it should be possible to modify so that the value is set and then my Keysight 34461A is made to read the value but how to set up the current? Is that done using current limit?

My setup was a DP821A and a DM3068 on the same LAN. I have used https://lxi-tools.github.io/ to send and receive SCPI messages. I haven't used powershell, so I'm not sure how compatible it is. But I'm suspecting it might only be targeting SH compatibility. This script requires BASH shell, as it uses a few things that are bash specific.

Basically, I use :CALI:SET to let the DP821A output a certain voltage/current, and then I read the measured voltage/current from the DM3068, and then I use CALI:MEAS to give this measured value to the DP821A.

The thread I read (and which provided the firmware descrambler) is here:

https://www.eevblog.com/forum/testgear/need-help-hacking-dp832-for-multicolour-option/
Real programmers use machine code!

My hobby projects http://mekatronik.org/forum
 
The following users thanked this post: Gandalf_Sr

Online taydin

  • Frequent Contributor
  • **
  • Posts: 495
  • Country: tr
Re: DP821A calibration
« Reply #13 on: December 23, 2019, 03:42:27 pm »
These are the commands related to Calibration:

013E - SET              SET         :CALibration:SET
013F - MEAS             MEAS        :CALibration:MEAS
0140 - STORe            STOR        :CALibration:STORe
0141 - CLEar            CLE         :CALibration:CLEar
0142 - STARt            STAR        :CALibration:STARt
0143 - END              END         :CALibration:END
0144 - SENSE            SENSE       :CALibration:SENSE


Thanks a lot for this. Good starting point to experiment with the sense. The only ones that I don't know about are the STORE and the SENSE.
Real programmers use machine code!

My hobby projects http://mekatronik.org/forum
 

Online taydin

  • Frequent Contributor
  • **
  • Posts: 495
  • Country: tr
Re: DP821A calibration
« Reply #14 on: December 23, 2019, 03:46:09 pm »
I don't think that a separate calibration of the sense function is necessary at all. The sense input is hardware-wise basically the same as the feedback input that's used during "normal" (i.e. not using the sense terminals) operation. Since the calibration takes place without any (considerable) output current flowing, there isn't any difference between the situation during the calibration and a possible later operation using the sense lines that eliminates the voltage drop across the power connection lines.

When I read the Rigol "official" calibration document (which explains how to use the GUI to do the calibration), it says that to calibrate CH2, just short the SENSE lines to the OUTPUT lines. Just like you say, that should take care of both the SENSE case and NOSENSE case. I did this during calibration, but it didn't work as expected.

Basically when calibrated this way, CH2 works fine WITH SENSE ONLY. Without the sense wires, the calibration is quite a bit off. But I will try again.
Real programmers use machine code!

My hobby projects http://mekatronik.org/forum
 

Online taydin

  • Frequent Contributor
  • **
  • Posts: 495
  • Country: tr
Re: DP821A calibration
« Reply #15 on: December 23, 2019, 03:49:09 pm »
In the GUI, there are two additional calibration menus that are not mentioned in the documentation. One is ADC Cal, and the other is Sense Cal.

I have run ADC cal, and it just waits for a while and then fails (the unit is working, so I'm assuming this is a software bug).

I have run SEnse cal, and there is only one test point, which outputs 8.4V. It isn't certain how this test is intended to run.
Real programmers use machine code!

My hobby projects http://mekatronik.org/forum
 

Online taydin

  • Frequent Contributor
  • **
  • Posts: 495
  • Country: tr
Re: DP821A calibration
« Reply #16 on: December 23, 2019, 04:11:27 pm »
I tested the sense functionality again.

DP821A is set to 8V, 10A limit. Sense is OFF and no cable is plugged into sense terminals.
DL3021 is set to draw 9A. Sense is OFF and no cable is plugged into sense terminals.

I turn on DP821A output and it outputs 8V. load draws 9A and the load sees 7.67V. Everything normal so far.

Here is the odd thing. Even though sense is OFF for both power supply and load, once I plug in sense wire to DP821 sense terminals and bring it over to the load output terminals, the voltage that the load sees changes! It increases to 7.82V. And when I enable sense on the DP821A, it absolutely has no effect at all! nothing is changed.
Real programmers use machine code!

My hobby projects http://mekatronik.org/forum
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf