 Did you key and a to fruit present? This week's iron MPIs from Bosch, that's right Bosch We're a little bit of a sensor streak a lot of cool sensors just came out So this week we're gonna be teaching a Bosch sensor. This is the BMP 390 which is the latest in a long generational stretch of a barometric pressure sensors from Bosch The BMP 390 is very small it's two millimeter by two millimeter. It does temperature and barometric pressure It is pin compatible with the BMP 388 So if you if you like the BMP 388 you're 388 you're gonna love the 390 So the thing that's new about the BMP 390 is It kind of improves on the accuracy and precision of the earlier BMP sensors So like, you know, basically every time every year or so, there's a new generation of BMP sensor And each time they get a little bit better at having a more precise or more accurate barometric pressure reading So for example, you know, I don't know man. This must have been like seven eight nine years ago the BMP 085 came out and That was a I squared C barometric pressure sensor that could do I think it was plus or minus a couple meters Then the BMP 180 This one Improved you can see that it's got a little bit smaller and again, I think I had like, you know a meter or so Precision Then the BMP 280 which is actually still quite popular. It's one of my most popular barometric pressure sensors And this one again, it has slightly better Accuracy and then about a year ago Was the BMP 388 which is like the last generation and one of the nice things that they added in the last couple generations is it both I squared C and SPI interface so barometric pressure sensors. What are they good for? Well, they're good for a couple things, especially the ones that are very high accuracy or precision So one thing that's really nice about them is you can use them indoor for positioning You know, it's very hard to get GPS data indoors But if all you need to know is how high something is like, you know, how far it is off the ground a very much pressure sensors You know, you don't need to have any satellites. They just use barometric pressure do it You can pair them up with a GPS a GPS will give you latitude and longitude But only within like a couple meters by adding a precision barometric pressure center You can greatly improve the altitude calculation Oh, sorry go back For accurate fitness tracking and calorie counting so you know when they know how many steps you've taken or like You know, if you're biking and they want on your altitude the higher altitude the more you have to work Of course and then in again more indoor navigation, you know, you can use like time-of-flight stuff to Determine how far you are from or like you RSSI readings to tell you how far you are from a base station But then using a barometric pressure sensor can give you altitude So how do you do the altitude calculation? Well, it's actually kind of a well-known You know mathematical calculation if you know the barometric pressure Well, actually here's the deal when you know the barometric pressure of two different altitudes You can tell how far apart those two altitudes are So like, you know as I raise something up like 10 meters I can measure the barometric pressure change and I can use it to calculate How much I moved up and down if you know the Barometric pressure at sea level, which is a commonly published piece of dating get on any weather report Like today was like 1034 hectopascals. You can then use that to calculate The sensors like absolute altitude, right? You have to have the reference altitude though. You can't just You can't just always assume what the sea pressure is so you do have to look that up But you know, especially for IoT devices that can get you know data from the internet It's a it's a commonly available number. You get that number and then you can calculate the altitude Nothing you can do with barometric pressure sensors is do weather prediction calculation You may have seen one of these that we know we having these in my home when I grew up Now they're digital, you know, of course these barometric pressure sensors But these simple barometers would translate High and low pressure into, you know, the chance of rain or sun or clouds You may also, you know watch News or you look in the paper and you see that these maps right and have like these L's and H's Floating through the sky. No, not really What these show you is where there's high pressure H and low pressure And you can even see next to the pressure like 1 0 0 9 that's low or 10 29 that's high that's in Hecto Pascals again Low pressure means air is coming in you're gonna get clouds. You're gonna get rain You're gonna get a storm high pressure means air is moving out So you're gonna have clear skies and a sunny weather you're gonna get in the winter for example So the BMP 390 thankfully Bosch has written the library to interface with it and we over the weekend We added it to our Arduino library So if you would like to try out the BMP 390 we have code that's been upgraded to now use Their new API v2, which you can also add into your Devices that their library is a kind of a pure C library You have to hook it into whatever does I squared C or SPI in your hardware So you can use it with embed or Zephyr or Raspberry Pi or whatever But we haven't already working for Arduino We even had somebody who's already like I just tried and it works great. So I know it works So I tested it and someone else tested it. All right, and you can get this on digikey digikey.com and The part numbers are they're long. So you're gonna want to use a short URL ZN to P Fn, but you could also just search for the sensor and you'll be able to find it Yeah, I available and kept taping tape in real. I think this is the only place that has them right now I picked up I picked up a couple Earlier today, so I'm gonna make him a breakout I mean they're pink and purple with a BMP 388. So the codes a little bit different, but the pinouts the same And so I put together a little demo. Yeah, do you want to play the video or do you want to do the demo? How about we show the demo and then the video and then and we'll kick out Okay, so here I've got I've got just a feather and I've got an OLED display and I'm showing the temperature I'm showing the biometric pressure. So you see it's a little low That's because there's it's kind of stormy today It's a very very much a pressure in Hector Pascal's and the estimated altitude. So before we did the show I went upstairs. I looked at what is the air pressure at? Sea level in New York City and I entered it in and so yeah, it's fine It's just about like, you know 20 or so meters Above sea level and here's something cool as I raise this up. You can actually see this number increase So it can actually measure within, you know, 25 centimeters is the published accuracy, sorry, they published precision of the of the sensor. So you move it up goes from 21 to 20 22.01 or so so you can measure a couple centimeters. So great for drones as an example We need to do precision altitude calculations. All right, and they have a little video It's about a minute and a half take it away, Bosch So that's the MPI for this week and don't forget you can get that over on digikey and that is this week's ion MPI