-->
Page 1 of 2

Bricked/Fried boards when trying to use pushbuttons

PostPosted: Thu Jun 22, 2017 2:26 pm
by Sky99
Hello there!
I'm new to the ESP scene but familiar with Arduino and AtMega µCs.

I wanted to phase out my arduino nanos for more modern stuffs, and the ESP8266 seems a good fit. So installed the boards definitions for the Arduino IDE in order to play with it, and could blink LEDs on various GPIOs, but i got into problems when i tried to use pushbuttons.

So i defined D2 as an INPUT_PULLUP, and thus tied it to the ground using a solid core wire in order to register a "push" on my button. However, once i did that, i could no longer flash anything to the chip.

The board i use is a NODEMCU board with µUSB and USB to serial converter. I've been able to flash things to the ESP without problems, until i did what i described earlier.

I had similar problems with 2 other boards, trying to do the same thing, but by then i did not understand why the board stopped working properly.

It still shows as a COM port in the Arduino IDE, but it fails to flash, returning the following error message :
warning: espcomm_send_command: didn't receive command response
warning: espcomm_send_command(FLASH_DOWNLOAD_BEGIN) failed
error: espcomm_upload_mem failed
error: espcomm_upload_mem failed

So now, i'm stuck with 3 ESP8266 that i can't flash, and i don't know what to do, nor what i did wrong.

Did i use a forbidden GPIO? can't i use INPUT_PULLUPs on the ESP? do i need an external pullup for my button?

Now, i'm really confused, and i'm not sure to understand what GPIOs i can safely use, nor how i bricked those units...

Any help would be apreciated :)

Re: Bricked/Fried boards when trying to use pushbuttons

PostPosted: Fri Jun 23, 2017 8:15 am
by martinayotte
wiki/doku.php?id=esp8266_gpio_pin_allocations

In brief : GPIO15 need to be pulled-down, while GPIO2/GPIO0 need to be pulled-up for normal operation (GPIO0 grounded for upload)

Re: Bricked/Fried boards when trying to use pushbuttons

PostPosted: Fri Jun 23, 2017 8:42 am
by schufti
if it was the pin marked D2 on the nodemcu board it is gpio4 which should be safe to be in whatever state during reset/power-up. Tying a pin - which could be configured as output - "hard" to V+ or gnd is never a good idea.

If you remove all "external" components from the nodemcu and connect it to USB, what happens?
Is ist recognized?
Does the LED on the sub-pcb (ESP-12) light up?
If the terminal window in Arduino-IDE is open and baud at 74880, do you see legible messages after pushing reset button?

P.S.: there was some post mentioning that internal pullups on gpio4/5 won't work; don't know if this is true.

Re: Bricked/Fried boards when trying to use pushbuttons

PostPosted: Sat Jun 24, 2017 5:52 pm
by Sky99
Hello!
Basically, what i had was the same when removing all externall stuff.
I got around it, and de-bricked my ESPs by holding the flash button, plugging it in then flashing something.
After that it responds normally and can be flashed.
However, i still don't understand well why it wouldn't work.

The internal pullup on some pins beeing defective is an interesting lead, however, if so, i guess i would have fried the chip?

What bugs me is that the ESP would not flash, as if by tying a pin to ground i had put it in some weird mode...

So i'm not left wondering what pins are safe to use on a NodeMCU module?