ESP32-CAM and PIR sensor

xavier32
Posts: 5
Joined: Fri Jan 19, 2024 10:07 am

ESP32-CAM and PIR sensor

Postby xavier32 » Fri Jan 19, 2024 10:31 am

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

ESP_Sprite
Posts: 9052
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32-CAM and PIR sensor

Postby ESP_Sprite » Sat Jan 20, 2024 1:21 am

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.

xavier32
Posts: 5
Joined: Fri Jan 19, 2024 10:07 am

Re: ESP32-CAM and PIR sensor

Postby xavier32 » Sat Jan 20, 2024 11:36 am

I could test it if I have a schematic of this latching circuit. Thanks

donbrew
Posts: 2
Joined: Mon Jan 22, 2024 2:36 pm

Re: ESP32-CAM and PIR sensor

Postby donbrew » Mon Jan 22, 2024 2:38 pm


xavier32
Posts: 5
Joined: Fri Jan 19, 2024 10:07 am

Re: ESP32-CAM and PIR sensor

Postby xavier32 » Tue Jan 23, 2024 7:23 am

Wow! This is the circuit I'm looking for. I will try it.
Thank you very much

donbrew
Posts: 2
Joined: Mon Jan 22, 2024 2:36 pm

Re: ESP32-CAM and PIR sensor

Postby donbrew » Tue Jan 23, 2024 3:22 pm

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.

xavier32
Posts: 5
Joined: Fri Jan 19, 2024 10:07 am

Re: ESP32-CAM and PIR sensor

Postby xavier32 » Mon Feb 12, 2024 2:35 pm

I tested. The latch circuit is working fine.
Thanks

Who is online

Users browsing this forum: No registered users and 153 guests