If you’re working on an air quality monitoring project and space is at a premium, SparkFun’s latest Qwiic breakout board featuring Bosch Sensortec’s BMV080 sensor might be exactly what you need. This isn’t just a shrunken-down version of existing PM sensors, it’s a serious performer in an unbelievably compact form.
If you’re working on an air quality monitoring project and space is at a premium, SparkFun’s latest Qwiic breakout board featuring Bosch Sensortec’s BMV080 sensor might be exactly what you need. This isn’t just a shrunken-down version of existing PM sensors, it’s a serious performer in an unbelievably compact form.
Ultra-Compact Design
At just 4.4 mm × 3.0 mm × 3.0 mm, the BMV080 is currently the smallest particulate matter sensor on the market. According to Bosch Sensortec, it is more than 450 times smaller than comparable devices. Being that small, having it mounted on a breakout board is practical and that is exactly what they did at SparkFun. Actually, they went a step beyond that as they also designed a practical enclosure for it that makes it even easier to use.
The BVM080 (inside the green circle) measures 4.4 mm × 3.0 mm × 3.0 mm.
No Fan Required
The BMV080 uses integrated lasers and photodiodes to detect particulate matter with diameters equal to or smaller than 2.5 µm (PM2.5) in real time. PM1.0 and PM10 concentrations are calculated too. The sensor measures free moving particulate matter in the ambient airflow around the device. Therefore, it does not need a fan nor special inlets or channels, making the sensor quieter, more power-efficient, and easier to mount in small enclosures.
Bosch Sensortec provides the BMV080 on a small module that SparkFun mounted on breakout board together with a SparkFun-standard Qwiic I²C connector for easy access. If for some reason you can’t use I²C, a 0.1" pin header can be mounted for a SPI port. This does require some rework on the PCB, though.
Delicate but Well-Protected
The BMV080 sensor is a delicate device, which is why SparkFun created an enclosure for it with a built-in filter that protects the sensor against contamination like fingerprints and dust. This is especially useful for sealed or weather-resistant designs. The filter seems black but doesn’t hinder the laser light. The laser has a wavelength of 850 nm (near-infrared) and is a Class 1 device. This means that it is considered safe under all normal conditions of use, including direct viewing with the naked eye.
To use the air quality sensor, a software library is needed. Bosch Sensortec offers an SDK for the BMV080 around which SparkFun wrapped an Arduino library. The SparkFun library installs as a normal Arduino library but to get to the Bosch Sensortec SDK you must first fill in a form before you can download the archive. You must then copy a bunch (16 for a complete installation) of precompiled libraries from the Bosch Sensortec archive to the SparkFun library. This is a bit laborious, but it does tell you which processors are supported.
Supported Platforms
As it tuns out, supported MCU platforms are the ESP32 (including S2 and S3) and Arm Cortex M0+, M33, M4(F), and M7(F). Raspberry Pi and X86 platforms are supported too. Not supported however are the Arduino UNO R3 (AVR) and R4 (Renesas). This is regrettable as the UNO R4 has a Qwiic connector and I had planned to use it for my review experiments. Now I had to solder wires to a Raspberry Pi Pico, which has an Arm Cortex M0+ core (or an ESP32 module). This lack of support is due to Bosch Sensortec, not SparkFun. Maybe they add it in the future? The test setup with SDA on pin 2 and SCL on pin 3. The white wire is the IRQ line.
First Try
With a Qwiic connector soldered to a Raspberry Pi Pico (SDA on pin 4, SCL on pin 5) I uploaded the example sketch Example_01_BasicReadings. This produced the following readings in the Serial Monitor:
So, either there is a problem, or I am working in a really polluted environment. Both assumptions can be true, unfortunately, as I don’t have anything to compare to. Trying the example sketch Example_02_DutyCycle produced similar results.
Best SDK Ever?
Before returning or binning the module, I decided to have a closer look at the SDK from Bosch. This, to my pleasant surprise, turned out to be a very complete and well-documented SDK, not just a collection of precompiled libraries. In it, I found an example for the Arm Cortex-M0+ targeted at an Adafruit RP2040 Feather board. To use it with my Raspberry Pi Pico I had to connect SDA to pin 2, SCL to pin 3 and solder a wire from the BMV080 module’s IRQ pin (next to the Qwiic connector) to pin 7 of the Pico. Also, I had to adapt the file main.cpp to make it use the Pico’s on-board LED on pin 25 instead of on pin 13. This requires changing the definition of BSP_IO_PORT_PIN_13 but also correcting line 181 (or so) where the LED is toggled and where pin 13 is hard-coded. Here are my changes:
In the file combridge.cpp you must change the I²C address of the module to 0x57, the default address of the SparkFun module:
#define BMV080_I2C_ADDRESS 0x57
One-Command Compile
Compiling the program is now as simple as navigating in a command-line terminal, Windows PowerShell for instance, to the SDK folder api_examples\arm_cortex_m0plus and then execute the command
./build_arm_cortex_m0plus.cmd i2c
An internet connection is required for this as the script will download and install the required toolchain before compiling the example. For me, this worked perfectly fine. Not being used to such smoothly working SDKs, I was genuinely impressed. Kudos to Bosch Sensortec!
Uploading the executable requires locating the UF2 file which, for some reason, does not end up in the Bin folder like the other binaries, but remains in the Build folder. With the Pico in bootloader mode, you can copy the UF2 file to it. Surprise! Now the BVM080 module started to output real data!
Particulate matter values after striking a few matches.
RTOS Required
While doing all this I had noticed that the Bosch Sensortec SDK referred to the Mbed RTOS, which gave me the idea to recompile the SparkFun example using the Arduino Mbed OS RP2040 Boards (I had been using Earle Philhower's RP2040 Arduino package) and this time it worked! (Remember, the SparkFun library expects SDA on pin 4 and SCL on pin 5, the IRQ pin is not used in the example I tried.)
Conclusion
SparkFun’s Qwiic Particulate Matter Sensor with Bosch’s BMV080 is a compact yet capable air quality solution targeted at applications where space, power, and simplicity are at a premium. With real-time PM detection, flexible communication interfaces, and an intelligent enclosure design, it’s a good choice for environmental sensing applications.
The software support from SparkFun is somewhat lacking documentation, but the Bosch Sensortec SDK is excellent. Once you know that most examples expect to run on an RTOS like the (obsolete) Mbed OS, then you too can measure particulate matter concentrations with the BMV080.
Read full article
Hide full article
Add a rating to this article
★★★★★
★★★★★
Page 1 / 1
Login
No account yet?Register for free!
Forgot password?
Please enter your email address. Instructions for resetting the password will be emailed to you now.
Discussion (0 comments)