DFROBOT TDS Meter Sensor With Arduino| Measure Water Quality in PPM |
Introduction
TDS (Total Dissolved Solids) indicates how many milligrams of soluble solids are dissolved in one liter of water. In general, the higher the TDS value, the more soluble solids are dissolved in water, and the less clean the water is. Therefore, the TDS value can be used as one reference point for reflecting the cleanliness of the water.
In this project, we will interface Gravity Analog TDS Sensor with Arduino Microcontroller and read the value in a 16×2 LCD Display (with i2c module)
Materials
Following are the components required for making this project.
DFROBOT Gravity Analog TDS Sensor
DFROBOT Gravity Analog TDS Sensor is an Arduino-compatible TDS sensor/Meter Kit for measuring the TDS value of the water. It can be applied to domestic water, hydroponic and other fields of water quality testing. This product supports 3.3 ~ 5.5V wide voltage input, and 0 ~ 2.3V analog voltage output, which makes it compatible with 5V or 3.3V control systems or boards.
The excitation source is an AC signal, which can effectively prevent the probe from polarization and prolong the life of the probe, meanwhile, it can help increase the stability of the output signal. The TDS probe is waterproof, it can be immersed in water for a long time measurement.
How to connect TDS meter to Arduino?
Interfacing TDS Sensor with Arduino
Source Code/Program
Video
Check Out Other Projects – Automated Chrome Dino Game using Arduino
7 Responses
hi gaurav…if u dont mind can i get the code..please
https://github.com/gauravk5/Techeonics-Arduino-Codes/tree/main/DFROBOT%20TDS%20Meter%20Sensor
Many thanks..i am using your code unfortunately there an error occur
‘A1’ was not declared in this scope
how to fix the problem..
First of all go to tools and select the board as arduino uno and then try to upload it,
else
Please send me a mail with the screenshot of the error at thetecheonics@gmail.com
Your method of explaining everything in this article is genuinely pleasant, all be able to easily understand it,
Thanks a lot.
Arduino: 1.8.19 (Windows Store 1.8.57.0) (Windows 10), Board: “Arduino Uno”
sketch_apr08b:7:1: error: expected initializer before ‘int’
int analogBuffer[SCOUNT]; // store the analog value in the array, read from ADC
^~~
C:\Users\user2\AppData\Local\Temp\arduino_modified_sketch_532610\sketch_apr08b.ino: In function ‘void setup()’:
sketch_apr08b:16:5: error: ‘lcd’ was not declared in this scope
lcd.init(); // initialize the lcd
^~~
C:\Users\user2\AppData\Local\Temp\arduino_modified_sketch_532610\sketch_apr08b.ino: In function ‘void loop()’:
sketch_apr08b:26:6: error: ‘analogBuffer’ was not declared in this scope
analogBuffer[analogBufferIndex] = analogRead(TdsSensorPin); //read the analog value and store into the buffer
^~~~~~~~~~~~
C:\Users\user2\AppData\Local\Temp\arduino_modified_sketch_532610\sketch_apr08b.ino:26:6: note: suggested alternative: ‘analogBufferTemp’
analogBuffer[analogBufferIndex] = analogRead(TdsSensorPin); //read the analog value and store into the buffer
^~~~~~~~~~~~
analogBufferTemp
sketch_apr08b:36:38: error: ‘analogBuffer’ was not declared in this scope
analogBufferTemp[copyIndex]= analogBuffer[copyIndex];
^~~~~~~~~~~~
C:\Users\user2\AppData\Local\Temp\arduino_modified_sketch_532610\sketch_apr08b.ino:36:38: note: suggested alternative: ‘analogBufferTemp’
analogBufferTemp[copyIndex]= analogBuffer[copyIndex];
^~~~~~~~~~~~
analogBufferTemp
sketch_apr08b:49:3: error: ‘lcd’ was not declared in this scope
lcd.setCursor(0, 0);
^~~
C:\Users\user2\AppData\Local\Temp\arduino_modified_sketch_532610\sketch_apr08b.ino: In function ‘int getMedianNum(int*, int)’:
sketch_apr08b:78:19: error: expected ‘}’ at end of input
return bTemp;
^
exit status 1
expected initializer before ‘int’
This report would have more information with
“Show verbose output during compilation”
option enabled in File -> Preferences.
—this are the error i encounter when try to upload in arduino board. what shall i do eleimante the error
Mail us at thetecheonics@gmail.com with the screenshot of the error and the code file