Go Down

Topic: ESP8622-ESP01 using FTDI + Arduino IDE (Read 147 times) previous topic - next topic

mkane

Apr 20, 2018, 07:09 pm Last Edit: Apr 20, 2018, 07:10 pm by mkane
Hey Everyone,

First thank you for any help you may give me.

I am trying to communicate an ESP862201 with the Arduino IDE. I have followed instruction on adding the ESP8622 to the board manager inside of the IDE and that seems ok.

The problem is when I try to upload or communicate with the esp8622. I am using the FTDI as a bridge to upload sketch files onto the 8622.

When using the serial monitor I see ............ on 115200 Baud but weird character on any other channel. However when sending the AT command I never get a response no matter which channel.

The other problem is when uploading the sketch file I see

warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
error: espcomm_upload_mem failed

I do see blue light on my esp8622 and both are powered on. I have the FTDI powering the esp8622.

I know the pins are hooked up right however the dividers I am not sure are correct.

PaulRB

Quote
I have the FTDI powering the esp8622.
I assume you mean esp8266? The ftdi cannot provide enough current for the esp. You need a separate regulator of some kind. Perhaps something based on ams1117.

mkane

Yes, 8266 sorry!

I have switched out the FTDI, I am not sure what it is. (Sorry, software guy here). I will attach a pic. I am able to now get the AT commands working with this new power source. I can join my WiFi and obtain an IP address.

Do I need to put the ESP 8266 into flash mode for this to work?


mkane

Now it gets to 95% and stops. It did upload 100% a few times (put it in programming mode) but now.i get

Arduino: 1.8.5 (Mac OS X), Board: "Generic ESP8266 Module, 80 MHz, ck, 26 MHz, 40MHz, QIO, 512K (no SPIFFS), 2, v2 Lower Memory, Serial, None, Only Sketch, 115200"

Archiving built core (caching) in: /var/folders/kv/f7drssbs0bv4w17ycwcs5d6r0000gp/T/arduino_cache_695195/core/core_esp8266_esp8266_generic_CpuFrequency_80,ResetMethod_ck,CrystalFreq_26,FlashFreq_40,FlashMode_qio,FlashSize_512K0,led_2,LwIPVariant_v2mss536,Debug_Serial,DebugLevel_None____,FlashErase_none,UploadSpeed_115200_e5ab0ff892b614113ea46e0d82f05a51.a
Sketch uses 253464 bytes (50%) of program storage space. Maximum is 499696 bytes.
Global variables use 32812 bytes (40%) of dynamic memory, leaving 49108 bytes for local variables. Maximum is 81920 bytes.
warning: espcomm_send_command: wrong direction/command: 0x01 0x03, expected 0x01 0x08
Uploading 257616 bytes from /var/folders/kv/f7drssbs0bv4w17ycwcs5d6r0000gp/T/arduino_build_766272/web_server.ino.bin to flash at 0x00000000
................................................................................ [ 31% ]
................................................................................ [ 63% ]
................................................................................ [ 95% ]
...........warning: espcomm_send_command: didn't receive command response
warning: espcomm_send_command(FLASH_DOWNLOAD_DATA) failed
warning: espcomm_send_command: wrong direction/command: 0x01 0x03, expected 0x01 0x04
error: espcomm_upload_mem failed
error: espcomm_upload_mem failed

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

mkane

OK progress. I am getting 100% but nothing shows up in the serial monitor. Was this successful?

Archiving built core (caching) in: /var/folders/kv/f7drssbs0bv4w17ycwcs5d6r0000gp/T/arduino_cache_695195/core/core_esp8266_esp8266_generic_CpuFrequency_80,ResetMethod_ck,CrystalFreq_26,FlashFreq_40,FlashMode_qio,FlashSize_512K0,led_2,LwIPVariant_v2mss536,Debug_Serial,DebugLevel_None____,FlashErase_none,UploadSpeed_115200_e5ab0ff892b614113ea46e0d82f05a51.a
Sketch uses 275360 bytes (55%) of program storage space. Maximum is 499696 bytes.
Global variables use 33684 bytes (41%) of dynamic memory, leaving 48236 bytes for local variables. Maximum is 81920 bytes.
Uploading 279504 bytes from /var/folders/kv/f7drssbs0bv4w17ycwcs5d6r0000gp/T/arduino_build_766272/web_server.ino.bin to flash at 0x00000000
................................................................................ [ 29% ]
................................................................................ [ 58% ]
................................................................................ [ 87% ]
.................................                                                [ 100% ]

ieee488

You will get inconsistent results if you don't provide a good 3.3V supply for the ESP8266.

Do that !


PaulRB

#6
Apr 21, 2018, 07:54 am Last Edit: Apr 21, 2018, 08:09 am by PaulRB
Quote
I am getting 100% but nothing shows up in the serial monitor.
What sketch did you upload? Does the sketch send anything to serial monitor?

Totally unhelpful picture, btw.



If you want to learn to build projects with esp, as a beginner, get an esp based dev board. I recommend Wemos mini.

I have had good results with one of those ultra-cheap "programmers" - https://www.ebay.com/itm/142082226373
You'll need to wire a button between gpio0 and GND and press it until the upload starts (read the following links to know why this does not work for everyone).

Info about programming the ESP-01

https://www.allaboutcircuits.com/projects/breadboard-and-program-an-esp-01-circuit-with-the-arduino-ide/
https://www.allaboutcircuits.com/projects/flashing-the-ESP-01-firmware-to-SDK-v2.0.0-is-easier-now/

To work with this module in a breadboard is probably a good idea to get a cheap breadboard adapter like this one: https://www.ebay.com/itm/232577675252

But I agree with PaulRB, the ESP-01 is not the best module to start playing with the 8266, I suggest you get one that have an integrated USB adapter.
--
You never learn anything by doing it right.

Go Up