Author Topic: OLED significant digit stability  (Read 220 times)

pabigot

  • Newbie
  • *
  • Posts: 5
OLED significant digit stability
« on: July 11, 2020, 07:46:39 PM »
I received my CurrentRanger today.  Testing against the uCurrent I've been using the last couple years it provides similar results on a DMM, and the autoranging is very nice.

The OLED accuracy is surprisingly poor, though, at least with the tests I've run so far.  Reading other postings here I understand I should expect some offset and error.  At 3050 uA it bounces around between 3020-3070 so that's useful.  But at 232 uA reading on the DMM the OLED bounces between 30 uA and 400+ uA so fast it tells me nothing about the value; similarly steady 650 uA displays anywhere between 500 and 850.

That's significantly worse than I've seen in messages here.  Is this expected?  It occurred with the as-delivered firmware and with the latest UF2 image on Github.  I'd hoped to get two significant digits of accuracy at a given magnitude, but even one would be helpful.

Thanks.

pabigot

  • Newbie
  • *
  • Posts: 5
Re: OLED significant digit stability
« Reply #1 on: July 12, 2020, 09:08:13 AM »
Looks like this is influenced by https://github.com/LowPowerLab/CurrentRanger/commit/2435424e605db6e16bb1aabe8d03a8f80bdb01e8.  Switching to slow ADC sampling improves things significantly, but the slow rate 256 still bounces between 206 and 242 uA with occasional 187s showing up.  512 sample averaging may be needed in my case.

Switching to the fast ADC sampling rate causes autoranging to go into a fit (constant buzzing toggling between nA and uA.)

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6279
  • Country: us
    • LowPowerLab
Re: OLED significant digit stability
« Reply #2 on: July 13, 2020, 09:26:43 AM »
The OLED accuracy is surprisingly poor, though, at least with the tests I've run so far.  Reading other postings here I understand I should expect some offset and error.  At 3050 uA it bounces around between 3020-3070 so that's useful.  But at 232 uA reading on the DMM the OLED bounces between 30 uA and 400+ uA so fast it tells me nothing about the value; similarly steady 650 uA displays anywhere between 500 and 850.
That's not normal. The CRs are all tested and calibrated against known fixed values in each range to ensure the ADC/OLED/raw readings are valid and stable.
Noise can certainly play a role, and there can be several sources.
How exactly do you perform your testing?
I would ensure you are not connected to any earth ground in any way, ensure USB is disconnected (or run through a isolator) as this is a ground loop hazard and possible damage to the CR as explained in the guide. I would simply go somewhere where there is no possible noise pickup from mains (noisy lights and other such things) and perform a very simple standalone test (everything floating and nothing connected to earth ground in any way), with a battery and resistor for instance to give you the 200uA you're after, and a DMM at the output.

pabigot

  • Newbie
  • *
  • Posts: 5
Re: OLED significant digit stability
« Reply #3 on: July 13, 2020, 03:38:26 PM »
This was with a microcontroller system powered by LiPo; no USB or mains powered sources involved.  After plugging in a scope it does seem to be a problem with noise on the test board and the environment.  Switching to testing a battery with a resistor things are much more stable.  But since I do need to measure systems like this I'll have to tweak the code to increase the sample size.

Thanks for your help.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6279
  • Country: us
    • LowPowerLab
Re: OLED significant digit stability
« Reply #4 on: July 13, 2020, 07:34:57 PM »
Yes definitely a scope would show you the raw behavior which is at much higher bandwidth than what the CR can sample.