DIY Reef Tank pH Monitoring

reef
Published

January 11, 2021

I added pH monitoring to my reef tank for about $80. I bought a pH probe and the associated PCB from Atlas Scientific and integrated it into my reef tank controller using ESPHome and Home Assistant. My tank is pretty young and not fully stocked so you don’t see much variation in pH right now. At the time of writing this about the only thing consuming CO2 in the tank is nuisance algae.

Configuring ESPHome for the pH probe is pretty straightforward.

sensor:
  #pH sensor
  – platform: adc
    pin: GPIO34
    name: "Reef pH"
    attenuation: 6db
    unit_of_measurement: "pH"
    update_interval: 5s
    accuracy_decimals: 2
    filters:
      – calibrate_linear:
          # Map 0.0 (from sensor) to 0.0 (true value)
        – 1.68 -> 6.86
        – 1.21 -> 9.18
      – sliding_window_moving_average:
          window_size: 60
          send_every: 60

The probe holder is 3d printed and uses rectangular plastic coated magnets I purchased from K&G Magnetics.

Update:

I ended up adding an RC filter to the pH probe analog signal. This helped tremendously with noise. 100 kOhm and 10uF with a time constant of 2.3 seconds.