Part

Gas and weather, BME680

Temperature, humidity, pressure and a heated gas plate over I2C, raw counts and calibration to work through.

See every part
  • 4 pins
  • 5 settings
  • In 1 project
  • In 1 lesson
Drawn live by the editor's own code, at the size you see it.
Gas and weather, BME680 as drawn in the Mokxi simulator
At a glance

The Gas and weather, BME680 in brief

What it is, and every setting the properties panel gives it.

The BME680 is Bosch’s four-in-one environmental sensor: temperature, humidity and pressure, like a BME280, plus a tiny metal-oxide plate that the chip heats and measures. Volatile compounds in the air, from cooking smoke to solvents, lower the plate’s resistance, so a falling gas figure means worse air. That figure is a resistance in ohms, not a ready-made air quality score, and it only means something compared with the same sensor’s own reading in clean air. On a breakout it answers over I2C at 0x77 or 0x76. In Mokxi four sliders set the air, and the model runs the chip’s measurement cycle as the datasheet describes: a forced-mode cycle of the three weather readings, then the heater step and the gas reading, with the busy flag up until it ends. The results come back as raw counts, so the library’s own calibration math produces the numbers you print.

Family
Sensors
Pins
4
address
119
temperature
22
humidity
45
pressure
1013.25
gas
50
Pins

4 pins

Named as the editor names them, so a wire lands where you expect it.

Pin
What it does
VIN
Supply, 3 to 5 V on the board.
GND
Ground.
SCL
I2C. The board carries the pull-ups.
SDA
I2C. The board carries the pull-ups.
How to use it

How to use the BME680 gas sensor with an Arduino

The breakout needs VIN on 5 V, GND on ground, and SDA and SCL on the Uno’s I2C pins. Adafruit’s library looks for it at 0x77 by default; a board strapped to 0x76 needs that address passed to begin().

bme.setGasHeater(320, 150) asks for the plate at 320 °C for 150 ms each cycle. performReading() runs one complete cycle and fills bme.temperature, bme.humidity, bme.pressure (in pascals) and bme.gas_resistance (in ohms). The kitchen air project takes its first gas reading as the clean-air baseline and calls the air bad whenever a later reading falls below two thirds of it. Drag the gas slider on the part down to half and the bad air message appears; the weather sliders change the rest of the line.

Part pin
Board pin
VIN
5 V
GND
GND
SDA
SDA (A4)
SCL
SCL (A5)

The breakout takes 3 to 5 V and uses the board’s default I2C pins, so the same sketch runs on an ESP32 or a Pico; Bosch’s bme68xLibrary is there too if your code uses its Bme68x class.

Arduino Uno: kitchen air monitor with a BME680live0.000 s 0.00x
Click to open it in the editor
This is the simulator itself, running here. Click anything to open it in the editor.
A baseline and a comparison, from the kitchen air sketch
bme.setGasHeater(320, 150);       // 320 C for 150 ms
bme.performReading();
baseline = bme.gas_resistance;    // clean air

// later, each second
bme.performReading();
bool bad = bme.gas_resistance < baseline / 3 * 2;
Common errors

Common Gas and weather, BME680 errors and fixes

What goes wrong
The fix
The gas reading is zero or missing at the start.
The plate has to be heated for the time you set before the reading comes, at the end of the cycle. Set the heater, then use the result of a completed performReading().
Two sensors in the same room read very different gas values.
Every BME680 has its own resistance in the same air. Compare each one only with its own clean-air baseline.
begin() returns false.
Check the address: 0x77 is the library default, and a board with its SDO strap low is at 0x76. Pass the right one to begin().
Pressure prints as a huge number.
The library gives pascals. Divide by 100 for hectopascals, as the kitchen air sketch does.
Questions

Questions and answers

What is the difference between the BME680 and the BME280?

The BME680 adds the heated gas plate. Temperature, humidity and pressure work much the same, and the BME280 has its own page here.

Does the BME680 measure CO2?

No. Its gas plate responds to volatile compounds in general and gives a resistance; it cannot tell which gas or report CO2 in ppm.

Why does a lower gas resistance mean worse air?

Reducing gases react at the hot metal-oxide surface and free up charge carriers, so the plate conducts better and its resistance falls.

How hot should the BME680 heater be?

The common choice, and the one the kitchen air project uses, is 320 °C for 150 ms. Keep it the same between readings you want to compare.

How it is modeled

What is true about the Gas and weather, BME680, here

In its help article’s own words: what the simulation gets right, and where it stops.

Not modeled

The IIR filter, the heater's real temperature, and the gas resistance's dependence on it and on humidity: the gas reading is the slider's resistance.

From BME680 gas and weather sensor, in full.

Projects

See the Gas and weather, BME680 in a project

One built-in project uses it. It opens in the editor, already wired.

Lessons

Where it turns up in a lesson

One lesson places it in its own circuit.

Boards

The boards it is shown on

This board has a built-in project with the Gas and weather, BME680 in it.

Libraries

Arduino libraries for the Gas and weather, BME680

Built in, so the sketch compiles with nothing to install. Each page has the calls, the wiring and an example to run.

Wire up the Gas and weather, BME680

Open the editor and push it into the breadboard. It is free, and it runs on your own machine.