The examples in this guide are no longer supported. Check out the MCP3008 and ADS1x15 guides for CircuitPython and Python usage.

The Raspberry Pi is an excellent small board computer that you can use to control digital inputs & outputs.  However what do you do when you want to read an analog signal, like what you might get from a thermistor, potentiometer, or many other types of sensors?  Don't give up!  By connecting a small analog to digital converter (ADC) chip to the Pi you can open up the world of analog signals to your Raspberry Pi programs!

This guide will show you a couple great options for reading analog values from Python with a Raspberry Pi.  You can use a simple MCP3008 analog to digital converter (ADC) to read up to 8 channels of analog input with 10-bit precision.  Or use a fancier ADS1x15 series ADC to read 4 channels with 12 to 16-bit precision, and a programmable gain stage--wow, fancy!  You'll be up and running in no time with a Python library and examples to read analog inputs from both these ADCs.

Before you get started you'll want to be familiar with the basics of using a Raspberry Pi like loading an operating system, setting up networking, and connecting to a terminal using SSH.  Check out the Learn Raspberry Pi series for more information.

Also make sure your Raspberry Pi is running the latest Raspbian Jessie operating system (either the full or lite version) before starting the guide.

Continue on to learn about using the MCP3008, or the ADS1015 / ADS1115 analog to digital convert with the Raspberry Pi.

This guide was first published on Feb 09, 2016. It was last updated on Mar 08, 2024.

This page (Overview) was last updated on Mar 08, 2024.

Text editor powered by tinymce.