dfrobot / gravitytds Goto Github PK
View Code? Open in Web Editor NEWDFRobot Gravity: Analog TDS Sensor / Meter For Arduino SKU: SEN0244
License: GNU Lesser General Public License v2.1
DFRobot Gravity: Analog TDS Sensor / Meter For Arduino SKU: SEN0244
License: GNU Lesser General Public License v2.1
I don't know if this is a noob problem but when I connect the library with my ESP32, it returns just 0. Yes, I have set the correct analog channel (I use A0 which is pin 36 on the ESP32) and I went as far as to go into the library and modify the already set pin inside the cpp file. I don't know what I must do to be able to make the ESP32 and the library compatible together. Please help.
This version only supports receiving the calibration commands using the serial console. Would it be possible to update it so it can receive the commands as parameters of the update function? It would be similar to what is already implemented in the library for pH sensor SEN0161. That would allow us to include the calibration routine in our sketches so they are executed by e.g. touching a button.
Hello can I know what is the purpose of calibration purpose, Since the starting value in serial monitor after each calibration depend on the value of buffer solution. For example if I used 500ppm buffer solution, the value in the serial monitor will be 300 after I take out the probe from the solution. While if I used 707ppm buffer solution, the value in the serial monitor will be 500ppm after I take out the probe from the solution. I notice when cal:tdsvalue is being put, there is new K-value been rewrite
Hello friends!!!
I try to install this Gravity TDS with zip on arduino and it gives me problems, it tells me--> library is not valid: missing file "library. properties" <-- how can I solve this issue?
its needed install any thing more?
Hi, I have 3 TDS sensors and have the following code, wondering how I enter calibration function for the other 2 sensors
float temperature = 25;
float tdsValue_SUP = 0;
float tdsValue_PREDI = 0;
float tdsValue_OUT = 0;
float kValue_SUP = 0;
float kValue_PREDI = 0;
float kValue_OUT = 0;
GravityTDS gravityTds_SUP;
GravityTDS gravitytds_PREDI;
GravityTDS gravityTds_OUT;
gravityTds_SUP.setPin(TDS_SUP_Pin);
gravityTds_SUP.setAref(5.0); //reference voltage on ADC, default 5.0V on Arduino UNO
gravityTds_SUP.setAdcRange(1024); //1024 for 10bit ADC;4096 for 12bit ADC
gravityTds_SUP.setKvalueAddress(4); //set the EEPROM address to store the k value,default address:0x08
gravityTds_SUP.begin(); //initialization
gravitytds_PREDI.setPin(tds_PREDI_Pin);
gravitytds_PREDI.setAref(5.0); //reference voltage on ADC, default 5.0V on Arduino UNO
gravitytds_PREDI.setAdcRange(1024); //1024 for 10bit ADC;4096 for 12bit ADC
gravitytds_PREDI.setKvalueAddress(8); //set the EEPROM address to store the k value,default address:0x08
gravitytds_PREDI.begin(); //initialization
gravityTds_OUT.setPin(TDS_OUT_Pin);
gravityTds_OUT.setAref(5.0); //reference voltage on ADC, default 5.0V on Arduino UNO
gravityTds_OUT.setAdcRange(1024); //1024 for 10bit ADC;4096 for 12bit ADC
gravityTds_OUT.setKvalueAddress(12); //set the EEPROM address to store the k value,default address:0x08
gravityTds_OUT.begin(); //initialization
gravityTds_SUP.setTemperature(temperature); // set the temperature and execute temperature compensation
gravityTds_SUP.getKvalue();
gravityTds_SUP.update(); //sample and calculate
tdsValue_SUP = gravityTds_SUP.getTdsValue(); // then get the value
//Calculate TDS from Output of Membrane
gravitytds_PREDI.setTemperature(temperature); // set the temperature and execute temperature compensation
gravitytds_PREDI.getKvalue();
gravitytds_PREDI.update(); //sample and calculate
tdsValue_PREDI = gravitytds_PREDI.getTdsValue(); // then get the value
//Calculate TDS from Output
gravityTds_OUT.setTemperature(temperature); // set the temperature and execute temperature compensation
gravityTds_OUT.getKvalue();
gravityTds_OUT.update(); //sample and calculate
tdsValue_OUT = gravityTds_OUT.getTdsValue(); // then get the value
If I use ENTER > CAL:
It updates only the GravityTDS gravityTds_SUP
I have a problem about the calibration. At the advanced tutorial they used a commercial calibration solution. Bu they dont explain the content. I want to use KCl or NaCl standart solutions for calibration and the conversion formula from tds to ppm is changes depend of your solution content. Can you help about this?
I used the program code on your github, the program code was uploaded successfully, but there was a little oddity, when I read the serial monitor, the tds value was 17 ppm, but it happened when I hadn't dipped the probe into the water sample to test, is this the problem in the sensor tds or indeed the initial value of the sensor tds (not dipped in the liquid to be tested) is 17 ppm
Running this code on an ESP32 returns mostly zeros (eg: 28 zeros and a few stray values). Running the same code on and Arduino UNO returns good values. Any ideas how to get this working on the ESP32? I am using the Adafruit ESP32 Feather and powering the TDS sensor at 3.3v for both the ESP32 and UNO.
int aa = 0;
for (int n = 0; n < 30; n++) {
aa = analogRead(A3);
Serial.print("TDS voltage: ");
Serial.println(aa);
delay(40);
}
I have tried adjusting the ADC on the ESP32 with:
#include <driver/adc.h>
// and in setup ...
adc1_config_width(ADC_WIDTH_BIT_10);
adc1_config_channel_atten(ADC1_CHANNEL_0, ADC_ATTEN_DB_0);
Thanks in advance.
Hi there, it's possible add 2/3/4 sensor in the same controller? How can i manage them? Many thanks :)
Hi! reviewing your code, i have two questions
this->ecValue=(133.42this->voltagethis->voltagethis->voltage - 255.86this->voltagethis->voltage + 857.39this->voltage)*this->kValue;
this->ecValue25 = this->ecValue / (1.0+0.02*(this->temperature-25.0)); //temperature compensation
this->tdsValue = ecValue25 * TdsFactor;
why do you use :
KValue=1 What this means?
TdsFactor=0.5 What this means ?
And where the equation to get the ec Value comes from?
Thanks so much !
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.