Can't flash ESP8266 from MEGA, but can with Uno

Hello everyone,

As you can see from the title, I have two arduinos with me - an Uno and a Mega.
I am able to successfully flash arduino code to the esp8266 from the uno, but with the same connection I can't flash it from the mega, getting errors like: espcomm_failed.

I have an external power supply from USB and the following connection:
VCC - 3.3V
CH_PD - 3.3V
GND - GND
GPIO0 - GND (same as arduino)
TX - TX
RX - RX

(still haven't bought a voltage regulator)

This works perfectly with the Uno, I can upload Blink, WebServer and etc.

I am doing the same connection with the Mega.
Opening the Serial Monitor, I can see the esp8266 connected in boot mode, but when i try to flash it i have an espcomm_failed error.

Usually that error is when wiring is messed up, but I'm pretty sure I have it all OK with me.

Also I have read every possible article in google and nothing has worked so far.

Not that I can't program the esp from the Uno, but I am very curious why the Mega is refusing to see it.

I'm open up for any suggestions.

Thanks everyone in advance

Have you tied the Mega's reset pin to ground? If not, the sketch last loaded onto the arduino will interfere with the upload process.

Why on earth do so many people insist on using arduino boards as serial adapters? Dedicated serial adapters are literally cheaper than a cup of coffee, including shipping.

These are the kind you want (no specific endorsement of vendor, other than as an example of whereabouts the price should be and for pictures):
http://www.ebay.com/itm/360916810060

You want the black ones with the little voltage switch on them, not the other black ones without the switch and button. The ones that show a jumper between two pins are bad, as they can't be used for programming an Arduino Pro Mini (I've bought a bunch of types - these seemed to be the best). BTW - the sellers all list only 5 at a time, but restock almost immediately (they're doing it to produce a false sense of scarcity).

Wow.

I only uploaded a Blink sketch to the Mega, and the communication over Uno works with any sketch on it. But setting the mega's reset to ground did the trick.

I literally spent 8 hours yesterday on that thing, but I refused to believe that when it works on the uno with a sketch, it will require the mega's reset to ground.

I am very delighted to see it work and also pretty confused... Why does it work on the uno and not the mega?

As for your other question:

DrAzzy:
Why on earth do so many people insist on using arduino boards as serial adapters? Dedicated serial adapters are literally cheaper than a cup of coffee, including shipping.

It takes like 40 days for something from ebay to arrive to my country (Bulgaria) and when I initially bought the esp8266 I didn't know it was... a different controller that needs to be flashed :smiley:

Thank you once again.
And I would be really happy if someone could explain why the uno uploads to the esp without the need of its reset pin to ground!

Have a nice day

DrAzzy:
You want the black ones with the little voltage switch on them, not the other black ones without the switch and button. The ones that show a jumper between two pins are bad, as they can't be used for programming an Arduino Pro Mini (I've bought a bunch of types - these seemed to be the best)

Good advice! I hadn't seen the CH340 adapters with the standard FTDI header pinout. I've always used the "FT232RL" ones but the CH340 is a good option. What does the the button do on those? I was impressed they had a schematic on that listing and was trying to decipher it for a minute before realizing it wasn't even for that item!