ESP8266 NodeMCU MQTT - Publish Temperature, Humidity, Pressure, and Gas Readings from a BME680 Sensor (Arduino IDE)
424.ESP8266 NodeMCU MQTT - Publish Temperature, Humidity, Pressure, and Gas Readings from a BME680 Sensor (Arduino IDE) Learn how to use the ESP8266 NodeMCU and MQTT to send temperature,…

Know the mission before touching a wire.
Understand what you are making, prepare the right tools, and make the workbench safe.
Project details
ESP8266 NodeMCU MQTT - Publish Temperature, Humidity, Pressure, and Gas Readings from a BME680 Sensor (Arduino IDE) is a iot project. 424.ESP8266 NodeMCU MQTT - Publish Temperature, Humidity, Pressure, and Gas Readings from a BME680 Sensor (Arduino IDE) Learn how to use the ESP8266 NodeMCU and MQTT to send temperature,…
- Source pages
- 1015-1018
- Named parts
- 8
- Build goal
- Working, tested prototype
Tools you need
- Digital multimeter
- Wire stripper and side cutters
- Soldering iron with a fine tip
- Current-limited bench supply
- Computer with a data-capable USB cable
Use eye protection, good lighting, and a clean insulated surface throughout the build.
Safety precautions
- Disconnect every power source before changing a connection.
- Check component polarity, pinout, and supply voltage twice.
- Use a current limit for the first power-up.
- Keep liquids, loose metal, and uninsulated wires away from the bench.
Gather, identify, and understand every part.
Use the standardized inventory, then open What's this? to learn each part's role, advantages, limitations, handling, and specifications.
What's this?Image, role, pros, cons, handling & specifications

development boards)
A named project component whose exact role is defined by the source circuit and build guide.
What it does hereIt performs a documented electrical, control, interface, or construction function in this project.
Buy / compare this part ↗Advantages
- Selected for this project
- Can be checked independently
- Supports modular troubleshooting
Limitations
- Substitutes may differ
- Generic names can hide variants
- Pinouts and ratings vary
Handling
- Compare the received part with the source
- Keep it labelled
- Do not force connectors or adjusters
Specifications to verify
- Use the exact model, value, package, and rating listed for development boards); similar-looking parts are not always interchangeable.
- Confirm dimensions, ratings, connection method, polarity, and environmental limits.
What's this?Image, role, pros, cons, handling & specifications

Raspberry Pi board equipped with BME680 and ESP8266 Guide
A programmable controller that reads inputs, makes decisions, and drives the project's outputs.
What it does hereIt is the control centre and must use the documented board, pin map, supply, and logic level.
Buy / compare this part ↗Advantages
- Reprogrammable and reusable
- Large learning ecosystem
- Complex behaviour remains changeable
Limitations
- GPIO voltage and current are limited
- Some pins affect boot or communication
- Loads normally need a driver
Handling
- Disconnect power before rewiring
- Avoid static discharge
- Never power motors, relays, or pumps directly from GPIO
Specifications to verify
- Use the exact model, value, package, and rating listed for Raspberry Pi board equipped with BME680 and ESP8266 Guide; similar-looking parts are not always interchangeable.
- Confirm operating voltage, logic level, pinout, memory, USB interface, and maximum GPIO current.
What's this?Image, role, pros, cons, handling & specifications

(read Best Raspberry Pi Starter Kits)
A programmable controller that reads inputs, makes decisions, and drives the project's outputs.
What it does hereIt is the control centre and must use the documented board, pin map, supply, and logic level.
Buy / compare this part ↗Advantages
- Reprogrammable and reusable
- Large learning ecosystem
- Complex behaviour remains changeable
Limitations
- GPIO voltage and current are limited
- Some pins affect boot or communication
- Loads normally need a driver
Handling
- Disconnect power before rewiring
- Avoid static discharge
- Never power motors, relays, or pumps directly from GPIO
Specifications to verify
- Use the exact model, value, package, and rating listed for (read Best Raspberry Pi Starter Kits); similar-looking parts are not always interchangeable.
- Confirm operating voltage, logic level, pinout, memory, USB interface, and maximum GPIO current.
What's this?Image, role, pros, cons, handling & specifications

Class 10 MicroSD Card with 16 GB of Storage
A named project component whose exact role is defined by the source circuit and build guide.
What it does hereIt performs a documented electrical, control, interface, or construction function in this project.
Buy / compare this part ↗Advantages
- Selected for this project
- Can be checked independently
- Supports modular troubleshooting
Limitations
- Substitutes may differ
- Generic names can hide variants
- Pinouts and ratings vary
Handling
- Compare the received part with the source
- Keep it labelled
- Do not force connectors or adjusters
Specifications to verify
- Use the exact model, value, package, and rating listed for Class 10 MicroSD Card with 16 GB of Storage; similar-looking parts are not always interchangeable.
- Confirm dimensions, ratings, connection method, polarity, and environmental limits.
What's this?Image, role, pros, cons, handling & specifications

Supply of Electricity for the Raspberry Pi (5V 2.5A)
A programmable controller that reads inputs, makes decisions, and drives the project's outputs.
What it does hereIt is the control centre and must use the documented board, pin map, supply, and logic level.
Buy / compare this part ↗Advantages
- Reprogrammable and reusable
- Large learning ecosystem
- Complex behaviour remains changeable
Limitations
- GPIO voltage and current are limited
- Some pins affect boot or communication
- Loads normally need a driver
Handling
- Disconnect power before rewiring
- Avoid static discharge
- Never power motors, relays, or pumps directly from GPIO
Specifications to verify
- Use the exact model, value, package, and rating listed for Supply of Electricity for the Raspberry Pi (5V 2.5A); similar-looking parts are not always interchangeable.
- Confirm operating voltage, logic level, pinout, memory, USB interface, and maximum GPIO current.
What's this?Image, role, pros, cons, handling & specifications

A set of jumper wires
A named project component whose exact role is defined by the source circuit and build guide.
What it does hereIt performs a documented electrical, control, interface, or construction function in this project.
Buy / compare this part ↗Advantages
- Selected for this project
- Can be checked independently
- Supports modular troubleshooting
Limitations
- Substitutes may differ
- Generic names can hide variants
- Pinouts and ratings vary
Handling
- Compare the received part with the source
- Keep it labelled
- Do not force connectors or adjusters
Specifications to verify
- Use the exact model, value, package, and rating listed for A set of jumper wires; similar-looking parts are not always interchangeable.
- Confirm dimensions, ratings, connection method, polarity, and environmental limits.
What's this?Image, role, pros, cons, handling & specifications

BMP180 - barometric sensor
A sensor converts a physical condition into an electrical signal the circuit can measure.
What it does hereIt provides project input as an analogue, digital, resistive, frequency, or calibrated signal.
Buy / compare this part ↗Advantages
- Adds real-world awareness
- Can usually be tested independently
- Often supports calibration
Limitations
- Readings can drift
- Placement affects results
- Some sensors need warm-up or calibration
Handling
- Protect the sensing surface
- Observe supply voltage and polarity
- Keep signal leads away from noisy power wiring
Specifications to verify
- Use the exact model, value, package, and rating listed for BMP180 - barometric sensor; similar-looking parts are not always interchangeable.
- Confirm supply range, output type, measurement range, accuracy, response time, and pin order.
What's this?Image, role, pros, cons, handling & specifications

BMP280 - barometric sensor
A sensor converts a physical condition into an electrical signal the circuit can measure.
What it does hereIt provides project input as an analogue, digital, resistive, frequency, or calibrated signal.
Buy / compare this part ↗Advantages
- Adds real-world awareness
- Can usually be tested independently
- Often supports calibration
Limitations
- Readings can drift
- Placement affects results
- Some sensors need warm-up or calibration
Handling
- Protect the sensing surface
- Observe supply voltage and polarity
- Keep signal leads away from noisy power wiring
Specifications to verify
- Use the exact model, value, package, and rating listed for BMP280 - barometric sensor; similar-looking parts are not always interchangeable.
- Confirm supply range, output type, measurement range, accuracy, response time, and pin order.
Connect one verified path at a time.
Explore the named components and standardized signal flow, then use Source Check to verify exact physical pins, values, and topology before applying power.
Trace this circuit.
ESP8266 NodeMCU MQTT - Publish Temperature, Humidity, Pressure, and Gas Readings from a BME680 Sensor (Arduino IDE): interactive parts, standardized terminals, responsive anchored wires, student explanations, and the original circuit reference in one shared system.
Trace before wiring
Follow power, ground, inputs, processing, and outputs in that order. Never guess a pin from package shape alone.
Connect with power off
Make short, labelled connections and share a common ground only where the schematic requires it.
Inspect every joint
Check continuity, polarity, adjacent shorts, and loose connections before the first power-up.
Open all source diagrams and build views 2 visuals


Confirm the hardware-only control path.
This project does not include firmware in the source. The circuit itself provides the required behaviour.
How to connect
- Match every controller label to the circuit view and source pin map.
- Join grounds before signal wires when separate low-voltage supplies are used.
- Keep motors, relays, pumps, and other loads on a suitable driver and external supply.
Common mistakes
Reversed VCC/GND, board-label versus GPIO-number confusion, missing common ground, and charge-only USB cables.
Troubleshoot
Disconnect loads, continuity-test one path at a time, then test with a current limit.
Software preparation
No IDE, board package, library, or firmware upload is required for this project.
If you add a programmable controller as an extension, document its pin map separately.
How to upload code
The original design is implemented entirely in hardware, so proceed after verifying the circuit and supply.
Assemble, deploy, test, and troubleshoot.
Use the complete source notes in build order, then pass the final checks before calling the project finished.
Build in functional stages
- Power and regulation
- Controller or processing stage
- Inputs and sensors
- Outputs and loads
- Enclosure and strain relief
Power up safely
- Inspect unpowered continuity first
- Apply the lowest safe current limit
- Measure supply rails before signals
- Add one load at a time
- Record expected and actual results
Work from simple to complex
- Confirm power, ground, polarity, and orientation
- Compare each pin with the source
- Test inputs separately from outputs
- Replace only one variable at a time
- Power off before every correction
Follow the documented instructions.
These notes come from this project's source and remain in their original order.
Project overview
Project build note424.ESP8266 NodeMCU MQTT - Publish Temperature, Humidity, Pressure, and Gas Readings from a BME680 Sensor (Arduino IDE) Learn how to use the ESP8266 NodeMCU and MQTT to send temperature, humidity, pressure, and gas air quality readings from a BME680 sensor to any platform that supports MQTT or any MQTT client. As an illustration, we will send the readings from the sensors to the Node-RED Dashboard MQTT is gaining popularity as an Industrial IoT (Internet of Things) data protocol. It is a lightweight method that is both efficient and secure, and it was developed for the purpose of connecting remote devices to a central server. On the other hand, IoT installations are becoming larger and more complicated, and there is a rising demand for OT/IT connectivity. The MQTT protocol is therefore good for the environment and simple to implement for a large number of devices. Keeping devices connected despite having unreliable networks: Even when connections between devices are
unstable, MQTT in the Internet of Things is able to leverage QoS levels to assure that messages will be delivered to their intended recipients.
Components Required
Project build noteThe ESP8266 is a required component (read Best ESP8266 development boards) Raspberry Pi board equipped with BME680 and ESP8266 Guide (read Best Raspberry Pi Starter Kits) Class 10 MicroSD Card with 16 GB of Storage Supply of Electricity for the Raspberry Pi (5V 2.5A) A set of jumper wires Breadboard
Project Overview
Project build noteA high-level overview of the project that we are going to construct can be seen in the accompanying diagram. Readings from the sensor are requested by the ESP8266, which is connected to the BME680. Node-RED is subscribed to those topics; Node-RED receives the sensor readings and then displays them on gauges and text fields;
The temperature readings are published in the esp/bme680/temperature topic; the humidity readings are published in the esp/bme680/humidity topic; the pressure readings are published in the esp/bme680/pressure topic; and the gas readings are published in the esp/bme680/gas topic. You have the ability to receive the readings in any other platform that supports MQTT, and you may treat the readings in any manner that you see fit. BME680 Integrated Environmental Sensor The BME680 is a digital sensor that measures gas, humidity, pressure, and temperature all in one package, and it does so use sensing methods that have been tried and tested. The BMP180, BMP280, and BME280 are all predecessors to the BME680, which is an updated and superior version of those models. The BME680 has a gas sensor that can detect a wide variety
of volatile organic chemicals, which allows it to monitor the quality of the air within. High linearity and accuracy are both characteristics of the sensor. The BME680 was designed specifically for mobile applications and wearables, two categories of electronics in which the criteria for size and power consumption are particularly stringent. The gas sensor contained within the BME680 is capable of detecting a wide variety of gases, including volatile organic compounds, in order to carry out air quality measurements (VOC).
Schematic Diagram
Project build noteConnect the BME680 to the ESP8266 in the manner depicted in the accompanying block diagram of the schematic. The SDA pin should be connected to GPIO 4, and the SCL pin should be linked to GPIO 5.
You built ESP8266 NodeMCU MQTT - Publish Temperature, Humidity, Pressure, and Gas Readings from a BME680 Sensor (Arduino IDE).
You followed the full workflow from understanding the mission to testing the finished project. That is a real engineering achievement - well done.
Browse all 500 projects