The MCP3008 is a 10-bit 8 channels Analog-to-Digital Converter (ADC) with SPI(Serial Peripheral Interface Bus) interface. learn more about SPI, please click here . You can also use MCP3004 instead which has 4 input channels , for the datasheet about MCP3004/MCP3008, please visit: https://osoyoo.com/driver/MCP3008_datasheet.pdf
In this project, we use Raspberry Pi 3.3V and GND as MCP3008 Input Channel 1 and Input Channel 2 respectly. the MCP3008 will convert the analog signal to digital quantity, this enables the Raspberry Pi to interpret analog voltages that are in turn typically emitted by analog-based sensors to reflect a measure of a physical characteristic such as acceleration, light intensity or temperature.
Hardware Setup
MCP3008 uses SPI interface, wiring up the MCP3008 to Pi as following connection graph, NC means Not Connected.
*DIN/DOUT PINS
MCP3008 can read 8 different analog input signal from pin CH0,CH1..CH7. The Chip will compare input voltage with Maximum allowed voltage and output an integer between 0 to 1023. Input analog max value are defined by VREF pin. In this sample circuit, CH0 connected to 3.3V which is same as VREF voltage, so output integer for CH0 is 1023. Ch1 connected to GND, its output is 0. Output will be sent through SPI serial protocol.
DownLoad Url osoyoo.com