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.

Pull Up Resistors Issue

Hi Community,

I have interfaced the launchpad tm4c123g6pm with IMU mpu6050 and I set the internal pull up resistors for i2c paths. But the interface failed to read the IMU. I found that when I cancel the internal pull up and connect two external pull up resistors instead , everything works fine. How can I check if the internal pull up is fine ?

  • I don't believe your issue is "fine" - instead it is one of which resistor grouping proves, "Most effective?"

    And - as you've found - the lower value, closely placed, external pull-up Rs (always) win!

    Those internal resistors are higher in value - are ok for a GPIO input circuit - but for pulsing, communication they tend to "round" the signal edges and admit EMI/RFI - which a lower value pull-up may better block and/or suppress.

    In a "perfect world" MCU's internal R's would work - in our "real world" as you've just found - "Not so much!"

    Vendor's "over-promotion" should be noted (BTW - occurs, NOT just here) and users must insure that, "Ease of use & saving of 0.05 (USD)" does not compromise their time & efforts!   (it will - and does - even if (some) passage of time is required to "catch/observe.")

  • To provide a shorter (perhaps less precise) answer than cb1: by comparing the value of the internal pull-up (datasheet) with that of the requirement (the I2C bus spec., in this case).

    For I2C, values between 1 .. 10k turned out to be fine (for me), in most cases I use 2k4 or 3k3. The internal pull-ups (in the range of 30 .. 50k for most vendors) don't work for I2C, and neither they are intended for this purpose.

  • Greetings f.m. (aka Frank)

    You are (per usual) correct, Sir.

    That said - you are (perhaps) "too kind" to vendor docs which "suggest/hint" that "internal pull-ups" are "fit for ANY task!"   As you've detailed - that proves NOT the case.   Vendor's Amit (valiantly) attempts to correct, "Vendor's data over-reach" - which is thankless and never-ending.

    Forcing any MCU into "Do All - Be All" causes much user grief.   Our poster here was smart enough to detect & correct - yet his "search for "what's fine" may better reduce to, "What (compromised), internal MCU value resistor - proves LEAST HARMFUL" to "application du jour?"   (love the "ring" & spirit of that...)

  • Hello Isam

    I agree with f.m. To double check, connect a scope probe on SCL and SDA and see the timings of the I2C transaction in both cases. Then check with the MPU6050 data sheet on what timing requirements should be

    Regards
    Amit
  • For I2C, the pull-up resistors have in fact a significant impact on timing.

    As a simple first-order model, they form a RC filter with the parasitic capacitances of the line, and thus define the rise/fall times. And as such, the internal pull-ups are about one order of magnitude too large.

    As Amit suggests, use a scope to view the timing and the waveforms.

  • f. m. said:
    As (vendor) suggests, use a scope to view the timing and the waveforms.

    Mes Amis,

    Are we not denying the (likely) intrusion of the "real-world" upon the "pristine" waveforms - which exist (only) in the lab?

    I cannot count the number of times we've visited clients (over past 10+ years) who, "Confirmed internal pull-up success in the lab" - and suffered intermittent (often worse) mis-behavior in the field.   Thus - skilled teacher (experience) dictates that, "Scope check w/in Lab" often FAILS w/in a real-world implementation.

    Such problems/horrors are - almost always - prevented by the proper placement (close to MCU pins) of correctly valued, external resistors.

    Further - again often - bus "additions" far exceed bus "subtractions" - and added devices are (more) likely to "disturb" enfeebled, internal (compromised value) resistors!