Hello,
I am experiencing significant discrepancies when measuring current with a PPK2 in Ampere Meter mode using a Python API (ppk2_api) compared to the official Power Profiler app.
Hardware Setup:
-
Mode: Ampere Meter
-
Power Source: External 5V source connected to VIN and GND.
-
DUT: A sensor connected to VOUT (and sharing the common GND).
-
The toggle "Enable power output" is set to ON.
Issue 1: Massive Auto-ranging Spikes in Raw Data When the DUT's current consumption varies dynamically (e.g., between 100 µA and 800 µA), the raw data from the Python API shows massive, saturated spikes exactly at 1,234,073 µA (~1.23 A), which seems to be the full-scale value of the highest measurement range.
-
These saturated samples account for up to 14% of the collected data during dynamic consumption.
-
The official Power Profiler app does not show these 1.23 A spikes. It appears the official app applies a specific spike-filtering or auto-range artifact mitigation algorithm.
-
Question 1: What is the specific filtering logic or algorithm the official app uses to discard or smooth out these hardware range-switching artifacts?
Issue 2: Baseline Measurement Discrepancy To work around Issue 1 in Python, I implemented a software filter to discard any sample above 10 mA. However, after filtering out the 1.23 A anomalies, the calculated average current in Python is still significantly lower than what the official app reports.
-
Official Power Profiler App average: ~270 µA
-
Python API average (filtered): ~20 µA to 70 µA
-
Question 2: Why is there such a large baseline discrepancy between the raw decoded data and the app's display? Are there undocumented calibration offsets, internal leakage currents (e.g., internal voltage dividers draining ~40 µA), or specific conversion modifiers that the official app applies but aren't handled by default raw data decoding?
Could you point me towards the correct approach to parse the raw USB bulk data to match the Power Profiler app's accuracy and filtering?
Thank you.