Calibration steps after firmware upgrade

Started by wnagele, March 01, 2021, 05:33:54 AM

wnagele

I've just flashed to the latest 1.1.0 firmware release and was configuring the calibration values from the sheet/sticker provided. My sticker has values for Bias, Gain and LDO. While the USB serial interface allows settings for Offset, Gain and LDO. Does Offset equal to Bias?

I have entered the 15 listed for Bias on my calibration sticker. This creates consistent noise across all ranges (nA, uA and mA) when no load is connected. So I am assuming this is not the right calibration for the offset. Instead I have adjusted it to match as close to 0 as possible when no load is connected (setting -1 seems to work well). Is this the right approach? Is Bias not needed to be configured in newer releases anymore?

Felix

Sounds like an earlier unit (R1?), the newer ones come with the calibration written on the screen. Usually because of differential sampling the offset is always 0 now. So the old calibration values are no longer valid for 1.1.0.
Hence I would recommend going back to the original firmware or to 1.0 and set offset to 0. Gain is set by adjusting with a known load (ex 100mA) and matching the ADC readings to the raw output.
Bias has nothing to do with calibration, it is just setting the amplifier reference to ~half of VCC so you can measure AC currents. Only use it if you have to and know what you're after, otherwise keep it off.

wnagele

Thanks for the reply.

It's a R2 unit according to the sticker on the back.

Why should I downgrade to 1.0 - I can set the offset to 0 on the 1.1.0 release, no?

For the gain adjustment - I will follow your suggestion with the 100mA load.

Felix

R2 had several revisions, with some minor differences in hardware. If you want to experiment with other firmware it's up to you, the historical changes are seen on github.
The different versions are not upgrades or downgrades, they are a progression.

wnagele

Not sure I get what you are saying. So firmware 1.1.0 is not actually compatible with R2 hardware? Is there an overview what firmware is compatible with what hardware then?

Felix

If you have a R2 then the firmware for that would be the CurrentRanger_R1.ino
The R3 firmware is really for R3.

Does your unit have the UF2 bootloader?

wnagele

No, no U2F bootloader on it but I can flash it with Arduino IDE. From what I can see I'll have to make a bunch of modifications to program in the calibration values with the old R1 release since it cannot be easily configured. Would have really hoped to use the R3 release on my unit. Anyway, I was mainly after the serial output which I can make work in the R1 release too.

Maybe you want to update the firmware upgrade docs to make note on which hardware revision is compatible with which firmware? It wasn't clear to me reading through it. https://lowpowerlab.com/guide/currentranger/programming-firmware-updates/

Felix

I added R2 firmware which ran on units before March 2020.

wnagele

Thanks, I've flashed to that now and adjusted the calibration according to the sticker on my unit.