I have trouble using an RTC with a esp32-cam. What I want to do is use a battery to power the esp32-cam, but it doesn't need to be on the whole time. So every hour it has to power up take a picture and send it via wifi to a server.
I thought of using a mosfet between the battery and esp. When the RTC triggers the mosfet power goes to the esp.
The reason I want to do this is, because the esp32-cam in low power mode still take 2.69mA. If I can fix this then the RTC is not necessary.
The problem I'm having is how to make the RTC work without the esp being powered on and how to turn the esp back off. What do I need to do to make it work?
The RTC I have is TinyRTC module and the mosfet is a MJE3055T.
I think the TinyRTC module has a DS1307, which doesn't have an alarm. I don't know how you would get that to work. You may have to go to a DS3231 module.
Your mosfet is an N-channel. To use the circuits shown in the other thread, you would need a P-channel.
My understanding is that the camera is permanently connected to one I2C peripheral, but there is another one that typically uses GPIO14 as SDA and GPIO15 as SCL. But I have no experience with that setup.
Anyway, the idea in the other thread is that the alarm pin of the DS3231 goes low at the alarm time, which turns on the mosfet. The ESP32-CAM would boot up and do its thing, and then send the command to the RTC to clear the alarm flag. That turns off the mosfet. If you want the alarm to trigger once every hour, you would set the alarm to zero minutes and zero seconds, and that would automatically occur once an hour. If you wanted some other interval, you would just program it into the RTC before clearing the alarm flag.
N-channel is usually used to switch on/off the ground of your circuit.
P-channel is usually used to switch on/off the positive voltage (e.g. +5v or +3.3v, or the positive battery voltage).
What is the max voltage of your battery, and what voltage regulator are you using for the ESP32 cam? are you just using the 3.3v linear regulator on the board?
After having another look at ShermanP's circuit's, I don't think there's any easy way to use your MJE3055T N-channel mosfet by itself. So just get a P-channel mosfet if your battery is below 5.5V. If battery is above 5.5v, then use 2 mosfet's, like illustrated in those circuits.
I have read it but wasn't sure how it worked. Now I understand it and will try it out. The only problem now is that I don't have a P channel mosfet. Do you know any that will work for me?
I haven't fully wrapped my head mosfet selection criteria, but I'm pretty sure that logic level mosfets, like AO3401 and DMP1045U will work well for the the entire voltage range of the 18650 4.2v battery, and will also easily handle the peak current the ESP32.
You can solder them to SOT-23-3 to DIP adapter boards with a cheap soldering iron.