Giter Site home page Giter Site logo

tds_sensor's Introduction

DFRobot Gravity TDS Sensor for ESP32

FreeRTOS task to read the DFRobot Gravity TDS sensor on an ESP32.

Mark Benson 2018 Licence - MIT or whatever is used for the rest of this project!

Compiles with the Espressif ESP-IDF.

The sensor is powered directly from an ESP32 GPIO pin as it only requires 3-6mA and the GPIOs can sink 12mA. Defaults to GPIO_NUM_32. The analog pin is connected to ADC1_CHANNEL_0 (GPIO_NUM_36).

What it does: Enables the sensor and waits 10 seconds for the reading to settle. Then takes a number of readings a few seconds apart and gives an average sample value. The sample value is then converted to a PPM value. The conversion includes some compensation values for the SAR ADC 11dB range. There is also a temperature compensation value that is currently static, but this should be measured to improve accuracy. Once the value is computed it is returned and the sensor is disabled until the next reading is needed.

The given TDS PPM value should be compared with a TDS meter and calibrated against a known sample.

TDS PPM conversion based on https://www.dfrobot.com/wiki/index.php/Gravity:_Analog_TDS_Sensor_/_Meter_For_Arduino_SKU:_SEN0244#More_Documents

tds_sensor's People

Contributors

markjb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

tds_sensor's Issues

How to load it?

Hi,

How do you load this into ESPHome so I can use it?

Thanks

Reading TDS value upto 1000 PPM using ESP wroom 02 wifi module.

Hello,
I am currently working on ESP wroom 02 for TDS reading purpose. I have TDS sensor at TOUT(ADC pin) of esp wroom 02. I have been working with this code and modified for esp wroom 02 with range 0 to 520 ppm. I want to extend this range up-to 1000 ppm.
Upto now I did many changes to getting value up-to 1000 ppm but it could not work, with Vref and attenuation I achieved 950 PPM but the actual value of TDS is totally different. I have checked this with standard TDS meter ( MI company). I got too much difference in reading which were not I aspect, so would it be possible to extend this for 1000 ppm.

The following changes i did in Vref.
At Vref 1.18V we got upto 520PPM
At Verf 1.5V we got upto 720ppm -but we need 510ppm.
At vref 1.8V we got upto 950 ppm - but we need 710 ppm.

Please suggest me....

Regards,
Nilesh

TDSmeter_sensor_comparison_with_our_board.xlsx

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.