Request for PH2.1 + ProfiCNC Power Module Help

I’m new to Pixhawk 2 and I’m setting up the ProfiCNC power module for the first time. I can calibrate the voltage easily enough, but the current is another matter.

My setup: PH2.1 with ProfiCNC power module, TBS Disco, 4S 5200mAh LiPo, Aikon 4-in-1 ESC, Firmware: APM Copter V3.5.3, MP version: 1.3.50.3 beta.

Unrelated hardware: Runcam Eagle, MinimOSD, ImmersionRC 600mW VTX, Here GNSS, Dragonlink MicroRX.

I’ve tried selecting the ProfiCNC HV Power Module in MP. It consistently reads 1-2 Amps low, across the range of 1-20 Amps. I’ve tried selecting “Other” for sensor type. I can pick a current set-point and get an accurate current reading at that point, but nowhere else. It seems to me that my use-case is not uncommon. I’m not sure why I’m having difficulty with this.

I’ve also noticed that only the motor current draw shows up in the calculated current. With PH1 and the old 3DR power module, I would see a draw around 1.2 Amp, sitting on the bench, with all on-board electronics powered and running. Does the ProfiCNC power module regulator connect to battery power before or after the current-sense resistor?

I’m also having a hard time finding self-help information about this power module. Is it open-source, or has the project changed direction? If I could find a schematic and BOM for the power module I could probably figure out the voltage-current multiplier and offset. Otherwise, I’m just flailing around.

If there is another way to manually calibrate this sensor, I’d love to know. I have access to a full microelectronics design verification lab, with calibrated electronic load, precision meters, 'scopes, etc.

Many thanks in advance for any information!

Chris

1 Like

I think I have a passable solution. I thought I would share, since I’m not the only person having this issue.

Getting the current sensor’s measurement to match the actual current is a matter of slope and offset. The Amp-per-Volt multiplier sets the slope. As a reference I picked 4 current points, 5A, 10A, 15A, and 20A. Plotting these values as y-coordinates, and 1-4 as x-coordinates, it gives a nice round slope of 5. With a programmable load set to each of these points, I recorded APM’s calculated current. A linear regression on the calculated current readings gave me a slope of 5.75.

I calculated a new Amp-per-Volt multiplier this way: New APV = Current APV in MP * (Reference Slope / Actual Slope).

In my case this was 41.9*(5/5.75)=36.43. This got me within 100mA. I was able to fine-tune the accuracy to around +/-25mA by trial and error.

At this point all current calculations were about 2.4A low. Trial and error adjustment of the current offset again got me within about +/-25mA. In my case the offset was -90mV.

The current calculation is still way off at the bottom end. I would expect it to be somewhat inaccurate when the IR drop across the current-sense resistor is only a few mV. This falls below the input offset voltage of many common op-amps and is well into the noise floor of electrical systems like a multirotor. Still, the old 3DR power module performed a lot better at the bottom end.

I realize that most people do not have access to the tools that I do, and may not be able to use this calibration method. But I present it here anyway, in case someone can benefit from it.

There is another method that I found, that might be more practical for some. It is written for the 3DR power module, but I expect that it would work for the ProfiCNC brick as well. https://www.rcgroups.com/forums/showthread.php?2279282-Calibrating-the-APM-Power-Current

The high error band in the lower end of the current measurements is a side effect of making the thermal system in the mini power module stable. Anything below 7A will have >5% error due to a number of factors within the analog circuit and the ADC circuit.

Hi Apache405,

Thank you for the information. Do you know if any hardware design documents are available to the public? I’d like to understand this power module better.

Cheers,

Chris