0

[I2C] Can VCC pin be alternatively LOW and HIGH
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

[I2C] Can VCC pin be alternatively LOW and HIGH

by pierrot10 on Mon Dec 17, 2018 12:13 pm

Hello,

I have a project with about 10 sensors:
3 moisture sensors
2 rain gauge (one for rain and one for the spray (drops)
1 sol temperaure
a RTC https://www.adafruit.com/product/3013

I also have some I2C sensors:

1) Baro BME280 https://learn.adafruit.com/adafruit-bme280-humidity-barometric-pressure-temperature-sensor-breakout?view=all
2) Lux TSL2561 https://learn.adafruit.com/tsl2561
3) IR Temperatue MLX90614 3V https://www.adafruit.com/product/1747

As my project take measures once each hour, the project sleep within about 58 minuntes. When the Adafruit MO adaloger sleep, the project consoms about 9mA.
It look a bit toomuch, then I am thinking to turn off the 3 I2C sensors (Baro, Lux and IR temperature)

I tried to leave the Baro VCC pin unconnected (open) but my project stopped working. I believe the SDA and SCl pin should be unconnected as well?
Or should I connect all of my I2C VCC pins to a pin of my Arduino MO adaloger and put it LOW when the microcontroller sleep, and HIGH when I need to take a measure?

If yes, should I re initiate the I2C sensor when they are reactive as for example with the BME280:
Code: Select all | TOGGLE FULL SIZE
      if (!bme.begin()) { 
        Serial.println("Could not find a valid BME280 sensor, check wiring!");
        while (1);
      }


Second question regarding TSL2451:

I red that TSL2451 can be in sleep mode, The doc say
about 0.5mA when actively sensing, and less than 15 uA when in powerdown mode.


In the ccp file, there is disable function but if in my ino file I write

Code: Select all | TOGGLE FULL SIZE
tsl.disble();


The IDE generate an error stating the disable() is private.
Then I wonder how can I use tsl.disable() and make sure that TSL2561 goes in low power when inactive (no measuring)


Many thank for your support and Merry Christmas to all of you!!
Last edited by pierrot10 on Sun Dec 23, 2018 7:10 am, edited 10 times in total.

pierrot10
 
Posts: 276
Joined: Tue Nov 17, 2015 4:34 pm

Re: [I2C] Can VCC pin be alternatively LOW and HIGH

by pierrot10 on Wed Jan 09, 2019 5:15 am

No body can help?

pierrot10
 
Posts: 276
Joined: Tue Nov 17, 2015 4:34 pm

Re: [I2C] Can VCC pin be alternatively LOW and HIGH

by adafruit_support_bill on Wed Jan 09, 2019 8:53 am

Removing VCC power from the board, the pullup resistors on the SDA and SCL lines effectively become pull-down resistors. So I2c communication will be adversely affected.

adafruit_support_bill
 
Posts: 70973
Joined: Sat Feb 07, 2009 10:11 am

Re: [I2C] Can VCC pin be alternatively LOW and HIGH

by pierrot10 on Wed Jan 09, 2019 9:03 am

Dear Bill
Thanks for your reply. I pulled up the I2C pin of my microcomtroller
I did not exactly understand your answer.
If my I2C lines are pulled up with a 4.7K resistance and if I leave the VCC pin of my I2C sensors, the SDA and SCl pin of the I2C sensors will be pulled down by the sensor enven if I pulled up the I2C line???

In any case the VCC pin can not be open, but it be to the ground to switch it off???
Last edited by pierrot10 on Wed Jan 09, 2019 2:26 pm, edited 1 time in total.

pierrot10
 
Posts: 276
Joined: Tue Nov 17, 2015 4:34 pm

Re: [I2C] Can VCC pin be alternatively LOW and HIGH

by adafruit_support_bill on Wed Jan 09, 2019 2:24 pm

If there is no VCC applied, the voltage on that rail is undefined - but probably would tend toward ground potential. So the pullup resistors on the board will not be pulling "up".

If you have other pullup resistors on the i2c bus, you can probably get away with removing the ones on the breakout.

adafruit_support_bill
 
Posts: 70973
Joined: Sat Feb 07, 2009 10:11 am

Re: [I2C] Can VCC pin be alternatively LOW and HIGH

by pierrot10 on Wed Jan 09, 2019 2:29 pm

Thank again for your reply.
Then in other work, the I2C sensor must be powered at VCC :)

pierrot10
 
Posts: 276
Joined: Tue Nov 17, 2015 4:34 pm

Re: [I2C] Can VCC pin be alternatively LOW and HIGH

by millercommamatt on Wed Jan 09, 2019 3:32 pm

Would something like this work for you?
https://www.adafruit.com/product/3435

millercommamatt
 
Posts: 149
Joined: Tue Jul 31, 2018 4:57 pm

Please be positive and constructive with your questions and comments.