2025-01-11 11:33 AM
HI folks.
I would like to wake up my ESP8266 using an interrupt from the VL53L0X sensor.
I have configured the sensor to use both threshold detection and to trigger an interrupt. I tested whether the interrupt is being triggered, and it is— the GPIO pin goes from HIGH to LOW when the threshold is reached. However, I noticed that the GPIO remains LOW until the interrupt flag is cleared. If I connect this GPIO pin directly to the RST pin of the ESP8266, the program will never run because the RST pin stays LOW.
To solve this, I implemented a pulse generator that triggers on the falling edge of the GPIO signal.
Here is the circuit I implemented:
From: https://forum.arduino.cc/t/esp8266-deep-sleep-forever-and-interrupt-wake-up/574185/20
i am using a 0.33uF capacitor instead 100uF. Resistor values are the same. The diode is a 1N4007.
In this setup, "H" represents the GPIO pin connected to the VL53L0X sensor, and the right side of the image shows the connection to the RST pin of my ESP8266 NodeMCU.
This is the board I am using: https://digitaltown.co.uk/components10VL53L0X.php
The issue is that I can't seem to reset my ESP8266 using the VL53L0X interrupt. Interestingly, if I replace the GPIO interrupt with a manually operated switch (pulled up), it works perfectly. Pressing the switch pulls the pin to ground, produces a falling edge, and the circuit generates the pulse needed for the RST pin.
I'm not sure what’s going wrong—maybe I’m overcomplicating things.
What would you recommend?
Thanks in advance!
2025-01-13 06:50 PM
Hi
VL53L0X interrupt pin is open drain structure, in theory it should be same with your manual switch setup.
May I know you pull-up resistor value for both VL53L0X interrupt pin and your manually operated switch?
And I suggest you check input(A) and output(B) oscillogram for the two configurations, just find the difference, guessing the INT pin drive low ability is not as strong as your manual switch.
And at last, for your special use case, maybe you can try to connect INT pin to the XSHUT and RST ESP8266 at same time, connect to XSHUT pin to trig VL53l0X HW reset, then the INT pin will be pull-high by default, this is the thing we have never tried, just a quick idea for your use case.
Br
Zhiyuan.Han