Wifi and I2C Instability/Noise - ESP32 WROOM

Hi Guys,

General query around stability when using an ES32 and its inbuild Wifi features. Has anyone else had issues when using the ESP32 and its Wifi chip (Blynk for example)? When ever I use the Wifi connect and Blynk connectivity in a sketch I get noisy readings on modules I've connected to I2C.

Currently I'm using an ESP32 with 2x ADS1115 units to measure voltages of a 7S (series) battery pack. I get pretty solid and stable readings from the Analog pins on the ADS1115 units, how-ever if i then pump the info over Wifi to Blynk the reads jump like crazy, so rather than 0.004 -> 0.009mV wobble or noise across the 7S battery pack, it increases to like 0.100 to 0.200 mV across the 7S voltage readings. All the correct linear voltage regulators, capacitors, decoupling capacitors, pull up resisters are being used and it doesnt seem to help.

Is the above just an issue when using onboard Wifi module rather than using a seperate ESP8266 unit (with its own LM33V regulator/capacitors) connected to a NANO or UNO for example?

I've also tried the above with a NodeMCU, this appears to not have as big an issues, much more stable (prob 0.020mv to 0.050mv wobble) with using Wifi, but still an issue it appears.

Cheers,

Nic

I would look at caps especially those involved in the transmitter power generation. All transmitters consume current and might generate noise. More caps on power input, one larger for basic current and one supressing high frequency noise.

Post a wiring diagram.

Wiring Diagram Below:

everything is common ground, couple of things I have tested (as seen in diagram).

  1. Pull up resistor 3.3k on ADS1115 VCC to GND, found a post where someone said to try. Didnt make a difference.

  2. Decoupling Capacitor (0.1uf) on ADS1115 VCC to GND, ADS1115 spec sheet section 11.2. suggests to use this as reading the ANALOG pins causing a voltage drop, didnt make a difference.

Only thing I have found is the having nothing on Wifi wise, and it appears to be stable.

It looks like You apply 8 volt to the controller Vcc, using a 7808 regulator. That looks strange to me. Is that within spec for the ESP32?
Using my phone now so difficult do check this up.

Recommended input voltage for VIN for board is 7 to 12v. I’m using a regulator to provide 8v to reduce any stress on the onboard voltage regulator chips have to do dropping from 12 to 3.3v internal stuff. I’ve noticed on other boards when heavily using the 3.3 or 5v pins and having any kind of current draw on them heats up the onboard 5 or 3.3 regulators. This seems to help allot

Yes, for Vin but the drawing shows Vcc. That is not the same. As I see it I would use a 7805 connected to controller 5 volt, Vcc.
Do I miss something or not?

hmmm ops that could be just me mixing up terminology as I'm still all just learning this stuff :confused:

I have a 12v 2A power supply brick. That goes into the LM7808 which then feeds the Arduino on VIN @ 8v.

What should the labels be?

Why not use a 7805 connected to controller 5 volt?
Okey, 8 volt to Vin will work but no knowing person would use Your setup.

oh, wait.... so you are saying I can supply 5v @ the Vin on an Arduino port to run it?

More than happy to do that, I thought it was 7-12 volts for VIN. Definitely can change that and more than happy to, 1 less voltage regulator on for my design then :)!

hksmonaro:
oh, wait.... so you are saying I can supply 5v @ the Vin on an Arduino port to run it?

Are we talking about an Arduino, or an ESP?

An Arduino - especially the "Classic" UNO/ Nano/ Pro Mini/ Leonardo, Pro Micro - actually runs on 5 V. So the proper way to power it is to supply 5 V to guess what? The "5V" pin. :grinning: OK, some of them have a conflict with the USB port and this connection must be broken while you have the USB connected to a PC but that is another matter. Simply ignore the "Vin" pin or "barrel jack on one of these Arduinox. :roll_eyes: "

The ESP9266 is a 3.3 V device (can run on two alkaline "AA" cells), so either you provide a 3.3 V regulator or use a board such as the WeMOS D1 Mini or NodeMCU which has a 3.3 V regulator which you power with - guess again - 5 V. They are not designed to be supplied with a higher voltage.

And it is a bad idea to use a linear regulator for powering from a higher voltage - you are dissipating a lot of heat in the regulator. Use a switchmode "buck" converter which is efficient and therefore, cool, to provide 5 V.

Paul__B:
Are we talking about an Arduino, or an ESP?

An Arduino - especially the "Classic" UNO/ Nano/ Pro Mini/ Leonardo, Pro Micro - actually runs on 5 V. So the proper way to power it is to supply 5 V to guess what? The "5V" pin. :grinning: OK, some of them have a conflict with the USB port and this connection must be broken while you have the USB connected to a PC but that is another matter. Simply ignore the "Vin" pin or "barrel jack on one of these Arduinox. :roll_eyes: "

The ESP9266 is a 3.3 V device (can run on two alkaline "AA" cells), so either you provide a 3.3 V regulator or use a board such as the WeMOS D1 Mini or NodeMCU which has a 3.3 V regulator which you power with - guess again - 5 V. They are not designed to be supplied with a higher voltage.

And it is a bad idea to use a linear regulator for powering from a higher voltage - you are dissipating a lot of heat in the regulator. Use a switchmode "buck" converter which is efficient and therefore, cool, to provide 5 V.

Im using this unit here: ESP32 Board
Yeah I read that the linear voltage regs are super ineffecient, but they are so convenient :), given i'm really only drawing sub 150mV the heat is minimal and ive also sinked it to dispitate heat. Such a big issue, I can see this being important if ever mA is important for battery operated systems for example.
So are you saying the Vin on all arduino boards should be ignored? I though tthe 3.3v and/or 5v pins on arduino boards are for supplying perfiheral devices, such as sensors, i2c devices that need a small amount of current...?

hksmonaro:
So are you saying the Vin on all arduino boards should be ignored?

Clearly the Vin pin on an Arduino has a purpose, it would not be there if it did not.
Its where you connect and external supply such as say 6xAA batteries to power the Arduino.
It avoids confusion if you do not refer to boards with an ESP32 on them as Arduinos. They may be programmed using the IDE plugin provided by Expressiff but these boards are not Arduinos.

Ha well that’s interesting! So not an Arduino, so are they called ESP boards then?

So based on Vin being some sort of input, save to use but ideally close to 5v as possible.

Any ideal why wobble/noise when wifi is being used on an ESP32 board on the I2C bus with 2x ADS1115s?

I’ve also tried changing I2C to the other programable pins, same result on pin 31-32. :frowning:

Hi Guys, fixed the issue on this one. I changed to a new ESP32-WROOM-32U board (fixed another issue in another post) and also did the following (which I think was the fix);

  1. Put 10k pullup resistors on the SCA and SCL lines to Vcc of the ADS1115 lines.
  2. Change code to work out running average.

Both ADS1115 units get read every 2 seconds, then a running average is calculated over 30 samples. By voltage readings and delta mVs now reports between 0.002 and 0.005mV. whoop!

Ive also retested on pins 32,33 for I2C and I do get slightly more stable raw readings, how-ever when using running average it makes no differece in results and to my accuracy needs

I've now also added a 1.3" SH1106 OLED screen to the I2C lines, which updated every 5 seconds which hasnt introduced any reading issues. testing still on going but look good.

srnet:
Clearly the Vin pin on an Arduino has a purpose, it would not be there if it did not.

It is purely historical.

I repeat my "stock" explanation to this question every time. The "Vin" - or "Barrel jack" on a UNO - is nothing more than a legacy "novelty" from the times ten or twenty years ago when 5 V switchmode power supplies were not common as they now are. It allowed you to use unregulated 9 V "plug packs" (US: "Wall warts") which were the common supply for computer "phone" modems and ADSL boxes which contained heat-sinked 7805 regulators. But the regulator on a tiny Nano or even the UNO board has minimal heat-sinking and is only suitable for simple demonstrations of the basic board and a few LEDs.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.