Core2 - Pullup resistor

  • Hi @m5stack

    I can read here that Core1 have integrated pull-up resistors (3.3k) on G21 and G22

    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) ?

  • 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.


  • 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 ?


  • 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.

  • @ajb2k3 said in Core2 - Pullup resistor:

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

    Well...poop. That explains a lot!

  • 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.