Artwork

תוכן מסופק על ידי Adafruit Industries. כל תוכן הפודקאסטים כולל פרקים, גרפיקה ותיאורי פודקאסטים מועלים ומסופקים ישירות על ידי Adafruit Industries או שותף פלטפורמת הפודקאסט שלהם. אם אתה מאמין שמישהו משתמש ביצירה שלך המוגנת בזכויות יוצרים ללא רשותך, אתה יכול לעקוב אחר התהליך המתואר כאן https://he.player.fm/legal.
Player FM - אפליקציית פודקאסט
התחל במצב לא מקוון עם האפליקציה Player FM !

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

10:58
 
שתפו
 

Manage episode 388413651 series 1242341
תוכן מסופק על ידי Adafruit Industries. כל תוכן הפודקאסטים כולל פרקים, גרפיקה ותיאורי פודקאסטים מועלים ומסופקים ישירות על ידי Adafruit Industries או שותף פלטפורמת הפודקאסט שלהם. אם אתה מאמין שמישהו משתמש ביצירה שלך המוגנת בזכויות יוצרים ללא רשותך, אתה יכול לעקוב אחר התהליך המתואר כאן https://he.player.fm/legal.
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!
  continue reading

4979 פרקים

Artwork
iconשתפו
 
Manage episode 388413651 series 1242341
תוכן מסופק על ידי Adafruit Industries. כל תוכן הפודקאסטים כולל פרקים, גרפיקה ותיאורי פודקאסטים מועלים ומסופקים ישירות על ידי Adafruit Industries או שותף פלטפורמת הפודקאסט שלהם. אם אתה מאמין שמישהו משתמש ביצירה שלך המוגנת בזכויות יוצרים ללא רשותך, אתה יכול לעקוב אחר התהליך המתואר כאן https://he.player.fm/legal.
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!
  continue reading

4979 פרקים

All episodes

×
 
Loading …

ברוכים הבאים אל Player FM!

Player FM סורק את האינטרנט עבור פודקאסטים באיכות גבוהה בשבילכם כדי שתהנו מהם כרגע. זה יישום הפודקאסט הטוב ביותר והוא עובד על אנדרואיד, iPhone ואינטרנט. הירשמו לסנכרון מנויים במכשירים שונים.

 

מדריך עזר מהיר

האזן לתוכנית הזו בזמן שאתה חוקר
הפעלה