Repository navigation
Cyclic Voltammetry
Cyclic Voltammetry (CV) applies a potential in form of a triangular form to an electrochemical cell and measures the resulting cell current. The method implemented by the framework implements cyclic voltammetry with current averaging. After each voltage step the data is sampled an either send as a JSON telegram to the python framework or stored directly on an SD-card, depending on the chosen operation mode (see Installation).
- Current averaging
- Sweeping up or down
- 537 μV : step size resolution
- 2.875 ms : step time resolution
- StartVoltage
- FirstVertex
- SecondVertex
- Stepsize / Scanrate
- Stepsize
from FreiStat.Methods.run_cyclic_voltammetry import Run_CV
run_CV = Run_CV(logger= Logger,
commnicationMode= CommunicationMode,
wlanSetting= WlanSetting,
mode= Mode
)
strExportPath = run_CV.start(StartVoltage= 0.5,
FirstVertex= 1.05,
SecondVertex= -0.62,
Stepsize= 0.002,
Scanrate= 0.1,
Cycle= 10,
CurrentRange= 45e-6,
FixedWEPotential= True,
MainsFilter= True,
Sinc2_Oversampling= 222,
Sinc3_Oversampling= 2,
EnableOptimizer= True,
LowPerformanceMode= False
)Different settings can be defined, when calling the class for cyclic voltammetry.
The logger allows to access the internal logging structure of the framework, to redirect the logging output to a custom location.
The logger is thereby an object of the type logging.logger.
The communication mode allows the user to define if the FreiStat should be operated in FreiStat-USB or FreiStat-WiFi mode (FreiStat-Standalone omitted, since it doesn't require the python framework).
Defined "Keywords" :
- FREISTAT_SERIAL : FreiStat-USB mode
- FREISTAT_WLAN : FreiStat-WiFi mode
The Wlan or WiFi setting allows the user to define the connection parameters between the FreiStat and the Python framework (see Communication). As shown below, the data is defined as an array of strings and integers with 4 entries. If this variable is not defined (e.g., for the USB-mode), default values are used as placeholders.
Structure:
wlanSetting = [FREISTAT_UDP_SERVER_IP,
FREISTAT_UDP_SERVER_PORT,
FREISTAT_UDP_CLIENT_IP,
FREISTAT_UDP_CLIENT_PORT]- FREISTAT_UDP_SERVER_IP : IP of the device the Python Framework is running on
- FREISTAT_UDP_SERVER_PORT : Port of the device the Python Framework is running on
- FREISTAT_UDP_CLIENT_IP : IP of the FreiStat
- FREISTAT_UDP_CLIENT_PORT : Port of the FreiStat
Example:
wlanSetting = ["192.168.0.101",
20000,
"192.168.0.201",
20001]By defining the Mode variable, the user can use the Python framework either as a standalone software or as a backend (Important! See implementation example)
Defined "Keywords" :
- FREISTAT_STANDALONE: The Python Framework is used as a standalone software
- FREISTAT_BACKEND: The Python Framework is used as a backend
After defining the class parameters, the actual experiment parameters need to be defined.
Defined "Parameters" :
- StartVoltage : Starting potential in V at which the CV should start
- FirstVertex : Potential of the first vertex in V
- SecondVertex : Potential of the second vertex in V
- Stepsize : Stepsize in V
- Scanrate : Scanrate in V/s
- Cycle : Amount of cycles
- CurrentRange : Current range at which the potentiostat should operate in A
- FixedWEPotential : Use a fixed potential for the working electrode
- MainsFilter : Activate the 50/ 60 Hz mains filter
- Sinc2_Oversampling : Oversampling rate for Sinc2
- Sinc3_Oversampling : Oversampling rate for Sinc3
- EnableOptimizer : Enable the optimizer which tunes the parameters
- LowPerformanceMode : Disabling the plotting of the data
Return value:
- strExportPath : OS path as string
Support sweeping up/ down:
- Sweeping down : FirstVertex < SecondVertex
- Sweeping up : SecondVertex < FirstVertex
Limits of operation:
- Stepsize / Scanrate > 2.875 ms
- Stepsize > 537 μV