Page 1 of 1

ESP32-CAM and PIR sensor

Posted: Fri Jan 19, 2024 10:31 am
by xavier32
I'm looking for a lowest battery consumption, and the battery size not very heavy.
With ESP32-CAM in deep sleep mode I have 4mA current draw. The battery capacity is 1500mA. This configuration will run maximum 15 days.
Now I tested a PIR sensor SR-602. It takes only 1uA or 0.001mA! The lowest battery consumption I have ever seen. Only this sensor will work about 62500 days from 1500mA battery.

Now the wanted scenario: In the idle time, only PIR sensor is powered on. It waits for the event. When the PIR sensor triggers, it powers on the ESP32-CAM. ESP32-CAM takes a picture, save it on the memory card and cut off the power so only the PIR sensor remains active. I need a external circuit to do this.

The SR-602 sensor output signal is 3.3v for only about 2.4 seconds (not modifiable). If I use a transistor like a switch, the ESP32-CAM will be powered on for only 2.4 seconds. How to increase this time? Even when the PIR signal will fall from high to low, I need to maintain the ESP board powered on to finish the task, then cut off the power.

Any ideas will be apreciated

Re: ESP32-CAM and PIR sensor

Posted: Sat Jan 20, 2024 1:21 am
by ESP_Sprite
You probably want some kind of latching circuit (like an S-R flipflop) where the PIR turns the ESP-CAM on and a GPIO on the ESP-CAM can turn it off.

Re: ESP32-CAM and PIR sensor

Posted: Sat Jan 20, 2024 11:36 am
by xavier32
I could test it if I have a schematic of this latching circuit. Thanks

Re: ESP32-CAM and PIR sensor

Posted: Mon Jan 22, 2024 2:38 pm
by donbrew

Re: ESP32-CAM and PIR sensor

Posted: Tue Jan 23, 2024 7:23 am
by xavier32
Wow! This is the circuit I'm looking for. I will try it.
Thank you very much

Re: ESP32-CAM and PIR sensor

Posted: Tue Jan 23, 2024 3:22 pm
by donbrew
I found using 2n7000 n-channel mosfets instead of the npn BJTs works better. You can get 100 2n7000 for less than $8 on Amazon.

Re: ESP32-CAM and PIR sensor

Posted: Mon Feb 12, 2024 2:35 pm
by xavier32
I tested. The latch circuit is working fine.
Thanks