Simulator
Mashed Potato Simulator
A virtual potentiostat for the classroom · CV · LSV · SWV · DPV · CA · OCP · runs in any modern browser
Cell
Solution: concentrations and redox couple
Electron-transfer kinetics
Electrode
Diffusion, double layer and noise
O + n e⁻ ⇌ R. Each run starts from a fresh, uniform solution.
Method
Waveform and sampling
Before the run
Label
Series of runs
Concentration profiles
At the point under the cursor in the plot above (or the last point). Distance from the electrode surface.
Runs
| Name | Method | Role | Conc. | Status |
|---|
Analysis
What this is
A potentiostat with a virtual cell inside, for teaching. It has the same methods, plots, analysis and exports as the Mashed Potato instrument page. The current comes from a simulation of the electrode reaction O + n e⁻ ⇌ R rather than from a board. Students can change the chemistry (number of electrons, concentrations, diffusion coefficients, E°′), the electrode (shape and size) and the electron-transfer kinetics (k°, α), and watch what happens to the voltammogram. Nothing is sent anywhere: the page works offline once loaded, and runs are autosaved in this browser.
- Set up the Cell, or pick a ready-made one from the menu at its top right.
- Choose a Method and its settings. The box under it gives the number of points and the time, and below that what theory predicts for this cell and method (peak current, peak separation, steady-state current…), so students can compare.
- Press Run. The curve is drawn over about 3 s (Animate), at the true experimental speed (Real time), or at once (Instant).
- Move the mouse over the curve to see the concentration profiles of O and R at that moment.
The model
- Reaction: one step, O + n e⁻ ⇌ R, with Butler–Volmer kinetics: kred = k° exp[−αnf(E − E°′)], kox = k° exp[(1 − α)nf(E − E°′)], f = F/RT. Large k° (≳ 1 cm/s at ordinary scan rates) behaves as reversible (Nernstian); small k° as irreversible.
- Mass transport: diffusion only (no migration, no convection), with separate D for O and R. Both may be present in the bulk.
- Electrode: Disc includes edge (radial) diffusion, so a large disc behaves like a planar electrode at short times and a microdisc reaches the steady-state current 4nFDcr. It uses a hemisphere of radius πr/4 for the radial part, which gives both limits exactly and is within a few per cent in between. Hemisphere is exact (steady state 2πnFDcr). Planar (ideal) is the textbook semi-infinite linear case.
- Double layer and resistance: a capacitance Cdl charged through the uncompensated resistance Ru. Ru causes the iR drop: the interface sees E − iRu, so peaks move apart and flatten. Set both to 0 for the ideal case. Choose E − iRu as the x axis to see the potential the interface really feels.
- Noise: Gaussian current noise with the RMS value you set (and 0.05 mV on OCP), so blanks, detection limits and calibration lines behave like real data.
- Numerics: finite volumes on an expanding grid, implicit time steps with extrapolation (second order). Checked against Randles–Sevcik (within 0.1 %), Cottrell (0.1 %), Nicholson's ΔEp table for quasi-reversible couples, the irreversible peak equation and the microelectrode steady state.
Techniques
- CV: start → vertex 1 → vertex 2 → start, repeated for the number of scans. Set vertex 2 equal to the start for a single return sweep. The sweep can be a true linear ramp (as on an analog instrument; the double layer gives a flat charging current Cdl·A·v) or a staircase (as on a digital instrument; current sampled at the end of each step, so most of the charging current has decayed).
- LSV: one sweep from start to end.
- SWV: staircase with a square wave on top (amplitude = half peak-to-peak). Current is sampled at the end of each half-cycle; ΔI = forward − reverse.
- DPV: each period holds the base potential, then pulses by the amplitude in the scan direction. ΔI = end of pulse − end of base.
- CA: holds the rest potential during the quiet time, then steps to E₁ (and optionally E₂). Time zero is the step. Pulses repeats step 1 + step 2, and Change each pulse can move a potential or change a step length each time.
- OCP: no current flows; the potential follows the Nernst equation for the bulk concentrations. With only one form present the OCP is poorly defined (a 0.01 % trace of the other form is assumed), just as in a real cell.
Current is positive for oxidation (anodic), as in the instrument page. The default cell contains only R, so the first sweep upwards oxidises it.
Things to try in class
- Randles–Sevcik: CV, series on scan rate × 2 for 6 runs. In Analysis pick Maximum (direction Forward), plot against scan rate as √x: a straight line through the origin. Or log x with log |Value|: slope 0.5.
- Reversible → irreversible: series on k° × 0.1 for 6 runs, starting at 1 cm/s. Plot the peak position against log k°, or watch ΔEp grow. Or keep k° fixed and raise the scan rate: same effect (Λ = k°/√(DnFv/RT) is what matters).
- Laviron/Tafel slope: for an irreversible couple, peak position vs log scan rate gives 29.6/(αn) mV per decade at 25 °C.
- Number of electrons: compare n = 1 and n = 2. The peak is 23/2 ≈ 2.8 times higher and ΔEp falls from 57 to 28.5 mV.
- Microelectrodes: series on radius from 1.5 mm down to 5 µm (list of values). The peak turns into a sigmoid plateau; plot the limiting current against radius: straight line (4nFDcr).
- Cottrell: CA with step 1 far past E°′. Switch the plot's x axis to t−½.
- Calibration and LOD: DPV or SWV, series on cR with a list of concentrations, plus three runs with cR = 0 as blanks. Mark roles in the Runs table; Analysis gives the line, LOD and LOQ.
- Why pulse methods: DPV with sampling at 5 % of the pulse versus at the end: early sampling picks up the charging current (raise Ru to make it last longer).
- Nernst: OCP with both forms present, series on cO (× 10); plot against concentration as log x: 59.2/n mV per decade.
- iR drop: series on Ru (0, 100, 300, 1000 Ω) on a reversible couple; compare with the E − iRu axis.
Series: the same method several times
Open Series under the method and tick Run as a series. Pick the parameter: any field of the technique, the conditioning or quiet time, or any number in the Cell (n, concentrations, k°, α, radius, D, Cdl, Ru…). The two concentrations are at the top of the list, under Concentration. Then choose how it changes: add a step, multiply by a factor, or type a list (for example 0.01, 0.02, 0.05, 0.1, 0.2 mM). Each run is saved as its own run, named after the value, so the runs overlay in the plot and can be analysed separately. Cell parameters that differ between runs also appear under Plot it against in Analysis. When the series changes cO or cR, each run's concentration is set to that value automatically.
When the current is sampled
By default the current is taken at the end of every step (staircase CV, LSV), half-cycle (SWV) or pulse (DPV). At a set point takes it at a percentage of the step or pulse instead. Sampling earlier gives larger peaks, because the faradaic current decays as t−½ during each pulse, but it also picks up more double-layer charging current. Sampling late rejects the charging current, which is the point of pulse methods. The DPV base current is always taken at the end of the base period. With a linear-ramp CV the current is simply the instantaneous one.
Taking curves to Excel, Google Sheets or Origin
Export plot… above the plot exports the curves as they are plotted, including blank subtraction, the scan selection and the x choice, in the plot's units:
- Copy curves: paste straight into Excel, Google Sheets, Origin or LibreOffice (tab-separated, with names and units).
- Excel workbook: the data plus a ready-made chart in the run colours, and a sheet describing each run and its cell. Google Sheets (File → Import), LibreOffice and Origin open it too.
- Origin-ready text: header rows for Long Name, Units and Comments. Drag the file into Origin.
- Picture: the plot as a PNG.
Export data CSV (Runs) saves every column of every visible run (time, potential, current, E − iRu…), unaffected by the plot settings. Save session keeps all runs, with their methods and cells, in a file that Open session brings back: handy for giving students a set of data. Concentration profiles are not saved; ↻ Simulate again recreates them.
Analysis
Give runs a role. Blank runs can be subtracted from every curve: choose one blank, or the average of all blanks, under Background in Analysis (the same setting as Subtract blank above the plot). The blanks are subtracted too, so they sit at about zero and, with Blanks as 0 standards, enter the fit at the origin. Without subtraction the background stays in the curves and ends up in the intercept. Standards with a concentration build the calibration line. Samples and tests get a concentration from that line. The concentration of each run is filled in from the cell (cR if present, otherwise cO) unless you type one. The value is taken from the plotted curve between x₁ and x₂. For CV, pick the scan and the direction first. LOD = 3.3·s/slope, using the SD of at least three blanks, or the fit's residual SD otherwise.
Plotting results against other things
Below the value selector, Plot it against chooses the x axis of the results plot: concentration (the calibration line), scan rate, SWV frequency, any method or cell setting that differs between the runs (k°, radius, n, Ru…), run number, time of the run, or a custom value you type into the table. The x values can be shown as x, √x, log x or 1/x, and the y as the value, its magnitude, its log, or the position of the peak. Untick Fit to leave a run out of the line. Some classic plots:
- Peak current vs √(scan rate): straight through the origin for diffusion control (Randles–Sevcik).
- log |peak current| vs log scan rate: slope 0.5 for diffusion.
- Peak position vs log scan rate: no shift for a reversible couple, a shift for slow electron transfer.
- OCP vs log concentration: 59.2/n mV per decade for a Nernstian couple.
- Chronoamperometry: switch the main plot's x to t−½ for a Cottrell plot.
About the name
Mashed Potato is a homage to Oliver Rodríguez and his two potatoes. Soft Potato is his open-source electrochemical simulator and toolkit, and Hard Potato is his Python library for controlling commercial potentiostats (CH Instruments, PalmSens) and automating experiments, developed with Joaquín Rodríguez-López at the University of Illinois. Oliver did his PhD with Guy Denuault at the University of Southampton and now works on digital electrochemistry at the UK's National Physical Laboratory. Mashed Potato mixes the two: hardware you control from the browser, and simulated cells to learn and teach with. This page is the soft half. Hence, mashed.
Rodríguez, O. Soft Potato: an open source electrochemical simulator and toolkit. ChemRxiv (2022), doi:10.26434/chemrxiv-2022-4bs3w · Rodríguez, O.; Pence, M. A.; Rodríguez-López, J. Hard Potato: a Python library to control commercial potentiostats and to automate electrochemical experiments. Anal. Chem. 2023, 95, 4840–4845, doi:10.1021/acs.analchem.2c04862
Credits
The Mashed Potato instrument's hardware is derived from IO Rodeo's Rodeostat (CC BY 4.0). Theory in the summary box: Randles–Sevcik, Matsuda–Ayabe, Nicholson, Cottrell, Shoup–Szabo, as in Bard & Faulkner, Electrochemical Methods.
License
This page is released under the MIT license: free to use, modify and share, as long as the copyright notice comes along. No warranty, no support, no refunds (it was free). If it works, great, tell your friends. If it breaks, you get to keep both pieces. The FuNII Lab logo and the Mashed Potato name are not part of the license.
A polite request (not legally binding): Metrohm Autolab is kindly asked not to use Mashed Potato until NOVA learns to export a plain CSV without a fight. We're open source, not a charity.
Built with love for students, and with years of NOVA trauma for motivation.
Full MIT license text
Copyright (c) 2026 FuNII Lab Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.