{"product_id":"picoadc16-16-port-adc-for-pico","title":"PicoADC16 - 16-port ADC for Pico","description":"\u003cp\u003eThe 8086 PicoADC16 is a 16-port ADC board for the Raspberry Pi Pico with screw terminals using two 8-port MCP3008 10-bit Analogue to Digital converters connected to the Pico using an SPI interface.\u003c\/p\u003e\n\u003cp\u003e\u003cstrong\u003eRaspberry Pi Pico not included!\u003c\/strong\u003e\u003c\/p\u003e\n\u003cp\u003eThe maximum input voltage for the ADC is 3.3 Volts, however, \u003cstrong\u003ecan be used with voltages higher than 3.3V when resistors (not-supplied) are soldered onto the board.\u003c\/strong\u003e\u003c\/p\u003e\n\u003cp\u003eThe two MCP3008 ADC IC are banked A0-A7 (set chip enable \"SPI CE A\" low) and B0-B7 (set chip enable \"SPI CE B\" low). On each side of the board there are 10 screw terminals \"GND, A0, A1, A2, A3, A4, A5, A6, A7, GND\" and \"GND, B0, B1, B2, B3, B4, B5, B6, B7, GND\".\u003c\/p\u003e\n\u003ctable width=\"377\"\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd width=\"189\"\u003e\u003cstrong\u003ePico GPIO\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd width=\"188\"\u003e\u003cstrong\u003eDescription\u003c\/strong\u003e\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eGP4\u003c\/td\u003e\n\u003ctd\u003eSPI RX\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eGP3\u003c\/td\u003e\n\u003ctd\u003eSPI TX\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eGP2\u003c\/td\u003e\n\u003ctd\u003eSPI Clock\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eGP1\u003c\/td\u003e\n\u003ctd\u003eSPI CE A\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eGP17\u003c\/td\u003e\n\u003ctd\u003eSPI CE B\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003c\/tbody\u003e\n\u003c\/table\u003e\n\u003ch2\u003eResistor Divider (when measuring voltages greater than 3.3 Volts)\u003c\/h2\u003e\n\u003cp\u003e\u003cimg src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0176\/3274\/files\/picoadc16-rear_1.jpg?v=1672413826\u0026amp;width=700\" alt=\"\"\u003e\u003c\/p\u003e\n\u003cp\u003eEach of the 16 ADC inputs has the option to use two through-hole resistors (RxxL and RxxH) to create a voltage divider.\u003c\/p\u003e\n\u003cp\u003eThe formula to calculate the voltage at the ADC is \"Vadc = RxxL \/ ( RxxH + RxxL ) * Vscrew\". When using the voltage divider cut the appropriate solder jumper on the bottom of the board for that port (e.g. for port B4 you would populate resistors RB4H and RB4L and cut the B4 trace on the underside of the board).\u003c\/p\u003e\n\u003cp\u003eFor example to measure up to 60 volts DC you could use a 2.7k resistor for RxxH and 47K resistor for RxxL (care must be taken when using with high voltages).\u003c\/p\u003e\n\u003cp\u003e2700 \/ ( 2700 + 47000 ) * 60 = 3.25955 which is below the 3.3 Volt maximum input for the ADC.\u003c\/p\u003e\n\u003cp\u003e\u003cstrong\u003eNote\u003c\/strong\u003e: After populating the resistors and cutting the solder jumper I strongly advise testing with a 3.3 Volt maximum input to ensure the solder jumper has been cut properly as connecting a high voltage to the input may damage the PicoADC16 and\/or Pico.\u003c\/p\u003e\n\u003ch2\u003eCode Examples\u003c\/h2\u003e\n\u003ch3\u003eCircuitPython\u003c\/h3\u003e\n\u003cp\u003eThe example below requires the adafruit_mcp3xxx library is saved in the lib folder on the CIRCUITPY drive to work.\u003c\/p\u003e\n\u003cpre\u003e\u003ccode class=\"language-py\"\u003eimport busio\nimport digitalio\nimport board\nimport time\nimport adafruit_mcp3xxx.mcp3008 as MCP\nfrom adafruit_mcp3xxx.analog_in import AnalogIn\n\n# SPI bus\nspi = busio.SPI(clock=board.GP2, MISO=board.GP4, MOSI=board.GP3)\n\n# Voltage Multiplier\nvdm = 3.3\/65536\n\n# Chip select pins\ncs1 = digitalio.DigitalInOut(board.GP1)\ncs2 = digitalio.DigitalInOut(board.GP17)\n\n# create the mcp objects\nmcp1 = MCP.MCP3008(spi, cs1)\nmcp2 = MCP.MCP3008(spi, cs2)\n\nadc_a = {}\nadc_b = {}\n\n# create analog input channels\nadc_a[0] = AnalogIn(mcp1, MCP.P0)\nadc_a[1] = AnalogIn(mcp1, MCP.P1)\nadc_a[2] = AnalogIn(mcp1, MCP.P2)\nadc_a[3] = AnalogIn(mcp1, MCP.P3)\nadc_a[4] = AnalogIn(mcp1, MCP.P4)\nadc_a[5] = AnalogIn(mcp1, MCP.P5)\nadc_a[6] = AnalogIn(mcp1, MCP.P6)\nadc_a[7] = AnalogIn(mcp1, MCP.P7)\n\nadc_b[0] = AnalogIn(mcp2, MCP.P0)\nadc_b[1] = AnalogIn(mcp2, MCP.P1)\nadc_b[2] = AnalogIn(mcp2, MCP.P2)\nadc_b[3] = AnalogIn(mcp2, MCP.P3)\nadc_b[4] = AnalogIn(mcp2, MCP.P4)\nadc_b[5] = AnalogIn(mcp2, MCP.P5)\nadc_b[6] = AnalogIn(mcp2, MCP.P6)\nadc_b[7] = AnalogIn(mcp2, MCP.P7)\n\ntest = digitalio.DigitalInOut(board.GP16)\ntest.direction = digitalio.Direction.OUTPUT\n\nwhile 1:\n\t# Clear the screen\n\tprint(\"\\033[2J\\033[H\", end=\"\")\n\tfor i in adc_a:\nprint('A'+str(i)+':', adc_a[i].value*vdm)\n\tprint(\"\")\n\tfor i in adc_b:\nprint('B'+str(i)+':', adc_b[i].value*vdm)\n\ttest.value = not test.value\n\ttime.sleep(0.3)\n\u003c\/code\u003e\u003c\/pre\u003e","brand":"8086","offers":[{"title":"Default Title","offer_id":43643766603837,"sku":"ojs1789693995267","price":15.46,"currency_code":"USD","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0658\/9716\/8957\/files\/picoadc16---16-port-adc-for-pico_1.jpg?v=1789694000","url":"https:\/\/laser-engraved-clasp.shop\/products\/picoadc16-16-port-adc-for-pico","provider":"My Store","version":"1.0","type":"link"}