Giter VIP home page Giter VIP logo

tai-min / thingy-91-condition-based-maintenance Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 0.0 28.1 MB

Simple IoT / LTE low power vibration sensor with on board fault classifier, Edge Impulse Machine Learning Prize winner in Make it Smart with Nordic Thingy:91

Home Page: https://www.electromaker.io/project/view/contactless-condition-based-maintenance-of-dc-motor

CMake 0.05% C 82.01% Python 0.23% C++ 17.72%
edge-impulse iot lte mqtt sensor zephyr arduino

thingy-91-condition-based-maintenance's Introduction

Thingy-91-Condition-Based-Maintenance

Repository for Condition Based Maincenance, which was submitted for Make it smart with Nordic Thingy:91 and has won "Edge Impulse Machine Learning Prize".

The main part of this project is a simple Thingy:91 based IoT sensor for condition based maintenance of power generators. The sensor uses built in high G accelerometer to perform vibration classification using FFT, PCA and simple feedforward neural network on the edge. Sensor's outputs are RGB LED visuals (alerts, warnings, info) along with MQTT messages sent over LTE.

Sensor's pipeline can be seen below: Sensor's pipeline

This repository contains source code for the sensor itself as well as project files for simple Arduino based test bench that was used to simulate motor's vibrations during different types of defects.

The test bench can be seen here: Testbench

Folder structure

Thingy:91 sensor project files

  • thingy
    • application - source code for the uC application
    • pca_dataset_collector - Python 3 script that is used to collect samples from the sensor and create C source code with custom PCA algorithm
    • neural_dataset_collector - Python 3 script to collect Edge Impulse friendly dataset from PCA samples obtained from the sensor

Test bench project files

  • workbench
    • controller - Arduino / PlatformIO source code for the workbench controller
    • gui - Python 3 / Qt5 GUI application to control state of the workbench via serial port and MODBUS
    • schematics - KiCAD schematic of the workbench
    • stl - files 3D printable motor and sensors mounts

Recreating the project

Test bench

  1. Print files from workbench/stl folder and assemble as in image above
  2. Connect electronics as in workbench/schematics
  3. Upload workbench/controller to Arduino UNO using PlatformIO
  4. Now you can run workbench/gui and controll the state of the of the workbench

Sensor (default)

  1. Simply upload the ready to use code from this repo using nrf SDK 1.9.1 and nRF Connect for VS Code

Sensor (full pipeline)

  1. Uncomment //#define PRINT_MAGNITUDES in thingy/application/main.cpp and upload the code to Thingy:91
  2. Run thingy/pca_dataset_collector/pca_sample_collector.py for some time changing test bench's state
  3. Run thingy/pca_dataset_collector/pca_creator.py
  4. Copy thingy/pca_dataset_collector/pca.h and pca.c to thingy/application/include and src folders
  5. Comment //#define PRINT_MAGNITUDES and uncomment //#define PRINT_PCA, then upload the code again
  6. Open thingy/neural_sample_collector and change label to given use case (i.e "bearing_fault"), then run it for some time with test bench in the same use case (i.e in bearing fault simulation). Repeat for each use case ("bearing_fault", "motor_throttle", "running", "stopped")
  7. Create Edge Impulse model (20Hz sampling frequency, 50ms window increase and 500ms window size) and generate C++ library
  8. Overwrite content in thingy/application with source code obtained from new C++ library
  9. Comment //#define PRINT_PCA and upload the code again
  10. Done!

thingy-91-condition-based-maintenance's People

Contributors

tai-min avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

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.