Chat freely about anything...

User avatar
By AlexPilk
#23078 Blue led is blinking after powering up the module, the red one stays on, I can even connect to it via wifi. But I cannot program it. I tried Arduino IDE, different firmware flashers (Like NodeMCU, XTCOM). I'm using Arduino Mega.
Here's my initial setup:

VCC - 3.3 V on Arduino
RST - nothing
CH_PD - 3.3 V on Arduino
TX - RX on Arduino (TX is transmitting data to RX, so I don't need a voltage divider, right?)
RX - voltage divider (R1 = 10K, R2 = 20K) - TX on Arduino
GPIO0 - GND on Arduino
GPIO2 - nothing
GND - GND on Arduino

Then I tried uploading a sketch from the Arduino IDE and got the following error:
warning: espcomm_sync failed
error: espcomm_open failed
After trying different IDEs, programmers, serial port I tried firmware flashers to at least see if I can communicate with it. NodeMCU for example just
showed "Waiting MAC" with GPIO0 to ground and without.
I also tried connecting TX to TX and RX to RX but got the same results. Tried connecting RX through a voltage divider as well.
With this setup the blue led was constantly on. I remembered reading somewhere that that could happen due to insufficient power supply,
so I also tried connecting both pins without the voltage dividers (the blue led is still blinking after the power up so hopefully I didn't burn them).
I also tried connecting GPIO0 to 3.3V and not connecting it to anything at all, connecting RST to 3.3V, connecting GPIO2 to ground as well.
On Mega there are 4 sets of TX and RX pins, so I tried them all out TX/RX0,1,2 and 3.
Still no idea what's going on :(
User avatar
By kolban
#23079 I believe that the TX label and RX labels on the Arduino are "FROM" TX and "FROM" RX ... so if I remember correctly, you need to connect the TX pin of the ESP8266 to the "FROM" TX pin of the Arduino and same for RX. It might help if you posted a picture of your breadboard and wirings.
User avatar
By Stoney
#23093 the arduino mega is a 5v board, the 3.3v is only a small reference supply generated by the FTDI, it is only 50mA.
A new esp starts in AP mode and is drawing a LOT more than 50mA at times. you really REALLY need a better power supply.

however, I think your problem could also be the divider resistor values are far too high especially at boot loader speeds. Capacitance becomes an issue and all your high speed edges become curves.
I used 470Ω in series and 1kΩ for a divider yesterday, that was for 9600 baud, I would try that and even lower .. like 100 and 220 ohm for higher speeds.
User avatar
By AlexPilk
#23134
Stoney wrote:the arduino mega is a 5v board, the 3.3v is only a small reference supply generated by the FTDI, it is only 50mA.
A new esp starts in AP mode and is drawing a LOT more than 50mA at times. you really REALLY need a better power supply.

however, I think your problem could also be the divider resistor values are far too high especially at boot loader speeds. Capacitance becomes an issue and all your high speed edges become curves.
I used 470Ω in series and 1kΩ for a divider yesterday, that was for 9600 baud, I would try that and even lower .. like 100 and 220 ohm for higher speeds.


Thanks, but it didn't help. Here is my initial setup. Did it according to this tutorial:
http://www.instructables.com/id/noobs-g ... re-needed/
Image

I also tried using two 1.5V AAA batteries instead of Arduino's power supply like this:
VCC --- battery +
RST ---
CH_PD --- battery +
TX --- arduino RX
RX --- arduino RX
GPIO --- battery -
GPIO2 ---
GND - battery -
Apart from this I connected the GND on arduino to battery's - to ensure common ground. I'm not sure though if there's any difference depending on which of the 3 GND pins on Arduino you connect. Also tried swapping TX and RX. Tried another voltage divider with 100 ohm and 220 ohm as well as connecting TX and RX directly.
The only difference I noticed when using a separate power supply is that when you connect the GND on Arduino to the common ground, even though GPIO0 isn't "grounded" the blue led on ESP8266 doesn't blink and I can't see the SSID from my phone/PC. If you leave it like this:

VCC --- battery +
RST ---
CH_PD --- battery +
TX ---
RX ---
GPIO ---
GPIO2 ---
GND - battery -

it works just the same. Led is blinking during the power up and you can connect to the access point.
Any ideas? :(