PIR turns ESP32-Cam ON; photo and video are captured and sent through Telegram.
(modified version of: https://github.com/jameszah/ESP32-CAM-Video-Telegram)
PIR outputs 3.3V signal when movement is detected, n-mosfet is siwtched ON (AO3400), camera is powered through p-mosfet (AO3401)
PIR module is an HC-SR501 modded as shown in order to run at 3.3V The 1uF capacitor keeps the PIR inactive for 25 seconds before being able to detect movement again. https://diyi0t.com/hc-sr501-pir-motion-sensor-arduino-esp8266-esp32/
The project is powered through an HT7833 LDO Idle current is 70uA; it pulls close to 200mA while sending photo+video+message