0

I2C access lockup on low power
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

I2C access lockup on low power

by skumarm226 on Fri Feb 08, 2019 5:35 am

Hi,

I am connecting the trinket m0 to adafruit sgp30 , i have the code working when powered through the usb. However when i connect external battery roughly at 2.8-3.2 v to Vbat and gnd pin , the i2c device access fails for sgp30.

It seems to be stuck at
Code: Select all | TOGGLE FULL SIZE
if (! sgp.begin()){
    Serial.println("Sensor not found :(");
    while (1);
  }


Is there any code modification/ setting needed when operating at low power / voltage?.

Thank you
Kumar

skumarm226
 
Posts: 3
Joined: Thu Feb 07, 2019 9:02 am

Re: I2C access lockup on low power

by adafruit_support_mike on Fri Feb 08, 2019 5:58 am

Post a photo showing your hardware and connections and we'll take a look. 800x600 images usually work best.

adafruit_support_mike
 
Posts: 55265
Joined: Thu Feb 11, 2010 2:51 pm

Re: I2C access lockup on low power

by skumarm226 on Fri Feb 08, 2019 6:34 am

Hi,

I have attached the photo for ref.

To brief you on the setup, the sgp30 from adafruit is connected to trinket m0 on i2c bus (3V,GND,SCL and SDA).

We have another product / sensor which is (CC430 series chip), we do periodic measurements for temp/ humi and other stuff. Since sgp30 requires to be operational every second we could not utilize this in the end product, so the plan was to use it with trinket m0 and pass data on RX/TX lines (Serial1).

The whole setup where cc430 rx/tx connected to trinket m0 (rx/tx) and m0 connected to sgp30 works fine if powered through the usb.

When powered through the cc430 by connecting vcc and gnd to m0 Vbat and gnd, it seems to fails while doing sgp30.begin. (Note the output voltage from CC430 was 3.2 V).

I also tried to power by connecting two 3AAA batteries at 2.8V to lipo connect pins also fails.

I disabled the sgp30 and tried to power trinket m0 on battery and from cc430 , both works with sgp30 / i2c disabled.

Any suggestions why it fails when powered through battery.

[img]
conn3.jpg
[/img]
[img]
conn2.jpg
[/img]

Thank you
Kumar
Attachments
conn3.jpg
conn3.jpg (62 KiB) Viewed 94 times
conn2.jpg
conn2.jpg (56.82 KiB) Viewed 94 times

skumarm226
 
Posts: 3
Joined: Thu Feb 07, 2019 9:02 am

Re: I2C access lockup on low power

by adafruit_support_mike on Sat Feb 09, 2019 4:34 am

Thank you. The connections look good, so I doubt you're running into problems with intermittents.

Since the problem is related to the power source, my next guess is that you're seeing power spikes when running from batteries. The CC430 uses about 45mA, which is fairly heavy compared to the Trinket M0.

Do you have access to an oscilloscope that you can use to monitor the power on the 3V, SDA, and SCL lines while the sensor is active?

adafruit_support_mike
 
Posts: 55265
Joined: Thu Feb 11, 2010 2:51 pm

Re: I2C access lockup on low power

by skumarm226 on Mon Feb 11, 2019 7:02 am

Hi,

Unfortunately i dont have access to an oscilloscope. A few observations sgo30 when connected and powered by cc430 responds and works well, trinket m0 when connected and powered by cc430 also works fine (i tried the rgb example on board).

It seems that only trinket m0 when powered by cc430 and connected to sgp30 fails. I enabled the I2C debug in sgp30 code and observed the following
0x36, 0x82,
<- 0x0, 0x0, 0x81, 0x0, 0x64, 0xFE, 0x76, 0xD9, 0x6C,
CRC calced: 0x81 vs. 0x81
Read: 0x0
CRC calced: 0xFE vs.

It seems that trinket sends the i2c command and even gets a response but then fails. The only thing i can think of is that maybe there is not enough power to drive all the three.
Is there any low power mode to operate the trinket m0.

Thank you
Kumar

skumarm226
 
Posts: 3
Joined: Thu Feb 07, 2019 9:02 am

Re: I2C access lockup on low power

by adafruit_support_mike on Sun Feb 17, 2019 5:18 am

It sounds like the CC430 board can't supply enough current to power the Trinket M0 and the SGP30.

Try reversing the power connection: connect power to the Trinket M0 and power the CC430 from that. See if that works better.

adafruit_support_mike
 
Posts: 55265
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.