Author Topic: Current Firmware on GitHub  (Read 236 times)

mahesh

  • Newbie
  • *
  • Posts: 2
Current Firmware on GitHub
« on: August 13, 2019, 01:03:56 PM »
Hi,

I've recently got a Current Ranger R3. Currently I have an OLED connected and there is a string "4095 - 6" being printed continuously to the SerialUSB. I've gone through the code on GitHub and as far as I can tell, it shouldn't output anything like that so I was wondering if it is current or if I was reading it wrongly. I'm trying to disable the string so that I can log the readings to USB.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6022
  • Country: us
    • LowPowerLab
Re: Current Firmware on GitHub
« Reply #1 on: August 13, 2019, 02:32:11 PM »
It's something I added in my local firmware for debugging. Specifically the lines below, before the end of the loop inside the if (OLED_found .. ) statement:
Code: [Select]
    SerialUSB.print(adcRead(A1));
    SerialUSB.print(" - ");
    SerialUSB.println(adcRead(A6));

You can ignore this. When you reflash, use the given calibration values. And make sure you don't have a DUT that is earth referenced (ie. powered from MAINS) if your PCB/USB is also referenced to the same mains earth. Heed the warnings in the guide about this.

Also note that USB will invariably introduce switching noise.

mahesh

  • Newbie
  • *
  • Posts: 2
Re: Current Firmware on GitHub
« Reply #2 on: August 14, 2019, 10:03:23 AM »
Thanks Felix,

Understood about the USB Switching Noise. I'm just interested in the average current trends. Quick question , what did you mean about the ADC Calibration ? Do you want me to use the calibration values in the sketch or is there someway to have it pick the values in EEPROM.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6022
  • Country: us
    • LowPowerLab
Re: Current Firmware on GitHub
« Reply #3 on: August 14, 2019, 10:23:38 AM »
EEPROM is erased when you reflash firmware.
There was a label with recommended calibration values that were programmed into the CR during initial testing/programming (offset, gain, LDO).