NodeMCU ESP8266 IoT application tutorials with examples

Here we have provided some tutorials on how the NodeMCU or ESP8266 can be used for making IoT application with different IoT platforms. The different IoT platform used here are Proteus IoT framework, NodeRed IoT framework and standalone IoT appliction where ESP8266 is used as a web server.

IoT devices, sensors and actuators

 IoT devices are sensors, actuators and any machine that can be monitored and controlled by user over the internet or world wide web(www). Internet is the largest network of interconnected computer that transfers data including images, audio and video using different internet protocols(TCP, UDP, HTTP, FTP, MQTT). Examples provided below uses Mosquitto MQTT broker which is open source and popular MQTT broker application. Sensors like humidity, temperature sensor, actuators like DC motor are sensors and actuators used in the IoT application tutorial provided below.

IoT with NodeMCU ESP8266

The NodeMCU ESP8266 is a popular SoC(System on Chip) embedded system that has the ability to connect via WiFi to WiFi network. It has analog to digital pin to read in analog sensor data and transfer the data over WiFi network and ultimately to the internet. It also has digital read and write pins to control sensors and actuators(DC motors, Stepper motors etc). The ESP8266 can be used as a standalone device to control and monitor sensors and actuator for IoT application. It can be used as a standalone HTTP server. It can also be interfaced with microcontroller boards such as Arduino for IoT application. This way we can have a Arduino microcontroller controlling the various connected sensor and actuators while the ESP8266 is mainly used to connect to the Internet.

ESP8266 IoT application examples

Following are some examples of using ESP8266 for Internet of Things application. 

LED Blink using ESP8266 & Arduino IDE with Video and Pictures

This tutorial is a beginner tutorial that helps one to learn how to use the Arduino IDE for programming the ESP8266. A simple LED blink is shown to simplify and make the process understandable.

ESP8266 ESP12-E Led blink 

schematic diagram ESP8826/ESP12-E

Simple ESP8266 Asynchronous Web Server Example with Code

 In this tutorial, the ESP8266 is configured as an asynchronous web server and when user visits the web page it shows text message hello from ESP12E module. This teaches how to make a web server with ESP8266 and how we write the html code. Instead of the text we can display form, control buttons for sensors etc. 

ESP12E WiFi module

PWM example using ESP8266 ESP12E

This tutorial illustrates how can control a DC motor with PWM signal from  ESP8266. This is an example where IoT devices can be controlled using the ESP8266.

 

 circuit diagram LED ESP12E wifi module

Read & Display Switch State on Web Page with ESP8266 Web Server

This tutorial shows how to build web user interface that shows the state of a physical switch which is connected to the ESP8266 pin. It is useful in IoT application where state of physical switch or button or laser alarm triggered information is required to be read and displayed on a webpage. Here the ESP8266 IoT device is programmed as a web server that shows the state of the physical switch.

ESP8266 web server with switch

schematic diagram of ESP8266 web server with switch 

Node-Red ESP8266 MQTT Publish Example

 This tutorial shows how to use MQTT protocol with ESP8266. The web IoT application is build using the NodeRed IoT framework and IoT connectivity is via WiFi. Here the ESP8266 based NodeMCU is used as IoT device which is connected to DHT11 humidity and temperature sensor. The ESP8266 IoT device reads the sensor data from DHT11, publishes and displays the humidity and temperature data on web page.

  DHT11 and NodeMCU

NodeMCU Node Red Industrial Iot platform

Node-Red ESP8266 MQTT Subscribe Example

 This IoT example with ESP8266 demonstrates how to subscribe to MQTT topic using ESP8288 IoT device and Node-RED. Here the ESP8266 NodeMCU wifi module is used as MQTT client to subscribe to a topic. For the MQTT broker we will be using Mosquitto MQTT application. The node-red is used to build the web application to send message from the MQTT server to the MQTT client to turn on or off a LED connected to the MQTT client which is ESP8266. 

ESP8266 LED

 Arduino ESP8266 IoT development platform with Proteus

This tutorial illustrates how one can use Proteus electronics design software to make IoT application with ESP8266 and Arduino. This tutorial shows how to write IoT program with flowchart programming in Proteus. It shows how to make front panel, the user interface, that is accessible via the internet on the browser.

IIoT platform using Arduino Uno and ESP8266

 WiFi controlled DC motor with ESP12E

In this tutorial it is shown how to control a DC motor over WiFi network using the ESP8266 ESP12E module. Here L293D motor driver is used to drive the DC motor. Program code is available as arduino sketch which can be uploaded via the Arduino IDE. The web user interface is written in HTML language which is loaded into the ESP8266 memory. The ESP8266 is used as a web server.

 WiFi controlled DC motor with ESP12E


1 Comments

Previous Post Next Post