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.

Interfacing OPT3001 over the I2C Channel of Raspberry Pi 0 W board

Other Parts Discussed in Thread: OPT3001

Namaste Reader,

The datasheet of the OPT3001 recommends a 10kOhm pull-up resistor for the SCL and SDA pins.

I'd like to integrate the OPT3001 with the Raspberry Pi 0 W board, which has internal 1.8kOhm pull up resistor on the SCL and SDA pins.

Questions:

1. Would these internal pull-ups be sufficient for a smooth communication between the OPT3001 and Pi 0 W board? What would be the limiting factors in this case of using the existing internal pull-ups?

2. What is the recommended value of external pull-up resistors, considering the fact that two resistors (internal & external resistors) would then result in a parallel combination?

Thank you for reading this post and, for your possible reply.

Thanks | Regards,

Dipen

  • Hi Dipen,

    1. Limiting factor is that lower value pull-up resistors will require more current to pull down. I am not sure if the lower value will be okay since this is not advised by the datasheet.

    2. Parallel resistor equation is total resistance = 1/(1/1.8k + 1/R_external_pullup)). Unfortunately you can't increase resistance by placing resistors in parallel as the lower resistor sets the upper bound. This is shown in the equation since you would require a negative resistance to get that equation to work out to 10k.


    I'll check to see if there are any other solutions to this problem.

    Best,

    Alex
  • Namaste Alex,

    Thank you for your reply. I very much agree with your (1) and (2) replies. 

    1. For a 3.3V supply, the current drawn equals 1.83mA for a 1.8kOhm internal pull-up resistor. As against this, the current drawn falls to 0.33mA using the recommended 10kOhm pull-up resistor.

    2. For a parallel combination, my calculation was suggesting a (-)2.195kOhm resistor, which made me wonder for a moment. Your explanation of the lower resistor setting the upper bound for a parallel combination, explains the reason for getting such a negative value. Thank you :-)

    I'll wait for your reply or, for a possible reply from any other reader, on this issue.

    Thanks | Regards,

    Dipen

  • Hi Dipen,

    We have an app note on pull-up resistor selection at http://www.ti.com/lit/an/slva689/slva689.pdf specifically figures 2 and 3 show you how to determine max and min pull-up resistance values given the bus capacitance. Also make sure to check the abs max current for the opt3001 pins (10mA). Looking at your values 1.8k should be okay if you are running with a 3.3V supply.

    Best,

    Alex

  • Namaste Alex,

    Thanks a ton for this useful Application Note and, for increasing my knowledge further on the I2C protocol.

    The minimum pull-up resistance [Rp(min)] value calculated as per Equation #1 (App Note) turns out to be 966.67Ohms, which is well below the 1.8KOhm internal pull-up resistor on the I2C channel of the Raspberry Pi board. Also, the 1.83mA current drawn is within the safe range, again well below the absolute maximum rating of 10mA.

    Assuming the maximum bus capacitance (Cb-max) of 400pF, below are the Rp(max) values.

    For Standard mode: Rp(max) = 2.95KOhm

    For Fast mode: Rp(max) = 884.85Ohm

    Note that the Rp(max) value turns out to be lower than Rp(min) value for Fast mode, maybe because the maximum bus capacitance value of 400pF has been considered.

    The calculations for maximum pull-up resistance [Rp(max)] value are not straight forward and the very 1st question that comes to my mind is, how do I calculate the effective bus capacitance (Cb), which is required for calculating Rp(max) value. I'd appreciate if you can share some useful links for understanding and calculating the bus capacitance (Cb).

    PS. I've marked this thread as 'Resolved' but would appreciate your reply.

    Thanks | Regards,

    Dipen