BME280 Temp & Humidity Sensor
Being Sensible
Dictionary
term | definition |
---|---|
GPIO | General Purpose Input/Output pins |
I2C | Inter-Integrated Circuit Protocol - communication protocol for multiple peripherals to communicate with a single controller |
SPI | Serial Peripheral Interface - bus to send data between peripherals and a microcontroller |
VIN | Voltage In - Allows for a 5V-12V DC input (+), and regulates it down to the required 3V3 |
3V3 | 3.3V DC power input (+) |
GND | Power Ground (-), also the 0V reference in a digital 0V/1V circuit |
SCK | Serial Clock - signals the microntroller to synchronize data transmission |
SDO | Serial Data Out - pipes the sensor data out |
SDI | Serial Data In - pipes data in |
CS | Chip Select - turns the peripheral on |
SDA | Serial Data Line on the Raspberry PI |
SCL | Serial Clock Line on the Raspberry PI |
The Wire Up
In this case I'm using the Adafruit BME280 Sensor to read the Temperature, Barometric Pressure & Humidity. I'll be reading that data using the I2C capabilities of the RaspberryPi's GPIO pins. This project has a good wiring diagram, and writeup on how to connect the BME280 to the RaspberryPi.
You'll have to ensure that you've enabled the I2C bus on your RaspberryPi, but once you do, it's pretty straight forward to initialize the board and read it. You might notice there's some additional processing of the temperature. In this case there's an attempt to "calibrate" the raw data. Because I built this off of another really neat project I've kept some of their underlying adjustments. Over time I want to figure out what these actually do, and decide if they make sense for my project. For now though, they're baked into the data stream.
It's also worth noting, that in the case of my "Outside AQI Monitor" I don't use the Enviro+. I've just got the raw sensors. The monitor is truly outdoors, so I don't want the LCD screen, or really any unnecessary parts that can break/wear out. While I like the idea of a single board hat, sometimes it's fun to build from pieces.
The Output
For my purposes I only end up using the Temperature and Humidity in my visualizations. Later on we'll cover how the other bits of raw data are used to derive values from other sensors, but living in the North West, it's either raining or about to rain at least 9 mounths out of the year, so I don't pay to much attention to the barometric pressure readings.
QOTD
“I am not much different now. I have never wanted to grow up and stop playing.” ― Penny Marshall, My Mother Was Nuts