Technical Project Notes

Technical Blog

Technical project notes, build records, deployment details, diagrams, and practical code examples.

Posts
15
Latest
8 November 2026

Latest Post

Adding a Live pH Probe to a Planted Aquarium

Submitted 8 November 2026

A Mega 2560 clone, W5500 Ethernet shield and analog pH interface send minute-by-minute aquarium readings to a local collector and live dashboard.

A planted aquarium is a changing environment, but a drop-based test only gives a reading when someone performs it. A continuous analog pH probe extends the aquarium sensor network so the water can be sampled once a minute and its history viewed alongside the other aquarium measurements.

A densely planted freshwater aquarium with the pH probe mounted among the plants
The planted aquarium that the new pH stream monitors.

Hardware and data path

The interface board converts the glass probe’s signal into an analogue voltage. A Mega 2560 clone reads that voltage, calculates pH, prints the result over USB serial and sends one UDP packet per minute through a W5500 Ethernet shield.

The board carries the earlier Gravity™ label; the Atlas Scientific Gravity™ Analog pH Kit has since been rebranded as the Surveyor™ Analog pH Kit. Its published specifications are:

Specification Detail
Monitored parameter pH
Sensing range 0.1 to 14.0
Resolution 0.1
Accuracy ±0.2
Data protocol / output Analog (2.7 V to 0.2 V)
Response time Continuous analog response
Temperature compensation None; unnecessary for basic monitoring
Supported probes Any type and brand
Calibration Optional
Board dimensions 56.2 mm × 32 mm (2.2″ × 1.2″)
Weight 15 g
Item Integration detail
Controller Arduino Mega 2560 clone
pH interface Atlas Scientific Surveyor™ Analog pH Kit (formerly Gravity™; board marked “Gravity pH Meter V2.1”)
Probe input A15
Network interface W5500 Ethernet Shield 2.0
Static sensor address 192.168.202.4
Local collector 192.168.202.1, UDP port 13
Reporting interval One UDP packet per minute
Serial connection USB, 9600 baud; pH and millivolts printed while running
Stored record Timestamp, pH and millivolts
Dashboard Live aquarium page and pH history chart
Arduino Mega 2560 with W5500 Ethernet shield wired to the red analog pH interface board
The bench setup, with the pH signal on A0 before it was moved to A15 for the aquarium installation.
Black PETG printed enclosure housing the Arduino Mega and Ethernet shield
The PETG printed box housing the Arduino hardware.

The Ethernet shield uses the Mega’s SPI pins. In this bench photo, the pH signal is connected to A0. It was later moved to A15 for the aquarium installation. The sketch retained the existing EEPROM calibration when the ADC input changed, so the move did not require recalibration.

The Mega was selected over an RP2040 solely for its 5 V ADC. The analog pH interface connects directly to the Mega input, with no extra analogue conversion stage.

Reference solutions and calibration

The calibration kit provides pH 4, 7 and 10 reference solutions. Its package lists the following specifications:

Package specification Label value
Reference pH values 4.00, 7.00 and 10.00
Quantity One 20 ml pouch of each value
Stated accuracy ±0.02 pH at 25 °C / 77 °F
Traceability NIST traceable

For later calibration, the Mega can be connected to a computer over USB, with a serial terminal set to 9600 baud. The running sketch prints the voltage and calculated pH once per second. Between buffers, the probe is rinsed with distilled or RO water; excess rinse water is allowed to drip off without wiping the glass bulb. Each fresh portion is given time to settle, and used solution is not returned to its pouch or bottle.

A three-point calibration uses pH 7 first, followed by pH 4 and pH 10. With the probe settled in each buffer, the corresponding line command is sent: CAL,7, CAL,4 or CAL,10. The board confirms each point was saved. Calibration values are stored in EEPROM, so the USB cable can be removed afterward; recalibration does not require reflashing the firmware. Any single point can also be updated independently when needed.

Only one 20 ml pouch of each pH value was initially available. With no other reference solution to hand, the poured portions were reused while the probe moved between values. The pH 4 jar began to read progressively higher, consistent with contamination from carry-over drops. Recalibrating to a used reference could make the display agree with that jar without proving the probe’s accuracy.

Probe in the aquarium

Close view of the pH probe secured vertically among plants in the aquarium
The pH probe mounted in the planted tank, where it can continue reporting without a manual test.

Manual chemical test

Repeated use of the small reference portions left the probe’s absolute accuracy uncertain, prompting a comparison with a manual chemical test. The first aquarium probe readings settled around pH 8.5, while the drop-based colour test appeared close to pH 8.0. The colour-chart photograph cannot resolve the difference precisely, so fresh reference solutions were still needed.

Aquarium pH colour test tube held beside a chart with values from pH 6 to 9
A colour-chart test taken alongside the continuous probe reading. The pictured match suggests approximately pH 8, with the usual uncertainty of comparing colours in a photograph.

Final check with fresh reference solutions

On 9 November, a new three-point calibration was completed in the order pH 7, 4 and 10; the Mega confirmed that each point was saved to EEPROM. The containers were then emptied and dried, refilled from new 500 ml reference bottles, and each value measured again. The measured temperature during this check was 24.0 °C. The bottles are labeled pH 4.00, 7.00 and 10.01, each with a stated accuracy of ±0.05 pH at 25 °C. The firmware uses CAL,10 for the high calibration point, 0.01 pH below the bottle’s label.

Three fresh pH reference solution bottles labeled 4.00, 7.00 and 10.01
The new reference bottles used for the final check, labeled pH 4.00, 7.00 and 10.01.

The fresh portions gave these readings:

ReferenceObserved pHSamples
4.004.00–4.059
7.006.95–7.009
10.019.98–10.0012

All 30 readings were within 0.05 pH of their reference labels. This separate check with fresh portions supports the calibration across the tested range and resolves the concern raised by the repeatedly used pH 4 jar. It does not establish an absolute probe accuracy: the bottles specify ±0.05 pH at 25 °C, while the check was made at 24.0 °C, and no independent meter was used. The remaining difference between the earlier aquarium probe reading and the colour test cannot be quantified from that photograph.

One reading per minute

The collector accepts the board’s single UDP datagram, timestamps it and appends the pH and millivolts to a local CSV record. A scheduled uploader copies the readings to the central server, where the live aquarium page and history chart are generated.

The minute-by-minute stream makes it possible to see whether pH is steady or changes over hours and days. A chemical test taken occasionally is a snapshot; it cannot show the variation between those test times. The history shows the aquarium’s pattern over time.

The live value and longer history are available on the aquarium dashboard, with the newest reading also shown on the live sensors page.

Conclusion: before and after calibration

Aquarium pH probe chart from 8 to 10 November: readings near 8.4 to 8.6 before recalibration on 9 November, then near 8.03 overnight
Thirty-minute average pH readings before and after the 9 November calibration. The brief low point at the transition is not representative of the settled aquarium reading.

Before the fresh-reference calibration, the probe reported roughly pH 8.4–8.6 in the aquarium. After the calibration, its readings settled near pH 8.03 and stayed close to that level overnight. The abrupt step reflects a change in the probe’s calibration, rather than evidence that the tank water itself changed by about half a pH unit in minutes. The new readings broadly agree with the earlier colour test near pH 8, while the fresh-buffer check provides stronger support for the probe’s calibration. This chart shows the practical effect of correcting the measurement; it does not establish the aquarium’s absolute pH more precisely than the references allow.

Topics

Current Tags

Archive

All Posts

15 total