Skip to main content

Quick Start

This board measures fine dust in the air as PM1, PM2.5 and PM10. Connect it over I2C, install the Arduino library together with the Bosch sensor files it needs, and run its simplest example to see a new reading about once a second.

You program the controller connected to this breakout. The breakout itself is not flashed.

1. Connect the breakout boardโ€‹

Plug a Qwiic cable into either Qwiic connector on the board and into the Qwiic connector on your controller. No soldering needed, and the second Qwiic connector stays free for chaining another Qwiic board.

ControllerSoldered BMV080 Particulate Matter Sensor
Qwiic connectorEither Qwiic connector

If your controller has no Qwiic connector, solder the included header pins and wire the board to its I2C pins instead:

ControllerSoldered BMV080 Particulate Matter Sensor
3.3 V3V3
GNDGND
I2C data (SDA)SDA
I2C clock (SCL)SCL

The board runs on 3.3 V only and has no regulator. Never connect 3V3 to 5 V, and use a controller with 3.3 V logic.

The library needs files from the Bosch BMV080 SDK, which you download separately in the next step. Its file table has places for ESP32, ESP32-S2, ESP32-S3 and ESP32-C6 boards, and for Arm Cortex-M0+, Cortex-M33, Cortex-M4 and Cortex-M4F boards. The library's library.properties lists every one of these except Cortex-M4, so pick a controller from the list other than a plain Cortex-M4.

2. Install the libraryโ€‹

Download the Soldered BMV080 Arduino library from its GitHub repository and add it to the Arduino IDE as a ZIP library.

๐Ÿ”—Soldered BMV080 Arduino library

Verified Arduino library at commit 011d5ca

โ†’

Tip: downloading from GitHub. On the library's GitHub page, click the green Code button and choose Download ZIP, then add it in Arduino IDE with Sketch โ†’ Include Library โ†’ Add .ZIP Library....

This library relies on the Bosch BMV080 SDK, which is not included in the library. Download the Bosch SDK here.

After you download and extract the Bosch BMV080 SDK, copy the required header files and precompiled static libraries to these locations in the library. The static libraries are platform-specific, so copy the files for your target platform.

Bosch SDK fileSoldered BMV080 Arduino library directory
api/inc/bmv080.hsrc/BMV080Wrapper/bmv080.h
api/inc/bmv080_defs.hsrc/BMV080Wrapper/bmv080_defs.h
api/lib/xtensa_esp32/xtensa_esp32_elf_gcc/release/lib_bmv080.asrc/esp32/lib_bmv080.a
api/lib/xtensa_esp32/xtensa_esp32_elf_gcc/release/lib_postProcessor.asrc/esp32/lib_postProcessor.a
api/lib/xtensa_esp32s2/xtensa_esp32s2_elf_gcc/release/lib_bmv080.asrc/esp32s2/lib_bmv080.a
api/lib/xtensa_esp32s2/xtensa_esp32s2_elf_gcc/release/lib_postProcessor.asrc/esp32s2/lib_postProcessor.a
api/lib/xtensa_esp32s3/xtensa_esp32s3_elf_gcc/release/lib_bmv080.asrc/esp32s3/lib_bmv080.a
api/lib/xtensa_esp32s3/xtensa_esp32s3_elf_gcc/release/lib_postProcessor.asrc/esp32s3/lib_postProcessor.a
api/lib/riscv_rv32imc/riscv_none_elf_gcc/release/lib_bmv080.asrc/esp32c6/lib_bmv080.a
api/lib/riscv_rv32imc/riscv_none_elf_gcc/release/lib_postProcessor.asrc/esp32c6/lib_postProcessor.a
api/lib/arm_cortex_m0plus/arm_none_eabi_gcc/release/lib_bmv080.asrc/cortex-m0plus/lib_bmv080.a
api/lib/arm_cortex_m0plus/arm_none_eabi_gcc/release/lib_postProcessor.asrc/cortex-m0plus/lib_postProcessor.a
api/lib/arm_cortex_m33/arm_none_eabi_gcc/release/lib_bmv080.asrc/cortex-m33/lib_bmv080.a
api/lib/arm_cortex_m33/arm_none_eabi_gcc/release/lib_postProcessor.asrc/cortex-m33/lib_postProcessor.a
api/lib/arm_cortex_m4/arm_none_eabi_gcc/release/lib_bmv080.asrc/cortex-m4/lib_bmv080.a
api/lib/arm_cortex_m4/arm_none_eabi_gcc/release/lib_postProcessor.asrc/cortex-m4/lib_postProcessor.a
api/lib/arm_cortex_m4f/arm_none_eabi_gcc/release/lib_bmv080.asrc/cortex-m4f/lib_bmv080.a
api/lib/arm_cortex_m4f/arm_none_eabi_gcc/release/lib_postProcessor.asrc/cortex-m4f/lib_postProcessor.a

3. Run the first exampleโ€‹

This is simpleReading.ino, the library's simplest example. It starts the sensor at the board's default address 0x57, switches it to continuous measurement and prints PM10, PM2.5 and PM1 each time a new reading arrives. Upload it, then open the Serial Monitor at 115200 baud.

Select Board
simpleReading.ino
#include "BMV080-SOLDERED.h"

BMV080 bmv080; // Create an instance of the BMV080 class
#define BMV080_ADDR 0x57 // BMV080 default address

void setup()
{
Serial.begin(115200);

while (!Serial)
delay(10); // Wait for Serial to become available.

Wire.begin();

if (bmv080.begin(BMV080_ADDR, Wire) == false)
{
Serial.println(
"BMV080 not detected at default I2C address. Check your jumpers and the hookup guide. Freezing...");
while (1)
;
}

/* Initialize the Sensor (read driver, open, reset, id etc.)*/
bmv080.init();

/* Set the sensor mode to continuous mode */
if (bmv080.setMode(BMV080_MODE_CONTINUOUS) == true)
{
Serial.println("BMV080 set to continuous mode");
}
else
{
Serial.println("Error setting BMV080 mode");
}
}

void loop()
{
if (bmv080.readSensor())
{
float pm10 = bmv080.PM10();
float pm25 = bmv080.PM25();
float pm1 = bmv080.PM1();

Serial.print("PM10: ");
Serial.print(pm10);
Serial.print("\t");
Serial.print("PM2.5: ");
Serial.print(pm25);
Serial.print("\t");
Serial.print("PM1: ");
Serial.print(pm1);

if (bmv080.isObstructed() == true)
{
Serial.print("\tObstructed");
}

Serial.println();
}
delay(100);
}

4. Check the resultโ€‹

Once the sensor is running, the Serial Monitor shows something like this. The output below is from a bench run on this board; the run did not record which controller it used.

Serial MonitorAutoscrollShow timestampNewline115200 baud
Message (Enter to send message to the board)
BMV080 set to continuous mode
PM10: 9.84 PM2.5: 7.12 PM1: 5.06
PM10: 10.27 PM2.5: 7.39 PM1: 5.21
PM10: 10.03 PM2.5: 7.25 PM1: 5.14
PM10: 9.71 PM2.5: 7.01 PM1: 4.98
PM10: 9.92 PM2.5: 7.18 PM1: 5.09

A new line appears about once a second, with each value in ยตg/mยณ. Your numbers depend on the air around the sensor. When something blocks the sensor's view, the line ends with Obstructed.

5. If it does not workโ€‹

Continue with Troubleshooting and retry this smallest example after each change.