 Digi-Key and Adafruit, bring you this week's IonMPI is from CUI Devices. Correct, thank you. That's a nice announcer voice. That's right, this week's microphone sensor, the CMM4030D261i2s. It's an i2s microphone and I've been actually looking for a device like this and so when I saw it pop up on digi-key.com slash knew I was like this is the MPI because I'm really a big fan of i2s mics but first let's talk about microphones. These graphics from the CUI site, by the way like their graphics game is like so sweet. I love their look, it's like this really adorable like cute flat iconography but it's very descriptive and they get great blog posts. So do check out the CUI Devices blog if you want to learn all about sensors and microphones. Anyway, so there's two basic types of microphones. You want to get audio into your project. There's the MEMS mic on the left and there's the ELECTRATE mic on the right, sometimes cartridge microphone. And ELECTRATE microphones like have been around for like decades and decades, they've been extremely popular and they're pretty easy to use. So they look like that, they've got two pins, there's like an ELECTRATE element inside, there's some fabric covering it as like a bit of a wind guard and you have to solder them onto a board. Like here we've got a breakout that we've created for an ELECTRATE microphone and on the opposite side because these ELECTRATE microphones they create a very small voltage you need to have. Sometimes you have a JFET built in to do a little bit of buffering but you still need an amplifier with like at least 100 time gain, if not more, it'd be like 200 time gain. And so I've got a little sensor here that takes the microphones designed for ELECTRATE mics, it amplifies it, this little potentiometer and gives you an analog output. That's right, these microphones are analog output and that's important to note. So there's some good things about ELECTRATE and some bad things and the bad things are, well good things are they're really cheap and they're really common, they're only like a couple cents and if you have an analog input you can use a pretty basic up amp to get that signal into your device for, you know, simple analog audio reading and then there's some chips out there or codecs that have an ELECTRATE microphone handler, you know, I've had some cellular modules that have ELECTRATE amplifiers built in, you just connect the microphone up directly and they do the biasing and everything for you. That's wonderful. The thing that really drives me a little bit, the most crazy about the ELECTRATE is they're kind of big and you have to hand solder them, you can't put them through a wave soldering process, you have to selective solder them or wave or hand solder them and that gets, you know, adds expense to your manufacturing complexity, right, because somebody has to sit there and solder them, you can't just like, just pump them out from a pick and place machine. Okay, so then we have MEMS microphones, right, these are kind of more recent and MEMS microphones, the way they work, I saw this cool, there's this paper and it was creative comments, so I grabbed this image from it. The way it works is there's, the sound, what it does is, you see that like red thing, so that's like a spring, it's a MEMS spring that's metallic and as the sound pushes that spring, like you see the airwaves come in and they push the spring, it creates a capacitor between it and the electrode, the yellow thing above it and then you can measure that capacitance and of course as everyone remembers, the closer the capacitance plates are, the capacitance goes down, right, and also like the size of the plates matter, so you can, but you can like control a lot of that to get much more consistent readings, you're gonna have more consistency over MEMS microphones because you can control these processes a little better and so this, you know, gives you a very, like, tiny micro capacitance change and that can be converted to a voltage and you can read this paper about how to do that, so this transducer, that part gets shoved into this metal case, this is the cutaway design and then on the right there's a little ASIC and the ASIC can do a little bit of computation we'll talk about in a second and there's a sound port, but basically the cool thing about this is you can pick in place if they're extremely small, they're extremely thin, they're a little bit more expensive than electrodes but they're all in one and so that benefit like outweighs the cheapness of electrode because you don't have to have this hand soldering step and so MEMS microphones have become very popular, right, you can see kind of where they were like invented, made inexpensive, it's only been, you know, like 10-ish years since they got really popular and they've just like totally taken off because, again, small repeatability, inexpensive, easy to integrate and they have more options for output than the electrode, again the electrode only gives you this micro voltage, you have to amplify it whereas with the MEMS microphone you have all these options, here's like the CUI page, so for example you see down there where there's analog output, so analog output is kind of what you expect that capacitance is converted into an analog voltage, you still need to have an op amp there, you don't need to have like the mega gain of an electrode but you do need to have some gauges and buffering, one is just great, you have an analog input to your micro controller or computer and you can quickly read analog voltages, you're replacing an electrode mic that created an analog voltage, you have something that it wants to expect analog or you don't mind, you can save a little bit of money and it's quite simple, right, the analog voltage is the analog voltage, okay so let's go back one, right and then above it you see there's digital PDM microphones and these are pulse density modulation and pulse density modulations go to, so pulse density modulation is different than analog, it's a digital signal but it kind of, it's digital but it's a little bit like PWM where it kind of like it's digital analog, if you like did a heavy heavy low pass filter then you would actually see the analog signal come out of a PDM, you know, but what's nice is that you can, first off read it with a digital pin, you don't have to have an analog input and second you can clock it and you can have two microphones share to, sorry you can have them share the data and clock pin because what happens is one puts data on the lower the clock fall and one pushes data on the clock rise and so you can actually get two microphones left and right on two digital pins and if you have a PDM peripheral on your microcontroller or FPGA or computer you know what it looks like basically the pulses just get more dense around the midpoint of a sine wave and then at the low and high end they become, so it's like it's basically PWM but the PWM rate dynamically changes to be as good as possible and you can clock these at like you know megahertz or two megahertz, okay so that's PDM and PDM is very common you know the NR52840 has PDM there's like some PDM support on the STM32 but there's a lot of computers and chips that don't have PDM and you might want to have that quality of a digital converging, you don't want to get an op amp involved but you do want to, you want to have a digital signal but you don't have PDM input and like you kind of need to have a digital PDM peripheral to interface with PDM like you can fake it with SPI but it doesn't work really well, okay so the third option you get with MEMS microphones and like we're getting to the point here is you can get i2s output microphones and i2s is like a totally well established standard with the clock rate and how many bits per word and the words select for left and right and like left channel right channel and like pretty much any microcontroller that's like you know an ARM Cortex M0 or better is going to have i2s built in because it you know it's the way to do digital audio and it's a totally great easy standard to use and especially with things like single board Linux computers they don't have PDM they don't have analog but they do have i2s, nice so what you get here is you don't have to have that i2s codec that you would have had to include with like a PDM or um electric or analog microphone you get the i2s data raw right from the microphone which is like kind of cool and kind of weird because it's like usually you don't expect something that small to have like a full i2s codec built in but it does so there's two options available there's on the left there the cmm 3526 and this is a bottom ported one so you have to have a hole in your pcb and this is the style we've seen before um but the new npi that we're talking about this week is the one on the right the cmm 4030 why is it so cool it's a top ported i2s microphone this is amazing phil have you ever seen this before no well i mean i did get the package that was delivered that's right we did get that we got a package of microphones but this is this is the first time i've seen a a fully digital i2s microphone with the top port just pretty sweet so again the nice thing about these you can wire them directly up to a linux computer single board computer and get stereo audio input like hard-coded on the i2s port you don't need to get a codec you don't need to do like i-squared c configurations and like lookup tables whatever no you just wire these up you load up the i2s you know device driver and boom you're set same with the mic controllers um our feather m4 our feather m0 the stm32 they all have i2s input and they're all going to have dma that can work with it so it's like really easy to stream in audio um over i2s which is great so uh another thing i wanted to mention is not only can you order from digikey and get it next day but i'm noticing that you could also from the product page on digikey click to get the snap eda part and i've used them and they're they actually work that it's footprints for the devices in like ltm and like or cad and eagle cat and kai cad and all you know many cats that i can't even remember you can download them so you don't even have to make the footprint or if you do like to make your footprints you at least have something to start with um to check that out because i'm going to make a breakout for this uh lovely microphone so i thought like let's skip a step okay it's available on digikey um here is the number you could search for the name or you can also use the short url digikey.com for slash short for slash z so i think it's i'm going to guess it's cui mem's microphone four millimeter by three millimeter i don't know what the d is i don't know the 260 is but the i2s means it's i2s apple yeah so that's a good part number means digikey.com for such short for size zdfjf one that'll get it there and that is uh this makes ion npi but we're going to show you before we go just quickly i'm going to show you the part because i do like to show off so this is the mem's microphone so you see it's got eight pads it's got like power ground clock word select data um and then of course it's going to have at least one pin for you know you decide which um left or right channel this is and on the other whoops on the other side you see the uh the top port so a wonderful top port i2s microphone if you if you want the smallest easiest way to get audio in without any extra components audio amplifiers codex whatever special electric handle chips this gives you data immediately instantly like one capacitor maybe is needed just to give you a nice bypass cap on the power supply all right and that's this week's ion npi