• pelya@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    4 hours ago

    Yup, it would be super convenient to have one or two pins for ADC. Technically you have a DAC on Pi 4, if you repurpose the analog audio output, but on Pi 5 all you have is digital HDMI audio.

    Oh well, an AD7705 voltmeter board costs only $2, and uses only six wires for SPI connection, including one of two precious precious 3V3 pins. And you’ll also need around three days to dig Github to find a working Python driver for it. But at least you don’t have to worry about burning your 3.3V Raspberry pins with 5V input voltage.

    And at this point you are asking yourself - why not pay $3 for an ESP32 or a STM32? you can program it to use just three wires - power, ground, and UART TX, and you don’t need to read it 500 times per second like AD7705 and use 25% CPU of your Raspberry Pi Zero, you can program it to calculate an average RMS voltage once per second, and you can read a total of six ADC channels on ESP32, and on STM32 half of all the pins can be configured as ADC, and it’s also quite precise and low-noise, while on ESP32 ADC is more … consumer-grade.

    • Buffalox@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      4 hours ago

      I made a digital drum reader using Piezos on an Arduino with my wife some years ago, For that you need way more than 2 analogue pins.
      I don’t see why newer Raspberry Pies couldn’t have something like 12 analogue pins, it would be amazing for many things, and it’s dirt cheap to make today. The ESP32 has 18 AFAIK.
      In some ways ESP 32 has way better features than Raspberry Pi, but it is not nearly as user-friendly and it lacks audio. It’s also not a general purpose computer with the things that entail, but “just” an embedded system, although a very good one for sure.