NodeMCU / Arduino / ESP8266 - wont run on its own? - Page 1
Forum section: electronics / general

author: TomS_
author_rank: Frequent Contributor
timestamp: January 10, 2019, 09:06:17 am
content: Hi all.Normally, I work directly with MCUs like PICs etc, but I needed to whip something up that had wifi connectivity, and using an ESP8266 based product and the Arduino IDE seemed to be a good way to do that.I bought some NodeMCU boards off Amazon, they seem to have a 12E on them.I have a problem, however, where they just dont seem to "run by themselves". By this I mean:* When I write code and upload via the Arduino IDE, they will boot and start operating every time* If I take a board that has had code uploaded to it, and plug it in to a USB power adapter somewhere, it doesnt seem to runI have an RTC hooked up via I2C which generates a once per minute interrupt which causes the ESP to send off a small amount of data which gets logged on a Raspberry Pi, but I dont see these logs coming in unless I am effectively running it in a development environment.Does anyone know what is causing this? It kind of defeats the purpose of building something that can then be tucked away and forgotten about, if they are going to need constant attention.I have sometimes randomly been able to get them to boot, but its very infrequent.Thanks!

author: westfw
author_rank: Super Contributor
timestamp: January 10, 2019, 10:05:49 am
content: The ESP8266 has some requirements for the state of certain pins to cause booting. I think on a NODEMCU those pins are normally manipulated by the Serial/USB controller, and if it's not in use you may need some pullups or something...https://www.forward.com.au/pfod/ESP8266/GPIOpins/index.html

author: JackJones
author_rank: Regular Contributor
timestamp: January 10, 2019, 10:16:59 am
content: Quote from: westfw on January 10, 2019, 10:05:49 amQuoteFunnily enough, I also usually just use microcontrollers directly but needed something with wifi without a hassle. I bought one of those e-paper driver boards with an ESP-12F built in, and the schematic it has does have pull ups for GPIO0, GPIO2 and GPIO15 which the link mentions. So probably try pullups on those pins?Edit: Here's a link to the schematic:https://www.waveshare.com/w/upload/7/7e/ESP8266_e-paper.pdf

author: mauroh
author_rank: Frequent Contributor
timestamp: January 10, 2019, 10:21:26 am
content: +1 for westfw statement.The NodeMCU board have all the needed pullups, and should take care of the boot and upload sequence, but try watching this 2 videos to be sure everything is as you expect.Troubleshooting NodeMCU (ESP8266) Arduino UploadsHow To: Pick the right pins on the NodeMCU ESP8266 and ESP32Mauro

author: TomS_
author_rank: Frequent Contributor
timestamp: January 10, 2019, 11:33:44 am
content: Brilliant! Thanks everyone. I will look in to these and report back.

author: TomS_
author_rank: Frequent Contributor
timestamp: January 10, 2019, 01:28:30 pm
content: Looks like problem solved!I have my interrupt connected to pin D3, which apparently causes a boot failure if pulled low (lo and behold, active low interrupt!). So if I had powered the unit down to relocate it elsewhere, and in that time an interrupt had been generated, upon re-applying power the pin would have been pulled low.Removing the jumper wire from this pin allowed it to boot, after which I could reconnect it.So now I just need to play around with my pin assignments to make sure it will always come back up without having to go through that procedure.