A turbidity sensor runs on 5 V and outputs up to about 4.5 V, but an ESP32-C3’s pins only take 3.3 V. Here is why it needs a voltage divider, how to wire it, and the checks to do before you plug in USB.

Free weekly email with the week’s posts, videos and one tip: https://chartmann1590.github.io/homelab-the-right-way/newsletter/

Disclosure: this is a Homelab the Right Way article by Charles Hartmann, written with AI help and edited by him; the setup described is his own.

  • CameronDev@programming.dev
    link
    fedilink
    arrow-up
    3
    ·
    4 hours ago

    Unreadable AI slop.

    Did the author actually test 5v into the microcontroller? The signal values might be intended to be 3.3v, but I have a bunch of esp32 boards reading 5v signals on their pins, and they have been doing that for years now. At the time I did some research and found posts from the espressif designer that claimed that the pins were okay with 5v.

    • Dingaling@lemmy.ml
      link
      fedilink
      English
      arrow-up
      2
      ·
      3 hours ago

      I’ve also been taking 5v on esp32 and esp8266 pins for years without any issues whatsoever.

      The article also claims DS18B20 are happy with 3.3v - technically yes, but if you have any long runs they are much more reliable at 5v. Yes every time I refer to a LLM when wiring them, it constantly makes the same point this article does, which is that dividers must be used. I think that lends weight to your claim that it’s AI written.

      Even if it isn’t written by AI, it’s certainly written by someone with very little experience on the subject.

      • CameronDev@programming.dev
        link
        fedilink
        arrow-up
        1
        ·
        2 hours ago

        Even if it isn’t written by AI, it’s certainly written by someone with very little experience on the subject.

        Which is worse, because its polluting up the search results. Infuriating.