Low Power Mode with...
 
Notifications
Clear all

Low Power Mode with Sensors

3 Posts
3 Users
0 Reactions
90 Views
(@markvanhorne)
Member
Joined: 3 years ago
Posts: 5
Topic starter  

In the recent video about low power modes with ESP32, I understand how to conserve power on the processor using the various sleep modes. But what if you have peripherals?  For example, if I have a BME280 taking temperature, humidity, and barometric pressure readings, how do I turn off the sensor so it won't take power while the processor is sleeping?



   
Quote
noweare
(@noweare)
Member
Joined: 6 years ago
Posts: 216
 

You can power some external devices using esp32 pins as the source if the current draw of those devices are within the current spec of the esp32.  The BME280 can be powered by a pin for example or the chip can go into deep sleep itself.  You can also use a regulator with an enable pin, and use the regulator to power all your external devices if they can take the save source voltage. Regulators do draw current even when disabled. 



   
ReplyQuote
(@davee)
Member
Joined: 5 years ago
Posts: 2043
 

Hi @markvanhorne,

 To supplement @noweare's helpful answer, if the current requirement oa chosen peripheral exceeds the ESP32's GPIO output current capability, then you could try using an ESP32 GPIO to drive the gate of a MOSFET to switch the power to the external device.

NB I haven't tried this with an ESP32, so whilst it should be fine, an unexpected gotcha could appear.

---

In the particular case of the BM280, a 5 second glance at the data sheet suggested its current consumption is modest, especially in 'sleep mode', so it might not even be necessary to switch the incoming power, depending upon your requirements:

from https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bme280-ds002.pdf

BME280
Digital humidity, pressure and temperature sensor
Key features ....

Current consumption 1.8 μA @ 1 Hz humidity and temperature
2.8 μA @ 1 Hz pressure and temperature
3.6 μA @ 1 Hz humidity, pressure and temperature
0.1 μA in sleep mode

Once again, I'll leave it to you to check out thoroughly. I don't know if the BM280 has been cloned, but be aware that many clones of parts may work reasonably well, but may not meet all of the specs, such as power consumption. This may be a case to ensure you have a 'genuine' product.

Good luck with your project.



   
ReplyQuote