Author Topic: Inconsistent mA/uA readings (OLED vs raw) [explanation]  (Read 159 times)

iggarpe

  • Newbie
  • *
  • Posts: 2
Inconsistent mA/uA readings (OLED vs raw) [explanation]
« on: February 29, 2020, 06:05:17 PM »
Hi all,

I've noticed that in a particular scenario my Current Ranger reads 0.0mA and when I manually switch to uA range the reading is 1285uA, which doesn't seem consistent to me (should read ~1.3mA in the mA range).

Am I missing something?

[EDIT] now I realize I haven't specified that I was speaking of the readings on the OLED display, the multimeter output is consistent, which leads me to think it's a limitation of the microcontroller ADC maybe?

Thanks.
« Last Edit: March 01, 2020, 08:55:20 PM by Felix »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6279
  • Country: us
    • LowPowerLab
Re: Inconsistent mA/uA readings
« Reply #1 on: March 01, 2020, 08:54:21 PM »
Yes it is sort of a limitation. There is a threshold of about 1-2 ADC least significant bits that can be caused by noise and at the very low end of the ADC readings cannot be made more accurate in each of the uA/mA stages.
It can differ from SAMD21 to SAMD21 so the OLED was just defaulted to "0.0" rather than show a jumping reading of 0-1 ADC bits which correspond to 0.8mA for each bit. Ie a ADC reading of 1=0.8mA, ADC reading of 2=1.6mA etc. Could be made more accurate with a lower reference, than the full range, or with oversampling and decimation.
I am trying to improve this by writing entirely custom ADC code but that is taking some time and lots of testing and fine tuning. So hoping to have good results and release that soon.
But generally speaking if you're in that 0-2000xA reading range, then you should go in the lower range to get full resolution. And yes the raw outputs will be always accurate as you noted.