Author Topic: Auto Mode - Is there a way to know in which range the CR is?  (Read 1049 times)

chagai

  • NewMember
  • *
  • Posts: 3
Auto Mode - Is there a way to know in which range the CR is?
« on: April 19, 2020, 09:11:58 AM »
Hi,
Usually I use the current ranger with the OLED display and with a scope (probing the output at the TPs marked scope).
I'm interested in the current waveform and not only the average (DVM) value.

The CR works great. I also compared it to a high-end Keysight CX3324A (which I borrowed from a colleague) and the wave-forms look very similar - well done!
Please check the attached figure/

One question I do have -
When reviewing the scope output, how can I know which shunt resistor is used?
for example -  from looking at the attached signal, how can i know that 1V means 1mA and not a 1uA?

It is most important of course when the signal changes quickly and can move from one scale (shunt resistor) to the other rapidly.


thanks,
Chagai




Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6605
  • Country: us
    • LowPowerLab
Re: Auto Mode - Is there a way to know in which range the CR is?
« Reply #1 on: April 20, 2020, 12:48:21 PM »
Hi Chagai!

Cool, nice to know CR is in spec with yet another high end $50K machine  ;)

To detect the range, some have suggested tapping into the 3 range LEDs and reading those signals along with the CR raw waveform output.
Or it was also suggested to toggle 3 of the upper right GPIOs for this purpose. This would require adding some code in firmware to do the toggling.
However because the GND of the board is not the same as the "GND" of the waveform output, and they are not galvanically isolated in the device, I would not recommend using it, since there is the possibility of running loop current through the MCU and damage it. This is especially true when you BIAS the CR.

So, instead, I would recommend using the methods above but with external fast optoisolators. Relays would be far too slow.
MAYBE I can develop an ADD-ON for this purpose, that could plug right into the 2x6 header (if enough people ask for it).

Let me know what you think.

srihari_ue

  • NewMember
  • *
  • Posts: 5
Re: Auto Mode - Is there a way to know in which range the CR is?
« Reply #2 on: June 18, 2020, 02:06:14 AM »
Hi Felix,

This will be a great addition to the unit. I have also made some comparison of the current ranger output with a Keysight Power Analyzer N6705B instrument and the current waveforms look pretty close.

Having the ability to read what range the unit is in when using the current ranger output will actually render it closer to any advanced power supplies with auto ranged current measurement capability.

We use TI optoisolator chip ISO7221 for reading serial data and it works pretty fine without causing any ground loop issues. If the current range info is available via 3 GPIOs, we could use the same opto isolator for this.

Best Regards,

Srihari S.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6605
  • Country: us
    • LowPowerLab
Re: Auto Mode - Is there a way to know in which range the CR is?
« Reply #3 on: June 18, 2020, 10:31:06 AM »
Hi Srihari,
The possibility already exists, there is a general purpose GPIO 2x3 header next to the MA pad, including a GND and regulated 3.3v. So they are actually a SPI port but the pins can be used for any purpose, like toggling 3 of them to indicate the current range. The only missing piece is the firmware to actuate the GPIOs.

So I released a change right now to include a new 'g' option that allows this:

'g' = toggle GPIO range indication (SCK=mA,MISO=uA,MOSI=nA)

You can reflash via IDE or by drag-dropping the UF2 file ontop the old one (double tap reset button to put board in bootloader mode). Ensure you write down your calibration values before you update firmware, and re-adjust them via the USB serial (</> for LDO and -/+ for gain).

Let me know if this has been useful and solved your requirement.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6605
  • Country: us
    • LowPowerLab
Re: Auto Mode - Is there a way to know in which range the CR is?
« Reply #4 on: June 18, 2020, 02:37:11 PM »
I have just posted another unrelated update which has to do with dramatically improving switching speed by implementing raw GPIO toggling vs using digitalWrite.
More details on that are discussed in this MoteinoM0 thread.

srihari_ue

  • NewMember
  • *
  • Posts: 5
Re: Auto Mode - Is there a way to know in which range the CR is?
« Reply #5 on: June 21, 2020, 02:28:22 AM »
Hi Felix,

Thanks for your very quick update. This addition is really very helpful.

I will test this out and keep you posted

Best Regards,

Srihari S.

isaac@isaacdavenport.com

  • NewMember
  • *
  • Posts: 2
Re: Auto Mode - Is there a way to know in which range the CR is?
« Reply #6 on: December 03, 2020, 11:03:36 PM »
I asked a similar question on youtube before I knew about this forum.  I don't think Felix's suggestion of not using auto-ranging while probing the 1mV/nA,uA,mA voltage output will allow me to see enough range to look at a scope trace and see the difference between 2uA and 3uA and quickly after between 75mA and 80mA.  However, I probably can run for a time on the nA range, store the trace and then run for a time on the mA range and store the trace.  Because the current use patterns will typically have RF transmit spikes in them around 80mA and LED patterns, I can probably match up two separate runs.  However, is it safe to put 80mA through the CurrentRanger in the nA mode, assuming I don't care that the voltage output circuitry saturates in that case?

Or perhaps I can use the 'g' option firmware and an optoisolater on the GPIO? 


Isaac Davenport
I am not sure if this is the place to ask.  I just ordered a CurrentRanger.  I need to look at sleep currents at a couple uA, uController wake currents at a couple mA, LED currents of a dozen mA in tens of ms pulses, and radio transmit current draws of 80 mA in tens of uS pulses of current draw.  As these overlay on one another and the CurrentRanger autoranges, how can I know if what I have on the oscilloscope is show a mV per nA or uA or mA?  Do I need to probe the LED outputs for the three ranges at the same time that I probe the real time voltage output?  Nice creation BTW, I am looking forward to putting it to use.

Felix Rusu
Please DO NOT probe the LEDs while probing the output, this is a good way to damage the CR since the grounds of the output/LEDs/USB/input are different so doing that will create ground loops. I would suggest just placing the CR in manual mA mode, then it will give you a good clear output and you'll know how it looks like when it wakes up. Then for the sleep part go in uA mode - the CR should not

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6605
  • Country: us
    • LowPowerLab
Re: Auto Mode - Is there a way to know in which range the CR is?
« Reply #7 on: December 04, 2020, 10:14:14 AM »
The above optoisolator suggestion is not bad. There are various chips that can be used, and they are usually cheap and very fast propagation.
You could do this on the 2x3 GPIO "SPI" header instead of trying to probe on the LEDs directly, you'd just have to write a little extra code to flip those GPIOs accordingly when ranging.
Putting 80mA through the 10K shunt is OK but it will create a burden voltage (aka VIN dropout) to your DUT and consequently a very different current profile if the DUT does not actually brownout - for that kind of current you'd want to be in the mA range where there is a 0.1ohm shunt instead of 10k for a next to zero burden voltage.

isaac@isaacdavenport.com

  • NewMember
  • *
  • Posts: 2
Re: Auto Mode - Is there a way to know in which range the CR is?
« Reply #8 on: December 18, 2020, 07:00:29 PM »
Thanks for the tips.  If you made an opto-isolator board to allow for tracking the auto-ranging modes I would certainly buy one!   :D  Although I can imagine you might not have enough interest to make it worth your while.

Can the LED drive for the auto-ranging LEDs drive a 220 ohm resistor into an opto-isolator-LED in parallel with the current ranger's LED so I could use an off the shelf opto-isolator board like this one?

https://www.sparkfun.com/datasheets/BreakoutBoards/Optoisolator-v12.pdf
https://www.sparkfun.com/products/9118

If not I could probably bump the 220 ohm resistors up to 1kohm and still see the logic levels toggle on the other side.