Page 1 of 1

Calibration-aware generate and acquire (cmd line utils)

Posted: Mon Nov 24, 2014 10:22 pm
by edgo
All, please find calibration-aware generate and acquire (cmd line utils) here in the /Test/ directory:

https://github.com/edgo914/RedPitaya

Calibration values are taken from EEPROM storage.

This work also includes generate with DC offset capability, originally done by markome and extended here. Does not include the sweep functionality from pdorazio.

Note that acquire is used itself for Front-End offset calibration purposes:
http://wiki.redpitaya.com/index.php?tit ... alibration

And so, acquire can be used in the "old fashion" for calibration purposes as documented above, and then WITH calibration-awareness using the "-c" option. The nice benefit of the "-c" option is that the values obtained are voltages, not raw samples from ADC.

acquire also includes an averaging option "-a" to compute the average of the number of samples taken. This is helpful for working with a generated signal of zero Hz with a DC offset (meaningless for a sine/sqr/tri wave).

It is recommended that in order to properly use the "calibration-awareness", the Front-End and Back-End calibration of Red Pitaya should be perfomed. Use a DMM and/or calibrated oscilloscope to measure and set the DC offset and full-scale (gain) settings.

Enjoy!

Re: Calibration-aware generate and acquire (cmd line utils)

Posted: Tue Mar 31, 2015 8:57 am
by Kilroy
Hi ..
I am still struggling with the calibration of the front end (ADC).
Some things are confusing me:
In line 73 of https://github.com/edgo914/RedPitaya/bl ... fpga_osc.c the maximum voltage is set to 14 Volt. ("

Code: Select all

const float c_osc_fpga_adc_max_v = +14;
" ). Other sources say its 1 Vpp/ 20 Vpp. Calculation from the calibration parameters say its 1.068 V/23.662 V using the formula

Code: Select all

float osc_fpga_calc_adc_max_v(uint32_t fe_gain_fs, int probe_att)
{
float max_adc_v;
int probe_att_fact = (probe_att > 0) ? 10 : 1;
max_adc_v =
fe_gain_fs/(float)((uint64_t)1<<32) * 100 * (probe_att_fact);
return max_adc_v;
}
I have measured the DC offset and applied the values to the calibration parameters, which is described in the user manual. Then I used a reference voltage of 10 V and measured the average - using acquire - and applied the measured DC offset (2726 + 129 = 2855). A recalculation to the full scale gives me a result of 28.69 V. (10 V / <measured value> * 8191). Here the measured value is in decimal 2855 including the DC offset of 129.

All measuring is done in the "HV" setting. Hope someone can explain the calibration behaviour.
Thanks in advance
Uwe

Re: Calibration-aware generate and acquire (cmd line utils)

Posted: Wed Oct 12, 2016 9:01 pm
by fbalakirev
Hi,

I have a very similar confusing experience to one described by Kilroy:
Kilroy wrote:Hi ..

...
I have measured the DC offset and applied the values to the calibration parameters, which is described in the user manual. Then I used a reference voltage of 10 V and measured the average - using acquire - and applied the measured DC offset (2726 + 129 = 2855). A recalculation to the full scale gives me a result of 28.69 V. (10 V / <measured value> * 8191). Here the measured value is in decimal 2855 including the DC offset of 129.

All measuring is done in the "HV" setting. Hope someone can explain the calibration behaviour.
Thanks in advance
Uwe
in brief, if I use a standard signal, and than use it to calibrate raw ADC read, the HV full scale comes out to be ~28.7V, which neither close 20V as on the HW specs nor 23.662V as from default EPROM scale ( = 1016267064). In addition, if I were to use oscilloscope web app that came with red pitaya image, it reads a signal within 2% of the applied standard.

I would really appreciate some clarification from the developers, if possible.

Fedor