0

I'm working on an ESP8266-based water level monitoring system using an ultrasonic sensor and an I2C LCD. The problem I'm facing is that sometimes the ESP8266 does not boot properly when powered on for the first time. However, if I turn the power off and on again, it boots and works fine.

Project Details

Microcontroller: ESP8266 (NodeMCU)

Peripherals:

Ultrasonic sensor (JSN-SR04T)

16x2 I2C LCD

Buzzer

Push button

Wiring:

const int trigPin = D3; 
const int trigPin2 = D8;
const int echoPin = D0; 
const int echoPin2 = D6;
const int overflow = D4; 
const int buzzer_out1 = D5; 
const int push_Button = D7;

LCD Connections:

SCL: D1

SDA: D2

I2C Blank Text

Issue Description:

When I first power on the ESP8266, it sometimes does not boot properly. The LCD either remains blank or shows a pattern of blocks (see attached image). If I turn off the power and turn it back on immediately, the ESP8266 boots and works correctly. The issue is inconsistent but happens frequently enough to be a concern.

Any insights on what might be causing this and how to fix it would be greatly appreciated!

Rohit Gupta
6122 gold badges5 silver badges18 bronze badges
asked Mar 21 at 7:01
8
  • possibly a problem with the code Commented Mar 21 at 7:05
  • But most of the time esp boots properly Without any issue, so might be issue with my pin selection or wiring Commented Mar 21 at 7:10
  • What is "overflow" (d4) ? Please, show full schematic. Commented Mar 21 at 9:57
  • 1
    This is for an ESP32 but the situation is the same for the ESP8266 where the enable (EN) pin is broken out: reddit.com/r/esp32/comments/ou6r8d/… The idea is to delay enabling the device for a few milliseconds after power is applied to it to help ensure the power is stable. But also add some details of the power supply to your question. Commented Mar 21 at 10:22
  • I am using 5V adapter connected directly to Vin pin of ESP8266 Commented Mar 21 at 14:26

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.