I am building a sensor that works when it is connected to my laptop through the USB. the LED lights up and I can record the sensor changes over time, however, when I disconnect the USB and connect it via a 9 V battery power supply, the LED indicator and essentially the circuit stops working. I tried switching the power supply off, and the LED flickers for only a fraction of a second when I do that. I am using a NodeMCU. Confused about what to do since I have tried checking for loose connections or wrong connections.
How is OP connecting their battery?
Schematic please.
Try a brand new unused battery.
Push the reset button
3 reasons why not to use classic 9V battery with your board:
Nodemcu is designed for 5V on VIN, while it probably can handle more, it's not suggested.
Cheap/used 9V battery might not be able to give current Esp8266 needs at peak.
Battery-life is bad, 2/3 of the capacity is waisted to convert voltage to 3.3V
3-4 AA batteries would work much better.
Yes, unfortunately, that is the only power supply I have on me right now since it came along with the kit. It's an ESP8266-based NodeMCU.
