So far in our Elektor.POST projects we have looked at mainly digital signals such as GPIO, Serial UART, SPI and I2C of the Raspberry Pi’s expansion header. In this installment we’ll be adding some analog functionality our Raspberry Pi’s by adding an Analog- to-Digital (ADC) interfaces via the SPI Bus.
 
Don't miss any project, take out a free membership to Elektor.POST now!

The Expansion Header of the Raspberry Pi does not have any analog interfaces, not a single one. This is a shame, when other platforms such as the Arduino and Beagle- Bone Black all sport several of them. But do not despair, we can use either one (or both) of the SPI or I2C serial interfaces to connect a serial ADC. So let’s start using the SPI interface. We’ll be adding a 4-channel MCP3004 ADC chip with 10-bit resolution.