This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

OPT3002: Using four OPT3002 - can't successfully attach more than two

Part Number: OPT3002
Other Parts Discussed in Thread: CC2640

Hello,

I'm using four OPT3002 on an I2C bus driven by CC2640r2. From the documentation I understand that there are four possible addresses. The Address line on the OPT3002 can be tied to VCC, GND, SDA, or SCL. I've configured each of the connectors so that they are wired correctly. I can plug two OPT3002 into any combination of mating connectors and they will work as expected - read data from the sensor. When I plug in a third OPT3002, the other two detectors continue to work as before, but the third detector doesn't work. If I remove one of the working detectors, the previously not working detector now works - again any two detectors will work. I've configured the CC2640r2 board file like so:

 Board_SPI0_CSN   | PIN_GPIO_OUTPUT_EN  | PIN_PULLUP      | PIN_GPIO_HIGH,                     /* CS pin at inactive level */
    Board_I2C0_SDA0  | PIN_INPUT_EN        | PIN_PULLUP      | PIN_OPENDRAIN,                     /* SDA pin pulled up*/
    Board_I2C0_SCL0  | PIN_INPUT_EN        | PIN_PULLUP      | PIN_OPENDRAIN,                     /* SCL pin pulled up*/
    Board_I2C0_INT   | PIN_INPUT_EN        | PIN_PULLUP      | PIN_IRQ_NEGEDGE,                   /* OPT3002 interrupt */
    Board_LOAD_CTRL  | PIN_GPIO_OUTPUT_EN  | PIN_PULLUP      | PIN_GPIO_HIGH   | PIN_OPENDRAIN,   /* Load control initially high */
    Board_UART_TX    | PIN_GPIO_OUTPUT_EN  | PIN_PULLUP      | PIN_GPIO_LOW,                      /* UART TX via debugger back channel */
    Board_UART_RX    | PIN_INPUT_EN        | PIN_PULLUP      | PIN_GPIO_LOW,                      /* UART RX via debugger back channel */

I understand that the I2C bus requires pull-ups. So, I'm using the internal facility on the CC2640r2 to pull up the bus lines. BTW, I've checked this performance against external 10K resistors and the performance is identical. I suspect that my PIN FUNC TABLE is incorrectly defined. Some pin here is not properly configured, causing the I2C bus to fail when I plug in a second device driving the SDA or SCL high with the pull up. assuming that the wiring is correct, which it must be, can anyone explain why I can't operate all four detectors on the I2C bus as advertised?

Any help is always appreciated.

Patrick

  • Hi Patrick,

    I work on the OPT3002 team so can help with any question on this part. For help with the CC2640r2 I would need to assign this post to our embedded processors team. If you have wired the OPT3002 address pin correctly then you will be able to operate 4 on the same bus. Please let me know if any other questions on OPT3002 or if okay to pass this post to the EP team to help further on the firmware side.

    Best,

    Alex

  • Hi Alex,

    Thanks for your response. Can you confirm that a pull-up from an embedded microprocessor like the TI CC2640r2 on the SDA, SCL, and INT lines will not cause a malfunction? Also the ADDR line when connected to the SDA and SCL lines will have a pull up too. Will this cause a problem? Please pass this request to the EP team if you think that they will be able to shead some light on the problem.

    Thanks again,

    Patrick

  • Hi Patrick,

    What is total pullup resistance used? Do you have multiple pull ups on a single line? ADDR should not have a pull up - per datasheet it should be shorted to the i2c line. Is this guideline being followed?

    Best,

    Alex 

  • Hi Alex,

    The pullup is weak and I'm not sure it's specified on the CC2640r2. I seem to recall it's ~100K. There are only the internal pullups on each of the lines - no external pullups. My understanding from the documentation is that there are four possible addresses as shown below. So, I have the ADDR tied to SCL for one device, SDA for the next, VDD for the next, and GND for the last device. Is this incorrect?

    Thanks,

    Patrick

  • Hi Patrick,

    Yes is addr is shorted to these lines this is correct. Please use the datasheet recommended pull up of 10k, you can add an external pullup, and test to see if that is the issue. I'm not sure if OPT will work with 100k pullups.

    Best,

    Alex

  • Hi Alex,

    I've tested the OPT with the internal pull-up resistors and 10K external pull-up resistors and the performance as measured on my scope is identical. So, I have configured the OPT with the needed pull-up resistors on SCL & SDA. So the problem stated in my first post remains unsolved. Have you tested and can you provide data showing four OPT running off a single MCU with the four ADDR pins configured as described in the documentation? Internally is the ADDR pin comparing to SCL, SDA, GND, and/or VCC? Any further documentation related to operating four OPT from one MCU would be appreciated.

    Thanks again for your help.

    Patrick

  • Hi Patrick,

    Yes I have tested 4x OPT EVMs running off a single MCU and was able to talk to each device by the appropriate address. Could you open a new post in the EP forum to address the CC2640 side? From OPT side I don't see any issues with your approach. If you want to share i2c waveform we can also check that.

    Best,

    Alex

  • Hi Alex,

    Thanks again for your help. I'll check with your colleagues on the EP side. I have some screen shots that I can share, but I'm not sure that's worthwhile. It must be something on my board side.

    Patrick

  • Sounds good. Let me know if you need further help on OPT side.

    Best,

    Alex