PPK2 reports implausible values & modifiers - how to recalibrate?

Hello,

My PPK2 is reporting 2 zetta amperes power usage, and I found out that the "modifiers" appear really broken:

Calibrated: 0
R0: 3095044895830869060112875520.0000
R1: 0.0000
R2: 0.0000
R3: 0.0000
R4: 0.0000
GS0: 0.0000
GS1: 138.3582
GS2: 21.5994
GS3: 3.0130
GS4: 0.0876
GI0: 1.0000
GI1: 0.9614
GI2: 0.9534
GI3: 0.9415
GI4: 0.9521
O0: 0.0000
O1: -2814926129201152.0000
O2: 0.0000
O3: -2251799813685248.0000
O4: 0.0000
VDD: 3300
HW: 54350
mode: 2
S0: -0.000000009
S1: -0.000000064
S2: -0.000000512
S3: -0.000004891
S4: 0.002447326
I0: 0.000000044
I1: 0.000000364
I2: 0.000061116
I3: -0.000254856
I4: -0.007713722
UG0: 1.00
UG1: 1.00
UG2: 1.00
UG3: 1.00
UG4: 1.00
IA: 58
END

I have attempted to re-flash the ppk2 firmware, but that had no effect.

This affects both measurement modes, but in source mode the correct voltage is still output.

Intercepting the modifiers before they are parsed and replacing them with some from a different PPK2 again results in plausible measurements.

This may be related to accidentally writing a binary image intended for a different device onto the PPK2 serial port, assuming there are serial commands to configure those values which do not verify plausibility and do not have a checksum.

Is it possible to re-calibrate the device, or will it have to be replaced?

Parents
  • Hi  

    Can you share what exactly you were trying to do when this calibration data was messed up on your end? It shouldn't be very easy to write/erase data on the EEPROM of the PPK2, so we would like to recreate this since it starts to seem like a common occurrence... 

    As for your calibration data, for the newer devices, the format of calibration data has changed, so they're not as easy to parse anymore I'm afraid, but they should be usable:

    GI0..GI4: [1.0, 0.9752, 0.9671, 0.9599, 0.9632]
    GS0..GS4: [0.0, 90.4022, 15.3252, 2.0925, 0.0653]
    I0..I4: [-1.16e-07, -2.01e-06, 2.2785e-05, -0.000381794, -0.010909314]
    S0..S4: [5.7e-08, 6.36e-07, 7.033e-06, 6.5243e-05, 0.003364293]
    R0..R4: [1000.9413, 101.2992, 10.1933, 0.9589, 0.0563]
    IA: 58.0

    Best regards,

    Simon

  • Hello  ,

    A colleague of mine started the NrfConnect app and open the Bluetooth Low Energy app (first on the list)  instead of PowerProfiler.
    After he clicked on the Connect Device and choose the PPK2 board, the software informed him that he Connected the PPK2 and that he needs to reprogram it, and he clicked yes.

    Then he realized that he used the wrong app, chose PowerProfile, and there again reprogrammed the device. The device was working, but if we compare its readings with our other equipment in the office there is a constant error in measurements. That is when I started thinking of Calibration coefficients. 

    I successfully updated EEPROM values, using the app that Fabio provided, but I still have differences in measurements.
    You shared GI, GS, I, S, and R coefficients, what is with O and UG?
    And also do I need to write IA, is it important for measurement, because we don't know its offset in EEPROM?

    Thank you for sharing coefficients and best regards.


  • Sorry, I didn't add the O and UG parameters. UG is always 1 for all PPKs. O0..O4:  [98.9353, 63.857247, 56.00798, 41.98090, 75.06288]. I don't have details on how to flash this onto the EEPROM I'm afraid.

    As far as I know the BLE app for nRF Connect should not access the EEPROM on the PPK2 when flashed, so this seems very strange. Do you have the incorrect calibration data so we could compare them on our end, as those would be interesting to see as well if you don't mind.

    Best regards,

    Simon

  • Hello Simon,

    I appreciate your help. I had issues with the current readings on PPk2 and our other amper meters, and that is when I started to think that I have problems with the calibration data. Before I wrote anything to EEPROM I made a backup of the readings:

    Reading 256 bytes from EEPROM, offset 0...
    00000000: 3f 3c 7a 44 36 99 ca 42  f5 17 23 41 06 79 75 3f |?<zD6..B ..#A.yu?|
    00000010: 6f 73 66 3d 54 ce 4a c4  ec cd b4 42 11 34 75 41 |osf=T.J. ...B.4uA|
    00000020: c9 ea 05 40 0c b0 85 3d  e6 de c5 42 d2 6d 7f 42 |...@...= ...B.m.B|
    00000030: 2c 08 60 42 72 ec 27 42  33 20 96 42 89 53 73 33 |,.`Br.'B 3 .B.Ss3|
    00000040: 4e 9e 2a 35 1f ff eb 36  39 d3 88 38 77 7b 5c 3b |N.*5...6 9..8w{\;|
    00000050: ab 36 f8 b3 e8 e8 06 b6  6e 23 bf 37 8f 2b c8 b9 |.6...... n#.7.+..|
    00000060: fb bc 32 bc d1 0d 83 3f  65 a8 79 3f 02 94 77 3f |..2....? e.y?..w?|
    00000070: 9b bc 75 3f 12 97 76 3f  e4 0c ff ff 07 ff ff ff |..u?..v? ........|
    00000080: 00 00 80 3f 00 00 80 3f  00 00 80 3f 00 00 80 3f |...?...? ...?...?|
    00000090: 00 00 80 3f ff ff ff ff  ff ff ff ff ff ff ff ff |...?.... ........|
    000000A0: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff |........ ........|
    000000B0: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff |........ ........|
    000000C0: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff |........ ........|
    000000D0: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff |........ ........|
    000000E0: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff |........ ........|
    000000F0: ff ff ff ff ff ff ff ff  ff ff ff 01 00 ff ff ff |........ ........|


    And this is after I wrote the values you shared, using Fabio's example app:

    Reading 256 bytes from EEPROM, offset 0...
    00000000: 3e 3c 7a 44 31 99 ca 42  c2 17 23 41 78 7a 75 3f |><zD1..B ..#Axzu?|
    00000010: d4 9a 66 3d 00 00 00 00  ed cd b4 42 05 34 75 41 |..f=.... ...B.4uA|
    00000020: 85 eb 05 40 02 bc 85 3d  e0 de c5 42 d2 6d 7f 42 |...@...= ...B.m.B|
    00000030: 2c 08 60 42 71 ec 27 42  32 20 96 42 2a d0 74 33 |,.`Bq.'B 2 .B*.t3|
    00000040: 96 b9 2a 35 03 fd eb 36  12 d3 88 38 78 7b 5c 3b |..*5...6 ...8x{\;|
    00000050: ad 1b f9 b3 89 e3 06 b6  6a 22 bf 37 86 2b c8 b9 |........ j".7.+..|
    00000060: fb bc 32 bc 00 00 80 3f  b5 a6 79 3f de 93 77 3f |..2....? ..y?..w?|
    00000070: 02 bc 75 3f 46 94 76 3f  e4 0c ff ff 07 ff ff ff |..u?F.v? ........|
    00000080: 00 00 80 3f 00 00 80 3f  00 00 80 3f 00 00 80 3f |...?...? ...?...?|
    00000090: 00 00 80 3f ff ff ff ff  ff ff ff ff ff ff ff ff |...?.... ........|
    000000A0: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff |........ ........|
    000000B0: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff |........ ........|
    000000C0: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff |........ ........|
    000000D0: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff |........ ........|
    000000E0: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff |........ ........|
    000000F0: ff ff ff ff ff ff ff ff  ff ff ff 02 00 ff ff ff |........ ........|

    They are almost the same but have some different bytes. 
    The problem is that I didn't manage to fix the readings. For example, I'm using a battery charger with the current set to 10mA, one amper meter shows a current of 9.95mA, and PPK2 says 9.60mA.

Reply Children
No Data
Related