Powering single lipo with step up with pir activation

I am trying to power a esp32 cam exactly like this link:

However i would like to power it with a 3 18650 in parallel. So only 3.2 -4.2 volts. The esp only turns on when the pir detects movement takes pic then turns off. If i were to use a 5v step up from the battery to where the dc 5 v would connect in the diagram, wouldn't there be significant power drain from just having it hooked up? Is there a good way / best practice to incorporate the stepup with minimal battery power loss? Is there a way to activate the stepup from the transistor that would sove this?

Li-ion batteries can have an output voltage 2.7 - 4.2v. The ESP32 CAM (as per the one in the tutorial) is a 3.3v device, and is able to convert a 5v supply into 3.3v via the on board LDO voltage regulator. This will not be able to convert the voltage once the batteries drop below a certain voltage, so you will not be able to use the batteries to their full potential. The voltage regulator will also consume some power... the more voltage it has to drop, the more power it need to dissipate. Check the Datasheet to work out exactly how much.

You might be better to use a buck/boost converter like this, and connect directly to the 3.3v line.

Is this the same thing but at 500mah and can use 2-5v input. So this enable pin i would power high from the pir signal and then it would come on then turn off after?

The difference is that it is a switching regulator so can be very efficient, and this is both a buck (lowers voltage from battery) and boost (increases voltage from battery)... so can handle the various voltages of the Li-Ion and always output 3.3v.

I haven't used this module before, but it does look like the enable pin can be used to turn the whole thing off, saving even more power.

I have problem's with the tutorial's use of 5V when programming the ESP32-CAM - the FTDI adapter should be set to 3.3V.

In fact, it seems everything involved here is 3.3V - the ESP32-CAM, the SD card and the PIR detector. So there's no need for a step up converter. The battery voltage will range from a maximum of 4.2V down to a practical minimum of about 3.5V at which point it will be about 90% discharged.

So I think what's needed is a very low dropout 3.3V linear regulator. The schematic for the ESP320-CAM shows an AMS1117 as the 3.3V regulator, which has a very high dropout voltage, so you would need to use a separate LDO, the output of which would feed directly to the 3.3V pin of the ESP module and the power pin of the PIR sensor. The MCP1700 LDO has very low dropout voltage, and will provide 250mA. That would probably be enough if you aren't using the radio.

Whether a buck regulator would be more efficient depends on how much time will be spent sleeping, and what the sleep current is. A switching buck regulator will be more efficient than a linear regulator under significant load, such as when the SD card is active, but the benefit decreases as the load decreases, and the buck may actually be less efficient under very light loads. Per the schematic, you can power down the camera, but you can't power down the SD card. So this system my sleep at a pretty high current level, and a buck regulator might well be the best choice.

The Adafruit is a buck regulator, not a buck/boost. But I think buck is actually what you want, and it should work fine.

If you use the enable pin on the regulator to disable power, you would have to have the PIR detector powered directly from the batteries.

On further reflection, it seems to me that the Adafruit 3.3V buck converter is probably the way to go. It has an active-high enable pin which could be used to power down the entire project, except the PIR sensor, between sensor events. I think that will save a lot of battery power since the sleep current of the ESP module is likely to be pretty high.

So you want the PIR output to drive the enable pin. However, the converter module has a 100K pullup resistor on the enable pin. And the PIR module apparently has a 20K resistor in series in its output. The enable voltage has to be below 0.4V to turn the converter off, so that mixture of resistors doesn't quite work reliably. The answer is probably to just remove the pullup resistor, or cut the trace going to it.

The PIR would be powered directly from the batteries, and would be on all the time.

If the PIR output doesn't stay high long enough to take and save the picture, then you could also feed the enable pin from a GPIO pin on the ESP - through a diode. That would allow the ESP to keep its power on until it's ready to shut down. It would override the PIR output when the ESP is powered up, but the diode would prevent interference from the ESP when it is powered down.

From several sources, it also looks like you need a capacitor on the PIR's power pin. Otherwise the switching regulator ripple may cause it to trigger falsely.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.