Mashed Potato Titrator — FuNII Lab
Instrumentation Tools

Mashed Potato Titrator

Two Mashed Potato boards · constant-current generation + biamperometric endpoint · Web Serial · Chrome / Edge

Generatorchronopotentiometry · Ag anode Not connected Firmware 7 or newer
Detectorchronoamperometry · two Ag wires Not connected Any Mashed Potato firmware

Titration

Generator CP

Detector CA

Automatic endpoint onset, slow down, stop
Safety and timing limits

Demo beaker simulated cell shared by the demo boards

The demo generator's clock runs 0.25 % fast, as an Uno's ceramic resonator can; the page measures and corrects it. Solubility products are illustrative. 2 ppm in 2 g of sample is 0.113 µmol Cl⁻.

Detector current vs charge

Phase
—
Time
—
Charge
—
Cl⁻ titrated
—
Detector
—
Generator
—
Gen. potential
—

Drag on a plot to zoom, double-click to reset.

Result

No titration yet.
Endpoint fit points, delay

Generator

Events

Titrations

NameDateStatusEndpoint chargeCl⁻ (net)ConcentrationClock

Conditioned cell Karl Fischer style

The electrolyte is titrated until the detector rises, a small excess of Ag⁺ is added on purpose, and the detector is held at that reading. Each sample is then titrated back to it.

Generator CP pulses

Detector CA

End point

More baseline, onset

Sample

Press Titrate sample, then inject. The titration ends when the detector is back at the end-point level and no pulse has been needed for the set time. m1 and m2 can also be entered afterwards, in the table.

Detector current cell off

Detector
—
End-point level
—
Drift
—
This sample
—
Time
—
Generator
—

Generated charge

Events

Results

NameTypeMass (g)ChargeCorrections (drift · level)Cl⁻ResultTime

Charge = generated − drift × time − (detector at the end − at the start) ÷ detector response. Results in ppm are µg Cl⁻ per g of sample; standards show the recovery.

Single run

Use these to check the electrodes before titrating: a constant-current run on the generator shows the potential it needs (it must stay inside the limits), a run on the detector shows its baseline and noise.

No run yet

Points
—
Current
—
Potential
—
Charge
—
Noise (SD)
—

Generator board

Not connected.

Detector board

Not connected.

Serial console


    

Calibration lives in each Uno's EEPROM and is read when a board connects. To calibrate a board, use the main Mashed Potato page.

What this page does

It runs a constant-current coulometric titration with two Mashed Potato boards in the same beaker. The generator board holds a constant anodic current through a silver anode, which releases Ag⁺ (Ag → Ag⁺ + e⁻); the Ag⁺ precipitates the chloride as AgCl. The detector board holds a small voltage between two silver wires and measures the current between them (biamperometry). Before the endpoint there is almost no free Ag⁺ and the current stays small; after it, excess Ag⁺ is reduced at one wire and formed at the other, and the current rises in proportion to the excess. The charge at the endpoint gives the chloride directly: n(Cl⁻) = Q / F, with no calibration curve. This is the principle of the Cotlove chloridometer.

Two ways to titrate

  • Titration tab (extrapolation): one titration per filling of the cell. The page follows the whole curve and finds the endpoint by extending the rise after it back to the baseline. Good for teaching and for larger amounts.
  • Conditioned cell tab (Karl Fischer style): the electrolyte is titrated once to a set detector current and held there; each sample is then titrated back to the same current, one after the other in the same electrolyte. Best for traces (ppm halide in a reagent): the reagent blank and the AgX solubility cancel, because every titration starts and ends at the same state.

The conditioned cell

  1. Start the cell. The detector records its baseline for 30 s; the page measures its noise and how fast it is still drifting (freshly immersed wires drift for a few minutes: wait if it warns).
  2. Conditioning. The generator titrates the halide in the electrolyte with fast pulses until the detector really rises (any overshoot only adds to the excess set next): the same onset test as in the Titration tab, against the charge, with the baseline's own drift removed so that a creeping background cannot pass for the end point. If it rises almost at once, the electrolyte already had excess Ag⁺; the page says so and carries on from there.
  3. Setting the level. After the mixing time, a chosen excess of Ag⁺ (0.5 mC by default, about 5 nmol) is added on purpose, in two halves with a pause for mixing after each. The reading after the second half becomes the end-point level, and its rise per mC is the detector response at that level (close to the equivalence point the rise is curved, because the AgX still dissolves, so the local slope is the one that matters). Every sample is titrated back to this same state, so the curvature cancels. With a fixed level entered instead, the cell goes straight to that current and holds it (enter the response under More to keep the end correction). The cell then holds the level and measures the drift; once the drift is known (measured over at least 30 s, starting 10 s after the last titration ended, so that its last pulses have mixed) it shows ready and a sample can be titrated.
  4. Approaching the level. The pulses depend on how far the detector still has to go, as a fraction of the way from the lowest reading the sample caused (or, when only holding, of the level's height). More than 75 % to go: fast pulses back to back. Between 75 % and 40 %: 1 s pulses whose current shrinks in proportion, each followed by the mixing pause. Under 40 %: slow pulses with the pause. Both switch points are settings (End point), to tune on the real cell: as soon as the detector starts to rise, the current comes down. The detector lags the generator by the mixing time, so slowing down early keeps the overshoot past the level small; what is left is corrected with the detector response.
  5. Drift. While ready, the cell keeps holding the level; the charge this needs per minute (Ag⁺ lost to light, through the frit, to impurities) is the drift.
  6. Titrate a sample. Enter the name and the syringe masses (they can be entered later in the table), press Titrate sample and inject. The halide takes up the excess Ag⁺, the detector drops, and the pulses bring it back. The titration ends when the detector is in the band and no pulse has been needed for the set time (and not before the shortest titration time).
  7. Result. Charge = generated − drift × time − (detector at the end − at the start) ÷ detector response. The last term corrects for ending slightly above or below where the titration started; the response (µA per mC) is measured during conditioning, or entered. The charge is corrected for the generator's clock. ppm = µg Cl⁻ per g of sample; for a standard, enter the µg added and read the recovery.

Pulses end on their own on the board, so no charge is lost when the generator stops. Each pulse starts from the potential the last one at the same current needed.

Wiring

  • Generator: WE → silver anode (a wire coil or foil with a fair area, so the current density stays low). RE and CE together → the cathode (platinum or silver wire) inside a tube with a frit filled with the same electrolyte. In the same compartment the cathode would plate the Ag⁺ back and spoil the endpoint.
  • Detector: WE → one silver wire, RE and CE together → the other silver wire. Both clean and of similar size.
  • Plug both Unos into the computer, press Connect on each strip and pick each board's port. Chrome remembers the ports, but check which is which: the generator must run firmware 7. If you got them the wrong way round, use Swap on the Boards tab.
  • A board's port can be open in one tab only: close the main Mashed Potato page first.

Solution

A typical medium is dilute nitric acid with acetic acid and a little gelatin (the Cotlove type). The acid lets the cathode work at a modest voltage, the acetic acid lowers the solubility of AgCl (a sharper endpoint), and the gelatin keeps the AgCl from coating the electrodes. Stir steadily throughout: the endpoint is only as fast as the mixing. Keep the sample small: the board holds at most about 0.85 mA, and 1 µmol of chloride needs 96.5 mC, about 3 minutes at 0.5 mA.

How the automatic titration runs

  1. Baseline: the detector starts first and records its baseline; the page measures its noise.
  2. Generation: a 1 s open-circuit reading of the generator, then the constant current starts from that potential.
  3. Onset: for every detector point the page fits a straight line to the last few points (the slope window) against the charge, not the time, so the slope keeps its meaning when the current changes. The onset is called when the slope is clearly positive (more than 3 standard errors), the current has risen above the lowest level seen by the set multiple of the noise (and the minimum in nA), and this holds for the set number of points in a row. One noisy point cannot trigger it, and the first two windows after the current is switched on are ignored.
  4. Slowing down: with a slow current set, the generator stops, the solution mixes for the pause, and the generator restarts at the slow current (on a more sensitive range if it fits). With an expected amount entered, it also slows down at that percentage of it, before the endpoint, as an automatic burette does.
  5. Stop: once enough charge has passed after the onset (a percentage of the charge at the onset) or the detector has risen by the set current, the generator stops; the detector keeps recording for a few seconds, then stops.
  6. Endpoint: the straight part of the rise is fitted (by default the points between 40 % and 100 % of the largest rise, at the slow current only) and extended back to the baseline before the rise. Where they meet is the endpoint charge. Points recorded while no current flowed (pauses, after the stop) are never fitted: the charge stands still there.

Why slow down near the end

The detector only sees the excess Ag⁺ after it has mixed from the anode to the wires. While the solution mixes, the generator keeps adding Ag⁺, so every detector point is plotted at a slightly too high charge: about the current times the mixing time. At 500 µA and 3 s that is 1.5 mC, 1.6 % of 1 µmol. At a tenth of the current the error is a tenth. The detector delay setting under Endpoint fit shifts every point back by a time you choose, if you want to correct for it instead; watch how long the detector keeps rising after the generator stops to estimate it.

The charge, and the board's clock

The charge is the sum of the measured current over each point (I × interval), not the set current, so it is right even if the loop is not exactly on the setpoint. It is only as good as two things:

  • The current calibration of the range the generator uses (r0 for currents above about 85 µA, r1 below). Calibrate those carefully on the main page.
  • The Uno's clock. An Uno is clocked by a ceramic resonator, which can be a few tenths of a percent off: the interval it thinks is 50 ms is not quite 50 ms. The page compares the board's own point count with the computer's clock over the whole run and corrects the charge for it. The correction is shown with the result (it needs at least 20 s of generation).

When the generator is stopped, the firmware drops the current of the unfinished interval; the page adds it back from the time since the last point. Keep the generator interval short (50 ms) so that this is small anyway.

Two boards in one beaker: grounds

Both Unos take their power and ground from the same computer, so their circuits are joined through the USB ground, and also through the solution. Part of the generator current can then return through the detector's wires and shift its reading. The charge stays right (the anode current is measured where it flows) but the detector baseline can jump when the generator switches on; the page warns when it sees that. Remedies, from simplest:

  • keep the cathode in its fritted tube, away from the detector wires;
  • place the detector wires away from the anode;
  • power one board through a USB isolator (ADuM4160-type, full speed), which separates the two grounds completely.

Blank and fixed-current endpoint

Titrate the electrolyte without sample to get the blank (µmol), and enter it: it is subtracted from the result. The fixed-current endpoint is the classic chloridometer reading: the charge where the detector first rises a set current above its baseline. It depends on the electrodes and the stirring, so it needs standards; the extrapolated endpoint does not.

Single runs

A constant-current run on the generator shows the potential the cell needs at a given current; it must stay well inside the limits, or the titration stops at the limit. A constant-potential run on the detector shows its baseline and noise before you titrate.

Demo boards

The demo boards share a simulated beaker: chloride, an Ag anode, mixing with a time constant and AgCl solubility. Add a sample in the demo card and titrate as with real boards. Try the water medium to see how solubility rounds the endpoint, and a long mixing time to see the lag the slow current reduces.

Credits

Part of Mashed Potato, the Arduino shield potentiostat of the FuNII Lab (Prof. Gabriel Negrão Meloni, Department of Chemistry, University of São Paulo). Analog front end derived from IO Rodeo's Rodeostat FeatherWing (CC BY 4.0). Written with the help of Claude (Anthropic). MIT license, no warranty.