jameszah / ESP32-CAM-Video-Telegram

Record avi video on ESP32-CAM and send to Telegram on event or request
GNU General Public License v3.0
113 stars 26 forks source link

Move the ESP to deepsleep but waiting for PIR event? #42

Open sergiocasero opened 1 year ago

sergiocasero commented 1 year ago

Hello, first of all, congrats, the sketch works so so good.

My question is: Is there any way to "disable" everyting except the PIR and the video transfer? I want to put the ESP in a place where is no power supply so I only have a 18650 battery, the idea is to have the ESP in deepsleep until PIR event is fired -> send video -> go deep sleep again.

What do you think?

FBMinis commented 1 year ago

The ESP-32CAM has a high deepsleep current, I found it's better to keep it OFF while there is no movement.

I set the PIR to stay ON for 3min. When it detects movement, the output goes HIGH, which powers the Camera throught the P-Mosfet. It sends me a photo with the RSSI value as caption; then sends the video; then sends a message with commands to take another photo, capture another clip or turn the flash ON (this might be redundant, so it's optional - I'm still testing). After 3min the power is turned OFF.

I keep this camera outside, where I dont have a 220V line but it's still under wifi range.

The project consumes 272uA of current while nothing is happening because the PIR is ON and I have a 0.9V to 5V boost module (power from 3xAAA)

IMG_20230114_155750 IMG_20230126_131239

https://github.com/jameszah/ESP32-CAM-Video-Telegram/discussions/33#discussion-4570513

sergiocasero commented 1 year ago

Thanks you so much, @FBMinis what is the part number of the mosfet you're using?

FBMinis commented 1 year ago

The mosfets I'm using are the AO3400 and AO3401.

sergiocasero commented 1 year ago

The mosfets I'm using are the AO3400 and AO3401.

I'm trying to find them in local stores but without success, any alternatives?

FBMinis commented 1 year ago

This is what I have in my notes:

IMG_20230202_132908

You can search for AO3400 in websites like Mauser, Digikey, LCSC and then select other mosfet with similar characteristics. Maybe also google "logic level Mosfet" or look at the schematic of open source hardware like the ESP-32CAM.