EYE on NPI - Microchip MCP3421 18-bit, 240 SPS, single-channel ADC episode artwork

EPISODE · Dec 7, 2023 · 10 MIN

EYE on NPI - Microchip MCP3421 18-bit, 240 SPS, single-channel ADC

from Adafruit Industries · host Adafruit Industries

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!

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!

NOW PLAYING

EYE on NPI - Microchip MCP3421 18-bit, 240 SPS, single-channel ADC

0:00 10:58

No transcript for this episode yet

We transcribe on demand. Request one and we'll notify you when it's ready — usually under 10 minutes.

API Intersection Stoplight Building a successful API requires more than just coding. It starts with collaborative design, focuses on creating a great developer experience, and ends with getting your company on board, maintaining consistency, and maximizing your API’s profitability.In the API Intersection, you’ll learn from experienced API practitioners who transformed their organizations, and get tangible advice to build quality APIs with collaborative API-first design.Jason Harmon brings over a decade of industry-recognized REST API experience to discuss topics around API design, governance, identity/auth versioning, and more.They’ll answer listener questions, and discuss best practices on API design (definition, modeling, grammar), Governance (multi-team design, reviewing new API’s), Platform Transformation (culture, internal education, versioning) and more.They’ll also chat with experienced API practitioners from a wide array of industries to draw out practical takeaways and insights you can use.H TV Podcast Industries Chris Jones, Derek O'Neill and John Harrison. TV Podcast Industries TV Podcast Industries is a podcast that provides discussions and reviews of various TV shows, including recent popular series like Alien Earth, The Sandman, The Last of Us, The Boys, and Daredevil Born Again. They also cover shows such as Ironheart, Star Trek: Picard, The Rings of Power, and many more, spanning both Marvel and DC universes, as well as other genres. Heart to Heart Podcast One on One / Next Level Studios In the Heart to Heart Podcast, we talk to some of our favorite & most interesting people in the entertainment industry so you can feel empowered and learn that even in the most challenging of industries, where there’s a will there’s a way.Whether you’re an actor, a writer, a casting director, a talent rep, or just someone interested in the behind the scene happenings of the entertainment industry, this podcast will have something for you. NOW, this isn’t just another How To podcast for actors. Plenty of those shows already exist. In Heart to Heart, every guest will share stories inspired by their sometimes winding path to success on their own terms. Revisionist History Pushkin Industries Revisionist History is Malcolm Gladwell's journey through the overlooked and the misunderstood. Every episode re-examines something from the past—an event, a person, an idea, even a song—and asks whether we got it right the first time. From Pushkin Industries. Because sometimes the past deserves a second chance.To get early access to ad-free episodes and extra content, subscribe to Pushkin+ in Apple Podcasts or at pushkin.fm/plus.iHeartMedia is the exclusive podcast partner of Pushkin Industries.

Frequently Asked Questions

How long is this episode of Adafruit Industries?

This episode is 10 minutes long.

When was this Adafruit Industries episode published?

This episode was published on December 7, 2023.

What is this episode about?

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)....

Can I download this Adafruit Industries episode?

Yes, you can download this episode by clicking the download button on the episode player, or subscribe to the podcast in your preferred podcast app for automatic downloads.
URL copied to clipboard!