Arduino pH sensor: Difference between revisions
| Line 67: | Line 67: | ||
=== Electric === | === Electric === | ||
https://www.electroniclinic.com/ph-meter-arduino-ph-meter-calibration-diymore-ph-sensor-arduino-code/ | |||
* short the external part and the center of the probe connector: 2.5V output. | |||
== Code == | == Code == | ||
Revision as of 20:27, 4 March 2026
Introduction
Some major commercially available or mass-produced solutions:
- Atlas Scientific and Gravity analog pH Kit with board, sensor and buffer solutions. Hiqh quality, not open source.
- DFRobot Gravity: Analog pH Sensor Kit
- Seeed Studio
- DIY MORE
- Other (Chinese) manufacturers.
If the pH electrode is labotorary 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.
- Rinse with distilled water after use.
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
pH electrode
Usually made of a glass. Glass membrane is filled with a buffer solution of known pH. When the probe is dipped into the solution, hydrogen ions in the test solution start exchanging with other positively charged ions on the glass membrane, which creates an electrochemical potential across the membrane
1
1
Calibration
Using known liquids
Electric
- short the external part and the center of the probe connector: 2.5V output.
Code
References
https://www.e-tinkers.com/2019/11/measure-ph-with-a-low-cost-arduino-ph-sensor-board/