To make a simple Vibration monitoring device using SW-420 vibration sensor module, IOT Cloud (myDevices Cayenne), Web Server and LCD interface.
This Vibration Sensor can be used to detect vibration from any angle. There is an on-board potentiometer to adjust the threshold of vibration. It outputs logic HIGH when this module not triggered while logic Low when triggered. here to used Earthquake application.
The main objective of project is to work on the real-time earthquake detector sensor network, and design such a low-cost real-time earthquake detector monitoring system that can be easily used throughout the country or world. So that’s why I decided to work on this project and make our own monitoring system for the earthquake based on the wifi module, vibration sensor, and IoT platform.
On the other hand, Cayenne is an IoT cloud platform that provides several cloud services, such as:
Data visualization
IoT cloud
Alerts
Scheduling Events
We will focus our attention on data visualization and on the IoT cloud services.
Circuit diagram
Components Required
Vibration sensor SW-420 - 1 no
Node MCU ESP8266 12E - 1 no
LCD 16x2 with I2C- 1 no
refer previous post for more detail:
NodeMCU
NodeMCU ESP8266-12E MCU is a development board with one analogue and many general-purpose input output (GPIO) pins. It has 4MB flash memory, and can operate at a default clock frequency of 80MHz. In this project, digital pin D0 of NodeMCU is used to read Data of Vibration Sensor.
Cayenne
Cayenne IoT Platform accelerates the development of IoT-based solutions, including quick design, prototyping and other commercialized projects. It is a drag-and-drop IoT project builder that can help developers build complete, ready-to-use IoT solutions with little to no coding.
Cayenne IoT Platform contains a vast catalogue of certified IoT-ready devices and connectivity options. This allows users to easily add any device to the library utilizing MQTT API. All devices in Cayenne are interoperable and benefit from features such as rules engine, asset tracking, remote monitoring and control, and tools to visualize real-time and historical data.
MQTT is a lightweight messaging protocol for sensors and mobile devices.
Vibration Sensor SW420
Vibration Sensor Module comes with SW-420 vibration sensor, integrated with adjustable sensitivity via on board potentiometer. There are also LED indicators for power and the digital output status on board. It has a simple and straight forward 3-pin interface, VCC, GND and the DO (digital output). It supports 3.3V or 5V power.
The DO pin will be LOW when there is no vibration, and indicator LED will lit up
NodeMCU programming with Arduino IDE
You need Arduino IDE software to program NodeMCU.
Steps for adding NodeMCU ESP8266 board and library to Arduino IDE are given below.
Open Arduino IDE. Go to File menu and select Preferences.
Copy this package and paste in Additional Boards Manager URL.
Go to Tools and select Boards Manager.
Type esp8266 in search box and press Enter.
Install the latest version.
From Tools menu, select NodeMCU 1.0 (ESP-12E module) board.
Select Include Library from Sketch menu.
Download the library from this link.
Click on Add ZIP Library and add Cayenne-MQTT-ESP-master zip file, or directly copy the folder (Cayenne-MQTT-ESP-master) and paste it in Libraries folder of Arduino IDE.
Configure Wifi setting:
Follow the Steps.
Open wifi setting in mobile
Select "Earth quake" device
After Connected device without internet, open Webpage
Enter IP 192.168.4.1, after loading Select Wifi Configure.
Confirm Switch On Your router, Select Your router
Enter your Wifi credentials SSID, Password.
After entered your credentials, the ESP8266 connected to the router.
now ESP 8266 IP address displayed in LCD display.
Hardware interfacing with Cayenne IoT platform
To interface the circuit with the IoT platform, open this link on any browser.
Click on Add new and then Device/Widget in Settings, Add New Device here and select Generic ESP8266 for in this project.
Configure device Generic ESP8266, MQTT username, password and client ID from Create App
Paste these respective details under username, password and client ID in Arduino source code , along with your Wi-Fi name and password.
After successfully compiling and uploading the code to NodeMCU, You will see ESP8266 connected to Wi-Fi. After the connection is established, the previous page is automatically updated on Cayenne. A new dashboard opens in the browser. Cayenne generates an ID and a device icon for your device.
Vibration dashboard for ESp8266.
Cayenne new trigger creation and add recipient.
Trigger ran stasus
Triggeer OFF when button to OFF state.
Email Notification when channel reached threshold condition.
Comentários