Nodemcu not running code when inserted into circuit board

Hello,

I am working on a project that involves reading data from a pressure transducer and uploading that data to a server. My code successfully uploads to the nodemcu, and the serial monitor outputs as it should when not connected to the board. Once I put the nodemcu into the board and power it, the nodemcu’s light blinks once and then does not blink anymore. When running the serial monitor without the nodemcu connected to the circuit board, it blinks multiple times. It seems to me the code on the nodemcu is not running and I do not know why.

This thing has been shown to properly run before, albeit with a different nodemcu board. The old nodemcu kept giving me upload errors, so I bought a new one that is identical to the old chip and was able to successfully upload code to it.

Every once in a blue moon, the code DOES run on it seemingly without any cause. I cannot replicate this with any consistency.

I verified that there are no loose connections in the circuit board and to the pins of the nodemcu. I feel like I am missing something simple that is causing the code not to run, like power cycling or flashing or something? I am fairly new to this, so any ideas would be greatly appreciated.

Attached is my code and schematics for the circuit board.

pcb_board_nodemcu_final_v2.pdf (29 KB)

original.ino (20.3 KB)

Any ideas? I am happy to provide more details if they are needed.

Previously I am facing similar issue.

Cause of this issue is not stable power supply and wrong HIGH/LOW boot process on GPIO 0 & GPIO 15. As you might know, on boot process GPIO 0 need to be HIGH and GPIO 15 need to be LOW.

When boot process gone wrong then ESP8266 gets stuck on boot loop. That is why your code not running anymore because ESP8266 unable to get into execution mode, it stuck on boot loop.

To solve this issue:

  1. Stabilize power supply by adding 470 uF capacitor across power supply VCC & GND
  2. Disconnect any wires which attached to GPIO 0 or GPIO 15
  3. Stabilize GPIO 0 by adding 10K resistor across GPIO 0 and 3V3 VCC
  4. Stabilize GPIO 15 by adding 10K resistor across GPIO 15 and GND
  5. Optional, add 0.1 uF decoupling capacitor across the ESP8266 VCC & GND

Hope this will help you to solve the issue.