1
\$\begingroup\$

Summary: With arduino's 5v & 3.3v supply , ESP8266 module emits boot messages and responds to AT commands on serial terminal@115200 baud as -

boot message:

<random/garbage characters>
Ai-Thinker Technology Co. Ltd.
ready

"AT" command output:

OK

"AT+GMR" output:

AT version:1.2.0.0(Jul 1 2016 20:04:45)
SDK version:1.5.4.1(39cb9a32)
Ai-Thinker Technology Co. Ltd.
Dec 2 2016 14:21:16
OK

whereas with external (tried multiple power source - details to follow) 3.3v power supply, there are garbage/random characters in the boot message, and response to AT command also has garbage characters.

Though arduino's 5v and 3.3v have fixed the issue for me, but it is not recommended to use the those for powering up ESP, as Arduino's

  • 5v can be dangerous for ESP (got hot within few minutes of connection) and,
  • 3.3v may not have enough current (dangerous for Arduino/Atmega chip),

so now, it seems i need to achieve close to what arduino's 5v and 3v3 pins are delivering to ESP's Vcc using external power source.


Details: I had purchased ESP8266 module from amazon, and trying make it to pass some basic tests like running AT command via serial monitor, planning to go to programming part later. Here is what i have tried so far wrt. input power for the ESP module.

Attempt1 (fail):

AC ---> 5v/1A output DC adapter ---> AMS1117 (3.3v) --> ESP8266's Vcc

As per information in iotbytes article, I fed ~3.3v (measured via voltmeter) to Vcc of ESP8266 from pin#2 of ams1117, and had used all capacitors of values as suggested in the post.

  • (Observation):
    Blue led flashing rapidly, Red LED glowing constantly,
    AI Thinker SSID appears , to which, I am able to connect (192.168.4.2) via my laptop and can ping 192.168.4.1
    Serial monitor gets filled up with garbage values at all baud rates except 115200. At 115200, serial monitor is quiet and i get 2/3 garbage characters in response to AT command.
  • (Pinout): Used pin #2(3.3v output) & #3 (Ground) of Ams1117 to power the module. Rest other pin connections is same as an article on medium.com as

    Esp8266 | Arduino
    ------------------
    RX      | RX
    TX      | TX
    GPIO 0  | None
    GPIO 2  | None
    
    
    Arduino | Arduino
    -------------------
    Reset   | GND
    
    Esp8266 | AMS1117
    ------------------
    Vcc     | 3.3v 
    CH_PD   | 3.3v (/Vcc of esp8266)   tried via jumper as well as 100 Ohm resistor
    GND     | GND 
    

Afterwards, I tried moving ahead by putting ESP8266 to programming mode by following a video . Had to add only 1 "additional" connection -

Esp8266 | Esp8266
------------------
GPIO0   | GND (From AMS1117)

And , on uploading esp8266 LED blink program, got (@9600/115200 upload rates) -

Global variables use 27968 bytes (34%) of dynamic memory, leaving 53952 bytes for local variables. Maximum is 81920 bytes. warning: espcomm_sync failed error: espcomm_open failed error: espcomm_upload_mem failed error: espcomm_upload_mem failed

tried adding 1k resistor with GPIO-Ground, but it didn’t work!!

Attempt2 (fail):

9v/1A battery ---> Buck Converter (adjusted to 3.3v output) --> ESP8266's Vcc

  • (Observation):
    Blue led flashes once and remains off (till i disconnect & reconnect Vcc), Red LED glowing constantly.
    AI Thinker SSID appears and can connect to/ping it
    Serial Monitor .... garbage in response to AT command.

  • (Pinout):

    Esp8266 | Arduino
    ------------------
    (Same as Attempt1)
    
    Arduino | Arduino
    ------------------
    (Same as Attempt1)
    
    Esp8266 | Buck Converter
    ------------------
    Vcc     | 3.3v
    CH_PD   | 3.3v (/Vcc of esp8266) - tried via jumper as well as 100 Ohm resistor
    GND     | GND 
    

Attempt3 (fail):

AC ---> 5v/1A output DC adapter ---> Buck Converter (adjusted to 3.3v output) --> ESP8266's Vcc

  • (Observation): Same as Attempt2
  • (Pinout): Same as Attempt2

Attempt4 (pass):

Arduino (5v and 3v3) ---> ESP8266's Vcc

  • (Observation):

    Blue led flashes once and remains off (till i type in a command via serial Monitor), Red LED glowing constantly. AI Thinker SSID appears and can connect to/ping it Serial monitor captures ESP8266's boot/welcome message and responds to AT commands @115200 baud.

  • (Pinout):

    Esp8266 | Arduino
    ------------------
    RX      | RX
    TX      | TX
    GPIO 0  | None
    GPIO 2  | None
    Vcc     | 3.3v (also tried 5v) 
    CH_PD   | 3.3v (/Vcc of esp8266)   tried via jumper as well as 100 Ohm resistor
    GND     | GND 
    
    
    Arduino | Arduino
    -------------------
    Reset   | GND
    

Note: arduino is being powered using usb (a to b) port of laptop .

What could be the reasons behind this behavior of ESP with external power source?. I can post more information if required. Any help / suggestion could be very useful.

\$\endgroup\$
6
  • \$\begingroup\$ "Any help / suggestion" - buy a decent power supply. Unless you have schematics and can look at the VCC ripple with a scope, there's not much to discuss. \$\endgroup\$ Commented Aug 21, 2018 at 7:15
  • 1
    \$\begingroup\$ Circuit diagrams would help. It just occurred to me that you may have forgotten to connect GND of Arduino to GND of ESP when ESP is externally powered. Could that be the issue? If not, post the circuit diagrams: more people will be inclined to take a look at your question then. \$\endgroup\$ Commented Aug 21, 2018 at 7:59
  • 2
    \$\begingroup\$ @DmitryGrigoryev - Yes, you are right. I did not connect the GND of Arduino to the GND of ESP - when ESP was powered externally (Attempts 1-3). I have mentioned all connections in the pin-out section and I would have definitely mentioned it in pinout section as -- Arduino (GND) | AMS1117/Buck Converter (GND) . I am not sure if it could be the potential cause, though, If you recommend then i can try this. \$\endgroup\$
    – puneet336
    Commented Aug 21, 2018 at 8:58
  • 1
    \$\begingroup\$ Well yes: TX and RX signals need GND to complete the circuit, just like VCC does. \$\endgroup\$ Commented Aug 21, 2018 at 9:10
  • 2
    \$\begingroup\$ Thanks again @DmitryGrigoryev your previous reply was the final missing piece of this puzzle :) The module is now responding to AT / AT + GMR commands on external power supply. You could post your previous comment as an answer. \$\endgroup\$
    – puneet336
    Commented Aug 21, 2018 at 14:57

1 Answer 1

2
\$\begingroup\$

You are missing a GND connection between ESP and Arduino when you're powering the ESP externally. In general, devices which share voltage-based signals also have to share common ground. Otherwise, without a common reference voltage becomes meaningless: a signal of +5V on Arduino may be seen as -1V on ESP (assuming there's 6V difference between ground voltages of the two).

You can also reason in terms of current: when Arduino drives its TX pin high and a current starts flowing, how does that current return back to Arduino?

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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