Author Topic: [HELP] ESP8266 ESP-01 Programming Troubles  (Read 1884 times)

0 Members and 1 Guest are viewing this topic.

Offline ashwinbrTopic starter

  • Newbie
  • Posts: 2
  • Country: us
[HELP] ESP8266 ESP-01 Programming Troubles
« on: September 29, 2017, 06:56:15 pm »
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 module
USB 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.3v
GND -> Ground
CH_PD --> +3.3v
GPIO 0 --> Open
GPIO 2 --> Open

RX pin --> TX of FTDI
TX pin --> RX of FTDI

Firmware Upload mode:
VCC --> +3.3v
GND -> Ground
CH_PD --> +3.3v
GPIO 0 --> GND
GPIO 2 --> Open
RX pin --> RX of FTDI
TX pin --> TX of FTDI

Software:
ArduinoIDE (All the appropriate boards' libraries updated)
ESPEasy
ESPlorer
Putty terminal emulator

Normal 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 ground
RX to RX of USB module
TX 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 connect
        flush start
        setting serial port timeouts to 1 ms
        setting serial port timeouts to 1000 ms
        flush complete
        espcomm_send_command: sending command header
        espcomm_send_command: sending command payload
        read 0, requested 1
warning: espcomm_sync failed
error: espcomm_open failed



I 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.
« Last Edit: September 29, 2017, 06:59:45 pm by ashwinbr »
 

Offline hamster_nz

  • Super Contributor
  • ***
  • Posts: 2803
  • Country: nz
Re: [HELP] ESP8266 ESP-01 Programming Troubles
« Reply #1 on: September 29, 2017, 08:43:29 pm »
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!
Gaze not into the abyss, lest you become recognized as an abyss domain expert, and they expect you keep gazing into the damn thing.
 

Offline hamster_nz

  • Super Contributor
  • ***
  • Posts: 2803
  • Country: nz
Re: [HELP] ESP8266 ESP-01 Programming Troubles
« Reply #2 on: September 29, 2017, 10:26:02 pm »
Found a link regarding pullups.... https://www.forward.com.au/pfod/ESP8266/GPIOpins/ESP8266_01_pin_magic.html

There is a table indicating a pull-down on gpio0 and a pull-up on gpio2

Gaze not into the abyss, lest you become recognized as an abyss domain expert, and they expect you keep gazing into the damn thing.
 
The following users thanked this post: ashwinbr

Offline danadak

  • Super Contributor
  • ***
  • Posts: 1875
  • Country: us
  • Reactor Operator SSN-583, Retired EE
Re: [HELP] ESP8266 ESP-01 Programming Troubles
« Reply #3 on: September 29, 2017, 11:43:44 pm »
Not sure what module you are using but for Nodemcu use ESPFLASHER
to restore firmware.


https://github.com/nodemcu/nodemcu-flasher


Regards, Dana.
Love Cypress PSOC, ATTiny, Bit Slice, OpAmps, Oscilloscopes, and Analog Gurus like Pease, Miller, Widlar, Dobkin, obsessed with being an engineer
 
The following users thanked this post: ashwinbr

Offline ashwinbrTopic starter

  • Newbie
  • Posts: 2
  • Country: us
Re: [HELP] ESP8266 ESP-01 Programming Troubles
« Reply #4 on: September 30, 2017, 05:04:30 am »
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.
 

Offline LukeW

  • Frequent Contributor
  • **
  • Posts: 686
Re: [HELP] ESP8266 ESP-01 Programming Troubles
« Reply #5 on: September 30, 2017, 09:35:04 am »

RX pin --> TX of FTDI
TX pin --> RX of FTDI

This 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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf