Main Menu

search

You are here

16-bit ADC

[last updated: 2025-11-11]
-----

ADS1115

  • Adafruit 1085
    This board comes in two versions: header and STEMMA QT.
    I have the "header" version, pictured.
    (link to:) Adafruit
    ...
  • Specs:
    ADS1115
    4-channel (4@ single-ended or 2@ differential)
    16-bit ADC
    with programmable gain amplifier up to 16x gain
    I2c interface with jumper-selectable, 7-bit addresses, between 0x48-0x4B
    VCC: 2 - 5 vdc
    860 samples/sec
    The absolute maximum analog input voltage is Vin + 0.3v.
    current consumption: Continuous Mode: Only 150µA Single-Shot Mode: Auto Shut-Down
    PROGRAMMABLE DATA RATE: 8SPS to 860SPS
    INTERNAL LOW-DRIFT VOLTAGE REFERENCE
    INTERNAL OSCILLATOR
    INTERNAL PGA (programmable gain amplifier)
    PROGRAMMABLE COMPARATOR

  • i2c:
    both SDA and SCL have internal 10k pullups to Vin
    Default i2c address is 0x48. 4 different addresses can be selected by connecting the ADDR pin as follows:
      ADDR-gnd = 0x48
      ADDR-Vin = 0x49
      ADDR-SDA = 0x4A
      ADDR-SCL = 0x4B

  • ALRT pin:
    This is the programmable comparator output.
    -------------------------------------------------

  • Programming/Operation from rPi:
    • First get i2c enabled and functioning on your rPi ,
      see: page 80...
      connect power and ground to the ADS module,
      connect ADDR pin to gnd (or wherever for the i2c address you want to use),
      connect SDA and SCL between your rPi and the ADS module
    • convoluted process. Here are the steps I did:
        sudo apt update
        sudo apt upgrade
        sudo apt install python3-pip
        sudo pip3 install --upgrade setuptools
          everything worked until this last one, that gave error: externally-managed-environment


        so after much googling, it seems the recommended procedure is to create a "vitrual environment":
        python -m venv my-venv (this worked...)
        my-venv/bin/pip install [some-python-library]
        so the procedure I'm following from the tutorials is trying to install: adafruit-circuitpython-ads1x15
        so I executed:
        my-venv/bin/pip install adafruit-circuitpython-ads1x15

          this worked, however gave me 3 "DEPRECATION" warnings...
          also, import board still fails...
          rebooted ... still fails


        trying a different apaproach: googled "i2c on rpi without using adafruit library". Following their recommentdaions...
        pip install smbus2 - failed for managed environment. crap.
        using previous procedure for installing in virtual environment:

          my-venv/bin/pip install smbus2 (note I did NOT re-create the my-venv)
          YAY! something finally worked!

          Using pipx as an alternative to pip3 if externally-managed-environment error is encountered

          sudo apt install pipx && pipx install "meshtastic[cli]"

          If using pipx it may be necessary to update $PATH by running:

          pipx ensurepath

.

.

.

eof