NodeMCU with ultrasonic sensor never wake up

Hi guys,

Sorry for my bad English. I want to use my NodeMCU (ESP12) with an ultrasonic sensor type HC-SR04 on

deep sleep mode in order to preserve battery.

The idea is to put NodeMCU in deep sleep mode for x times, and when he wakes up, the ultrasonic sensor

gets the distance, and NodeMCU send it to me by email, and going to deep sleep again.

The problem is that the NodeMCU never wake up, the blue led flash for few seconds, and nothing.

I appreciate your help.

Here is my diagram.



Hi guys,

Sorry for my bad English. I want to use my NodeMCU (ESP12) with an ultrasonic sensor type HC-SR04 on

deep sleep mode in order to preserve battery.

The idea is to put NodeMCU in deep sleep mode for x times, and when he wakes up, the ultrasonic sensor

gets the distance, and NodeMCU send it to me by email, and going to deep sleep again.

The problem is that the NodeMCU never wake up, the blue led flash for few seconds, and nothing.

I appreciate your help.

Here is my diagram.



Hi guys,

How can i wake up an esp8266 or NodeMCU from deep sleep with PIR sensor type HC-SR505 ?

Diagram or photos please.

this project will help you

hope this helped you

@moun31, do not cross-post. Threads merged.

Well, I seemed to recall that someone had explained to you that the ultrasonic sensor actually "pings" under the control of the microprocessor and requires the microprocessor to actually make the decisions regarding the echoes it receives, so clearly it cannot operate the ultrasonic sensor while it is in sleep mode. Or was it this one referenced ?

The PIR sensor is self-contained, so it gives a logic output when it senses something and you simply connect that to the pin you have set to wake the microprocessor.

@m_k_akash Thank you for your response, i tested my NodeMCU yesterday with this diagram, it does not work

If it is a simple ESP8266 deep sleep/wake problem, which would also occur without the ultrasonic sensors, it could be a missing GPIO16 / reset pin connection:

EDIT

Looking more closely at your schematic, it looks like the D0 / Reset connection is there, so that is not the problem.

Your problem appears to be the voltage divider to reduce the echo pin output to 3.3 volts. This voltage divider should NOT span the power rails.

It should be something like this:

echo -- 10K --- ESP8266 --- 20K --- Ground

@6v6gt Thank you for your response,

I modified my schematic like this.

The NodeMCU wake up from the deep sleep, but the distance is always 0

I am newbie in the voltage divider concept, with this schematic I am not sure that echo pin have 3.3v

Please help.

OK. That sound like some progress.

The voltage divider looks OK.

However, it has already been pointed out to you that an ultrasonic sensor cannot be used to wake an ESP8266 because the ESP8266 must already be running for the sensor to detect something. It must be constantly sending trigger requests to ultrasonic device.

If the object that you are monitoring is quite static, say car parking space occupancy, you could get away with waking the esp8266 periodically (say with an RTC if necessary), check the object with the ultrasonic sensor and sleep again.

@6v6gt I have to rethink the project otherwise thank you for your help.