LowPowerLab Forum

Hardware support => CurrentRanger => Topic started by: briangordon on June 16, 2019, 02:54:04 PM

Title: Strange readings from my CurrentRanger [solved: range overload!]
Post by: briangordon on June 16, 2019, 02:54:04 PM
Hello!

A few months ago I got my CurrentRanger, but other than installing the battery and banana terminals I hadn't done anything with it yet. Last night I finally needed it for a project so I set up a basic sanity check to see if the CurrentRanger would work. Unfortunately I'm getting some weird measurements.

I set up two different tests, and I have a different problem with each test:


I'm not really concerned about the serial output but I included test #2 anyway in case it turns out to be relevant to the diagnosis.

Any ideas, Felix? Am I just using it wrong? I'm kind of mystified here.  ???

I took a few high-resolution photos of the front and back of the PCB to show that I haven't physically damaged any components: https://imgur.com/a/gI382FL
Title: Re: Strange readings from my CurrentRanger
Post by: Felix on June 17, 2019, 09:39:32 AM
All the CRs are tested obviously, so they ship as working units.
You have read the guide and the safe use page, correct?
https://lowpowerlab.com/guide/currentranger/

In your video I see a lot of equipment, and it's not clear how it's all connected. I see a power sypply, a DMM, and a scope. You are focusing on the PSU and scope, so that's no good sign right there. I assume the bench stuff is all earth grounded. If 2 of these are connected to the CR, it's game over.
The floating DMM is no problem at all since it's not earth grounded and hence no ground loops created through the CR.
If I see what I think I see, your PSU is feeding a bunch of current through the CR, into the scope's GND/probe. The probe might even get warm/hot. The CR can also get warm/hot or even smoke if you put enough current through it.

If at any time they are subjected to common earth ground between any of the input/output/USB/headers then it can and probably will be damaged. I have seen this a few times.
I try to include as much warning against this as I can (label, guide, emails, forum, etc).
Then from that point this type of thing will happen.
The SAMD can completely burn (depending how much current you short through it), or actually still work but act erratically, the touch pads not working anymore, or the readings be bogus.
From what I see I cannot estimate what has happened. So I can't say that's what happened. But if you do that just once and you don't realize it, it's already too late.
I am trying to find ways to make it more fail proof and limit the damage that could happen when folks might do that.
Title: Re: Strange readings from my CurrentRanger
Post by: briangordon on June 17, 2019, 05:13:18 PM
Yes, I read all of the documentation carefully, including your warning. I've been careful to only use one earth-referenced thing at a time when using the CurrentRanger, and like I said this is the first time I used it, so I'm 100% sure of this. In particular, my bench power supply doesn't produce an earth-referenced voltage, so I should be OK. To prove it, I ran a cable directly between the positive terminal and the earth terminal on my power supply, and no current flows:

(https://i.imgur.com/QFCa98R.jpg)

(This isn't just a feature of the earth terminal of my power supply; I also see no potential between the positive terminal of the power supply and the earth pin in a wall socket.)

To make my test clearer, I made a little diagram to show what I'm doing:

(https://i.imgur.com/jcFrqk8.png)

Do you have any suggestions of things I could try in order to narrow down the problem? I don't see any damage on the board. Does anything jump out at you given that 5mA on the mA scale seems to work fine but 3mA on the uV scale is wrong?  :(
Title: Re: Strange readings from my CurrentRanger
Post by: Felix on June 17, 2019, 05:20:01 PM
Ok so your PSU is completely floating WRT to Gnd? Ie is it galvanically isolated?

What if you power from a battery?
And what happens if you take the DMM out?
Then what happens if you measure the output with the DMM vs the scope?
Title: Re: Strange readings from my CurrentRanger
Post by: briangordon on June 17, 2019, 05:53:34 PM
Quote
Ok so your PSU is completely floating WRT to Gnd? Ie is it galvanically isolated?

Yes, the power supply is totally floating with respect to ground unless you go out of your way to add a wire tying the GND terminal to one of the other terminals on the front panel.

Quote
What if you power from a battery?

I put a 9V battery in series with a 5V linear regulator, in series with the Current Ranger, in series with a 1k resistor, in series with a DMM acting as an ammeter. On the output of the Current Ranger is a DMM acting as a voltmeter.

The mA scale looks good:

(https://i.imgur.com/JmczY8P.jpg) (https://i.imgur.com/JmczY8P.jpg)

The uA scale is borked:

(https://i.imgur.com/dTHUQwI.jpg) (https://i.imgur.com/dTHUQwI.jpg)

Quote
And what happens if you take the DMM out?

The same thing; I just had it in there to be as sure as possible that the current was being misreported at that exact moment.

Quote
Then what happens if you measure the output with the DMM vs the scope?

See above.

Do you check all of the ranges before sending them out, or only a subset of them? Is it even possible for one range to be broken and the others to work?  :o I can try testing the nA scale as well.
Title: Re: Strange readings from my CurrentRanger
Post by: Felix on June 18, 2019, 09:15:26 AM
I test all ranges. It's a human process, so while there is a possibility I missed something, the combination of tests I do would make that possibility very very very limited.
The only thing that would cause one range to fail would be a connection in that range's shunt path. But your photos show everything looks good and no missing components or assembly faults.
If any of the ranges would be faulty, the autoranging would also not work. And that is always the first thing I test - can the unit autorange from nA to at least 1A?

The multitude of wiring and equipment makes it a little hard to tell what's connected to what.

I wanted a simple test with the battery+CR+resistor(load) without a DMM, and instead use the DMM to read the CR output. Do not add the DMM inline with the load, that's not how you verify a reading - use the DMM at the CR output. And then the OLED should report a similar reading which is done through the SAMD21 ADC. The ADC cannot work correctly if the SAMD21 is damaged, or if the CR/opamps/circuit are damaged (in this case the CR output would also not work at all in any of the ranges).

If you believe the unit is faulty, you can return it and I will take a look and determine what is wrong.
Title: Re: Strange readings from my CurrentRanger
Post by: briangordon on June 18, 2019, 07:28:17 PM
Hmm, I don't have the OLED module; the only way I can check what the ADC is seeing is to use the Bluetooth header (that's what "test #2" was for in my original post.) I ordered a USB isolator to make that less sketchy, but it won't be here until Monday.

I'll try getting a clear photo of the setup you describe (sans OLED). I was really taking photos to give you a general idea of what I was describing in words, and to show that I'm not totally making this up; I didn't mean for you to try to trace the wires visually! :-X

Quote
Do not add the DMM inline with the load, that's not how you verify a reading - use the DMM at the CR output.

I don't think I see the harm of having a DMM in series with the CurrentRanger inputs to monitor the input current while a second DMM monitors the voltage coming out of the CurrentRanger. But I'll take it out to see if it makes a difference.

I'm going to investigate the nA range next and see how it behaves. If I can't figure out what's going on then I suppose I'll have to send it over to you.

Quote
I test all ranges. It's a human process, so while there is a possibility I missed something, the combination of tests I do would make that possibility very very very limited.

Zero offense intended; just asking. Thank you for offering to take a look. I'm super impressed with the crazy level of support and patience you offer on these forums. I'm still working with the mindset that this is either something I'm missing (i.e. user error) or some freak occurrence not representative of the usual quality of the device!
Title: Re: Strange readings from my CurrentRanger
Post by: Felix on June 19, 2019, 09:10:25 AM
You could connect the USB and log to SerialUSB() instead of the BT but you'd need to reflash the unit and calibrate it. If indeed it's damaged that would not work, or you'd have to use the #define ADC_CALIBRATE_FORCED to calibrate it with the "factory calibration values" on the label that came with the unit.

I appreciate your patience as well, and providing all the detail, everything helps to some extent.
I "know" I shipped a good CR because by doing several tests I want to ensure a good experience for the user, and avoid any dead on arrival situations. Returns and repairs are not only time consuming but also expensive, so not good for anyone.
In any case I will do whatever I can to get to the bottom of this and get you to a working unit.

The DMM has some burden voltage, that might have a role to play in the output readings.
That is why I would like you to try the simple test by attaching a battery + resistor at the input, and DMM at the output for the reading. Do that for all 3 ranges, see what your DMM reads.
For a given battery and resistor you know what you can expect. If those readings are not correct, not even close, or the readings are only good in 1 range, then the unit has some TBD fault/damage. If you get good readings, then it should be OK. Also if you put it in auto-range mode (mA + nA) then the unit should be able to range to mA when you connect your mA range load.
Title: Re: Strange readings from my CurrentRanger
Post by: briangordon on June 20, 2019, 11:54:35 PM
My thinking was that the ammeter DMM's burden voltage doesn't matter because it's in series with the load and I was only comparing the two DMMs, not calculating the expected current from the source voltage and load resistance. Nevertheless, I took it out, and got similar results:


Note that I also tested the nA range this time and it works fine. So it does look like the uA range is alone in being weird. Auto-range to the mA scale seems to work but the measurement isn't off by, like, orders of magnitude so if it's auto-ranging at the wrong levels then it wouldn't be super obvious.
Title: Re: Strange readings from my CurrentRanger
Post by: briangordon on June 21, 2019, 12:00:35 AM
Waiiit a second, if I run ~850uA through the CurrentRanger on the uA scale, I get a correct reading.

I just went back and checked the CurrentRanger specs, and it only goes up to 3300 nA/uA/mA! My only problem this whole time has been me trying to measure too much current for the uA scale.  :-[

Thanks for your help, and sorry to waste your time!
Title: Re: Strange readings from my CurrentRanger
Post by: Felix on June 21, 2019, 10:19:22 AM
OK thanks for the follow up. I should have paid more attention to the actual load :)
I will mark as solved, and leave here for reference. I may remove the thread later.