WiFi / ADC issue

Gorkde
Posts: 8
Joined: Mon Jun 06, 2016 10:53 pm

WiFi / ADC issue

Postby Gorkde » Tue Jun 14, 2016 11:33 pm

When reading the ADC as long as WiFI is enalbled the ADC jumps up and down up to 10 values which renders the module useless for me.

I did want to use the ESP as Heart of my new product which needs to read sensors while on the other hand sends data on WiFi.
Since I'm using Blynk whicht checks all the time if still connected I can't just simply disable WiFi.

I'm using Arduino IDE and the available Libs.
Any solution?

ESP_Faye
Posts: 1646
Joined: Mon Oct 27, 2014 11:08 am

Re: WiFi / ADC issue

Postby ESP_Faye » Thu Jun 16, 2016 11:28 am

Hi,

What is the version of your SDK ?

Can you provide your test code and more details about your test steps ? We will have a try.

Thanks for your interest in ESP8266 !

Gorkde
Posts: 8
Joined: Mon Jun 06, 2016 10:53 pm

Re: WiFi / ADC issue

Postby Gorkde » Thu Jun 16, 2016 10:25 pm

Im using it with the latest Arduino IDE with the latest ESP8266 libraries from Github (http://arduino.esp8266.com/stable/packa ... index.json).

In my case the reading should be 66 (or 0 if AIN is put to GND) but once the code has run some time the value goes up around 7 points and jumps up and down in this range.

I found many people complaining about this (nodeMCU and Arduino users) and it's neiter a problem with my power nor one of some kind of radio interference (shielded the comlete board and used battery).

I tried with ESP8266-12 standalone as well as with Wemos D1.

As soon as I WiFi.disconnect(); the reading is correctly at 66 (or 0 if AIN is put to GND)
Most people are interpolating the read values to get a stable result but that's not a good way.



My code for testing is:
(You need to wait a bit since readings in the beginning are correct, then suddenly they start to go up as if some kind of capacitor is filling up)

Code: Select all

#include <ESP8266WiFi.h>

char WLANname[] = "***";
char WLANpw[] = "***";


void setup()
{
  Serial.begin(115200);

  WiFi.begin(WLANname, WLANpw);
  Serial.println(" ");
 
  while (WiFi.status() != WL_CONNECTED) {
    delay(300);
    Serial.print(".");
  }
  Serial.println("\nCONNECTED");
 
  // WiFi.disconnect();

}

void loop()
{
  Serial.println(analogRead(0));
  delay(100);
}


Screen.jpg
Last edited by Gorkde on Thu Jun 16, 2016 11:20 pm, edited 1 time in total.

Gorkde
Posts: 8
Joined: Mon Jun 06, 2016 10:53 pm

Re: WiFi / ADC issue

Postby Gorkde » Thu Jun 16, 2016 10:59 pm

Is there a way to maybe analogRead just when the module is not transmitting?

Gorkde
Posts: 8
Joined: Mon Jun 06, 2016 10:53 pm

Re: WiFi / ADC issue

Postby Gorkde » Sat Feb 12, 2022 10:53 pm

That was an issue of 2016 and since there seemed to be no solution (other people switched to different CPUs) so I gave up on this.

Gorkde
Posts: 8
Joined: Mon Jun 06, 2016 10:53 pm

Re: WiFi / ADC issue

Postby Gorkde » Sat Feb 12, 2022 10:53 pm

If there's a solution by now I would be interested anyway.

Who is online

Users browsing this forum: No registered users and 5 guests