0

I have a ESP8266-01 and am trying to get it to work. I am using the example WiFiScan code shown below.

#include "ESP8266WiFi.h"

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


  WiFi.mode(WIFI_STA);
  WiFi.disconnect();
  delay(100);

  Serial.println("Setup done");
}

void loop() {
  Serial.println("scan start");

  // WiFi.scanNetworks will return the number of networks found
  int n = WiFi.scanNetworks();
  Serial.println("scan done");
  if (n == 0) {
    Serial.println("no networks found");
  } else {
    Serial.print(n);
    Serial.println(" networks found");
    for (int i = 0; i < n; ++i) {
      // Print SSID and RSSI for each network found
      Serial.print(i + 1);
      Serial.print(": ");
      Serial.print(WiFi.SSID(i));
      Serial.print(" (");
      Serial.print(WiFi.RSSI(i));
      Serial.print(")");
      Serial.println((WiFi.encryptionType(i) == ENC_TYPE_NONE) ? " " : "*");
      delay(10);
    }
  }
  Serial.println("");

  // Wait a bit before scanning again
  delay(5000);
}  

I have a voltage regulator producing 3.3 V connected to CH_PD and the Arduino powers the ESP's VCC via the 3.3 V pin. TX is connected to TX and RX is connected to RX. GPIO0 is connected to ground. I can upload, but it cannot find any networks. It always states no networks found. Now I'm not even sure how to proceed... Any help would be appreciated.

  • Try Wifi access point example and connect green wire to 2 and white one to 3. And give it a try – Nabin Sharma Jun 27 '18 at 8:30
  • 1
    ch_pd is an enable signal, VCC draws current that the Uno 3.3 pin can't supply – Juraj Jun 27 '18 at 9:32
  • Actually, I'm not too sure how to control the current being produced. Some things I have tried include using the 5V but adding a 100ohm resistor, and powering the esp through the mains via a phone charger. Do you have any suggestions? Thanks! – Clovis Nyu Jun 27 '18 at 9:53
  • and the voltage regulator? how many amperes can it supply? – Juraj Jun 27 '18 at 11:12
  • Try connecting the ESP's Vcc to your 3.3v regulator. You didn't say which regulator you are using but most will be able to supply more than enough current for your ESP. I power my ESP-01s with LM-1117 regulators which can supply up to 800mA. – JRobert Jun 27 '18 at 14:49
1

You should provide a good power source for the VCC. One that can supply 800 mA for WiFi operations of esp8266. You should use the power regulator to supply 3.3 V to VCC and there is no reason to use other power source for the CH_PD pin. CH_PD pin is "enable" pin, it doesn't need a strong power supply.

IO 0 should be connected to ground only for upload, not for normal operation.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.