elecena.pl

PicoADC16 - 16-port ADC for Pico

The Pi Hut

PicoADC16 - 16-port ADC for Pico RSS 15.50 15.50 GBP80.17 PLN
  • Sklep zagraniczny
Kod:
105316
Producent:
8086
Waluta:
funt szterling
Dodany do bazy:
Ostatnio widziany:
Zmiana ceny:
+25% (30.11.2024)
Poprzednia cena:
12.40 GBP

The 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. Raspberry Pi Pico not included! The maximum input voltage for the ADC is 3.3 Volts, however, can be used with voltages higher than 3.3V when resistors (not-supplied) are soldered onto the board. The 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".

Pico GPIO Description

GP4 SPI RX

GP3 SPI TX

GP2 SPI Clock

GP1 SPI CE A

GP17 SPI CE B

Resistor Divider (when measuring voltages greater than 3.3 Volts)

Each of the 16 ADC inputs has the option to use two through-hole resistors (RxxL and RxxH) to create a voltage divider. The 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). For 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). 2700 / ( 2700 + 47000 ) * 60 = 3.25955 which is below the 3.3 Volt maximum input for the ADC. Note: 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. Code Examples CircuitPython The example below requires the adafruitmcp3xxx library is saved in the lib folder on the CIRCUITPY drive to work. import busio import digitalio import board import time import adafruitmcp3xxx.mcp3008 as MCP from adafruitmcp3xxx.analogin import AnalogIn

# SPI bus spi = busio.SPI(clock=board.GP2, MISO=board.GP4, MOSI=board.GP3)

# Voltage Multiplier vdm = 3.3/65536

# Chip select pins cs1 = digitalio.DigitalInOut(board.GP1) cs2 = digitalio.DigitalInOut(board.GP17)

# create the mcp objects mcp1 = MCP.MCP3008(spi, cs1) mcp2 = MCP.MCP3008(spi, cs2)

adca = {} adcb = {}

# create analog input channels adca[0] = AnalogIn(mcp1, MCP.P0) adca[1] = AnalogIn(mcp1, MCP.P1) adca[2] = AnalogIn(mcp1, MCP.P2) adca[3] = AnalogIn(mcp1, MCP.P3) adca[4] = AnalogIn(mcp1, MCP.P4) adca[5] = AnalogIn(mcp1, MCP.P5) adca[6] = AnalogIn(mcp1, MCP.P6) adca[7] = AnalogIn(mcp1, MCP.P7)

adcb[0] = AnalogIn(mcp2, MCP.P0) adcb[1] = AnalogIn(mcp2, MCP.P1) adcb[2] = AnalogIn(mcp2, MCP.P2) adcb[3] = AnalogIn(mcp2, MCP.P3) adcb[4] = AnalogIn(mcp2, MCP.P4) adcb[5] = AnalogIn(mcp2, MCP.P5) adcb[6] = AnalogIn(mcp2, MCP.P6) adcb[7] = AnalogIn(mcp2, MCP.P7)

test = digitalio.DigitalInOut(board.GP16) test.direction = digitalio.Direction.OUTPUT

while 1: # Clear the screen print("\033[2J\033[H", end="") for i in adca: print('A'+str(i)+':', adca[i].value*vdm) print("") for i in adcb: print('B'+str(i)+':', adcb[i].value*vdm) test.value = not test.value time.sleep(0.3)

Elecena nie prowadzi sprzedaży elementów elektronicznych, ani w niej nie pośredniczy.

Produkt pochodzi z oferty sklepu