Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs #166

Merged
merged 20 commits into from
Aug 25, 2021
Merged

Docs #166

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions AUTHORS

This file was deleted.

50 changes: 29 additions & 21 deletions docs/basic_operation.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _basic_operation:
.. _basic operation:

Basic Operation Instructions
============================
Expand All @@ -8,7 +8,8 @@ GUI-based Operation
.. rubric:: Experimental Setup

#. Plug the USB cable into the computer and the potentiostat.
#. Attach electrodes from potentiostat as appropriate to the experimental setup (if you are not familiar with how to set up an electrochemical experiment, see :ref:`setup`).
#. Attach electrodes from potentiostat as appropriate to the experimental setup (if you are not familiar with how to set
up an electrochemical experiment, see `setup <experimentalsetup.html>`_).

.. rubric:: Program Setup

Expand All @@ -18,11 +19,15 @@ GUI-based Operation

#. Pypot main window should display at this point.
#. Click button for find potentiostat.
#. In the drop down box the communication port that is connected should be displayed after the program finds the correct port.
#. In the drop down box the communication port that is connected should be displayed after the program finds the correct
port.
#. Now an experiment can be created by clicking on the add button
#. Once clicked, a window should pop up to select the type of experiment that you want to run. Click on the appropriate experiment type.
#. The experiment choice window should close and a new window should appear that allows you to edit the experiment parameters.
#. Once experiment parameters are input, click generate preview to show the time vs. voltage profile to verify that your experimental procedure appears correct.
#. Once clicked, a window should pop up to select the type of experiment that you want to run. Click on the appropriate
experiment type.
#. The experiment choice window should close and a new window should appear that allows you to edit the experiment
parameters.
#. Once experiment parameters are input, click generate preview to show the time vs. voltage profile to verify that your
experimental procedure appears correct.
#. Once satisfied, click save experiment file and then save the file as a .yml file.
#. Now you can begin the experiment by pressing the start button beside the start/stop experiment label.
#. Once experiment is complete, click the disconnect potentiostat button.
Expand All @@ -34,29 +39,32 @@ Command-Line Operation
.. rubric:: Experimental Setup

#. Plug the USB cable into the computer and the potentiostat.
#. Attach electrodes from potentiostat as appropriate to the experimental setup (if you are not familiar with how to set up an electrochemical experiment, see :ref:`setup`).
#. Attach electrodes from potentiostat as appropriate to the experimental setup (if you are not familiar with how to set
up an electrochemical experiment, see `setup <experimentalsetup.html>`_).

.. rubric:: Program Setup

#. Copy the example config file to an easy to navigate to directory.
#. Edit this file to accomodate your experiment parameters.
#. Open up a console window (e. g. command prompt).
#. Navigate in the console to the directory with the config file.
#. Type the command :code:`pytentiostat`.
#. Edit the example config file to accommodate your experiment parameters and then save the file.
#. Open up a console window (e.g. command prompt, powershell, Windows terminal).
#. Navigate in the console to the directory pytentiostat/pytentiostat.
#. Type the command :code:`python main.py` and press Enter.

.. rubric:: Pytentiostat Operation

#. Pytentiostat should print to console "Welcome to the JUAMI pytentiostat interface!".
#. Then Pyentiostat should prompt "Press enter to connect to a JUAMI potentiostat.".
#. If USB connection still secure at this point press enter.
#. Pytentiostat will print to console "Welcome to the JUAMI pytentiostat interface!".
#. Then Pytentiostat will prompt "Press enter to connect to a JUAMI potentiostat.".
#. If the USB connection still secure at this point press enter.
#. Pytentiostat will notify "Searching for potentiostat...".
#. Once connected, Pyentiostat prints to console "Pytentiostat connected to COM".
#. Once connected, Pytentiostat prints to console "Pytentiostat connected to COM".
#. Pytentiostat will then ask to load the config file stating: "Press enter to load the config file".
#. If config file is in the current working directory press enter here.
#. If make sure that config.yaml is set and saved then press enter.
#. The Pytentiostat will have final statement before experiment begins: "Press enter to start the experiment".
#. The Pytentiostat will then run the experiment in the config file.
#. Pyentiostat will display a real-time plot of your experiment.
#. After running experiment, pytentiostat saves the data to location specified in the config file.
#. The Pytentiostat will then ask if you want to repeat your experiment: "Would you like to repeat the last experiment? [y/n]".
#. If pressing :code:`y`, the Pytentiostat will repeat previous four steps.
#. Pytentiostat will display a real-time plot of your experiment (the window might be minimized if you are using an IDE
for python.
#. After running the experiment, pytentiostat saves the data to location specified in the config file.
#. Pytentiostat will then ask if you want to repeat your experiment: "Would you like to repeat the last experiment?
[y/n]".
#. If pressing :code:`y`, the Pytentiostat will repeat previous four steps. (Warning: experiment starts immediately
after pressing enter.)
#. If pressing :code:`n`, the Pytentiostat will close and can be thereafter safely disconnected.
95 changes: 57 additions & 38 deletions docs/experimentsetup.rst
Original file line number Diff line number Diff line change
@@ -1,40 +1,45 @@
.. _setup:

=================
Experiment Setup
=================

A variety of cells can be characterized using a potentiostat. This section will briefly describe cell preparation and
attachment to the potentiostat.

Types of Cell Arrangements
--------------------------
===========================

Most potentiostats (including the JUAMI Potentiostat) have the option to connect three leads to an electrochemical cell.
Electrochemical cells/devices commonly have two or three leads. An important distinction between the two arrangements is the
dependencies of the potential.
Most potentiostats (including the JUAMI Potentiostat) have the option to connect three electrodes to an electrochemical
cell. Electrochemical cells/devices commonly have two or three leads. An important distinction between the two
arrangements is how the potential is measured.

In a three electrode cell, there is a working electrode (with the material or reaction of interest) and counter electrode
(completes the circuit and allows charge to flow by facilitating a counter reaction) and a reference electrode.
The voltage reading will be dependent on the type of reference electrode that is used in the experiment.
In a three electrode cell, there is a working electrode (with the material or reaction of interest), counter electrode
(completes the circuit and allows charge to flow by facilitating a counter reaction), and reference electrode (stable
redox couple that with high impedance to minimize electrode polarization).
The voltage value measured will be dependent on the type of reference electrode that is used in the experiment.

In a two electrode cell, both electrodes (anode and cathode, or working electrode and counter electrode) undergo reactions.
While the reactions occur at each electrode, the potential of both electrodes can change, therefore, there is no stable
reference potential.
In a two electrode cell, the counter electrode is used to measure the voltage instead of a reference. While the
reactions occur at each electrode, the potential of both electrodes can change from cell polarization causing a voltage
drift. This type of setup is adequate when you aren't interested in measuring the absolute voltage.

Overall, the two electrode arrangement measures the cell potential (and requires a good understanding of what is happening
at each electrode) and the three electrode arrangement enables the measurement of the potential solely of the working electrode
against a known reference potential such as that of Ag/AgCl in KCl. See the examples below for instructions on how to connect
the potentiostat to each type of cell.
Overall, the two electrode arrangement measures the cell potential (and requires a good understanding of what is
happening at each electrode) and the three electrode arrangement enables the measurement of the potential solely of the
working electrode against a known reference potential such as that of Ag/AgCl in KCl. See the examples below for
instructions on how to connect the potentiostat to each type of cell.

.. rubric:: Materials and Instrumentation
Materials and Instrumentation
==============================

All experiments will require:

#. Computer
#. JUAMI Potentiostat
#. USB AB cable
#. Enthusiasm for electrochemistry! \\o/

If testing a device (e.g. battery, solar cell, resistor, etc.), it can be attached directly to the potentiostat as described below.
If testing a device (e.g. battery, solar cell, resistor, etc.), it can be attached directly to the potentiostat as
described below.

If testing an open cell (e.g. H cell, three-neck cell, etc.) you will need each of the following components.

Expand All @@ -46,52 +51,66 @@ If testing an open cell (e.g. H cell, three-neck cell, etc.) you will need each

.. important:: Take proper safety precautions!

#. If you have never run an electrochemical reaction before, perform these experiments with a lab partner or consult with an instructor.
#. If you have never run an electrochemical reaction before, perform these experiments with a lab partner or consult
with an instructor. This potentiostat can not generate a high voltage to shock you but other commercial
instruments may.
#. Wear personal protective equipment (PPE; gloves, safety glasses, lab coat) when carrying out experiments.
#. Read the safety data sheet (SDS) for all materials, understand the reactions that are expected, and familiarize yourself with the potential risks of reaction product. Take necessary actions to prevent the formation of or exposure to dangerous gases/chemicals (e.g. carry out experiments in a fume hood).
#. Read the safety data sheet (SDS) for all materials, understand the reactions that are expected, and familiarize
yourself with the potential risks of reaction product. Take necessary actions to prevent the formation of or
exposure to dangerous gases/chemicals (e.g. carry out experiments in a fume hood).

Two-electrode experiment
------------------------
=========================

.. rubric:: Examples:
Examples
_________

* Resistor
* Battery
* Solar cell
* Fuel cell

.. rubric:: Cell/Device Connection
Cell/Device Connection
_______________________

In each of these applications, the electrochemical cell only has two electrical leads. However, the potentiostat has
three clips. To connect the potentiostat to one of these cells, attach the potentiostat reference electrode clip (white) to the
potentiostat counter electrode clip (blue). Now there should be a working electrode clip (red) and a counter/reference clip (blue/white) to attach
to the two leads on the electrochemical cell, as shown in :ref:`Figure 1 <solar_cell_fig>`. Once these are attached to the electrochemical cell, you are ready to begin
:ref:`operating the potentiostat <basic_operation>`.

.. _solar_cell_fig:
three clips. To connect the potentiostat to one of these cells, attach the potentiostat reference electrode clip (white)
to the potentiostat counter electrode clip (blue). Now there should be a working electrode clip (red) and a
counter/reference clip (blue/white) to attach to the two leads on the electrochemical cell, as shown in below.

.. image:: _static/solar_two_electrode_setup.png
:width: 600

.. rubric:: Figure 1: Two electrode solar cell diagram that shows the connection of the working electrode clip to one electrical contact (typically positive) and the counter and reference electrode clips connected to the other electrical contact (typically negative).
.. rubric:: Figure 1: Two electrode solar cell diagram that shows the connection of the working electrode clip to one
electrical contact (typically positive) and the counter and reference electrode clips connected to the other
electrical contact (typically negative).


.. note:: The colors associated with the potentiostat wires can change depending on the convention used by the person building the potentiostat. If you built the JUAMI Potentiostat you are using, be sure to record which color was associated with each electrode. If the JUAMI Potentiostat was built by someone else, check the documentation that the builder might have provided you or contact them to find out what convention was used.
.. note:: The colors associated with the potentiostat wires can change depending on the convention used by the person
building the potentiostat. If you built the JUAMI Potentiostat you are using, be sure to record which color
was associated with each electrode. If the JUAMI Potentiostat was built by someone else, check the
documentation that the builder might have provided you or contact them to find out what convention was used.

Three-electrode experiment
---------------------------

.. rubric:: Examples
===========================

* Measure electrochemical behavior of materials
* Sensing and detection experiments
Examples
_________

.. rubric:: Cell/Device Connection
* Measure redox couples
* Electroanalytical experiments
* Rotating disk electrode
* Many others

All three clips from the potentiostat can be attached to their respective electrodes in the cell, as shown in :ref:`Figure 2 <three_electrode_fig>`.
Cell/Device Connection
_______________________

.. _three_electrode_fig:
All three clips from the potentiostat can be attached to their respective electrodes in the cell, as shown below. For
best practice, try to position the tip of the reference electrode as close as possible to the working electrode to
minimize uncompensated solution resistance. This is most important in systems with low electrolyte conductivity.

.. image:: _static/three_electrode_setup.png

.. rubric:: Figure 2: Example of a three electrode setup in a three-neck round-bottom flask with a Pt rod counter electrode, foil working electrode, and a reference electrode in an aqueous electrolyte.
.. rubric:: Figure 2: Example of a three electrode setup in a three-neck round-bottom flask with a Pt rod counter
electrode, foil working electrode, and a reference electrode in an aqueous electrolyte.

65 changes: 58 additions & 7 deletions docs/gettingstarted.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,78 @@
and take any additional measures necessary prior to starting to use the pytentiostat
for experiments.

.. _get_started:
.. _getting started:

================
Getting Started
================


Installing from Github
_______________________

#. Navigate to `<https://github.com/juami/pytentiostat>`_ and click the green button that says Code with a down arrow.
Then select Download ZIP from the dropdown list.

#. Once the download is finished, unzip the folder.

#. Make sure you have all the dependencies for pytentiostat installed. All the dependencies are listed in the
requirements folder. For managing dependencies, we recommend `conda <https://www.anaconda.com/>`_ or
`pip <https://pypi.org/project/pip/>`_.

#. Open a command prompt and navigate to the pytentiostat folder. Run the command ``python setup.py install``.

#. The application should be installed if there were no errors. Now move on to `basic operation <basic_operation.html>`_
to get started.

Installing from conda-forge
____________________________

#. Installation with conda requires Anaconda to be installed already. To install pytentiostat with Anaconda enter the
following command in the Anaconda prompt.

.. code-block:: shell

conda create -y --name pytentiostat
conda activate pytentiostat
conda install pytentiostat -c conda-forge

#. The application should be installed if there were no errors. Now move on to `basic operation <basic_operation.html>`_
to get started.

Installing from PyPI
_____________________

#. Installation with pip requires python and pip to be installed already. To install pytentiostat with pip enter the
following command in your terminal.

.. code-block:: shell

pip install pytentiostat

#. The application should be installed if there were no errors. Now move on to `basic operation <basic_operation.html>`_
to get started.

Flash Drive Installation
------------------------
_________________________

Instructions for installing pytentiostat onto a Windows computer with a USB
#. Copy the entire top level directory of Pytentiostat onto a USB flash drive.

.. important:: Download the Python 3.8 installer and corresponding wheel files onto the USB. Copy the python installer to the folder 'local_install' and the wheels to a subdirectory named 'whls'.
.. important:: Download the Python 3.8 installer and corresponding wheel files onto the USB. Copy the python
installer to the folder 'local_install' and the wheels to a subdirectory named 'whls'.

.. note:: For help to obtain a copy of the installer and wheel files, contact the development team through Github or email. (https://github.com/juami/pytentiostat)
.. note:: For help to obtain a copy of the installer and wheel files, contact the development team through Github
or email. `<https://github.com/juami/pytentiostat>`_

#. Plug in the flash drive to the desired computer and copy all the files onto the computer.

#. Find the file called 'install_from_local' in the scripts folder and double click it.

#. Follow the prompts on the screen to install Python 3.8. Be sure to select 'add Python to PATH' at the bottom of the first screen.
#. Follow the prompts on the screen to install Python 3.8. Be sure to select 'add Python to PATH' at the bottom of
the first screen.

It will take a couple of minutes to install all the packages. If everything was successful, you will see no errors and the bottom of the command window will say 'press any key to continue...'
It will take a couple of minutes to install all the packages. If everything was successful, you will see no errors
and the bottom of the command window will say 'press any key to continue...'

#. For further information on running experiments, continue to :ref:`basic_operation`.
#. For further information on running experiments, continue to `basic operation <basic_operation.html>`_.
Loading