
Moitoring the PH of your water can inform you of problems quickly so you can make ajustments. The sensor generally has a small PCB which is mounted in the sensor module and a probe for the tank water.
​
The PH sensor is an Analog sensor and can only be conected to one of the Senosor module analog ports.
​
Here is how to conect one and set it up...
PH Sensor
Analog sensor
A pH sensor for reef aquariums measures the acidity or alkalinity of the water, which is crucial for coral health. It typically consists of a glass electrode and a reference electrode. The glass electrode reacts to hydrogen ion concentration in the water, generating a small voltage that varies with the pH level. This voltage is compared to the stable reference electrode, and the difference is converted into a readable pH value. The sensor connects to a pH controller or monitor, allowing reef keepers to track and maintain stable pH levels, essential for a healthy reef ecosystem.
Hardware conection
How its conected
The PH sensor needs to be connected to one of the analog ports in the sensor module, each port can supply either 5v or 3,3v to power the sensor. For the signal there is a 3 port teminal, the center port is Ground then either side are the Signal pins. Signal can either be sent directly (DIR) to the ESP32 or via a voltage divider (DIV). The ESP32 can only read analog volages up to 3v so if you have a sensor that outputs more then you will need to use the divider.
​
You may 3d print a custom cradle to mount the sensor into the port spot and the removeable piece of the case can be drilled to allow the cable to pass through.
​
Here is an example of how to use the divider:
5v analog output form sensor reduced to 3v for the esp32. R1 = ?Ohm R2=?Ohm
​
The Beta version of the hardware has moved on to using an ADS1115 external ADC for sensing, the hardware conection is slightly different to what is listed here. This will be updated soon.
Software setup
Checking the Code
Analog sensors are actually quite simple to setup. The code has everything in place and if You use the ports as shown on the PCB then there is no need to change anything, simply uncomment thesensors youhave conected. themost Important part here is to ensure your sensor is calibrated correctly. Here is a quick rundown on the part of the code that is used then a guide on how to calibrate.
The code:
​​
​
Calibrateion:
Links
Here are a few links to where you can purchase your sensors, click the link depending on your location.
​
Worldwide link generally takes longer to be delivered but is a little cheaper. Better if you want to bulk order.
Full disclosure: some of these links are affiliate links, clicking them and purchasing though my links helps me support the project.