I am using an esp32-cam to stream video. As it is steaming I want to take a picture and save it to a micro SD card when motion is detected.
EKMC2604112K panasonic PIR motion sensor
I am powering the 12e and PIR with a 3.3v regulator with a 10uf smoothing cap.
I am getting the signal from the PIR on pin 13 (INPUT)on the 12e. I have a 10k ohm pull down resistor on this pin.
When pin 13 goes HIGH it sends a signal to an MQTT server to send a notification of the movement. Also when pin 13 goes HIGH it triggers Pin 5 (OUTPUT) on the 12e to go HIGH. When I do a multimeter reading of Pin 5 it reads 3.3v.
I am powering the ESP32 with a 6v regulator with 10uf smoothing cap. which outputs about 5.7v. I connect Pin 5 of the 12e to Pin 13 (INPUT) of the esp32. When Pin 5 goes high it should activate Pin 13 which then tells the camera to take a picture and save it to the MicroSD card.
When I power the whole thing up, if I don't have Pin 13 of esp32 connected, the camera streams and takes a picture about every 2 seconds and saves it to the microSD card.
If I then connect Pin 5 (12e OUTPUT) to Pin 13 (esp32 INPUT) when there is movement detected on the PIR the flash on the ESP32 lights up slightly about 500msec apart but when I check no pictures are saved to the MicroSD card.
If I power the whole thing up and I have Pin 5 connected to Pin 13 the MicroSD card is activated but there is no flash of any kind when there is movement and no pictures are taken.
I have tried an pull down resister of 10k and 20k ohms but there is no change in the outcome.
If I power the ESP32 with a FTDI 5v source with Pin 5 to Pin 13 picture is taken every 500msec. connecting to pull down pin doesn't do anything and disconnecting the pins doesn't have an effect either.
I have attached a drawing of the connections.
I hope this helps. I am at my wits end as what to do. If anyone can help me I would greatly appreciate it.