Max LeeAnip Aananda Shah
Published

Next-Gen Remote Monitoring with Node MCU Technology

created a cost-effective Remote Monitoring System using NodeMCU, Blynk API, and Arduino code, resulting in a 30% reduction in downtime

AdvancedFull instructions provided2 days92
Next-Gen Remote Monitoring with Node MCU Technology

Things used in this project

Hardware components

Espressif ESP32 Development Board - Developer Edition
Espressif ESP32 Development Board - Developer Edition
×1
Gravity: Analog Alcohol Sensor (MQ3) For Arduino
DFRobot Gravity: Analog Alcohol Sensor (MQ3) For Arduino
×1
Ultrasonic Sensor - HC-SR04
SparkFun Ultrasonic Sensor - HC-SR04
×1
MyOctopus i2c Barometric Air Pressure Sensor BMP280
MyOctopus i2c Barometric Air Pressure Sensor BMP280
×1

Software apps and online services

Blynk
Blynk

Story

Read more

Schematics

RMS

This is the schematic of the RMS

Code

Remote Monitoring System Using Node MCU

Arduino
This code contains all the library and functions used for the project
#include <WiFi.h>
#include <WiFiClient.h>
#define BLYNK_TEMPLATE_ID "TMPL3HcM9-Wa"
#define BLYNK_DEVICE_NAME "----------------"
#define BLYNK_AUTH_TOKEN "-----------------"
#include <BlynkSimpleEsp32.h>


#define  trig  5
#define  echo  18

#define MQ3 34 
#define BLUE 2 

long duration;
int distance;
int per;


char auth[] = "58qpgrH1IC4nbu794mqmRZYkWMhMG0sT";
char ssid[] = "max";  
char pass[] = "bishal12"; 

BlynkTimer timer;


int sensorValue = 0;
boolean state = false;
int temp=25;
int pres=1016;

void setup()
{
  // Debug console
  pinMode(trig, OUTPUT); 
  pinMode(echo, INPUT);   
  Serial.begin(9600);
  Blynk.begin(auth, ssid, pass);

 timer.setInterval(1000L, sendSensor);
}

void loop()
{
  Blynk.run();
  timer.run();
}
void sendSensor()
{
  digitalWrite(trig, LOW);   
  delayMicroseconds(2);       
  digitalWrite(trig, HIGH); 
  delayMicroseconds(10);      
  digitalWrite(trig, LOW);   
  duration = pulseIn(echo, HIGH);   
  distance = duration * 0.034 / 2;  
  per=(100*distance/400);

  Serial.print("Distance = ");        
  Serial.println(distance);

  if(distance <= 5)
  {
    Blynk.tweet("My Arduino project is tweeting using @blynk_app and its awesome!\n #arduino #IoT #blynk");
    Blynk.notify("Post has been twitted");
  }
  Blynk.virtualWrite(V0, per);  //Pause for 3 seconds and start measuring distance again
  sensorValue = analogRead(MQ3); 
  Blynk.virtualWrite(V1, sensorValue); 

  Serial.println(sensorValue); 
  
  Blynk.virtualWrite(V2, pres);
  Blynk.virtualWrite(V3, temp);

  if (sensorValue > 500) 
  {
    Blynk.notify("Gas Detected!");
    digitalWrite(BLUE, HIGH);
  }

  else
  {
    digitalWrite(BLUE, LOW); 
  }
}

Credits

Max Lee

Max Lee

1 project • 0 followers
Anip Aananda Shah

Anip Aananda Shah

5 projects • 0 followers
Practicing and learning about microcontroller boards and sensors.😊
Thanks to Anip Shah.

Comments

Add projectSign up / Login