Skip to main content

Read an analog sensor with a Raspberry Pi

Reading an analog voltage from a sensor on a Raspberry Pi 5 using an external I2C analog-to-digital converter (ADS1115) on the 40-pin header's I2C pins, with Python on Raspberry Pi OS. The documents read list no analog input on the Pi 5 header.

Safety notice:

Every instrument and board has maximum input voltages. BenchRove does not check whether a measurement setup is safe. Stay within the manufacturer’s input and probe ratings, and do not measure mains or high voltage unless you are qualified and using rated equipment.

BenchRove compares manufacturer documentation only; it has not validated or physically tested any setup. Our content does not cover mains wiring, high-voltage builds such as coils or inverters, or modifying or charging lithium cells and packs outside the manufacturer’s instructions. For that work, follow the manufacturer’s safety documentation and use a qualified electrician or other qualified professional.

Technologies that could fit

Suggestions only, not a recommendation. Check each record for limits.

Caveats

Scope: low-voltage logic-level signals only; no mains, high-voltage or safety-critical guidance. The statement that the Pi 5 header has no analog input is BenchRove's interpretation, based on the Raspberry Pi RP1 function table and header documentation, which list no analog input; Raspberry Pi does not state it. Wiring, library and code are untested here. Sensor output voltage must be checked against the converter input range in the TI datasheet. skill_level and budget_band are not set because no primary source states them.