Table of Contents

BME280 multi-purpose sensor

bme280.jpg





This multi-purpose sensor is used to measure temperature, relative humidity and barometric pressure. It operates as an I2C slave device.

The actual sensor is tiny but a board is available from China with the I2C connections and power on a standard 0.1 inch header which makes it easily accessible.

Raspberry Pi

The device uses I2C to communicate with a host master and with the Pi, four pins on the GPIO header are utilised to achieve this.

    +---P1---+
3V3 01       .
SDA 03       .
SCL 05       .
    .        .
GND 09       .
    .        .
    
Relevant pins for I2C communications shown, others omitted.

With the miniature board (purple device in photo), the four wires hook up the BME280 to the Pi. Two wires are for power and two for communications. Power is supplied from the Pi 3V3 pin which is connected to the board's Vin pin. For safety you may wire the board with the Pi disconnected from it's power source and only power it up when satisfied the wiring is correct.

Install Telegraph and use it's BME280 demo for PHP and the apache2 web server to create and display graphs of the sensor (see the three graphs on this page).

Within the Telegraph directory you will find the `demo' directory and within that `bme280'. Two further directories exist, the `etc' directory demonstrates how to set up telegraph to poll the BME280 device and store the results in a database. The `htdocs' directory contains files which you can be served by the apache2 web server to display images like the examples on this web page.