ESP8266, BMP280, MQTT Weather Station

Intro: ESP8266, BMP280, MQTT Weather Station

This will guide you trough making a simple weather station with good accuracy.

Here we use a ESP8266 WIFI development board to connect the sensor to the internet to save the data. A lot of flavorous exist and will work and I will use the one I have at home: Homefixer ESP8266

There are many different sensors, but according to http://www.kandrsmith.org/RJS/Misc/Hygrometers/calib_many.html the BME280 delivers the best results out of common low-cost hygrometers. (Due to the seller sending me the wrong part, this guide will be using BMP280 but the steps are similar.

The sending of data will be trough MQTT.

Step 1: Connection

First we need to connect the BMP280 to the ESP8266.

Connect it like this:

BME280	| ESP8266(NodeMCU) 
VCC	| 3.3V
GND	| GND
SCL	| GPIO2(D4)
SDA	| GPIO0(D3)

Step 2: Install the Software

You can also follow this guide: https://www.letscontrolit.com/wiki/index.php/Tuto...

  1. Download ESPEasy: https://www.letscontrolit.com/downloads/ESPEasy_R...
  2. Unpack
  3. Run flash.cmd
  4. Answer the questions: Comport can be found in the Devicemanager, Flash Size depends on module: my module is 4096, Build: 120 or newer
  5. Wait
  6. Power off/on or reset the module
  7. Follow this guide to set up WiFi: https://www.letscontrolit.com/wiki/index.php/Easy...

Step 3: Set Up BMP280

  1. Connect to the modules website as showed in the wifi setup
  2. Change i2c ports to SDA=GPIO0 and SCL= GPIO2 or as you connected it
  3. Add the BMP280 under devices, remember to set IDX to non-zero value

Step 4: Set Up MQTT

Under the config tab you can set the MQTT broker settings. I'm using openHAB protocol after recommendation from here: https://diyprojects.io/esp-easy-mqtt-node-red-bi-...

Temperature will now be published under:

weather_station_bmp280/BMP280/Temperature

and Pressure:

weather_station_bmp280/BMP280/Pressure

I'm using node-red to display it as shown in the last picture.


Now the weather station is done hurray

Share

    Recommendations

    • Electronics Tips & Tricks Challenge

      Electronics Tips & Tricks Challenge
    • Plastics Contest

      Plastics Contest
    • Optics Contest

      Optics Contest

    Discussions

    0
    None
    DIY Hacks and How Tos

    5 months ago

    Cool. It would be great to set up a whole network of these.