Flashing ESP8266 with Arduino Uno

Thank you very much!! My ESP is 3.3 V. It is a ESP-01 version.

Uno has 3.3V output but provide only 40 mA and ESP-01 uses between 200-300 mA in operation mode
but flash Mode is less that these but UNO can flash ESP-01 if you removed the chip so serial TX ,RX willl talk directly to ESP-01 not the atmel chip of arduino.
easier buy USB to serial you will need it almost every esp8266 project

1 Like

I am unable to use the UNO without the chip. It gives me an error while uploading. What steps should I take while uploading without the AVR chip?

Alright I am able to give AT commands in the serial monitor of arduino IDE. But it is still not flashing and giving the same error. Is the problem with the firmware? If so how to achieve this successfully on a Mac? If there are any Windows links it would be appreciated as well :smile:

First try setting GPIO-0 to Ground, and tapping (and then removing) RST to Ground and THEN try uploading the firmware. This puts it into a special mode for uploading. If that doesn’t work, try flipping your TX/RX pins around and doing the same thing again.

1 Like

sorry i didn’t used Mac ever , as i hate APPLE products :apple: , you should select the Board type as below
before uploading your sketch

I really love this guide:

http://reflowster.com/blog/2015/05/11/esp8266.html

It helped considerably when I started with the ESP. If you get a decent USB-to-Serial with DTR and RTS pins exposed, you can make an auto-uploader with a small print an tiny capacitor.

1 Like

HI zee ko. I did try doing that. Should I connect a pull down resistor to the gpio pin though?

I’ll definitely take a look into this. Thank you! :smile:

you can use the below wiring guide , also it will work without using the resistors by connecting the
ESP RX directly to UNO TX

Alright so after connection, are you using esptool or nodemcu for flashing?

Also on compiling I get this error message on Arduino. espcomm_sync failed.

@ashwinkumar1994 Read this entire topic on the subject:

Hi I am having the exact same problem as @ashwinkumar1994 as stated in the first post. I am using Arduino Uno with the Sparkfun ESP8266 Wifi Shield. I have a separate “wall wart” power supply so power isn’t my problem, at least I don’t think so (I am quite new to this). I tried removing the chip from the Arduino as mentioned in the thread but I still get the fatal error when uploading. I tried connected GPIO-0 to GND as mentioned and the power and status led’s both blanked out. Is that normal? Im a little lost now, any help would be greatly appreciated. Thanks

@smike I can’t be 100% sure about the LED’s but it is probable that they are ‘blanked out’ when you ground GPIO-0. Grounding GPIO-0 is essential for loading new firmware to the ESP’s so you must do this. As the ESP is then in ‘flashing’ mode then you would expect the LED’s to show a different state to when it is in running / WiFi mode.
I don’t have the Sparkfun WiFi shield so I can’t really help further. Do you not have a USB to Serial/TTL adapter that you could use to flash the ESP?

Ok thanks I will connect GPIO-0 to GND and try again. I don’t have a USB to Serial/TTL adapter, the only way I can program the ESP at this time is through the arduino. Perhaps I will have to get one.

Alright so my esp8266 is able to connect to blynk and toggle an LED on and off. However it still gives a fatal error when I run terminal on my mac and give a sudo code to flash the esp8266. So is it safe to assume that I am in the clear and just blynk as it is? I guess it may be due to the fact that the SDK version for my ESP8266 is 1.3.0 and the .bin file that was provided in the instructables that I was using was for version 1.0.0. Does this make any difference? If so, then what .bin file would you recommend I can use in order to flash the esp8266.
Thanks for all your help by the way guys!! I really appreciate you guys taking the time out to help a newbie :slight_smile:

@ashwinkumar1994 What did you finally do to get blynk to connect to your ESP 8266?

@smike I had downgraded my arduino to 1.6.5 (but I think it shouldnt matter even with the current versions). Continue as you have using these instructions http://www.instructables.com/id/Connect-to-Blynk-using-ESP8266-as-Arduino-Uno-wifi/

However, instead of flashing the ESp8266, I just didnt connect the GPIO0 pin to the ESP and on the blank sketch I opened up the serial monitor and passed the AT command. You have to experiment with your baud rates and check at which baud rate in the serial monitor you get OK while passing the AT command. Once you get the OK confirmation, I passed this command AT+GMR to check the version of the SDK. Mine was 1.3.0.

After this, upload the ESP8266 example from the BLYNK library, which if you are using the current version, should be labelled as ESP8266_Shield_HardSer . Do that and change Serial 1 to Serial in your code and also update the baud rate in your code with the baud rate where you observed your ESP to work in the previous step. Once this is done, go ahead and upload to your UNO. If you still get an error, then you might have to download the latest version of the BLYNK library which can be downloaded from here. https://github.com/blynkkk/blynk-library/releases/latest

Once downloaded, copy the contents from HardSer to the blynk-library-master folder in your package contents of the arduino ide and upload again. Once this is done, it should hopefully be successful. Then set up your mobile app accordingly and you should be able to control your equipment now.

1 Like

Awesome this seems a lot easier than trying to flash the esp. I will try this as soon as I can. I will post if it works for me or not. Thanks!