Search code examples
arduinoesp8266esp32adc

What would make sense to use for measuring a 0-10V analog signal? (Arduino, ESP32, ESP8266 with ADS1115)


I'm trying to read in a 0-10V analog signal from a pressure gauge (Balzers SingleGauge TPG 251) with the help of an arduino nano. With a voltage divider I'm able to get to a 0-5V range to not damage my arduino. Sad thing is that the resolution of the integrated 10-bit ADC is pretty low (5000mV/1023 ~ 5mV steps) for my purposes. The pressure gauge can measure from 10e-11 mbar to 1000 mbar and will give a value from 0-10V accordingly. Through observations I've seen the display change values in this way:

  • 1000 to 100 being in 10 steps = 91 numbers
  • 100 to 1 in 0.1 steps = 991 numbers
  • 9.9e-1 to 1e-2 = 99 numbers per decade (there are 11 decades --> 99*1 = 1089 numbers)
    • Total of 2171 separate analog steps (if the steps are linear).

This means that each analog step will be of 4.6 mV in a 0-10V range. Since I'm using a voltage devider the mV/step difference will be halved, reaching a 2.3 mV/step. This is obviously to low to resolve and so I need to use an 12- or 16-bit ADC. I decided to use a 16-bit ADC because why not have a better precision, right? I have bought the ADS1115 and I hope to be able to read the values a lot better and more precise (max 0.15mV). With the analog value I can then reversly get the pressure as a number.

The real problems come in now. I want to have the setup connected to the local wifi where people can look at the pressure. And I would also like to let them enter the value they want to be alerted on per email that they also enter. I've seen this tutorial with an ESP32 (https://randomnerdtutorials.com/esp32-email-alert-temperature-threshold/) where it's possible. So I'll try to follow through that with an ESP8266 nodeMCU.

I know this is a lot to take in and I hope somebody has an Idea how I can advance in this project. Here are some questions from my side:

  1. Do I need both an arduino and a ESP8266 for this project? Since Arduinos analog range is from 0-5V and the ESPs analog range is from 0-1V, arduino can thus handle more. ESP would then just have the purpose of sending the email and web server stuff.

  2. Is there a way to just use the ESP8266 and the ADS1115 and still read the analog values with a high precision? Or is it just not possible?

  3. Any feedback what would make sense here? Maybe there is a way to do this that I've not yet googled.

Thank you in advance!


Solution

  • ADS1115 has a I2C interface. Just hook it up to the ESP. There is no need for the Arduino nano.

    Please read the datasheet of your ADC.

    http://www.esp8266learning.com/ads1115-analog-to-digital-converter-and-esp8266.php