Author Topic: Arduino Serial Plotter - Auto Range  (Read 231 times)

peter.howard@eportage.com

  • Newbie
  • *
  • Posts: 3
Arduino Serial Plotter - Auto Range
« on: June 13, 2020, 11:00:15 AM »
Searching the forum I was not able to find (or overlooked) the Arduino Y-Axis not to scale.  Looking at the image on the CurrentRanger informaiton page (see here) https://lowpowerlab.com/wp-content/uploads/2018/09/Pi_Boot.png

The scaling is -150 to 450.  Yet when I watch the data stream to the plotter the values are in the Mili-amp range, e.g. 1234E-3. 

Looking on the web it appears this has been an issue and at least one person re-write the java code to accommodate numbers less that one. 

So - what am I missing?    Is there a way for the CurrentRanger to stream scaled numbers?

I'm also using an Otii Arc - but don't want that inline during the entire development process.

Thanks in advance for your help,
Peter

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6279
  • Country: us
    • LowPowerLab
Re: Arduino Serial Plotter - Auto Range
« Reply #1 on: June 15, 2020, 10:59:47 AM »
By default the output is in exponent format. The IDE is pretty dumb, the given example plot image is in straight milliamp output back when that was default.
You now have the option to use different data streaming formats, since the firmware is open. Here's the relevant lines to change:
https://github.com/LowPowerLab/CurrentRanger/blob/master/CurrentRanger_R3.ino#L97

Follow the guidelines for updating the firmware if you choose to do so: https://lowpowerlab.com/guide/currentranger/programming-firmware-updates/

I could make that format change-able via the USB menu, similar to other options. So you'd get output in nanoAmperes instead of exponent or millis. However if the scale changes, the IDE scale will also change by 2 orders of magnitude, since IDE monitor has a linear scale, which will be non useful for visual reading.

You can always use some other 3rd party plotter that can just read exponent format correctly, sorry I don't have a suggestion at the moment.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6279
  • Country: us
    • LowPowerLab
Re: Arduino Serial Plotter - Auto Range
« Reply #2 on: June 16, 2020, 09:03:22 AM »
I just released some changes to the firmware that will allow changing the sampling speed (3 modes: average, fast, slow), and the logging format (exponent, nanos, micros, millis, raw ADC).

Achieve this with 's' and 'f' commands.
The UF2 is available at Github as well for drag-and-drop update. (save the calib values before updating, backup the old UF2 from the device).
« Last Edit: June 16, 2020, 09:15:48 AM by Felix »

peter.howard@eportage.com

  • Newbie
  • *
  • Posts: 3
Re: Arduino Serial Plotter - Auto Range
« Reply #3 on: June 16, 2020, 12:11:12 PM »
Fantastic!

Thanks

peter.howard@eportage.com

  • Newbie
  • *
  • Posts: 3
Re: Arduino Serial Plotter - Auto Range
« Reply #4 on: June 16, 2020, 09:52:20 PM »
I flashed my CurrentRanger this evening. - Looks Great! - Thanks!

Great product - far and above what I expected.

Best of luck with this and your future products.

Peter

ePortage.com