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

  Переглядів 19,566

Maker's Digest

Maker's Digest

День тому

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 років тому
This is well thought out and informative video. Thank you for making it ! I subscribed to your channel.
@kjl2875
@kjl2875 4 роки тому
MCP3008 사용에 대한 거부감을 줄이는데 큰 도움이 되었습니다. This video is more less stress My using MCP3008 module. good video!
@gerardllaberia921
@gerardllaberia921 3 роки тому
Amazing ! this really saved my project ! useful and well done stuff !
@wangxin6856
@wangxin6856 8 місяців тому
Thanks a lot! 感谢!思路,讲解清晰,听明白了。
@flywittzbeats4008
@flywittzbeats4008 3 місяці тому
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!
@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?
@sidd8988
@sidd8988 Рік тому
you made my day
@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?
@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
@rodrigo6459
@rodrigo6459 5 років тому
Is there a chance you can repeat the raspberry part using Windows IoT Core in C#?
@omerbozkurt4444
@omerbozkurt4444 6 місяців тому
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.
@ronen124
@ronen124 4 роки тому
I see that you don't use level shifter from 5v to 3.3v and back to the MCP3008?
@xparade0de
@xparade0de 4 роки тому
You can use the K9V1 - then You have the names of the PINS - I use 2 because of the fan
@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 4 роки тому
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 3 роки тому
he has it connected to 24 anyways right? (edit: yeah just saw the update)
@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 3 роки тому
How come no ( ) on the print commands?
@makersdigest4752
@makersdigest4752 3 роки тому
Python 2. Have since switched to python 3 for future projects, my mistake for not switching sooner!
@one_mega_ohm9139
@one_mega_ohm9139 3 роки тому
@@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.
How to connect the MCP23017 GPIO Expander to an Arduino and Raspberry Pi
27:15
Їжа Закарпаття. Великий Гід.
1:00:29
Мiша Кацурiн
Переглядів 663 тис.
Первая поломка Scirocco! Балацко попал на мотор.
1:13:12
How Do ADCs Work? - The Learning Circuit
10:13
element14 presents
Переглядів 116 тис.
Reading Analog Inputs | Raspberry Pi Pico Workshop: Chapter 2.6
8:46
Raspberry Pi ADC: MCP3008 Analog to Digital Converter
10:37
Pi My Life Up
Переглядів 66 тис.
inventor aw - This Device is very helpful ,, you can make at home
6:47
Potentiometer - Analog Input for the Raspberry Pi 4
5:18
Robotica DIY
Переглядів 11 тис.
When Did Raspberry Pi become the villain?
21:54
Jeff Geerling
Переглядів 1,3 млн
Raspberry Pi Analog to Digital Converter (ADC) Microchip MCP3002
11:04
Слишком много порошка...
0:35
Это точно смешно
Переглядів 4,8 млн
Эталонная лава за ЛЯМ | woods shorts
1:01
Слэб головного мозга
Переглядів 2 млн
Эта Девушка Королева Тортов 😁
0:39
MrGolub
Переглядів 2,6 млн
В Одессе что-то прилетело. Концерта не будет #дядьказнает #дядька
0:28
Новости и сводки. Дядька знает
Переглядів 1,3 млн