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

chagai

  • Newbie
  • *
  • 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: 6279
  • 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

  • Newbie
  • *
  • 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: 6279
  • 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: 6279
  • 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

  • Newbie
  • *
  • 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.