{"product_id":"mcp3008-i-p-8-channel-10-bit-a-d-converter","title":"MCP3008-I\/P 8-Channel 10-Bit A\/D Converter","description":"\u003cp\u003e\u003cspan\u003eProvides up to 8 channels of 10-bit Analog-to-Digital conversion with SPI interface.\u003c\/span\u003e\u003c\/p\u003e\n\u003ch2\u003eDESCRIPTION\u003c\/h2\u003e\n\u003cp\u003eThe Microchip MCP3008-I\/P provides up to 8 channels of 10-bit Analog-to-Digital conversion with an easy to use SPI interface.\u003c\/p\u003e\n\u003ch2\u003ePACKAGE INCLUDES:\u003c\/h2\u003e\n\u003cul\u003e\n\u003cli\u003eMCP3008-I\/P 8-Channel 10-Bit A\/D Converter IC\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003ch2\u003e\u003cstrong\u003eKEY FEATURES OF MCP3008-I\/P 8-CHANNEL 10-BIT A\/D CONVERTER:\u003c\/strong\u003e\u003c\/h2\u003e\n\u003cul\u003e\n\u003cli\u003e10-bit successive approximation A\/D converters\u003c\/li\u003e\n\u003cli\u003e8 single-ended or 4 differential inputs\u003c\/li\u003e\n\u003cli\u003eOn-chip sample \u0026amp; hold\u003c\/li\u003e\n\u003cli\u003eUp to 200ksps maximum sampling rate\u003c\/li\u003e\n\u003cli\u003eLow power\u003c\/li\u003e\n\u003cli\u003e2.7-5.5V operation\u003c\/li\u003e\n\u003cli\u003eBreadboard friendly DIP package\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cp\u003e\u003cimg decoding=\"async\" class=\"wp-image-8075 size-full alignright entered lazyloaded\" src=\"https:\/\/protosupplies.com\/wp-content\/uploads\/2019\/09\/MCP3008-Pinout.jpg\" alt=\"MCP3008 Pinout\" width=\"170\" height=\"145\" data-lazy-src=\"https:\/\/protosupplies.com\/wp-content\/uploads\/2019\/09\/MCP3008-Pinout.jpg\" data-ll-status=\"loaded\"\u003e\u003c\/p\u003e\n\u003cp\u003eThe MCP3008 is an easy way to add A\/D capability to an MCU like Raspberry Pi that doesn’t have one or to expand the number of A\/D inputs on an MCU like Arduino Uno.\u003c\/p\u003e\n\u003cp\u003eThe device uses the SPI interface which allows multiple chips to be put on the same bus with separate Chip Select line enabling the chip being accessed.\u003c\/p\u003e\n\u003cp\u003eThe 10-bit matches the bit-depth of built-in A\/D converters found on most Arduino and similar MCUs.  For higher bit depth capability, check out the ADS1115 module at the bottom of this page which provides 4 channels of 16-bit using I2C interface.\u003c\/p\u003e\n\u003cp\u003eThe part can operate from 2.7- 5.5V and are the DIP version so they are breadboard friendly.\u003c\/p\u003e\n\u003ch2\u003eOUR EVALUATION RESULTS:\u003c\/h2\u003e\n\u003cp\u003e\u003cimg decoding=\"async\" class=\"wp-image-8076 size-full alignright entered lazyloaded\" src=\"https:\/\/protosupplies.com\/wp-content\/uploads\/2019\/09\/MCP3008-Example-Schematic.jpg\" alt=\"MCP3008 Example Schematic\" width=\"385\" height=\"236\" data-lazy-srcset=\"https:\/\/protosupplies.com\/wp-content\/uploads\/2019\/09\/MCP3008-Example-Schematic.jpg 385w, https:\/\/protosupplies.com\/wp-content\/uploads\/2019\/09\/MCP3008-Example-Schematic-300x184.jpg 300w, https:\/\/protosupplies.com\/wp-content\/uploads\/2019\/09\/MCP3008-Example-Schematic-280x172.jpg 280w\" data-lazy-sizes=\"(max-width: 385px) 100vw, 385px\" data-lazy-src=\"https:\/\/protosupplies.com\/wp-content\/uploads\/2019\/09\/MCP3008-Example-Schematic.jpg\" data-ll-status=\"loaded\" sizes=\"(max-width: 385px) 100vw, 385px\" srcset=\"https:\/\/protosupplies.com\/wp-content\/uploads\/2019\/09\/MCP3008-Example-Schematic.jpg 385w, https:\/\/protosupplies.com\/wp-content\/uploads\/2019\/09\/MCP3008-Example-Schematic-300x184.jpg 300w, https:\/\/protosupplies.com\/wp-content\/uploads\/2019\/09\/MCP3008-Example-Schematic-280x172.jpg 280w\"\u003eThese parts are very easy to use and have good library support.\u003c\/p\u003e\n\u003cp\u003eThe example shown here uses hardware SPI to talk to the MCP3008, but this can be changed to software SPI by uncommenting the line shown in the program.\u003c\/p\u003e\n\u003cp\u003eSince we are using an Uno in our example, the SPI connects to the following pins between the Uno and the IC.  Coincidentally the same pin numbers are used on both.\u003c\/p\u003e\n\u003cp\u003eSPI CLK          Uno pin-13 to IC pin-13\u003cbr\u003eSPI MISO       Uno pin-12 to IC pin-12\u003cbr\u003eSPI MOSI       Uno pin-11 to IC pin-11\u003cbr\u003eSP CS              Uno pin-10 to IC pin-10\u003c\/p\u003e\n\u003cp\u003eAlso be sure to wire IC pins 9 \u0026amp; 14 to ground and IC pins 15 \u0026amp; 16 to VCC on the MCU which can either be 3.3V or 5V.\u003c\/p\u003e\n\u003cp\u003eIn addition you will need a variable voltage to measure.  We are simply hooking a potentiometer up to the IC pin 1 (A\/D CH0) to keep things simple.  You could also just hook it up to the 3.3V output of the MCU.\u003c\/p\u003e\n\u003cp\u003eTo use the program you will need to download the MCPXXX.h library using the Arduino IDE.  If you are using a VREF of 3.3V, be sure to change the constant ADC_REF to 3.3 in the program.\u003c\/p\u003e\n\u003cp\u003eOnce the program is downloaded and running, open the Serial Monitor window to observe the output which is printed in both the raw ADC reading (0-1024) as well as the calculated voltage.\u003c\/p\u003e\n\u003cp\u003eIf you want to optimize the accuracy of the reading, measure the actual voltage at the VREF pin and enter that into the ADC_REF value in place of 5.0.\u003c\/p\u003e\n\u003ch3\u003eMCP3008 8-Channel 10-Bit A\/D Converter Example Program\u003c\/h3\u003e\n\u003cpre class=\"copy-the-code-target\"\u003e\u003cspan\u003e\/***************************************************\u003c\/span\u003e\n\u003cspan\u003e  Example program for MCP3008 A\/D converter\u003c\/span\u003e\n\n\u003cspan\u003e  Uses library MCP3XXX.h by Christopher Baker\u003c\/span\u003e\n\n\u003cspan\u003e  Example uses hardware SPI.  For Uno connect the following\u003c\/span\u003e\n\u003cspan\u003e  SPI Clock - Pin 13 Uno to Pin 13 IC\u003c\/span\u003e\n\u003cspan\u003e  SPI MISO - Pin 12 Uno to Pin 12 IC\u003c\/span\u003e\n\u003cspan\u003e  SPI MOSI = Pin 11 Uno to Pin 11 IC\u003c\/span\u003e\n\u003cspan\u003e  SPI CS = Pin 10 Uno to Pin 10 IC\u003c\/span\u003e\n\u003cspan\u003e  Power to IC pins 15 \u0026amp; 16\u003c\/span\u003e\n\u003cspan\u003e  Ground to IC pins 9 \u0026amp; 14\u003c\/span\u003e\n\u003cspan\u003e  Pot connected to IC pin 1\u003c\/span\u003e\n\u003cspan\u003e ****************************************************\/\u003c\/span\u003e\n\n\u003cspan\u003e#include\u003c\/span\u003e \u003cspan\u003e\u0026lt;\u003c\/span\u003e\u003cspan\u003eMCP3XXX\u003c\/span\u003e\u003cspan\u003e.\u003c\/span\u003e\u003cspan\u003eh\u003c\/span\u003e\u003cspan\u003e\u0026gt;\u003c\/span\u003e\n\u003cspan\u003elong\u003c\/span\u003e \u003cspan\u003econst\u003c\/span\u003e \u003cspan\u003eADC_REF\u003c\/span\u003e \u003cspan\u003e=\u003c\/span\u003e \u003cspan\u003e5.0\u003c\/span\u003e\u003cspan\u003e;  \/\/ Set voltage used for VREF\u003c\/span\u003e\n\u003cb\u003e\u003cspan\u003eMCP3008\u003c\/span\u003e\u003c\/b\u003e \u003cspan\u003eadc\u003c\/span\u003e\u003cspan\u003e;\u003c\/span\u003e\n\u003cspan\u003e\/\/===============================================================================\u003c\/span\u003e\n\u003cspan\u003e\/\/  Initialization\u003c\/span\u003e\n\u003cspan\u003e\/\/===============================================================================\u003c\/span\u003e\n\u003cspan\u003evoid\u003c\/span\u003e \u003cspan\u003esetup\u003c\/span\u003e\u003cspan\u003e(\u003c\/span\u003e\u003cspan\u003e)\u003c\/span\u003e\n\u003cspan\u003e{\u003c\/span\u003e\n  \u003cb\u003e\u003cspan\u003eSerial\u003c\/span\u003e\u003c\/b\u003e\u003cspan\u003e.\u003c\/span\u003e\u003cspan\u003ebegin\u003c\/span\u003e\u003cspan\u003e(\u003c\/span\u003e\u003cspan\u003e9600\u003c\/span\u003e\u003cspan\u003e)\u003c\/span\u003e\u003cspan\u003e;\u003c\/span\u003e\n\n  \u003cspan\u003e\/\/ Use the default SPI hardware interface.\u003c\/span\u003e\n  \u003cspan\u003eadc\u003c\/span\u003e\u003cspan\u003e.\u003c\/span\u003e\u003cspan\u003ebegin\u003c\/span\u003e\u003cspan\u003e(\u003c\/span\u003e\u003cspan\u003e)\u003c\/span\u003e\u003cspan\u003e;\u003c\/span\u003e\n\n  \u003cspan\u003e\/\/ Or use custom pins to use a software SPI interface.\u003c\/span\u003e\n  \u003cspan\u003e\/\/ adc.begin(SS, MOSI, MISO, SCK);\u003c\/span\u003e\n\u003cspan\u003e}\u003c\/span\u003e\n\u003cspan\u003e\/\/===============================================================================\u003c\/span\u003e\n\u003cspan\u003e\/\/  Main\u003c\/span\u003e\n\u003cspan\u003e\/\/===============================================================================\u003c\/span\u003e\n\u003cspan\u003evoid\u003c\/span\u003e \u003cspan\u003eloop\u003c\/span\u003e\u003cspan\u003e(\u003c\/span\u003e\u003cspan\u003e)\u003c\/span\u003e\n\u003cspan\u003e{\u003c\/span\u003e\n  \u003cspan\u003eint\u003c\/span\u003e \u003cspan\u003eadc_Reading\u003c\/span\u003e \u003cspan\u003e=\u003c\/span\u003e \u003cspan\u003eadc\u003c\/span\u003e\u003cspan\u003e.\u003c\/span\u003e\u003cspan\u003eanalogRead\u003c\/span\u003e\u003cspan\u003e(\u003c\/span\u003e\u003cspan\u003e0\u003c\/span\u003e\u003cspan\u003e)\u003c\/span\u003e\u003cspan\u003e;\u003c\/span\u003e\n  \u003cb\u003e\u003cspan\u003eSerial\u003c\/span\u003e\u003c\/b\u003e\u003cspan\u003e.\u003c\/span\u003e\u003cspan\u003eprint\u003c\/span\u003e\u003cspan\u003e(\u003c\/span\u003e\u003cspan\u003eadc_Reading\u003c\/span\u003e\u003cspan\u003e)\u003c\/span\u003e\u003cspan\u003e;\u003c\/span\u003e\n  \u003cb\u003e\u003cspan\u003eSerial\u003c\/span\u003e\u003c\/b\u003e\u003cspan\u003e.\u003c\/span\u003e\u003cspan\u003eprint\u003c\/span\u003e\u003cspan\u003e(\u003c\/span\u003e\u003cspan\u003e\" = \"\u003c\/span\u003e\u003cspan\u003e)\u003c\/span\u003e\u003cspan\u003e;\u003c\/span\u003e\n  \u003cb\u003e\u003cspan\u003eSerial\u003c\/span\u003e\u003c\/b\u003e\u003cspan\u003e.\u003c\/span\u003e\u003cspan\u003eprint\u003c\/span\u003e\u003cspan\u003e(\u003c\/span\u003e\u003cspan\u003e(\u003c\/span\u003e\u003cspan\u003eadc_Reading\u003c\/span\u003e \u003cspan\u003e*\u003c\/span\u003e \u003cspan\u003eADC_REF\u003c\/span\u003e\u003cspan\u003e)\u003c\/span\u003e\u003cspan\u003e\/\u003c\/span\u003e\u003cspan\u003e1024.0\u003c\/span\u003e\u003cspan\u003e)\u003c\/span\u003e\u003cspan\u003e;\u003c\/span\u003e\n  \u003cb\u003e\u003cspan\u003eSerial\u003c\/span\u003e\u003c\/b\u003e\u003cspan\u003e.\u003c\/span\u003e\u003cspan\u003eprintln\u003c\/span\u003e\u003cspan\u003e(\u003c\/span\u003e\u003cspan\u003e\"V\"\u003c\/span\u003e\u003cspan\u003e)\u003c\/span\u003e\u003cspan\u003e;\u003c\/span\u003e\n  \u003cspan\u003edelay\u003c\/span\u003e\u003cspan\u003e(\u003c\/span\u003e\u003cspan\u003e1000\u003c\/span\u003e\u003cspan\u003e)\u003c\/span\u003e\u003cspan\u003e;\u003c\/span\u003e\n\u003cspan\u003e}\u003c\/span\u003e\n\u003cbutton class=\"copy-the-code-button\" data-style=\"svg-icon\" title=\"Copy\"\u003e\u003csvg aria-hidden=\"true\" role=\"img\" class=\"copy-icon\" viewbox=\"0 0 16 16\" width=\"16\" height=\"16\" fill=\"currentColor\" focusable=\"false\"\u003e\u003cpath d=\"M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z\"\u003e\u003c\/path\u003e\u003cpath d=\"M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z\"\u003e\u003c\/path\u003e\u003c\/svg\u003e\u003c\/button\u003e\u003c\/pre\u003e\n\u003cp\u003e\u003cstrong\u003e\u003cem\u003eNotes: \u003c\/em\u003e\u003c\/strong\u003e\u003c\/p\u003e\n\u003col\u003e\n\u003cli\u003e\u003ci\u003eNone\u003c\/i\u003e\u003c\/li\u003e\n\u003c\/ol\u003e\n\u003chr\u003e\n\u003ch2\u003eTECHNICAL SPECIFICATIONS\u003c\/h2\u003e\n\u003ctable class=\"table table-hover\" width=\"756\"\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd width=\"145\"\u003e\u003cstrong\u003eOperational Ratings\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd width=\"264\"\u003e\u003c\/td\u003e\n\u003ctd width=\"229\"\u003e\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd width=\"145\"\u003e     Vdd\u003c\/td\u003e\n\u003ctd width=\"264\"\u003eRecommended\u003c\/td\u003e\n\u003ctd width=\"229\"\u003e2.7 – 5.5V\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd width=\"145\"\u003e     Throughput rate\u003c\/td\u003e\n\u003ctd width=\"264\"\u003eVref = 5V\u003c\/td\u003e\n\u003ctd width=\"229\"\u003e200ksps\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd width=\"145\"\u003e     Resolution\u003c\/td\u003e\n\u003ctd width=\"264\"\u003e\u003c\/td\u003e\n\u003ctd width=\"229\"\u003e10 bits\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd width=\"145\"\u003e     Analog Inputs\u003c\/td\u003e\n\u003ctd width=\"264\"\u003eMaximum single-ended input voltage\u003c\/td\u003e\n\u003ctd width=\"229\"\u003eVref\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd width=\"145\"\u003e    Imax\u003c\/td\u003e\n\u003ctd width=\"264\"\u003eMaximum current while active\u003c\/td\u003e\n\u003ctd width=\"229\"\u003e500uA\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd width=\"145\"\u003e\u003cstrong\u003ePackage\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd width=\"264\"\u003eFootprint\u003c\/td\u003e\n\u003ctd width=\"229\"\u003eDIP-16\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd width=\"145\"\u003e\u003c\/td\u003e\n\u003ctd width=\"264\"\u003eType\u003c\/td\u003e\n\u003ctd width=\"229\"\u003ePlastic, thru-hole\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd width=\"145\"\u003e\u003cstrong\u003eMfr\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd width=\"264\"\u003e\u003c\/td\u003e\n\u003ctd width=\"229\"\u003eMicrochip\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd width=\"145\"\u003e\u003cstrong\u003eDatasheet\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd width=\"264\"\u003eMicrochip\u003c\/td\u003e\n\u003ctd width=\"229\"\u003e\u003cspan\u003e\u003ca href=\"https:\/\/cdn-shop.adafruit.com\/datasheets\/MCP3008.pdf\" rel=\"noopener noreferrer\" target=\"_blank\"\u003e\u003cstrong\u003eMCP3008\u003c\/strong\u003e\u003c\/a\u003e\u003c\/span\u003e\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003c\/tbody\u003e\n\u003c\/table\u003e\n\u003c!----\u003e","brand":"Keszoox","offers":[{"title":"Default Title","offer_id":45674473521387,"sku":"","price":9.87,"currency_code":"USD","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0677\/1005\/8731\/files\/MCP3008-IP-8-Channel-10-bit-ADC.jpg?v=1723007351","url":"https:\/\/keszooxstore.com\/products\/mcp3008-i-p-8-channel-10-bit-a-d-converter","provider":"Keszoox","version":"1.0","type":"link"}