🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Core2 - Pullup resistor

    Core 2
    4
    6
    3.4k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      Leo05
      last edited by

      Hi @m5stack

      I can read here that Core1 have integrated pull-up resistors (3.3k) on G21 and G22
      https://community.m5stack.com/topic/1762/solved-m5stack-basic-i2c-pull-up-resistor

      Is it similar on Core2 ?

      I use DS18B20 sensor with external pullup resistor 4.7k, but do I really need it ?
      Can I have problems using internal pullup? (DS18B20 are powered on 5V pin) ?

      1 Reply Last reply Reply Quote 0
      • felmueF
        felmue
        last edited by

        Hello @Leo05

        check out the M5Core2 schematic. Port A is using GPIO32 / 33 and yes, there are internal pull-up resistors (5.1 k) to MCU_VDD (= 3.3 V).

        According to the DS18B20 datasheet minimal voltage is 3.0 V, so it should work being powered with 3.3 V.

        Note: ESP32 GPIOs are not 5 V tolerant, so I would not use an external pull-up to 5 V.

        Thanks
        Felix

        GPIO translation table M5Stack / M5Core2
        Information about various M5Stack products.
        Code examples

        1 Reply Last reply Reply Quote 1
        • L
          Leo05
          last edited by Leo05

          Thank you @felmue

          I will try on 3.3V, 5.1k seems good instead of 4.7k, but I use DS18B20 on long range (50m) and I am afraid 3.3V is not enough.

          what happens if I connect 5V? do I risk destroying GPIO33 or the whole board?
          I have to tell that after many tests over long periods of time, I've never burned out a GPIO using an external 4.7k resistor on the 5V, but may be it is possible while using internal pullup.

          I can see that GPIO21/22 are 2.2k, may be it is better to have more current for long distance ?

          0_1697229904447_54757a4c-1d76-4971-9bf7-899bd111cb2e-image.png

          1 Reply Last reply Reply Quote 0
          • ajb2k3A
            ajb2k3
            last edited by

            If 5v hits the GPIO pin it will kill the IO pin.
            When you say its long range, are you saying that the sensor is 50M away from the core?
            If so that is way too far and the issue is volt drop cause by the resistance of the cable connecting the two.

            UIFlow, so easy an adult can learn it!
            If I don't know it, be patient!
            I've ether not learned it or am too drunk to remember it!
            Author of the WIP UIFlow Handbook!
            M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

            M 1 Reply Last reply Reply Quote 0
            • M
              mtylerjr @ajb2k3
              last edited by

              @ajb2k3 said in Core2 - Pullup resistor:

              If 5v hits the GPIO pin it will kill the IO pin.

              Well...poop. That explains a lot!

              1 Reply Last reply Reply Quote 0
              • L
                Leo05
                last edited by

                I've never had any problems with the DS18B20 sensor powered at 5V, with an external 4.7k resistor. Never any esp32 or even Raspberry Pi burnt out.

                I did a few tests:

                • 24 m cable with 8 sensors of 1m at the end
                • sensors powered by 3.3V

                Works well with 4.7k external resistor
                Also works well with internal resistor using pinMode(33, INPUT_PULLUP)
                No errors (-127 or not detected) at all in all cases

                I'll test soon with longer cables.

                But, most important I use certified DS18B20, not bad quality copies that are good only for short distance.

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post