[HELP] ESP8266 ESP-01 Programming Troubles - Page 1
Forum section: electronics / beginners

author: ashwinbr
author_rank: Newbie
timestamp: September 29, 2017, 06:56:15 pm
content: Hi All,I'm a newbie in electronics and just getting into Arduino/RaspPi type projects.I'm working on a project to add some ESP8266 MCU based IoT devices at my home (switches, dimmers etc).In trying to upload a firmware on to ESP-01, I've repeatedly failed to even get an AT command to work and I'm desperate.I'd be grateful for any help/advice/pointers towards this.So far here's my setup.Power supply: 3.3v breadboard P/S moduleUSB Serial adapter: FTDI based USB to Serial adapter. Connected to a Windows 10 PC using FTDI 2.12.28.0 drivers with a 8/16/17 timestamp.I've tried 3 different adapters all based on FTDI chip, including one that says genuine FTDI chip. :-)ESP-01 connections as follows:Normal Working mode:FVCC --> +3.3vGND -> GroundCH_PD --> +3.3vGPIO 0 --> OpenGPIO 2 --> OpenRX pin --> TX of FTDITX pin --> RX of FTDIFirmware Upload mode:VCC --> +3.3vGND -> GroundCH_PD --> +3.3vGPIO 0 --> GNDGPIO 2 --> OpenRX pin --> RX of FTDITX pin --> TX of FTDISoftware:ArduinoIDE (All the appropriate boards' libraries updated)ESPEasyESPlorerPutty terminal emulatorNormal working mode:When I hook up everything all the right lights are on (power indicator on FTDI, power indicator on ESP-01)Blue light flickers initially as the module is coming up and shuts off.When I connect the terminal emulator (9600 and 115200 baud), I get a constant stream of junk characters.Most of the time it doesn't respond to any AT commands I type and rarely it responds back with garbage characters.Firmware Flashing mode:GPIO-0 conected to groundRX to RX of USB moduleTX to TX of USB Module.Does not respond to any AT commands, terminal is quiet/blank.When I run ESPEasy flash command I get the following error about 9 times:trying to connectflush startsetting serial port timeouts to 1 mssetting serial port timeouts to 1000 msflush completeespcomm_send_command: sending command headerespcomm_send_command: sending command payloadread 0, requested 1warning: espcomm_sync failederror: espcomm_open failedI would be very grateful if you could kindly give me any pointers on what I'm doing wrong and how to get this working.Thank you so much!-Ash.PS: I have other ESP-01 based switches like Sonoff switch and Sonoff S20. I've not had any luck with these either.

author: hamster_nz
author_rank: Super Contributor
timestamp: September 29, 2017, 08:43:29 pm
content: On a fee modules I played with many months ago I had to add a pull-up on one of the GPIO pins to enable programming. Sorry I can't be more specific - it was a while ago!

author: hamster_nz
author_rank: Super Contributor
timestamp: September 29, 2017, 10:26:02 pm
content: Found a link regarding pullups....https://www.forward.com.au/pfod/ESP8266/GPIOpins/ESP8266_01_pin_magic.htmlThere is a table indicating a pull-down on gpio0 and a pull-up on gpio2

author: danadak
author_rank: Super Contributor
timestamp: September 29, 2017, 11:43:44 pm
content: Not sure what module you are using but for Nodemcu use ESPFLASHERto restore firmware.https://github.com/nodemcu/nodemcu-flasherRegards, Dana.

author: ashwinbr
author_rank: Newbie
timestamp: September 30, 2017, 05:04:30 am
content: Hi All,Thanks so much for the input.I will definitely check out the URL for pullup resistors (I've not used it in my setup, so it could be something I possibly need).Also thanks for the new flasher tool. Will check it out.THank you.Ashwin.

author: LukeW
author_rank: Frequent Contributor
timestamp: September 30, 2017, 09:35:04 am
content: RX pin --> TX of FTDITX pin --> RX of FTDIThis should be the case for both programming mode and normal operating mode - always.Other than that, check that your 3.3V supply can supply sufficient current.Check that your FTDI (or similar) device works by sending characters in a serial terminal, and then just connect the TX back to the RX with a wire, and confirm that you now get an "echo" from the serial port.Generally, I would not recommend the ESP-01 as a worthwhile beginner's device.It's hard to set up for beginners, you have to provide the serial comms and 3.3V supply, you can't use it on a breadboard, and you only get a couple of GPIO pins.An ESP-12 is about the same price, or a Wemos D1 board, or a NodeMCU Amica board, are all much easier to use.Something like an Amica is slightly more expensive but gives you the 3.3V and serial already sorted easily for you.GPIO15 is already tied to ground on the ESP-01. There are already internal pull-ups on GPIO0 and GPIO2, but you can try adding some yourself, like 10k or 4k7, and see if there's a difference.Maybe try adding a decoupling capacitor on the 3.3V supply too.