{"id":20610182,"url":"https://github.com/ganeshkumartk/vibscope","last_synced_at":"2025-07-20T21:32:40.442Z","repository":{"id":56673327,"uuid":"174075166","full_name":"ganeshkumartk/viBscope","owner":"ganeshkumartk","description":"DEVELOPMENT OF Low Cost IoT BASED VIBRATION MONITORING AND SPECTRUM ANALYSIS SYSTEMS FOR TECHNICAL OBJECTS","archived":false,"fork":false,"pushed_at":"2020-10-26T05:04:22.000Z","size":54404,"stargazers_count":10,"open_issues_count":2,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-15T04:38:53.324Z","etag":null,"topics":["hacktoberfest","raspberry-pi","spectrum-analysis-systems","vibration-monitor","vibrational-analysis"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ganeshkumartk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-06T05:05:13.000Z","updated_at":"2025-02-07T02:26:34.000Z","dependencies_parsed_at":"2022-08-15T23:00:56.470Z","dependency_job_id":null,"html_url":"https://github.com/ganeshkumartk/viBscope","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ganeshkumartk/viBscope","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ganeshkumartk%2FviBscope","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ganeshkumartk%2FviBscope/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ganeshkumartk%2FviBscope/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ganeshkumartk%2FviBscope/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ganeshkumartk","download_url":"https://codeload.github.com/ganeshkumartk/viBscope/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ganeshkumartk%2FviBscope/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266204510,"owners_count":23892360,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","raspberry-pi","spectrum-analysis-systems","vibration-monitor","vibrational-analysis"],"created_at":"2024-11-16T10:15:50.826Z","updated_at":"2025-07-20T21:32:40.397Z","avatar_url":"https://github.com/ganeshkumartk.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e VibScope \u003c/h1\u003e \u003cbr\u003e\n\u003cp align=\"center\"\u003e \n  \u003ca href=\"https://github.com/CoDeRgAnEsh/viBscope\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n   ![forthebadge](https://forthebadge.com/images/badges/made-with-python.svg) \n  ![forthebadge](https://forthebadge.com/images/badges/powered-by-electricity.svg)\n![forthebadge](https://forthebadge.com/images/badges/built-with-love.svg)\n![forthebadge](https://forthebadge.com/images/badges/check-it-out.svg)\n\n# Vibrational Analyser\nDEVELOPMENT OF IoT BASED VIBRATION MONITORING AND SPECTRUM ANALYSIS SYSTEMS FOR TECHNICAL OBJECTS\n\n//Done as a course project//\n![Example screenshot](./Resources/20190409_160852.jpg)\n\n\n## Table of contents\n* [Objective](#objective)\n* [Screenshots](#screenshots)\n* [Technologies](#technologies)\n* [Bill of Materials](#bill-of-materials)\n* [Getting Started](#getting-started)\n* [Setup](#setup)\n* [Features](#features)\n* [Status](#status)\n* [Gallery](#gallery)\n* [Collabrations](#collabrations)\n* [Contact](#contact)\n\n# Objective\n\n* To design a low cost alternative to vibration monitor and spectrum  analyzer using the Raspberry Pi microcomputer and 3-axis digital MEMS MPU6050 accelerometer.\n* To study if inexpensive vibration monitoring systems could be suitable for condition monitoring\n* To highlight  the  impact  of  different components  of  the  signal  chain  to  the  measured  vibration  signal  itself  and  familiarize the reader with the signal chain found in vibration monitoring. \n* To analyze vibration parameters in order to predict and prevent possible accidents, thus reducing the costs associated with the failure of the cutting tools, expensive parts and assemblies of the CNC machine.\n\n## Screenshots\n![Example screenshot](./Resources/Screenshot_2.png)\n![Example screenshot](./Resources/Screenshot_3.png)\n\n## LabVIEW UI\n![LabVIEW implementation](./LabVIEW/5.PNG)\n\u003ch5 align=\"center\"\u003e LabVIEW UI for FFT based Vibrational analysis \u003c/h5\u003e \u003cbr\u003e\n\n## Technologies  \n* Python \u0026 Matlab\n* IoT integration\n\n## Bill of materials\n\n ### Electronic components \n\n| Component             |        Description       |     Source      |                          Price (Rs.)                            |\n| -------------         |:-------------:           |:-----:          | -----:                                                    |\n| Raspberry Pi 3 Model B   | Version 1.2              |[Amazon](https://www.amazon.in/Raspberry-Pi-Model-RASP-PI-3-Motherboard/dp/B01CD5VC92/)|       2750            |\n| MicroSD Card   | 8GB              |[Amazon](https://www.amazon.in/Kingston-Class-Micro-SDHC-Memory/dp/B007W0NFCG)|       230            |\n| SD Card Reader   | SD card adapter for writing   |[Amazon](https://www.amazon.in/i2choose-Quantum-5570-Card-Reader/dp/B073SWMV1G)|       40            |\n| Jumper wires (F-F)             | Connects the RPi to Sensor |Local shop | 30 /10 wires |\n| MPU6050         | Accelerometer and Gyroscope     |[Sparkfun](https://www.sparkfun.com/products/11028)  |   190       |\n\n## Getting started\nLet's get started! First thing first, solder the MPU6050 with breakout board pins and connect to the Raspberry Pi for the best results. Other means of connection, such as jumper wires or connectors are discouraged as they might disconnect during usage. \n\nNow, we are also going to need a few tools, so downloading them now is a good idea.\n\n### Tools\n- [Etcher](https://etcher.io/) - SD Card flasher\n- [Advanced IP Scanner](https://www.advanced-ip-scanner.com) - IP Scanner\n- [Putty](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html) - SSH client\n- [VNC Viewer](https://www.realvnc.com/en/connect/download/viewer/) - RDP client\n\n\n### Raspbian Jessie Lite\n\nDownload and flash [Raspbian Jessie Lite](http://downloads.raspberrypi.org/raspbian_lite/images/raspbian_lite-2017-07-05/2017-07-05-raspbian-jessie-lite.zip) on a micro SD card (preferably a 8GB one) with [Etcher](https://etcher.io/), or an alternative flasher. We will be using the lite version of Raspbian since we will not need a video output or many of the software packages that come with the Desktop version. \n\nAfter flashing the OS on the SD card, we need to enable the SSH server and connect it to a Wireless Access Point in order to communicate with it. Open the micro SD card directory from your File Explorer and create an empty file called ***ssh***. \nCreate another file called ***wpa_supplicant.conf*** with the following text:\n\n```\nctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev\nupdate_config=1\nnetwork={\n    ssid=\"YOUR_SSID\"\n    psk=\"YOUR_PASSWORD\"\n    key_mgmt=WPA-PSK\n}\n```\nWhere *YOUR_SSID* and *YOUR_PASSWORD* are the SSID and Password of your WiFi router.\n\nThis is what your /boot directory should look like now\n\u003cimg src=\"/Resources/Inkedssh_wpa_LI.jpg\" alt=\"Boot directory\"\u003e\n\nThe Raspberry Pi Zero W on boot will read these two files and automatically enable the SSH server and connect it to your WiFi router.\n\nNow eject the micro SD card, put it in the Raspberry and power it on with a micro USB cable.\n\nNow your Pi should have connected to your router, and we need to find out its IP address. An easy way to do this is to use [Advanced IP Scanner](https://www.advanced-ip-scanner.com).\n\u003cimg src=\"/Resources/ip_scanner.jpg\" alt=\"IP scan\"\u003e\n\nNow that we have found out the IP address, let's SSH into it. We'll use [Putty](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html) for that.\n\u003cimg src=\"/Resources/putty.jpg\" alt=\"Putty\"\u003e\n\nYou'll be asked username and password. \n\u003cimg src=\"/Resources/login.jpg\" alt=\"Putty login\"\u003e\n\nThe default user name is:\n```\npi\n```\nAnd the default password is:\n```\nraspberry\n```\nNow you should be logged in. It is advised to change these credentials for safety reasons.\n\u003cimg src=\"/Resources/logged_in.jpg\" alt=\"Putty logged in\"\u003e\n\nWe're all set! Let's move forwards by installing some essentials modules.\n\n**Note that all the following commands will be executed on the Raspberry Pi Zero W through the Putty SSH session.**\n\n---\n### Python\nPython will be used to read from the sensors and transmit the data to Node-RED via mqtt\n```\nsudo apt-get install python-2.7 python-pip\n```\nNow let's install the Scipy, Numpy, Matplotlib and pyplot library for Python\n```\nsudo apt-get install build-essential gfortran libatlas-base-dev python-pip python-dev\nsudo pip install --upgrade pip\nsudo apt install python-numpy python-scipy python-matplotlib\n```\nIn order to read from the I2C from Python, we need to install the smbus module\n```\nsudo apt-get install python-smbus\n```\nThis library is needed so that Python can read from the MPU6050 sensor\n```\nsudo apt-get install build-essential python-pip python-dev python-smbus git\nsudo pip install mpu6050-raspberrypi\n```\n---\n\n## Setup\n \n Clone this repository in your /home/pi directory of your Raspberry Pi.\n \nTo clone and run this application, you'll need [Git](https://git-scm.com) installed on your computer. From your command line:\n\n```bash\n# Clone this repository\n$ git clone https://github.com/CoDeRgAnEsh/viBscope\n```\n To run the program for callibrating MPU6050 accerleometer, open the *Src* folder\n```\ncd /home/pi/vibscope/Src\n```\nAnd run the following program\n```\npython /home/pi/vibscope/Src/g.py\n``` \nTo run the program for realtime MPU6050 accerleometer readings and graph, open the *Src/live* folder\n``` \npython /home/pi/vibscope/Src/live/record.py\n``` \nTo run the program for realtime logging MPU6050 accerleometer readings and graph, open the *Src/log* folder\n``` \npython /home/pi/vibscope/Src/log/Start.py\n``` \nTo run the program for Vibrational analysis MPU6050 accerleometer readings and graph, open the *Src/Vibrational Analysis* folder\n``` \npython /home/pi/vibscope/Src/Vibrational analysis/MPU.py\n``` \n\n**Note** use your own Pi IP address that you found with [Angry IP Scanner](https://angryip.org/download/)\n\n## Code Examples\nPython implementation of RMS time plot\n```python\n#Compute RMS and Plot\ntic = time.clock()\nw = np.int(np.floor(Fs)); #width of the window for computing RMS\nsteps = np.int_(np.floor(N/w)); #Number of steps for RMS\nt_RMS = np.zeros((steps,1)); #Create array for RMS time values\nx_RMS = np.zeros((steps,1)); #Create array for RMS values\nfor i in range (0, steps):\n\tt_RMS[i] = np.mean(t[(i*w):((i+1)*w)]);\n\tx_RMS[i] = np.sqrt(np.mean(x[(i*w):((i+1)*w)]**2));  \nplt.figure(2)  \nplt.plot(t_RMS, x_RMS)\nplt.xlabel('Time (seconds)')\nplt.ylabel('RMS Accel (g)')\nplt.title('RMS - ' + file_path)\nplt.grid()\ntoc = time.clock()\nprint(\"RMS Time:\",toc-tic)\n```\n\nMatlab FFT \u0026 Power Spectral Density plot\n\n```matlab\n    %Compute FFT \u0026 PSD\n    Fs = fActual;\n    x = datalist(:,2);     \n    N = length(x);\n    freq = 0:Fs/length(x):Fs/2;\n    xdft = fft(x);\n    xdft = xdft(1:floor(N/2)+1);\n    psdx = (1/(Fs*N)) * abs(xdft).^2;\n    psdx(2:end-1) = 2*psdx(2:end-1);\n    psdx = psdx';\n    xdft = 1/length(x).*xdft;\n    xdft(2:end-1) = 2*xdft(2:end-1);\n    xdft = xdft';\n    phase = unwrap(angle(xdft));\n    xdft = abs(xdft);\n```\n\n\n\n\n## Features\nList of features ready and TODOs for future development\n* FFT plot GUI for input signals\n* Accerleometer data logging\n* Matlab implementation of Analysis\n\nTo-do list:\n* Instead of Signal simulation, use data from accerlometer.\n* Hardware and Software bindings\n* IoT implementation.\n\n## Status\nProject is: _in progress_ !\n\n## Gallery\nCheck out the Snaps from [here](https://drive.google.com/open?id=1brYf8YWGJxZcrrcRJvZ1mOswZXJb9st3)\n\n# Collabrations\n\n     Ganesh Kumar T K (MSM17B034)\n     Dhilipan S (MSM17B002)\n     Chandralekha R (MSM17B027)\n     Ext. Avital Bhaptakri (3rd Yr, Mech, NIT Raipur)\n\n## Contact\nCreated by [@coderganesh](https://github.com/CoDeRgAnEsH) - feel free to contact me!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fganeshkumartk%2Fvibscope","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fganeshkumartk%2Fvibscope","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fganeshkumartk%2Fvibscope/lists"}