Chat freely about anything...

User avatar
By btidey
#93985 To get the best battery life you want to power off the sensor when you sleep. The current requirement of the HC-SR04 is a little high to power it reliably from a GPIO pin so you really want to use a transistor or better a MOSFET switch to control its power.

The D1 mini itself does not have the lowest current in deep sleep due to the on board USB / serial and the onboard regulator has a significant quiescent current. For lowest current in deep sleep you really want to use a raw module like the ESP-12F