lab_driver.charac_adc#

Module Contents#

Classes#

SettingsADC

Class with settings for testing the DUT of Analog-Digital-Converter (ADC) Attributes: system_id: String with system name or ID voltage_min: Floating with minimal ADC voltage voltage_max: Floating with maximal ADC voltage adc_reso: Integer with bit resolution of ADC adc_chnl: List with ADC channel IDs to test (like: [idx for idx in range (16)]) adc_rang: List with [min, max] analog ranges for testing the N-bit ADC (like: [0, 65535]) daq_ovr: Integer number for oversampling of DAQ system num_rpt: Integer of completes cycles to run DAQ sleep_sec: Sleeping seconds between each DAQ setting

CharacterizationADC

Data#

API#

class lab_driver.charac_adc.SettingsADC[source]#

Class with settings for testing the DUT of Analog-Digital-Converter (ADC) Attributes: system_id: String with system name or ID voltage_min: Floating with minimal ADC voltage voltage_max: Floating with maximal ADC voltage adc_reso: Integer with bit resolution of ADC adc_chnl: List with ADC channel IDs to test (like: [idx for idx in range (16)]) adc_rang: List with [min, max] analog ranges for testing the N-bit ADC (like: [0, 65535]) daq_ovr: Integer number for oversampling of DAQ system num_rpt: Integer of completes cycles to run DAQ sleep_sec: Sleeping seconds between each DAQ setting

system_id: str#

None

voltage_min: float#

None

voltage_max: float#

None

adc_reso: int#

None

adc_chnl: list#

None

adc_rang: list#

None

daq_ovr: int#

None

num_rpt: int#

None

delta_steps: float#

None

sleep_sec: float#

None

static get_date_string() str[source]#

Function for getting the datetime in string format

get_common_mode_voltage() float[source]#

Getting the Common Mode Voltage (VCM) of the DUT

get_num_steps() int[source]#

Function for getting the number of steps in testing

get_cycle_stimuli_input() numpy.ndarray[source]#

Getting the numpy array with a stimuli with sawtooth waveform

get_cycle_empty_array() numpy.ndarray[source]#

Function for generating an empty numpy array with right size

lab_driver.charac_adc.DefaultSettingsADC#

‘SettingsADC(…)’

class lab_driver.charac_adc.CharacterizationADC(folder_reference: str)[source]#

Bases: lab_driver.charac_common.CharacterizationCommon

Initialization

Class for handling the measurement routine for characterising a Digital-Analog-Converter (DAC)

Parameters:

folder_reference – String with source folder to find the Main Repo Path

settings: lab_driver.charac_adc.SettingsADC#

None

run_test_transfer(func_mux, func_daq, func_sens, func_dut, func_beep) dict[source]#

Function for characterizing the transfer function of the ADC

Parameters:
  • func_mux – Function for defining the pre-processing part of the hardware DUT, setting the ADC channel with inputs (chnl)

  • func_daq – Function for applying selected channel and data on DAQ with input params (data)

  • func_sens – Function for getting the applied voltage (measured) from DAQ device

  • func_dut – Function for sensing the ADC output with external multimeter device with inputs (chnl)

  • func_beep – Function for do a beep in DAQ

Returns:

Dictionary with [‘stim’: input test signal of one repetition, ‘settings’: Settings, ‘ch’: DUT results with ‘val’ and ‘std’]

plot_characteristic_results_from_file(path: str, file_name: str) None[source]#

Function for plotting the loaded data files

Parameters:
  • path – Path to the numpy files with DAQ results

  • file_name – Name of numpy array with DAQ results to load

Returns:

None

plot_characteristic_results_direct(data: dict, file_name: str, path: str) None[source]#

Function for plotting the loaded data files

Parameters:
  • data – Dictionary with measurement data [‘stim’, ‘ch’, …]

  • path – Path to measurement in which the figures are saved

  • file_name – Name of figure file to save

Returns:

None