EYE on NPI - Microchip MCP3421 18-bit, 240 SPS, single-channel ADC @digikey @MicrochipTech @adafruit

Subscribers:
460,000
Published on ● Video Link: https://www.youtube.com/watch?v=C8OLIcwN-h8



Duration: 10:58
1,540 views
0


This week's EYE ON NPI is a compact and capable analog-to-digital converter, it's the Microchip MCP3421 18-bit, 240 SPS, single-channel ADC (https://www.digikey.com/en/product-highlight/m/microchip-technology/mcp3421-analog-to-digital-converter). This SOT-23-6 part is simple, inexpensive, and easy to use with an I2C interface that can run up to a 3.4MHz clock rate. Being able to power it from 2.7V to 5V makes it an easy-to-integrate component whenever you need an ADC that has differential inputs, adjustable gain, and a built in precision/low-drift reference voltage.

One of the trade-offs with getting 18-bit precision is that the ADC is not going to be very fast: you can configure the chip to do a faster 12-bit conversion at 240 SPS, but at 18-bits, it slows down to 3.5 SPS. That's because the way a sigma-delta ADC (https://en.wikipedia.org/wiki/Delta-sigma_modulation) works, it 'guesses' the analog voltage and uses a comparator to determine whether the input is higher or lower. Each 'guess' takes an extra step, and thus halves the throughput, so 12-bit is 240 SPS, and 14-bit is 1/4 (2-bit) slower, 60 SPS. Ditto 16-bit is 1/4 slower, 15 SPS, and finally 18-bit is 3.75 SPS. However, sigma-delta ADCs are inexpensive, so as long as you don't need high speeds there's no reason to spec a faster and more expensive part!

The MCP3421 is already set up for differential inputs, which means that you can read positive or negative differences between the two inputs, as long as both signals are between 0 and 2.048V. This means it's not going to be great for reading stuff like potentiometers, where you have a single-end reading referenced to ground, and you want to read the full range from 0 to Vcc. It is great, however, for reading sensors like strain gauges, pressure sensors, or thermocouples.

The I2C interface for the MCP3421 is simple and well documented: there's a command byte that can be written directly to set continuous or one-shot, gain from 1x to 8x and the ADC bit depth. Then, the current data can be read directly, with the status/'command' byte following. Since the ADC is differential, note that the data will come out as binary 1's complement for easy casting to a signed 16 or 24 bit variable. Since there's no address selection pin, you can determine which I2C the device responds to by purchasing a part code variant. For example, A0 is address 0x68, A1 is 0x69, etc.

We used ChatGPT to quickly put together an Arduino-compatible library (https://chat.openai.com/share/76252459-50e5-4cd2-8edf-08bf3cc1c438) in about an hour and it pretty much worked right out of the box minus a few typos. The final, tested library code is available here (https://github.com/adafruit/Adafruit_MCP3421). We also spun up a quick prototype PCB for the MCP3421 (https://twitter.com/adafruit/status/1650909789591945248) and it works very nicely, with a terminal block for the differential input, and Stemma QT ports to quickly plug into a variety of dev boards.

If you're on the look-out for a well-designed high precision ADC to integrate into your next design, the Microchip MCP3421 18-bit, 240 SPS, single-channel ADC (https://www.digikey.com/short/5htnqnw8) is an easy win. And, best of all, it's in stock right now for immediate shipment from Digikey. Order an MCP3421 today (https://www.digikey.com/short/5htnqnw8) and you'll be convertin' by tomorrow afternoon!




Other Videos By Adafruit Industries


2023-12-11CircuitPython Weekly Meeting for December 11, 2023 #adafruit
2023-12-11Electric Fireplace Teardown & Upgrade Tutorial #adafruit
2023-12-11Electric Fireplace Teardown & Upgrades with NeoPixels and WLED #adafruit
2023-12-11The Great Search: Wire Wrap Wire #TheGreatSearch #DigiKey #adafruit @DigiKey @adafruit
2023-12-11Desk of Ladyada - MEMENTO Tester & ICN6211 4" Display Troubles
2023-12-08Deep Dive w/Scott: CircuitPython workflow refactoring #adafruit
2023-12-08John Park's CircuitPython Parsec: For Statements with Enumeration #adafruit #circuitpython
2023-12-07KB2040 Big Switch Macro Pad #adafruit #3dprinting
2023-12-07JOHN PARK'S WORKSHOP LIVE 12/7/23 Summoning Horn
2023-12-07#NewProducts 12/6/23 Feat #MEMENTO - Python Programmable #DIYCamera!
2023-12-07EYE on NPI - Microchip MCP3421 18-bit, 240 SPS, single-channel ADC @digikey @MicrochipTech @adafruit
2023-12-07Adafruit Top Secret December 6, 2023 #Adafruit #AdafruitTopSecret #display @Adafruit
2023-12-06Python on Hardware weekly video Dec 6, 2023 #CircuitPython #Python #adafruit @Adafruit @micropython
2023-12-06ASK AN ENGINEER 12/6/2023 LIVE!
2023-12-06SHOW and TELL 12/6/2023
2023-12-06Advanced Manufacturing: Made in NYC by Adafruit 12/6/2023
2023-12-063D Hangouts – Fireplace Yule Log and Present Box
2023-12-06JP’s Product Pick of the Week 12/5/23 Qualia ESP32-S3 for RGB-666 Displays RECAP
2023-12-05Qualia S3 Fireplace Video Player
2023-12-05JP’s Product Pick of the Week 12/5/23 Qualia ESP32-S3 for RGB-666 Displays
2023-12-05Qualia S3 Fireplace Video Player #adafruit #3dprinting



Tags:
adafruit
electronics
diy
arduino
hardware
opensource
projects
raspberry
pi
computer
raspberrypi
microcontrollers
limor
limorfried
ladyada
STEAM
STEM
python
microbit
circuitpython
neopixel
neopixels
raspberry pi
circuitplaygound
nyc
make
makers
micro:bit
adafrit
adafruit promo code
ada fruit
adafruit coupons
raspberry pi zero
micropython
machine learning
ai
tensorflow
EYE on NPI
DigiKey
Microchip
ADC
MCP3421
single channel