ADC MCP3008 (Raspberry Pi)

Introduction: ADC MCP3008 (Raspberry Pi)

About: the Raspberry Pi is Awesome!

Basic tutorial of how to setup an Analog to Digital Converter with the Raspberry Pi.

Step 1: Parts

RPI 3 - https://amzn.to/2VA9pQY

4 Amp Power Adapter - https://amzn.to/2CTptWu

16GB micro SD - https://amzn.to/2SFMwd3

120 pcs jumper cable: https://ebay.to/2VAb9cY

Breadboard - https://amzn.to/2H1ekHs

breadboard jumper cables: https://amzn.to/2D9HXlD

mcp3008 chips: https://amzn.to/2RP7Orj

(optional) touch sensor: https://amzn.to/2D8RYj1

Step 2: Setup

1. Enable SPI

"sudo raspi-config"

select interfacing options

selet SPI

2. Check to see if SPI is activated

"lsmod" -> should see something like spi_2835

3. Download Adafruit libraries

"

git clone https://github.com/adafruit/Adafruit_Python_MCP30...

cd Adafruit_Python_MCP3008

sudo python setup.py install

"

4. Comment lines 13-17 in simpletest.py

5. Uncomment lines 20-22 in simpletest.py

6. Run simpletest.py and examine output

For more detailed setup instructions: https://learn.adafruit.com/raspberry-pi-analog-to-...

Step 3: Code

Step 4: Additional Info

Be the First to Share

    Recommendations

    • Make it Glow Contest

      Make it Glow Contest
    • First Time Author Contest

      First Time Author Contest
    • PCB Challenge

      PCB Challenge

    3 Discussions

    0
    wifistreaming
    wifistreaming

    Question 3 months ago on Step 4

    Hi. Congratulations for the video. Very good shared material.
    I've a question on interfacing other A/D converters with Raspberry, using SPI.
    I'm using MAXIM MAX191 A/D converter to interface Raspberry using SPI.
    Do you see that it will also work, or it might be a complicated adaptation instead of using MCP3008?
    Thanks.

    0
    PeterS591
    PeterS591

    Question 2 years ago

    Hi

    I understand the black and red wiring, but I don't understand the yellow/green/blue/purple going to the Raspberry pi. Why not just one cable like brown cable from the sensor?