How to connect the MCP3008 Analog to Digital Converter (ADC) to a Raspberry Pi and Arduino

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 มิ.ย. 2024
  • In this episode we take a look at the MCP3008 Analog to Digital Converter IC. With this chip we can add Analog inputs to a Raspberry Pi, or extend the analog ports on an Arduino.
    UPDATE: CE0 on the Raspberry PI is pin 24 NOT 22. Ill put updated schematics on GitHub & makersdigest.net.
    In this video we cover:
    ► Physical connection of the MCP3008 to a Raspberry Pi
    ► Code examples for the Raspberry PI in Python
    ► Physical connection of the MCP3008 to an Arduino UNO
    ► Code examples for the Arduino
    As promised, all the code used in this video is on Github!
    github.com/makersdigest/T04-M...
    Parts that were used in this video:
    MCP3008 IC: amzn.to/2FqQAdt
    Arduino: amzn.to/2QgREHv
    Rapsberry Pi Kit: amzn.to/2Piy7kn
    Jumper Wires: amzn.to/2PkWxcX
    Breadboard: amzn.to/2QikbMQ
    Now go get creative! Share what you have made with me. I can be found at
    ● Facebook: / makersdigest
    ● Instagram: / makersdigest
    ● Twitter: / makersdigest
    ● Patreon: / makersdige
    If you liked this video, please consider subscribing. You can enable notifications for new videos when they are posted!
    See ya next time!
    #arduino #raspberrypi #makers
  • แนวปฏิบัติและการใช้ชีวิต

ความคิดเห็น • 25

  • @electroninstructor
    @electroninstructor 5 ปีที่แล้ว +4

    This is well thought out and informative video. Thank you for making it ! I subscribed to your channel.

  • @gerardllaberia921
    @gerardllaberia921 3 ปีที่แล้ว +2

    Amazing ! this really saved my project ! useful and well done stuff !

  • @kjl2875
    @kjl2875 4 ปีที่แล้ว +1

    MCP3008 사용에 대한 거부감을 줄이는데 큰 도움이 되었습니다.
    This video is more less stress My using MCP3008 module.
    good video!

  • @wangxin6856
    @wangxin6856 9 หลายเดือนก่อน

    Thanks a lot! 感谢!思路,讲解清晰,听明白了。

  • @flywittzbeats4008
    @flywittzbeats4008 4 หลายเดือนก่อน

    I typed this in my search, couldn’t find this video, then wait two days and it’s on my recommended, if anyone else is wondering what’s going on with google ad and search engine ai let me know cause this is nuts…. Anyways, thanks so much for this video!

  • @sidd8988
    @sidd8988 ปีที่แล้ว

    you made my day

  • @joshuabrand11
    @joshuabrand11 3 ปีที่แล้ว

    Great video - would I be able to plug a Resistance Level Sender into this? The type with the float which changes the resistance as the float moves up and down it?

  • @kanchankarmacharya1980
    @kanchankarmacharya1980 2 ปีที่แล้ว

    Great video, Can we use K type thermocouple as the analog input instead of potentiometer? I have to interface thermocouple and raspberry pi?

  • @rodrigo6459
    @rodrigo6459 5 ปีที่แล้ว

    Is there a chance you can repeat the raspberry part using Windows IoT Core in C#?

  • @testchannel1834
    @testchannel1834 5 ปีที่แล้ว

    Hi can you do an part 2 with the raspberry pi and mcp3008 and interface it with cayenne for iot interface the output of the AC/DC readout

  • @ronen124
    @ronen124 4 ปีที่แล้ว

    I see that you don't use level shifter from 5v to 3.3v and back to the MCP3008?

  • @omerbozkurt4444
    @omerbozkurt4444 7 หลายเดือนก่อน

    Hello sir. I have a problem with MCP3008 sampling frequency. I am trying to increase clock speed for better sampling rate but it does not work. Is there any way for this or any suggestion? And also I tried software SPI configuration, it gives an error does not work either. Thanks for your explanation.

  • @linkerthejedi2575
    @linkerthejedi2575 2 ปีที่แล้ว

    I’m using your code in thonny on my pi and it doesn’t seem to work it keeps saying that it cannot find the Adafruit GPIO and I know I installed it do you have any idea what I’m doing wrong

  • @akashrprame
    @akashrprame 5 ปีที่แล้ว +2

    Sir, are you sure pin 22 is SPI CEO?
    For hardware SPI, 24 and 26 are the CEO pins

    • @one_mega_ohm9139
      @one_mega_ohm9139 4 ปีที่แล้ว

      he has it connected to 24 anyways right? (edit: yeah just saw the update)

  • @xparade0de
    @xparade0de 4 ปีที่แล้ว

    You can use the K9V1 - then You have the names of the PINS - I use 2 because of the fan

  • @notablemind
    @notablemind 5 ปีที่แล้ว

    I was told that the MCP3008 is capable of a much higher analog sampling frequency compared to the Arduino 9.6khz (= 16 MHz/[13 clock cycle for a conversion * 2^(7bits)]) . Do you know if that's true?

    • @makersdigest4752
      @makersdigest4752  5 ปีที่แล้ว

      Hey John, According to the datasheet at (ww1.microchip.com/downloads/en/devicedoc/21295c.pdf) the MCP3008 running at 5.5v is capable of 200k samples per second. At the lowest voltage it can run at (2.7v) it does 75k samples per second. So yeah, A bit higher!

  • @one_mega_ohm9139
    @one_mega_ohm9139 4 ปีที่แล้ว +1

    How come no ( ) on the print commands?

    • @makersdigest4752
      @makersdigest4752  4 ปีที่แล้ว

      Python 2. Have since switched to python 3 for future projects, my mistake for not switching sooner!

    • @one_mega_ohm9139
      @one_mega_ohm9139 4 ปีที่แล้ว

      @@makersdigest4752 Ah I see. I'm trying to read voltages on my pi, but as a human bottleneck it's not going well.

  • @somboku
    @somboku 2 ปีที่แล้ว

    not working. double checked. all ... fixed for python3 .. nothing. thanks anyway.

    • @RikoOnline
      @RikoOnline 2 ปีที่แล้ว

      Notice the update in the video description. In the video it says pin 22 but it should be pin 24 for CE0.