Arduino pH sensor: Difference between revisions
(→1) |
|||
| (8 intermediate revisions by the same user not shown) | |||
| Line 6: | Line 6: | ||
# Atlas Scientific and Gravity analog pH Kit V2 with board, sensor and buffer solutions. Hiqh quality, not open source. | # Atlas Scientific and Gravity analog pH Kit V2 with board, sensor and buffer solutions. Hiqh quality, not open source. | ||
# DFRobot Gravity: Analog pH Sensor Kit | # DFRobot Gravity: Analog pH Sensor Kit | ||
# Seeed Studio | # Seeed Studio, Grove pH sensor kit | ||
# DIY MORE | # DIY MORE | ||
# Other (Chinese) manufacturers. | # Other (Chinese) manufacturers. | ||
If the pH electrode is | Signs of a dying probe include slow response time (more than 2-3 minutes), inability to calibrate correctly, and readings that drift continuously. If the pH electrode is laboratory grade, it is not designed for submerging into measuring solution permanently. Thus, use an industrial-grade pH electrode (lifecycle about 3 years), but calibrate it at least twice every year. | ||
The probe: | The probe: | ||
* Keep wet (store in KCl solution). | * Keep wet (store in KCl solution). | ||
* Don’t put in hot/corrosive stuff. | * Don’t put in hot/corrosive stuff. | ||
* | * Clean the probe by soaking in 0.1M HCl for 30 minutes. If sluggish response, rinse with distilled water after use. | ||
* Never touch the glass with your fingers (oils can contaminate the surface). | |||
* Never wipe it dry. That can create static charges affecting readings. | |||
* Store in pH 4 buffer (or electrode storage solution) when not in use for extended periods. | |||
** Never let the glass membrane dry out completely. | |||
Water resistant probe? | |||
== Theory == | == Theory == | ||
| Line 59: | Line 65: | ||
=== pH electrode === | === pH electrode === | ||
=== Single / Double === | |||
Double junction electrodes | |||
=== 1 === | |||
#Single junction vs Double junction | |||
#*Double junction lasts longer in fertilizer solutions. | |||
#*Better for hydroponics. | |||
#Sealed vs Refillable | |||
#*Refillable = longer life | |||
#*Sealed = cheaper but disposable | |||
#Temperature compensation | |||
#*Some include built-in temperature sensor | |||
#*Important if reservoir temperature fluctuates | |||
=== Glass === | |||
A pH electrode is a voltmeter that measures the electrical potential difference created by hydrogen ions interacting with a glass membrane. Is is usually made of a glass (typically lithium-doped silicate glass). Glass membrane is filled with a buffer solution (usually potassium chloride, pH=7) of known pH. When the probe is immersed into the solution, hydrogen ions in the test solution interact with other positively charged ions on the glass membrane, which creates an electrochemical potential across the membrane | A pH electrode is a voltmeter that measures the electrical potential difference created by hydrogen ions interacting with a glass membrane. Is is usually made of a glass (typically lithium-doped silicate glass). Glass membrane is filled with a buffer solution (usually potassium chloride, pH=7) of known pH. When the probe is immersed into the solution, hydrogen ions in the test solution interact with other positively charged ions on the glass membrane, which creates an electrochemical potential across the membrane | ||
=== ISFET === | |||
* Durable | |||
* Faster response | |||
* Better for continuous systems | |||
* More expensive | |||
=== Temperature effects === | === Temperature effects === | ||
| Line 71: | Line 103: | ||
== Calibration == | == Calibration == | ||
=== Calibration frequency === | |||
* Monthly calibration maintains reasonable accuracy (casual use) | |||
* Weekly or when readings seem inconsistent (hydroponics nutrient management etc) | |||
=== Using known liquids === | === Using known liquids === | ||
| Line 79: | Line 118: | ||
* short the external part and the center of the probe connector: 2.5V output. | * short the external part and the center of the probe connector: 2.5V output. | ||
== Code == | == Code == | ||
== Building a Reliable pH Monitoring System == | |||
== References == | == References == | ||
Latest revision as of 21:46, 4 March 2026
Introduction
"The probe generates millivolt signals that drift with temperature, the signal conditioning board needs proper calibration, and those cheap pH electrodes from online marketplaces degrade faster than you’d expect." https://pcbsync.com/ph-sensor-arduino/
Some major commercially available or mass-produced solutions:
- Atlas Scientific and Gravity analog pH Kit V2 with board, sensor and buffer solutions. Hiqh quality, not open source.
- DFRobot Gravity: Analog pH Sensor Kit
- Seeed Studio, Grove pH sensor kit
- DIY MORE
- Other (Chinese) manufacturers.
Signs of a dying probe include slow response time (more than 2-3 minutes), inability to calibrate correctly, and readings that drift continuously. If the pH electrode is laboratory grade, it is not designed for submerging into measuring solution permanently. Thus, use an industrial-grade pH electrode (lifecycle about 3 years), but calibrate it at least twice every year.
The probe:
- Keep wet (store in KCl solution).
- Don’t put in hot/corrosive stuff.
- Clean the probe by soaking in 0.1M HCl for 30 minutes. If sluggish response, rinse with distilled water after use.
- Never touch the glass with your fingers (oils can contaminate the surface).
- Never wipe it dry. That can create static charges affecting readings.
- Store in pH 4 buffer (or electrode storage solution) when not in use for extended periods.
- Never let the glass membrane dry out completely.
Water resistant probe?
Theory
Briefly
An ideal pH sensor because H+ ions. Ranging linearly:
- U = 0 @ pH 7
- U > 0 @ pH < 7
- U < 0 @ pH > 7
A high quality op amp is needed to amplify the voltage.
The pH electrode
- a passive sensor
See more about impedance and Arduino ADC at https://www.e-tinkers.com/2020/07/a-review-on-seeed-studio-ph-and-ec-sensor-kits-part-1/
Nernst Equation
The Gibbs free energy is related to the free energy change under standard state by
where is the reaction potential, is the universal ideal gas constant. Also
where is the Faraday constant, is the number of electrons transferred in cell reaction, and thus we have
The voltage generated across the probe's glass membrane follows the Nernst equation and changes by approximately 59.16 mV/pH at 25°C.
pH electrode
Single / Double
Double junction electrodes
1
- Single junction vs Double junction
- Double junction lasts longer in fertilizer solutions.
- Better for hydroponics.
- Sealed vs Refillable
- Refillable = longer life
- Sealed = cheaper but disposable
- Temperature compensation
- Some include built-in temperature sensor
- Important if reservoir temperature fluctuates
Glass
A pH electrode is a voltmeter that measures the electrical potential difference created by hydrogen ions interacting with a glass membrane. Is is usually made of a glass (typically lithium-doped silicate glass). Glass membrane is filled with a buffer solution (usually potassium chloride, pH=7) of known pH. When the probe is immersed into the solution, hydrogen ions in the test solution interact with other positively charged ions on the glass membrane, which creates an electrochemical potential across the membrane
ISFET
- Durable
- Faster response
- Better for continuous systems
- More expensive
Temperature effects
- The electrode’s voltage response changes with temperature (the 59.16 mV/pH value varies).
- the actual pH of solutions changes with temperature independent of measurement effects.
Add a waterproof temperature sensor, eg DS18B20.
1
Calibration
Calibration frequency
- Monthly calibration maintains reasonable accuracy (casual use)
- Weekly or when readings seem inconsistent (hydroponics nutrient management etc)
Using known liquids
Electric
- short the external part and the center of the probe connector: 2.5V output.