So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By Kunterbunt
#65479 Hey there,

I've initially gotten myself an Adafruit Feather Huzzah for an IOT project, however, since I really like the ESP I don't want to deploy Feathers and keep buying new ones because they are expensive.
So I bought little ESP12F modules and a CP2104 flasher (the same one is used on the Feather), but I can't get it to flash.

I'm using ArduinoIDE 1.8.1 or esptool 1.2 on Ubuntu 16.04.

I've rebuild the circuit multiple times according to various tutorials and sadly did not picture them, at first I got the generic error message:
Code: Select allwarning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
error: espcomm_upload_mem failed


And the Receive LED of the CP2104 wasn't flashing, but I've gotten a step further today and the ESP answers (Receive LED flashing now).
But the answer seems wrong:
Code: Select allwarning: espcomm_send_command: wrong direction/command: 0x00 0x08, expected 0x01 0x08
warning: espcomm_send_command: wrong direction/command: 0x00 0x08, expected 0x01 0x08
warning: espcomm_send_command: wrong direction/command: 0x00 0x08, expected 0x01 0x08
warning: espcomm_send_command: wrong direction/command: 0x00 0x08, expected 0x01 0x08
warning: espcomm_send_command: wrong direction/command: 0x00 0x08, expected 0x01 0x08
warning: espcomm_send_command: wrong direction/command: 0x00 0x08, expected 0x01 0x08
warning: espcomm_send_command: wrong direction/command: 0x00 0x08, expected 0x01 0x08
warning: espcomm_send_command: wrong direction/command: 0x00 0x08, expected 0x01 0x08
warning: espcomm_send_command: wrong direction/command: 0x00 0x08, expected 0x01 0x08
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
error: espcomm_upload_mem failed


Or on esptool (visually the same flashing):
Code: Select allA fatal error occurred: Failed to connect to ESP8266


Now on this issue I couldn't find (useful) help on google anymore and I'm desperate....
Do I still have a wrong connection?

GND - GND (If i connect the CP2104s GND to GND as well I don't receive feedback anymore)
GPIO15 - GND
GPIO0 - GND
TXD0 - RXD of the CP2104
RXD0 - TXD of the CP2104
RST - GND (according to this topic)
EN - 3.3V
VCC - 3.3V

Image

Thanks in advance for your input!

Greetings
Kunterbunt
User avatar
By rudy
#65490 Reset can not go to gnd. Use a pull up resistor on it. I use 22K but you can use from 1K to 47K. And use a capacitor from reset to ground. 4.7uF if you use 1K, 0.1uF if you use 47K as the resistor.

Do not ground D15. Use a resistor. Nin 330 Ohms. Max 22K, I use 10K.

D0 will need a pull up resistor. I usually use 2.2k but it can be higher. The LED on D2 should work as a pull up on that line. I always add a resistor anyway.

You should solder a capacitor across vcc and gnd on the module. Short leads. 10uF might be a good starting point. You may have to put a larger value cap on the breadboard, put it close to the module and don't use long wires. Keep connections short.

Have a look at a schematic of the Huzzah and compare it with what you have. What you have done there isn't even close. The only good thing you have done is post a picture of what you have done so it doesn't take as log to get you working.
Last edited by rudy on Wed May 03, 2017 7:39 am, edited 1 time in total.
User avatar
By trackerj
#65499 To avoid all the hassle related with changing the boot modes, switches, etc, just use a programmer that has autoreset capabities. Will make your life more easy.

You cand find in this post: http://www.esp8266.com/viewtopic.php?f=13&t=14689 a example of such a USB Adapter/Programmer.
User avatar
By Kunterbunt
#65500
rudy wrote:Reset can not go to gnd. Use a pull up resistor on it. I use 22K but you can use from 1K to 47K. And use a capacitor from reset to ground. 4.7uF if you use 1K, 0.1uF if you use 47K as the resistor.

Do not ground D15. Use a resistor. Nin 330 Ohms. Max 22K, I use 10K.

D0 will need a pull up resistor. I usually use 2.2k but it can be higher.

You should solder a capacitor across vcc and gnd on the module. Short leads. 10uF might be a good starting point. You may have to put a larger value cap on the breadboard, put it close to the module and don't use long wires. Keep connections short.

Have a look at a schematic of the Huzzah and compare it with what you have. What you have done there isn't even close. The only good thing you have done is post a picture of what you have done so it doesn't take as log to get you working.


Thank you very much for your answer!
Seems like I have done everything wrong that could have been done wrong...
I've searched for the feather schematics and even though I dont understand them completely: You're right, the are a lot of resistors and capacitors on there.
I've compared the schematics with your advice and they seem to match pretty good, but I have identified three things that are different:
1. They connect GPIO2 to 3.3v with a 10k resistor.
2. They use an autoreset circuit (which probably is what trackerj means).
3. They put a 1k resistor in front of ESPs RXD0.

I'll try to rebuild that, lets hope the store has the right capacities and NPN Transistors in stock.

Thanks again, I'll report when I'm back!