Esp ADC input voltage reading is jumping

Hi.

I’m using a wt32-eth01 board.

image

I’m trying to read ESP ADC input voltage from TDS sensor, but it jumps randomly from 0,300V to 0,450V. The Sensor output voltage is stable (0,438V) according to my multimeter and osciloscope.

I connected sensor output to one of ADC GPIOS. Should I do anything else to remove the noise? Is this ESP32 ADC issue as suggested on link bellow?

Should I use extrenal ADC such as ADS1115 for accurate readings?

Thank you for your suggestions.

Br

You answered it yourself. I had similar issues so went with ADS1115 to measure 3 CT’s on solar input. Still a bit jumpy, very noisy environment, but a lot better.

Short wiring. Signal wire twisted with gnd wire, preferably shielded cable. Small ceramic cap between sensor signal and gnd. Good quality power supply.
Also learn to use filters in esphome.

Thank you for your reply.

My very very cheap multimeter will show a stable voltage with 3 decimal accurancy. What good is ADC for if it randomly jumps like that?

Does this varies from different ESP boards?

Will try AD

Thank you

Thank you for reply.

Wires are short. Pcb board project at this stage. What would be a good ceramic cap value to start with?

Thank you

Impossible to answer, try different values. Start with 10 nF. If your PSU is noisy, you might need larger cap between power wires as well.

Your multimeter is filtering and averaging a lot, obviously it can’t present a value changing continuously because it would not be readable.

1 Like

Ive never used this board personally but, this is a post that has been asked about dozens of times so, fyi there is a search box here and its very helpful.

Which gpio are you using and why do you think its an ADC capable one? A couple are labeled as “Input only” Ive always thought that meant digital input.

Like I said, ive never used these and was under the impression these dont have ADC capability based on the numerous people posting on here for that problem.

The data sheet for that board doesn’t specify or even have the word “analog” in it and no ADC on the pinout.

Can someone test this or can someone verify ADC or not?

Thank you for your reply.

https://qqtrading.com.my/WT32-ETH01%20ESP32

  • Number of analog input pins (ADC): 11

I tested it using IO2 and IO4.

If those are not ADC inputs, I suppose it wouldn’t even read the voltage at all.

Thank you

Br

Be aware, that if you use wifi, ADC2 is not working, so you have to choose ADC1 pins.

Got it. I’m using ETH but will change to I36 anyway.

Thank you

Br

So, it is working then? If so, im glad for you but, now im thoroughly aggravated now. I try to avoid using online vendors 'specifications page" because of how obvious it is that they all just rip off each other’s pages to have documentation for customers and I dont put much faith in them and blindly trust that someone actually vetted it during the copy/paste procedure.

Here is whats is pissing me off… The pinout you got from an online vendor isnt matching the one im looking at and im looking at the actual legit spec sheet for that board.

What the heck is going on here and why are they so far off?

IO2 and IO4 dont show as anything specific and they’re the only 2 that dont have information about them.

Am I blowing this out of proportion or does not seem very cool?

Did you find out what esp32 chip they have under the hood?

On my board it says ESP32-WROOM-32

I’m no expert by any means, but I did read some post where some one had problems because he/she was using touch capable pins, that got thrown off by something. could that also be in play here (if the right specs for the board are used of course)?

Thats a big problem ive noticed. They dont bother look at a pinout or make sure if they do its the correct one. People want help and say they got a “d1 mini … whats wrong with it?”

My first thought is, which d1 mini? but its common to see response after response wirh people making guesses and calling them answers… not good.

1 Like

I do guess at times, but when I do so I try to make sure I use wording that shows that I am. Not doing so is indeed misleading.

And I think anyone who has tinkered with more than one ESP has fallen into the trap of wrong specifications. Boards look the same and are named after famous ones to improve sales (not so say pirated) while they are vastly different.

Well ya, maybe that wasnt the best word to use. You could argue most answers are guesses but they come on a spectrum between, “really? Are you on drugs?” and well thought out best guesses rooted in facts and logic.

Maybe i should have said there are some poor quality guesses and more and more they seem to outnumber the higher quality ones…

I also tried it with a different ESP board (ESP-WROOM-32 38 PIN Development Board). The same story, unlike my multimeter and oscilloscope, readings will jump from 380mV to 520mV. I guess the peak value is at an exact update interval.

image

I also tried to put ceramic caps of different values between the sensor signal and GND and still no luck.

I’m guessing the meters from the multimeter and oscilloscope take multiple readings and calculate the average value. I can see from the oscilloscope MIN=420mV and MAX=520nV. Only MEAN and Cyclic RMS values are stable at 460mV.

So that makes me wonder. How does any ADC sensor show the correct value if Esp32 DC reading jumps so much.

Can I get multiple readings and average values from ESP boards, to get similar stable readings as the multimeter and oscilloscope does?

Do you think the external ADS1115 ADC will solve the issue?

Thank you
Br

It’s not so far away from your esp adc values. And that’s not considered one of the best in class… Probably you can get better results with ads1115, but I wouldn’t call this " an issue".
Try with another power supply. Use esphome filters, there are plenty of them.

Also, it’s obvious multimeter is averaging a lot to show solid readable values.

Thank you for your reply.

I tried averaging filters:

  - platform: adc
    name: "Sensor Voltage"
    id: tds01_raw
    pin: GPIO36
    attenuation: 0db
    unit_of_measurement: v
    accuracy_decimals: 3
    update_interval: 100ms
#    internal: true
    filters:
      - multiply: 1.3
      - sliding_window_moving_average:
          window_size: 20
          send_every: 20
          send_first_at: 20
      - throttle: 2s

It does get me a bit closer to the desired results. But still, it jumps randomly, causing TDS Water levels to jump from 215-225 PPM.

That does not happen with other commercially sold TDS meters. The one I have will keep a stable 219 PPM value for hours.

image