top of page
Splash of Water

TDS Sensor

TDS is monitored to ensure the quality of your RO/DI water, this will help you decide when to change the filters.​ The sensor generally has a small PCB which is mounted in the sensor module and a probe for the tank water.

The TDS sensor is an Analog sensor and can only be conected to one of the Senosor module analog ports. 

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 on of the following.

  • DFRobot Gravity - analog sensor of TDS, purity of water for Arduino

TDS Sensor

Analog sensor

A TDS (Total Dissolved Solids) sensor measures the concentration of dissolved substances, like minerals and salts, in reef aquarium water. It works by sending an electrical current between two probes and measuring the water's conductivity, which increases with higher dissolved solid levels. The sensor converts this data into a TDS value (ppm), indicating water purity. It's commonly used to monitor RO/DI filter performance and ensure clean, stable water for reef health.

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. 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 conector to leave the case.

Be sure to mount the Probe inline with your auto top off feed.

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:

ads-PH1.png

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:

https://esphome.io/components/sensor/ads1115.html

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.

bottom of page