Skip to main content

Hard Potato library

Welcome to the hardpotato GitHub repository. Hard Potato is an open source Python API to control commercially available potentiostats. It enables researchers to write Python scripts that can include experimentation, immediate data analysis using any third-party library and/or the control of other instruments. Hard Potato facilitates the standardization of electrochemical experiments by keeping a record of the experiments and data analysis that can be later run again to ensure repeatability. It also facilitates the sharing of electrochemical protocols between researchers and groups that own different potentiostats.

Currently, the following potentiostats are included in the library:

  • CHI1205B from CH Instruments (chi1205b)
  • CHI1242B from CH Instruments (chi1242b)
  • CHI601E from CH Instruments (chi601e)
  • CHI760E from CH Instruments (chi760e)
  • Emstat Pico from PalmSens (emstatpico)

with the following techniques:

  • Cyclic voltammetry, CV
  • Chronoamperometry, CA
  • Linear sweep voltammetry, LSV
  • Open circuit potential, OCP

For the CHI601E and CHI760E only:

  • Normal pulse voltammetry, NPV

Installation

Open a console and type:

pip install hardpotato

Example: techniques

Here are quick examples on how to use the library. For more help check the Wiki.

import hardpotato as hp

# Potentiostat setup
# Choose the correct model from ['chi760e', 'chi1205b', 'emstatpico']:
model = 'chi760e' 
# Write the path where the chi software is installed (this line is optional when
# using the Pico). Make sure to use / instead of \:
path = 'C:/Users/jrl/CHI/chi760e.exe' # This is ignored for the Pico
# Write the path where the data and plots are going to be automatically saved:
folder = 'C:/Users/jrl/Experiments/data'
# Setup:
hp.potentiostat.Setup(model, path, folder)

# Run CV with default values:
cv = hp.potentiostat.CV()
#cv.bipot() # uncomment to activate second working electrode
cv.run()

# Run a LSV with default values:
lsv = hp.potentiostat.LSV()
#lsv.bipot() # uncomment to activate second working electrode
lsv.run()

# Run a CA with default values:
ca = hp.potentiostat.CA()
#ca.bipot() # uncomment to activate second working electrode
ca.run()

# Run an OCP with default values:
ocp = hp.potentiostat.OCP()
ocp.run()

Notes for CH Instruments users

  • Since the CHI potentiostat software only works in Windows, any script written with hardpotato will only work in Windows.
  • The CHI translators use macro commands that are only available in the most recent versions of the software. Please contact CHI support for help on updating the potentiostat software and firmware.

Notes for Emstat Pico users

  • Contact PalmSens for instructions on how to update the firmware of the Pico.
  • The communication to the Pico is done via the serial port, this means that no external software is required. Because of this, there is no live plotting, however, the data and plots are saved when the measurement is finished.
  • Scripts written for the pico may also work in other operating systems, provided the library is installed correctly. So far, hardpotato with the Pico has been tested in Windows 10 and Manjaro Linux with kernel 5.15.xx; it has not been tested with MacOS although it should work.

Requirements

  • numpy for data handling
  • matplotlib for plotting
  • scipy for fitting
  • pyserial for serial handling
  • softpotato for electrochemical equations and simulations

Acknowledgements

  • To CH Instruments for making their software flexible enough that it can be started from the Windows command line and for creating the Macros.
  • To PalmSens for developing MethodScript and writing code for parsing data. The code is in the PalmSens MethodScript GitHub account.
  • This development is funded by the Joint Center for Energy Storage Research (JCESR).

Authors

Hard Potato was developed at the Beckman Institute, University of Illinois at Urbana-Champaign, Feb 2021 to Jan 2023 by:

Metadata

Release files for hardpotato 1.3.13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hardpotato 1.3.13
File Size Uploaded Provenance Actions
hardpotato-1.3.13.tar.gz 32.8 kB Without provenance Details for hardpotato-1.3.13.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hardpotato 1.3.13
File Interpreter ABI Platform Actions
hardpotato-1.3.13-py3-none-any.whl Python 3 none any Details for hardpotato-1.3.13-py3-none-any.whl

Total release size: 73.1 kB

Release files / hardpotato-1.3.13.tar.gz

Download URL hardpotato-1.3.13.tar.gz
Size 32.8 kB
Tags Source
SHA-256 checksum
How to use checksums
4f63ea21db1163868b187419d2a2e331c0b0f28476c8ca07a8de5fb1578b4adf
BLAKE2b-256 checksum
How to use checksums
1e74fd25a14acb0743a63be3a7846b86084a555c8e131f482658c58bfac4520c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.2

Release files / hardpotato-1.3.13-py3-none-any.whl

Download URL hardpotato-1.3.13-py3-none-any.whl
Size 40.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
90e436c5b24d1167aebb731b308827fba9f69f010c092cc345c7379526882507
BLAKE2b-256 checksum
How to use checksums
0ddf715001f6ce68e18deb68e28c540de42707afbad8f35b93410b08adbec738
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.2

Security for hardpotato 1.3.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page