GithubHelp home page GithubHelp logo

nauman3s / operational-equipment-efficiencysensing Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 1.0 304.66 MB

Operational Equipment EfficiencySensing Project

C++ 53.76% Processing 0.42% C 4.75% CMake 0.31% Makefile 0.10% Shell 0.17% HTML 40.14% CSS 0.06% Python 0.27% Dockerfile 0.03%

operational-equipment-efficiencysensing's Introduction

Project logo

Operational Equipment Efficieny Sensing

Status


Operational Equipment Efficieny Sensing

📝 Table of Contents

🧐 About

This repo contains

  • Firmware
  • Circuit Diagram
  • Detailed instructions

for OEESensing project.

Getting Started

These instructions will get you a copy of the project up and running on your system.

Prerequisites

Things you need to install the FW.

- Arduino IDE

Installing

A step by step series that tell you how to get the Firmware and Backend running

ESP32 Configuration

You should have Arduino IDE Installed

  1. Add ESP32 Board to your Arduino IDE 1. In your Arduino IDE, go to File> Preferences Installing ESP32 Add-on in Arduino IDE Windows, Mac OS X, Linux open preferences 2. Enter https://dl.espressif.com/dl/package_esp32_index.json into the “Additional Board Manager URLs” field then, click the “OK” button: Note: if you already have the ESP32 boards URL, you can separate the URLs with a comma(each board will go to neaw line) as follows: https://dl.espressif.com/dl/package_esp32_index.json,\n http://arduino.esp8266.com/stable/package_esp8266com_index.json

  2. Open the Boards Manager. Go to Tools > Board > Boards Manager…

  3. Search for ESP32 and press install button for the ESP32 by Espressif Systems“:

  4. That’s it. It should be installed after a few seconds.

  5. In your Arduino sketchbook directory, create tools directory if it doesn't exist yet.

  6. Unpack the tool into tools directory(present in libs/ESP32FS-1.0.zip) (the path will look like <home_dir>/Arduino/tools/ESP32FS/tool/esp32fs.jar).

  7. Close and re-open the Arduino IDE.

  8. Now copy the contents of the libs folder to the libraries directory of your Arduino

    1. If you are using windows, the libraries directory will be Documents/Arduino/libraries
ESP32 Node FW Uploading
  1. Select ESP32 Dev Module from Tools->Board->ESP32
  2. Select the correct port from Tools->Port
  3. Then open Firmware.ino file,
  4. Select Tools > ESP32 Sketch Data Upload menu item. This should start uploading the files into ESP32 flash file system.
  5. Now Upload the Code to your ESP32 Dev Module.
  6. Your ESP32 is now ready to be used.

Circuit

ESP32 Dev Module Pinout

Follow the pinout diagram given below to connect different components to your TTGO LORA32 board.

LoraPinout

Other Components

Other components pin connection details

Temperature Sensor DHT22

DHT22 Connections

DHT22 Pins ESP32 Dev Module Pins
DATA OUT 23
VCC 5V
GND GND

Vibration Sensor(MPU6050)

MPU6050 Connections

MPU6050 Pins ESP32 Dev Module
SCL 22
SDA 21
VCC 3.3V
GND GND

Status LED

LED Connections

LED Pins ESP32 Dev Module
Anode D2 via 220Ω resistor
Cathode GND
D2 is also connected to the internal LED of ESP32 Dev Module

SCT-013

SCT-013 Connections

  • Voltage Divider with 2x 100KΩ resistors.
  • 10uF capacitor connected between Voltage Divider Circuit Output and GND
  • 3.5mm Audio Jack connected between Voltage Divider Circuit Output and ESP32 Pin 34.

The overall SCT-013 connection assembly will look something like shown in the diagram below.

SCTConnection

Complete Circuit Diagram

Here's the complete circuit diagram of the system.

CircuitDiagram

Usage

  1. Power on your ESP32, it will present you with an AP named OEE (while OEE can be changed in the portal)

  2. Default captive portal password 12345678AP which can be changed in captive portal.

  3. Connect to the ESP32 access point and open the web-browser and navigate to the link http://esp32.local/_ac. This link will work on most of the operating systems but if your operating system is not allowing to open it, you may want to check the captive portal IP Address from the serial monitor and can use that IP address inplace of the above mentioned URL.

  4. The default access IP Address is http://192.168.4.1/_ac

  5. You will be presented with a main dashboard as shown below(based on your device) SCR1

  6. Once connected to a WiFi network, you can again access the captive portal using same URL or the IP Address from the Serial monitor.

  7. The data is published to the MQTT Topic OEE/{hostname} while the hostname is the one which you can define in Settings page of the captive portal.

The whole system is following the flowchart given below:

flow

Changing Timezone

  1. Open Settings tab
  2. Enter timezone string from https://en.wikipedia.org/wiki/List_of_tz_database_time_zones 'TZ database name' column.
  3. Click Save&Start

API Endpoints and HTML URLS

API Endpoints

Endpoint Description
/api-now API: live sensor readings in JSON format
/api API: historical sensors data in JSON format
/LiveSensors HTML PAGE: Live Sensor Data
/data HTML PAGE: Historical Sensor Data
/mqtt_settings HTML PAGE: Settings. Default username: AP Name, Default Password: admin
/_ac HTML PAGE: Main Captive portal page
/ HTML PAGE: Historical Sensor Data
  1. Connect to WiFi tab allows searching of nearby WiFi APs and adding them to the ESP32. SCR3
  2. Saved WiFi Networks tab allows connecting to the saved access points. SCR4
  3. Reset... tab allows reseting of the device to factory settings. SCR5
  4. Settings tab contains settings related to MQTT and sensors. SCR6
  5. api-now tab gives the live-sensor data in JSON format. SCR7
  6. api tab gives the historical sensor data acquired after every 5 mintues. SCR9
  7. LiveSensors tab shows live values of the sensors. SCR8
  8. HOME tab shows historical sensor data in a HTML table form acquired after every 5 minutes. SCR10

List of Components

Following components are used to make this project

  1. ESP32 Dev Kit Module https://www.amazon.com/HiLetgo-ESP-WROOM-32-Development-Microcontroller-Integrated/dp/B0718T232Z/ref=sr_1_3?crid=5EOAXOANUSCU&dchild=1&keywords=esp32+nodemcu&qid=1629587138&sprefix=esp32+node%2Caps%2C201&sr=8-3

  2. Current Sensor (SCT-013) https://www.amazon.com/dp/B083S6YG36/ref=sspa_dk_detail_2?psc=1&pd_rd_i=B083S6YG36&pd_rd_w=lyRRH&pf_rd_p=887084a2-5c34-4113-a4f8-b7947847c308&pd_rd_wg=ARQkk&pf_rd_r=9X6KNTP47QE6X1QG8RGX&pd_rd_r=92990704-e6cd-4c90-9b74-93726cb99938&smid=A1G4TRJSF885ET&spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUFWVzdCSUhXNFU2VEwmZW5jcnlwdGVkSWQ9QTAxODU2MTcxQjNFVUI5M1ZTSUEwJmVuY3J5cHRlZEFkSWQ9QTA3OTA4NTcxR0ZGQ1JOQUFHSFFPJndpZGdldE5hbWU9c3BfZGV0YWlsJmFjdGlvbj1jbGlja1JlZGlyZWN0JmRvTm90TG9nQ2xpY2s9dHJ1ZQ==

  3. DHT22 Temperature and Humidity Sensor https://www.amazon.com/Gowoops-Temperature-Humidity-Measurement-Raspberry/dp/B073F472JL/ref=sr_1_7?dchild=1&keywords=dht22&qid=1624855583&sr=8-7

  4. Vibration Sensor (IMU) (MPU6050) https://www.amazon.com/HiLetgo-MPU-6050-Accelerometer-Gyroscope-Converter/dp/B00LP25V1A/ref=sr_1_1?dchild=1&keywords=mpu6050&qid=1624855642&sr=8-1

  5. Generic 3.5mm Green LED

  6. Generic 3.5mm Audio Jack

  7. Generic 10uF 25v Capacitor

  8. Generic 220Ω and 100KΩ resistors

  9. Generic 5V USB Micro B cable and adapter.

⛏️ Built Using

  • Python - For Cloud Gateway Pogramming
  • Arduino - Embedded Framework and IDE - For Sensor Node Design

📹 Demo Videos

✍️ Authors

operational-equipment-efficiencysensing's People

Contributors

nauman3s avatar

Watchers

James Cloos avatar  avatar

Forkers

astonix

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.