Hi everyone! I hope you are all having a great Sunday!
First of thank you so much for taking the time to read my post and hopefully help me to understand my issue.
I have a simple low power project with various I2C sensors.
My project enable and disable the external power (i2c power) in order to hopefully save some battery life before sleeping.
But I found out that the BME280 is consuming a lot when my external power is disabled.
I think this is due to the ESD diod protection on the i2c line mentioned in the date sheet
So my understanding is that the current on the SDA and SCL line will follow this path :
How can I easily fix this via software? Or will I need to change my design to use some i2c bus switch? (like PCA9546APW,118 from NXP)? (a software fix will be the desirable solution)
BME280 power consumption
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_mike
- Posts: 67446
- Joined: Thu Feb 11, 2010 2:51 pm
Re: BME280 power consumption
You'll need to control the voltage on the SDA and SCL lines, setting those low along with power to the external devices you want to shut down.
Even if you use an I2C switch, you'll still get parasitic current through the protection diodes if you shut down VCC while leaving SDA and SCL high.
Even if you use an I2C switch, you'll still get parasitic current through the protection diodes if you shut down VCC while leaving SDA and SCL high.
- Sansan97
- Posts: 2
- Joined: Sun Sep 18, 2022 6:17 am
Re: BME280 power consumption
Thanks for your answer, I already tried to set the pin to output and set them low, but I still have the same power leakage as if I left the pin as open drain and let the current sink to the esd diode...You'll need to control the voltage on the SDA and SCL lines, setting those low along with power to the external devices you want to shut down.
Isn't there a correct way to power off external i2c devices for battery powered projects?
- adafruit_support_mike
- Posts: 67446
- Joined: Thu Feb 11, 2010 2:51 pm
Re: BME280 power consumption
Having powered devices connected to unpowered devices is generally a problem. Most circuits aren't designed for it, and will have exactly the kind of leakage problems you're seeing.
The best solution is to make a clean disconnect between the powered side and the unpowered side. Relays are the devices to beat in that realm, and reed relays are less power-hungry than the usual kind:
https://www.mouser.com/c/electromechani ... rt=pricing
Even so, they need 10mA to 15mA to operate (about the same as an LED), which can be a lot for some applications. Under those conditions, a swith IC is the next best choice:
https://www.mouser.com/c/semiconductors ... rt=pricing
https://www.mouser.com/c/semiconductors ... rt=pricing
Some are called 'analog' and some are called 'digital', but there isn't much difference between them. For your application, either will work.
For an I2C sensor that only needs a few milliamps, you can run the VCC, SDA, and SCL lines through switches and turn all the switches off bwhen you want to shut down the sensor. The switches solve the microcontroller's powered/unpowered problem because they always have power when the microcontroller does.
The best solution is to make a clean disconnect between the powered side and the unpowered side. Relays are the devices to beat in that realm, and reed relays are less power-hungry than the usual kind:
https://www.mouser.com/c/electromechani ... rt=pricing
Even so, they need 10mA to 15mA to operate (about the same as an LED), which can be a lot for some applications. Under those conditions, a swith IC is the next best choice:
https://www.mouser.com/c/semiconductors ... rt=pricing
https://www.mouser.com/c/semiconductors ... rt=pricing
Some are called 'analog' and some are called 'digital', but there isn't much difference between them. For your application, either will work.
For an I2C sensor that only needs a few milliamps, you can run the VCC, SDA, and SCL lines through switches and turn all the switches off bwhen you want to shut down the sensor. The switches solve the microcontroller's powered/unpowered problem because they always have power when the microcontroller does.
Please be positive and constructive with your questions and comments.