Vertical Resolution Inconsistency in PicoScope 6 GUI

Discussion forum for the Picoscope 6 Linux software
Post Reply
alowell
Newbie
Posts: 0
Joined: Mon Sep 02, 2019 8:46 pm

Vertical Resolution Inconsistency in PicoScope 6 GUI

Post by alowell »

Hello,

I have a PicoScope 3406D, which is an 8 bit scope. I'm using Ubuntu 18.04 LTS. I'm noticing something strange with PicoScope 6 GUI on Linux. In the screenshot below, I used the vertical cursors to measure the LSB size in volts. I get 4.7 mV on +/-500 mV scale. However, at 8 bits I would have guessed that the LSB size should be 500 mV / 127 = 3.94 mV. Any idea what is going on here?

Also, I have written some code using the streaming API to capture waveforms, and I'm noticing a vertical scale discrepancy between the waveforms captured with my code and what is reported in PicoScope 6 GUI.

Thanks

Gerry
PICO STAFF
PICO STAFF
Posts: 1145
Joined: Mon Aug 11, 2014 11:14 am

Re: Vertical Resolution Inconsistency in PicoScope 6 GUI

Post by Gerry »

Hello alowell,

Actually what you are seeing is not unusual for Digital Oscilloscopes. During the calibration process adjustments must typically be made to the range/and or specific values in order to meet the specifications. This results in fewer than 256 samples over the Full-Scale input range, which means that the minimum step size is made larger to cover the full range.

Could you give us examples of the discrepancy.

Regards,

Gerry
Gerry
Technical Specialist

alowell
Newbie
Posts: 0
Joined: Mon Sep 02, 2019 8:46 pm

Re: Vertical Resolution Inconsistency in PicoScope 6 GUI

Post by alowell »

Hi Gerry,

Thanks for your response, I had a hunch it had something to do with calibration.

Sorry I forgot to attach the screenshot. I posted basically the same question in the Windows forum with a screenshot, here is the link: topic40819.html

My next question is: how do I apply the calibration data when writing applications using the PicoScope API? My approach has been to scale the 16 bit integers by a constant scale factor. This scale factor is returned by e.g. ps3000aMaximumValue. I haven't seen any functions in the Programming guide relating to calibration coefficients.

Thanks!

Gerry
PICO STAFF
PICO STAFF
Posts: 1145
Joined: Mon Aug 11, 2014 11:14 am

Re: Vertical Resolution Inconsistency in PicoScope 6 GUI

Post by Gerry »

Hi alowell,

The Calibration data is applied to the PicoScope during factory testing, and the data is stored in the PicoScope, so you don't need to apply any changes.

Regards,

Gerry
Gerry
Technical Specialist

alowell
Newbie
Posts: 0
Joined: Mon Sep 02, 2019 8:46 pm

Re: Vertical Resolution Inconsistency in PicoScope 6 GUI

Post by alowell »

Hi Gerry,

Thanks!

To clarify, when the API functions return signed 16 bit integers, the integers are thus not evenly spaced? And this is how the calibration is expressed? I had assumed that in 8 bit mode, the lower 8 bits of the 16 bit ints could be ignored, but perhaps that is not the case if the values returned by the scope are not evenly spaced.

Gerry
PICO STAFF
PICO STAFF
Posts: 1145
Joined: Mon Aug 11, 2014 11:14 am

Re: Vertical Resolution Inconsistency in PicoScope 6 GUI

Post by Gerry »

Hi alowell,

No, the lower 8 bits can be ignored (they are used internally for Calibration and Test). It just means that, in practical terms, a few upper 8-bit values are not generated by the Analog to Digital Conversion process.

Regards,

Gerry
Gerry
Technical Specialist

alowell
Newbie
Posts: 0
Joined: Mon Sep 02, 2019 8:46 pm

Re: Vertical Resolution Inconsistency in PicoScope 6 GUI

Post by alowell »

Hi Gerry,

Thanks again for your response!

But now I'm confused. Can you please clarify how to convert the 16 bit signed integers returned by the API to real voltages? The programming manual implies that the scale factor should be 0.500/32512 in 8 bit mode, on the +/-500 mV vertical scale. So for example, if the scope returns a value of 8704, this would correspond to a voltage of 8704 * (0.500/32512) = 0.134 V. However, since you said the lower 8 bits can be ignored and thus the samples are evenly spaced out by increments of 256, then the LSB size should be 256 * (0.500/32512) = 3.94 mV, which is different from what I measure in the PicoScope GUI: 4.69 mV.

Gerry
PICO STAFF
PICO STAFF
Posts: 1145
Joined: Mon Aug 11, 2014 11:14 am

Re: Vertical Resolution Inconsistency in PicoScope 6 GUI

Post by Gerry »

Hi Alowell,

Under normal circumstances during capture and processing of data you should be working with the 16-bit values as these give you the capability to perform accurate intermediate calculations, and take advantage of transformations associated with downsampling without compromising accuracy as well as giving you the best linearity when using the ADC. You should only convert to 8-bit if there is a very good reason for doing so (such as complex manipulations/multiplications where the bit size increases the processing/storage requirements exponentially to beyond what you have available). So I guess what I should have said was "the lower 8 bits can be ignored, if you absolutely have to use 8-bit, in which case you will have reduced linearity".

If you want to convert to millivolts you should use the function adc_to_mv() defined in the example code from https://github.com/picotech, and you should only use the defined 16-bit data types. Regarding the way the calibration works, it's better not to make any assumptions, but to understand that some equivalent 8-bit values, of the returned 16-bit values, will not be represented as unique converted values by the ADC, but when calling adc_to_mv() with returned Int16_t values each incremental Int16_t data type value representing a captured sample value will be displaced by 4.69mV.

Regards,

Gerry
Gerry
Technical Specialist

Post Reply