0

I am using an ESP8266 to control a ring of neopixels. I want to use a PIR to trigger a brief light show. I'm using batteries and need them to last as long as possible.

I have it working by checking the PIR for motion. If there is motion I run the light show. If no motion I put the ESP8266 into deep sleep for 15 seconds. When I wake I try again.

I would prefer to use the PIR to reset the ESP, and I did get it to do that but the problem was that further movement would reset again and start the light show from the beginning. I would like to be able to disable reset while I'm running code.

I did some research and found this:

PIR motion wake ESP8266 from deepsleep

It's pretty much what I need.

Is there a final circuit diagram or a similar solution?

Thanks.

1 Answer 1

1

Hi I have being using the circuit below now for a few weeks and all seems to work.

When I wake from deep sleep I set the Latch pin to 0 to prevent any more resets. I do the work, I check if there is still motion by reading PIR out, if no movement I set the Latch pin to 1 and go into deep sleep. Circuit diagram to prevent repeated resets when waking from deep sleep

2
  • Have you measured the current consumption when the PIR is not detecting anything ? To me it looks like 2.5mA if R3 is only 1k.
    – 6v6gt
    Dec 9, 2023 at 14:45
  • Updated R3 to 47K and works fine for the last few days. Thanks.
    – Eoin Byrne
    Dec 15, 2023 at 9:19

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.