LDO and I2C sensor powered directly from the GPIO

noblerabbit
Posts: 6
Joined: Tue Oct 23, 2018 9:49 am

LDO and I2C sensor powered directly from the GPIO

Postby noblerabbit » Sat Feb 16, 2019 5:32 pm

Hi,

My I2C sensor operates at 2.8 V, therefore I need to add the LDO to get from 3.3 V down to 2.8 V. And the I2C sensor requires max 2 mA for operation. GPIO from esp32 can supply up to 40 mA.

I would like to avoid having LDO powered when I don't need the sensor in order to minimize the current.

Therefore I would like to use the GPIO from the esp32 to power the LDO directly. So when GPIO is 0, neither LDO nor sensor will consume any current.

1. Can I do that? Is this ok practice?

2. For LDO to work I need to put 1 uF capacitor between the Vin, GND (as in the attached schematics). What will happen when I set GPIO to 0? Will the capacitor discharge problematic?

Attached screenshot of how to connect the LDO - Vin would be connected to GPIO from esp32, Vout is Vdd for I2C sensor.

Thanks so much!
Screenshot 2019-02-16 at 18.09.17.png
Screenshot 2019-02-16 at 18.09.17.png (53.51 KiB) Viewed 3761 times

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

Re: LDO and I2C sensor powered directly from the GPIO

Postby ESP_Sprite » Sun Feb 17, 2019 12:13 pm

It should work. I'd personally add a series resistance between the GPIO and the LDO/capacitor of, say, 100 ohm or so, to limit the inrush current.

noblerabbit
Posts: 6
Joined: Tue Oct 23, 2018 9:49 am

Re: LDO and I2C sensor powered directly from the GPIO

Postby noblerabbit » Mon Feb 25, 2019 3:52 pm

@ESP_Sprite. Appreciate your feedback. Thank you.

Who is online

Users browsing this forum: Bing [Bot] and 56 guests