
The EC sensor is used to measure Salinity in the reef tank. keeping the salinity stable is probably the most important value to monitor. The sensor generally has a small PCB which is mounted in the sensor module and a probe for the tank water.
The EC sensor is a analog sensor and can only be conected to one of the ports on the sensor module.
Here is how to set one up...
Recomended sensors...
Although the Marine assistant hardware will work with a wide range of sensors I recomend using a higher quality one, though my testing I found the results to be more consistant and reliable than using "cheap" sensors, for that reason I recomend the following.
-
DFRobot Gravity - analog sensor of water salinity - DFR0300
EC Sensor
Analog sensor
An EC (Electrical Conductivity) sensor measures the salinity of reef aquarium water by detecting how well it conducts electricity. It has two or more electrodes that pass a small electrical current through the water. The amount of current flow varies with the concentration of dissolved salts, allowing the sensor to calculate conductivity, which is then converted to salinity. Maintaining stable salinity is crucial for coral and marine life health in reef tanks.
Hardware conection
How its conected
The EC 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. The 4 ports are labeled with their intended use, in this case use the PH port. connect 5v (or3,3v), GND and Signal to thecoresponding pins.
The case has a removable section where you can mount the senosr pcb too. remove the 3d printed cover over the outlet to allow the BNC conector to leave the case.
Be sure to mount the Probe in an area of your sump that has good flow, 3d printed Probe holders are available in the Shop.
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 the sensors youhave conected, The most 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:

Line for line:
107: Name of the platfom the code is using (The hardware)
108: What pin on the ADS1115 board we are using
109: Gain - used to set the voltage from the sensor. (More info in the link below)
110: Name Of the sensor
111: Filters currently used
112 - 115: Calibration data, explained in more detail below
117 - 120: Median used to smooth out the data and create a more consistant result.
121: Unit of measurement.
Calebration:
To calibrate the sensor in MA you will need at least two (three are better) calibration solutions. In the example above I used 4, 7 and 10. To calibrate you will need to uncomment the three lines (above it would be 113, 114 and 115), then open the logs and write down the voltage reading for each solution, be sure to leave them in each solution for at least 2-3 minutes to get a good reading. Input these values into the code (Example above has 2,075v set for the 4v solution), be sure they are all uncommented and then reinstall the code.
More details on the ADS1115 and ESP can be found here:
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.