{"id":110,"date":"2021-03-15T08:43:07","date_gmt":"2021-03-15T08:43:07","guid":{"rendered":"https:\/\/store.smartwti.com\/?post_type=product&#038;p=110"},"modified":"2023-03-10T12:31:18","modified_gmt":"2023-03-10T12:31:18","slug":"analog-tds-sensor-tds-meter-water-conductivity-sensor-tester-liquid-detection-water-quality-monitoring-diy-with-2-cables","status":"publish","type":"product","link":"https:\/\/store.smartwti.com\/ar\/product\/analog-tds-sensor-tds-meter-water-conductivity-sensor-tester-liquid-detection-water-quality-monitoring-diy-with-2-cables\/","title":{"rendered":"Analog TDS Sensor TDS Meter Water Conductivity Sensor Tester Liquid Detection Water Quality Monitoring DIY with 2 cables"},"content":{"rendered":"<div data-spm-anchor-id=\"a2g0o.detail.1000023.i2.1d2731e2tDlTXw\"><span style=\"color: #000000;\">\u00e2\u20ac\u2039Documents Download link:<\/span><\/div>\n<div><span style=\"color: #000000;\"><a style=\"color: #000000;\" href=\"https:\/\/drive.google.com\/drive\/folders\/1V09r0bJHEELFpZKGE4fZ52fXpZk5vxCA?usp=sharing\">https:\/\/drive.google.com\/drive\/folders\/1V09r0bJHEELFpZKGE4fZ52fXpZk5vxCA?usp=sharing<\/a><\/span><\/div>\n<div><\/div>\n<div><span style=\"color: #000000;\"><img decoding=\"async\" src=\"https:\/\/ae01.alicdn.com\/kf\/Hb539b4e143bc4901abf2cd01dc9ead28j.jpg\" alt=\"44\" data-spm-anchor-id=\"a2g0o.detail.1000023.i0.1d2731e2tDlTXw\" \/><\/span><\/div>\n<div><span style=\"color: #000000;\">Note:<\/span><\/div>\n<div><\/div>\n<div><span style=\"color: #000000;\">TDS probes cannot be used in water above 55 \u00c2\u00b0C.<\/span><\/div>\n<div><span style=\"color: #000000;\">The TDS probe should not be placed too close to the edge of the container, as it will affect the display.<\/span><\/div>\n<div><span style=\"color: #000000;\">The head and lead of the TDS probe are waterproof and can be immersed in water, but the connection interface and the signal adapter board are not waterproof. Please pay attention to use.<\/span><\/div>\n<div><\/div>\n<div><span style=\"color: #000000;\">Product Features:<\/span><\/div>\n<div><\/div>\n<div><span style=\"color: #000000;\">1. Wide voltage operation: 3.3~5.5V<\/span><\/div>\n<div><span style=\"color: #000000;\">2. 0~2.3V analog signal output, compatible with 5V, 3.3V two control systems<\/span><\/div>\n<div><span style=\"color: #000000;\">3. The excitation source is an AC signal, effectively preventing probe polarization<\/span><\/div>\n<div><span style=\"color: #000000;\">4. Waterproof probe for long-term immersion in water<\/span><\/div>\n<div><span style=\"color: #000000;\">5. compatible, easy to connect, plug and play, no soldering required<\/span><\/div>\n<div>\n<div><span style=\"color: #000000;\">Technical specifications:<\/span><\/div>\n<div><\/div>\n<div><span style=\"color: #000000;\">Signal adapter board:<\/span><\/div>\n<div><\/div>\n<div><span style=\"color: #000000;\">Input voltage: 3.3~5.5V<\/span><\/div>\n<div><span style=\"color: #000000;\">Output signal: 0~2.3V<\/span><\/div>\n<div><span style=\"color: #000000;\">Working current: 3~6mA<\/span><\/div>\n<div><span style=\"color: #000000;\">TDS measurement range: 0~1000ppm<\/span><\/div>\n<div><span style=\"color: #000000;\">TDS measurement accuracy: \u00c2\u00b110% F.S. (25\u00c2\u00b0C)<\/span><\/div>\n<div><span style=\"color: #000000;\">Size: 42*32mm<\/span><\/div>\n<div><span style=\"color: #000000;\">Module interface: XH2.54-3P<\/span><\/div>\n<div><span style=\"color: #000000;\">Electrode interface: XH2.54-2P<\/span><\/div>\n<div><\/div>\n<div><span style=\"color: #000000;\">TDS probe:<\/span><\/div>\n<div><\/div>\n<div><span style=\"color: #000000;\">Number of probes: 2<\/span><\/div>\n<div><span style=\"color: #000000;\">Overall length: 83cm<\/span><\/div>\n<div><span style=\"color: #000000;\">Connection interface: XH2.54-2P<\/span><\/div>\n<div><span style=\"color: #000000;\">color: White<\/span><\/div>\n<div>\n<p><span style=\"color: #000000;\">Other: Waterproof probe<\/span><\/p>\n<p><span style=\"color: #000000;\">Package includes:<\/span><\/p>\n<div><span style=\"color: #000000;\">1 x TDS signal adapter board<\/span><\/div>\n<div><span style=\"color: #000000;\">1 x Waterproof TDS probe<\/span><\/div>\n<div><span style=\"color: #000000;\">1 x Analog sensor line<\/span><\/div>\n<div><span style=\"color: #000000;\">source code:<\/span><\/div>\n<div><\/div>\n<div><span style=\"color: #000000;\">#define TdsSensorPin A1<\/span><\/div>\n<div><span style=\"color: #000000;\">#define kValue 1.8 \/\/kValue = value of calibrator TDS \/ measurement to get TDS<\/span><\/div>\n<div><span style=\"color: #000000;\">#define VREF 5.0 \/\/ analog reference voltage(Volt) of the ADC<\/span><\/div>\n<div><span style=\"color: #000000;\">#define SCOUNT 30 \/\/ sum of sample point<\/span><\/div>\n<div><span style=\"color: #000000;\">Int analogBuffer[SCOUNT]; \/\/ store the analog value in the array, read from ADC<\/span><\/div>\n<div><span style=\"color: #000000;\">Int analogBufferTemp[SCOUNT];<\/span><\/div>\n<div><span style=\"color: #000000;\">Int analogBufferIndex = 0, copyIndex = 0;<\/span><\/div>\n<div><span style=\"color: #000000;\">Float averageVoltage = 0, tdsValue = 0, temperature = 25;<\/span><\/div>\n<div><\/div>\n<div><span style=\"color: #000000;\">Void setup()<\/span><\/div>\n<div><span style=\"color: #000000;\">{<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0 \u00c2\u00a0 Serial.begin(115200);<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0 \u00c2\u00a0 pinMode(TdsSensorPin, INPUT);<\/span><\/div>\n<div><span style=\"color: #000000;\">}<\/span><\/div>\n<div><\/div>\n<div><span style=\"color: #000000;\">Void loop()<\/span><\/div>\n<div><span style=\"color: #000000;\">{<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0 \u00c2\u00a0Static unsigned long analogSampleTimepoint = millis();<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0 \u00c2\u00a0If(millis()-analogSampleTimepoint &gt; 40U) \/\/every 40 milliseconds,read the analog value from the ADC<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0 \u00c2\u00a0{<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0analogSampleTimepoint = millis();<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0analogBuffer[analogBufferIndex] = analogRead(TdsSensorPin); \/\/read the analog value and store into the buffer<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0analogBufferIndex  ;<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0If(analogBufferIndex == SCOUNT)<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0analogBufferIndex = 0;<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0 \u00c2\u00a0}<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0 \u00c2\u00a0Static unsigned long printTimepoint = millis();<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0 \u00c2\u00a0If(millis()-printTimepoint &gt; 800U)<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0 \u00c2\u00a0{<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 printTimepoint = millis();<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 For(copyIndex=0;copyIndex&lt;scount;copyindex  )&lt; span=&#8221;&#8221;&gt;&lt;\/scount;copyindex  )&lt;&gt;<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 analogBufferTemp[copyIndex]= analogBuffer[copyIndex];<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 averageVoltage = getMedianNum(analogBufferTemp,SCOUNT) * (float)VREF \/ 1024.0; \/\/ read the analog value more stable by the median filtering algorithm, and convert to voltage value<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 Float compensationCoefficient=1.0 0.02*(temperature-25.0); \/\/temperature compensation formula: fFinalResult(25^C) = fFinalResult(current)\/(1.0 0.02*(fTP-25.0));<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 Float compensationVolatge=averageVoltage\/compensationCoefficient; \/\/temperature compensation<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 tdsValue=(133.42*compensationVolatge*compensationVolatge*compensationVolatge &#8211; 255.86*compensationVolatge*compensationVolatge   857.39*compensationVolatge)*0.5*kValue; \/\/convert voltage value to tds value<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \/\/Serial.print(&#8220;voltage:&#8221;);<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \/\/Serial.print(averageVoltage,2);<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \/\/Serial.print(&#8220;V &#8220;);<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 Serial.print(&#8220;TDS Value:&#8221;);<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 Serial.print(tdsValue,0);<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 Serial.println(&#8220;ppm&#8221;);<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0 \u00c2\u00a0}<\/span><\/div>\n<div><span style=\"color: #000000;\">}<\/span><\/div>\n<div><span style=\"color: #000000;\">Int getMedianNum(int bArray[], int iFilterLen)<\/span><\/div>\n<div><span style=\"color: #000000;\">{<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 Int bTab[iFilterLen];<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 For (byte i = 0; i&lt;ifilterlen; span=&#8221;&#8221;&gt;&lt;\/ifilterlen;&gt;<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0bTab[i] = bArray[i];<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 Int i, j, bTemp;<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 For (j = 0; j &lt; iFilterLen &#8211; 1; j  )<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 {<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0For (i = 0; i &lt; iFilterLen &#8211; j &#8211; 1; i  )<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 {<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0 \u00c2\u00a0If (bTab[i] &gt; bTab[i   1])<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 {<\/span><\/div>\n<div><span style=\"color: #000000;\">bTemp = bTab[i];<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0bTab[i] = bTab[i   1];<\/span><\/div>\n<div><span style=\"color: #000000;\">bTab[i   1] = bTemp;<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0 \u00c2\u00a0 }<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0}<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 }<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 If ((iFilterLen &amp; 1) &gt; 0)<\/span><\/div>\n<div><span style=\"color: #000000;\">bTemp = bTab[(iFilterLen &#8211; 1) \/ 2];<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 Else<\/span><\/div>\n<div><span style=\"color: #000000;\">bTemp = (bTab[iFilterLen \/ 2]   bTab[iFilterLen \/ 2 &#8211; 1]) \/ 2;<\/span><\/div>\n<div><span style=\"color: #000000;\">\u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 Return bTemp;<\/span><\/div>\n<div><span style=\"color: #000000;\">}<\/span><\/div>\n<div><\/div>\n<div><span style=\"color: #000000;\"><img decoding=\"async\" src=\"https:\/\/ae01.alicdn.com\/kf\/Hc73cb00e51b249d081eae38be72566b2T.jpg\" alt=\"H08f07c0e3b264a6b95f3fd42a620897ew\" \/><\/span><\/div>\n<div><span style=\"color: #000000;\">\u00e2\u20ac\u2039<\/span><\/div>\n<div><span style=\"color: #000000;\">Connection Photo for reference<\/span><\/div>\n<div><span style=\"color: #000000;\"><img decoding=\"async\" src=\"https:\/\/ae01.alicdn.com\/kf\/H4e0a28c120364dc49124f9d87cb3e3b8l.jpg\" alt=\"11\" \/><img decoding=\"async\" src=\"https:\/\/ae01.alicdn.com\/kf\/H2fb9d41587fe4443b3a5a3a233777f03q.jpg\" alt=\"SEN0244_application_0\" \/><img decoding=\"async\" src=\"https:\/\/ae01.alicdn.com\/kf\/Hedf4c72043df46ddb1da45a577a7f033r.jpg\" alt=\"22\" \/><\/span><\/div>\n<div><span style=\"color: #000000;\"><img decoding=\"async\" src=\"https:\/\/ae01.alicdn.com\/kf\/H3806d44e34054358a57f607146e5b733q.jpg\" alt=\"H6050d57aa6af422e91702a8532d2c04dc\" \/><\/span><\/div>\n<div><\/div>\n<div><span style=\"color: #000000;\">Product Photo<\/span><\/div>\n<div><\/div>\n<div><span style=\"color: #000000;\"><img decoding=\"async\" src=\"https:\/\/ae01.alicdn.com\/kf\/H3b210964785148a2b467b82bf27fc32cY.jpg\" alt=\"a816f87c-8a85-4a5b-afd4-9bccf6283c74.JPG.webp\" data-spm-anchor-id=\"a2g0o.detail.1000023.i1.1d2731e2tDlTXw\" \/><img decoding=\"async\" src=\"https:\/\/ae01.alicdn.com\/kf\/Hc5f03aa4c34c425eb5d802cf3f2cada0Y.jpg\" alt=\"1364722a-59ee-4846-b1ed-cad0bdf8146d.JPG.webp\" \/><img decoding=\"async\" src=\"https:\/\/ae01.alicdn.com\/kf\/H8a7873db67a746b1931b45863e750c33I.jpg\" alt=\"d8821784-e8cb-4833-8491-bd49c044150a.JPG.webp\" \/><img decoding=\"async\" src=\"https:\/\/ae01.alicdn.com\/kf\/H277dff07cfab4a348728f087c7d95159M.jpg\" alt=\"a81b9ab4-e487-4845-b1b4-1a13bfddd97f.JPG.webp\" \/><\/span><\/div>\n<div><span style=\"color: #000000;\"><img decoding=\"async\" src=\"https:\/\/ae01.alicdn.com\/kf\/Hb04b2186d9ba47bface6f46e8573e978H.jpg\" alt=\"0fb59566-6057-43be-9520-4ba1b3cdb13c.JPG.webp\" \/><\/span><\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u00e2\u20ac\u2039Documents Download link: https:\/\/drive.google.com\/drive\/folders\/1V09r0bJHEELFpZKGE4fZ52fXpZk5vxCA?usp=sharing Note: TDS probes cannot be used in water above 55 \u00c2\u00b0C. The TDS probe should not be placed too close to the edge of the container, as it will affect the display. The head and lead of the TDS probe are waterproof and can be immersed in water, but the connection [&hellip;]<\/p>\n","protected":false},"featured_media":111,"comment_status":"open","ping_status":"closed","template":"","meta":[],"product_cat":[16,17],"product_tag":[],"class_list":{"0":"post-110","1":"product","2":"type-product","3":"status-publish","4":"has-post-thumbnail","6":"product_cat-accessories","7":"product_cat-sensors-actuators","9":"first","10":"instock","11":"sale","12":"shipping-taxable","13":"purchasable","14":"product-type-simple"},"_links":{"self":[{"href":"https:\/\/store.smartwti.com\/ar\/wp-json\/wp\/v2\/product\/110","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/store.smartwti.com\/ar\/wp-json\/wp\/v2\/product"}],"about":[{"href":"https:\/\/store.smartwti.com\/ar\/wp-json\/wp\/v2\/types\/product"}],"replies":[{"embeddable":true,"href":"https:\/\/store.smartwti.com\/ar\/wp-json\/wp\/v2\/comments?post=110"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/store.smartwti.com\/ar\/wp-json\/wp\/v2\/media\/111"}],"wp:attachment":[{"href":"https:\/\/store.smartwti.com\/ar\/wp-json\/wp\/v2\/media?parent=110"}],"wp:term":[{"taxonomy":"product_cat","embeddable":true,"href":"https:\/\/store.smartwti.com\/ar\/wp-json\/wp\/v2\/product_cat?post=110"},{"taxonomy":"product_tag","embeddable":true,"href":"https:\/\/store.smartwti.com\/ar\/wp-json\/wp\/v2\/product_tag?post=110"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}