No GSP30 connection on Uno R4 QWIIC Post

Hi, I tried connecting on UNO R4 QWIIC a SGP30 Breakout, using Adafruit "sgptest" example program from Adafruit Library for SGP30. No Luck to make it work on Wire1, but works on Wire object. Initially reported issue to Adafruit. For investigation works done so far with Adafruit, see: https://forums.adafruit.com/search.php and search for same topic title as here. I have done further investigation, and confirm it is present on the two Arduino Uno R4 boards I have. However, being a new user, I cannot load the test file code for Arduino to confirm the problem presence. It seems related to the absence of SCL signal on QWIIC port when configured as Wire1. Works fine on "Wire" object. Has this problem been seen before?

1 Like

I've used the QWIIC connector for severa l things now with Wire1 and it's worked fine.

I don't really want to chase down your other thread. You can post your code here in code tags and links to the libraries. If there's any really good information on that thread then please post some quotes here or a direct link.

Thanks Delta G. This is helpful. For the QWIIC, did you make some firmware update on the R4, or it worked great from the start? For some reason, mine is missing the SCL signal with Wire1. SDA has some activity. No issue with Wire when using the i2C on the R4 headers in lieu of QWIIC. The other R4 I have exhibit the same behaviour, but I did not check which signal is missing on Wire 1.

Explain what you mean and how you came to this conclusion.

I have two distinct QWIIC cables. One with QWIIC connector at both ends, and one with QWIIC connector and flying leads. Only one is used at any given time. They are both new. Same for Arduino, and same for the SGP30 breakout. I connect the flying leads cable to the Ardino header pins used for Wire (+3.3V, Gnd, SDA and SCL pins). I configure the code to use Wire object. Things work fine on I2C, and the code does what I want. I then use my Tektronix digital voltmeter, and when I measure "AC" I can then measure some spike activity on both SDA and SCK at the breakout. (I don't have a logic analyser). The measurements "spikes" are updated at 1 second rate, which is consistant with the code I have. Same results with Adafruit test code from their SGP30 library. I then disconnect this cable, connect the other cable with QWIIC connectors at both ends. I initialise the code to use Wire1 object and recompile. I then use my digital voltmeter, under the same configuration, and I can measure the same activity type of on SDA, but not on SCL. Using a very small needle pin, I go J2 connector pins soldered on the Arduino board, and measure SDA and SCK signals the same way. SDA shows activity, and SCK does not. My conclusion is that the code is initialized correctly because SDA pin has "AC" type spike activity at the QWIIC connector J2 pins (even though SCL does not). I get the same results with Adafruit's test code for SGP30. I did not go as far as trying to measure activity on MCU pins P400 and P401, because they are much too close together, and I may damage the board soldered joints, or the MCU. Based on the fact that your QWIIC I/F works is a big + for me. I am inclined to believe that QWIIC should work, unless I may possibly have a firmware configuration issue, or a potential hardware defect somewhere. However, the two Arduino boards I have shows the same behaviour, and your interface does work (maybe you use a different baseline). I also only have one cable with QWIIC connectors at both ends; I did not discard a potential defect there. It may very well be, even if it is a new cable. To assess this possibility, I tested continuity of each connector pins wire; they are all connected correctly with their corresponding pins at the other connector. I then checked for shorts between adjascent pins; I have no shorts. I tend to believe the cable is OK, but I cannot confirm it for sure. I need to find another one to discard this variable, but no success so far to find one locally (I have not given up yet). What I'll try tomorrow evening is to verify from the schematic if the SGP30 breakout can accept 3.3V input from somewhere (the part on it requires 1.8V supply from an on-board regulator, so I need to check this first). If it does, I'll solder some header pins on the SGP30 breakout, "turn around" the QWIIC cable with flying leads that is known to work to supply the breakout with the flying leads end, and feed again the SGP30 from the QWIIC connector. The results from this should get me further. Anyways, knowing that your interface works encourages me to dig out further. Just explaining this put extra structure in my head on the way forward.

Paragraphs my man. Make it readable. A line break here or there.

I don't think your test is conclusive. I'm not sure what you measured but I don't think that's the right way.

1 Like

Good day Delta_G. I'll keep your comment on paragraph in mind.

As for the test method: The right way to measure this is with an oscilloscope, or a logic analyser. I have none, but a good digital voltmeter.

The test validity is as follows: SDA and SCL carry digital pulses that varies from 0v (logic 0) to 3.3V (logic 1) during communication exchange.

If the voltmeter is ONLY used to indicate "ac" type ACTIVITY on signal pins, and is capable of providing some king of indication on a working baseline, then the "Activity" test would be valid. Mine is capable of doing so, but not all can.

The long explanation I provided you with demonstrated that:

  1. Signal activity was detected both SDA and SCL signals when the library is set as "Wire" object (I2C port found on Arduino header pins)
  2. SCL activity was missing, but SDA was OK on I2C signals when the library Wire1 object. (I2C port found on Arduino QWIIC connector)
  3. Having SDA pin activity on QWIIC port suggests that the Wire1 object was initialised properly, and in accordance with Arduino documentation.

At this time, either the board, or the QWIIC cable are defective. I am trying to find a QWIIC cable on the basis that your board is working.

If you have a better test method solution, I'd welcome your comment back. I agree that what the method I used is not the right way. Nonethless, I believe the test results are still conclusive.

I normally use, with no problem, QWIIC port on R4 WiFi to connect Adafruit QIIWC compatible sensors and also 0.96" OLED so ... or your cable or your board is defective :confused:

Guglielmo

Comment accepted Guglielmo: Either my board or my cable is defective. Hopefully not both.

When running your tests, are there pull-up resistors connected to the SDA and SCL lines at some point in the circuit?

1 Like

Hello david_2018. To answer from unpowered tests:

  1. SPG30 schematic shows pull-ups from 5V header pin to each SDA and SCL.
  2. Measured about 10K practically on physical SGP30 board alone.
  3. Connected SGP30 to QWIIC cable; the other QWIIC end to Arduino QWIIC connector (In circuit, but Arduino unpowered). Measured about 3.5 K on both SDA and SCL to +5V header pin on SGP30. In that configuration, the +5V header pin of SGP30 breakout is connected to the Arduino QWIIC 3.5V output.
    Made measurements twice. Thanks for the suggestion.

From david_2018 good suggestion, and results I get, it seems the QWIIC cable connectors SDA and SCL wires are OK, hense.... I need to re-run this test and make myself a dwg to verify once more the outcome.

Made a drawing, and rechecked results. Measurements are OK. The current situation is :

  1. SGP30 breakout works from UnoR4 header pins when the code using Arduino Wire library is set to use the Wire object.

  2. SGP30 breakout does not work on both of my UnoR4 QWIIC port when the code using Arduino Wire library is set to use the Wire1 object.

  3. Discussion with Delta_G explained how I measured the absence of SCL signal activity on QWIIC connector using an unusual method. Until a better solution is found, that’s all I have.

  4. I confirm presence of 10K pull-up on SGP30 breakout SDA and SCL lines from david_2018 input to the conversation.

  5. Following david_2018 lead, and from the drawing I made, the difference in resistive values during measurements of unpowered interconnected units, compared to SGP30 breakout measurements alone, confirms SDA and SCL wires connectivity from SGP30 breakout right up to the MCU pins P400 and P401. These pins are used by the MCU for SDA and SCL signals on the QWIIC port. Whatever is inside the MCU provided additional parallel resistive circuit path to explain the difference in resistive values measurements. That’s new from yesterday.

  6. Adafruit SGP30 sensor breakout documentation « Power Pins » and « Data Pins » sections indicates that +3.3V is acceptable power and signal levels to the SGP30 breakout.

I still can’t find anything wrong to use the QWIIC port. Although possible, I find hard to believe that my 2 Uno Wifi R4 boards would have both a defective QWIIC port, while the same port works for many of you using different breakouts than the one I use.

Do you have other boards that work with 3.3V? Raspberry, Arduino MKR? Just to verify that the module actually works well when powered by 3.3V and to exclude problems with the module ... :roll_eyes:

Guglielmo

Hello Guglielmo,

To make progress, I would have to find a board operating at 3.3V, with a QWIIC connector on it. I'll check around anyways.

As per my point 1 above, the SGP30 module already works feeding the SGP30 from its QWIIC connector using QWIIC to flying leads leads connected to the UnoR4 header pins. This already tends to eliminate it.

Thanks for your reply.

...in my previous answer, I should add that SGP30 was fed with 3.3V when connected to the Arduino R4 header via flying leads to QWIIC connector.

Due to my misreading of Uno R4 Wifi schematics until I read it a third time, point 5 of post #13 above needs to change as follows: The difference in resistive values during measurements of unpowered interconnected units, compared to SGP30 breakout measurements alone, confirms SDA and SCL wires connectivity from SGP30 breakout right up to Q1 and Q2 level translators.