A IoT based system that allows the user to keep an eye on their dog or pet and observe if they are accessing an area unaccompanied and interacting with the owner's belongings.

Overview

IoT_Smart_Dog_Collar

Objective

Our goal is to develop a system that allows the user to keep an eye on their dog or pet and observe if they are accessing an area unaccompanied and interacting with the owner's belongings. In our example, a user's pet dog loves moving and knocking over a garbage can while the user is not there. Our solution would allow the user to observe the dog's state without having to constantly monitor it.

Design

Two raspberry pis will be used to receive data from the MPU sensors on the dog and garbage can, respectively. Our third device can be a laptop or Raspberry Pi that will operate the MQTT broker, web server for the web page UI, and triangulation computation. Three BLE beacons are also required to locate the dog in the room. Aside from that, we will need one additional BLE beacon installed on the garbage can to precisely detect if the dog is near the trash can.

The user attaches a raspberry pi with an MPU sensor on the dog to read movement data and assess whether or not the dog is moving. This gadget also serves as a receiver for Bluetooth Low Energy beacons. We triangulate the dog's position based on the relative signal intensity between the receiver and each beacon. The user additionally attaches a Raspberry Pi with an MPU sensor to the garbage can. This will detect if the garbage can is moving or not and whether it is in risk of being dealt with. If the dog is near the garbage can (identified by the RSSI intensity generated by a beacon on the trash can) and both of them are moving, we may believe the trash can is in danger. We then publish this data via MQTT so that the appropriate devices may receive and process it.

We can now display the data for the dog's status, location, the garbage can's state, and whether or not the can is being interacted with on a UI. The UI is hosted on a web server on the MQTT broker device. The web server will be a listener to the MQTT topics that the other devices are publishing to, allowing it to quickly display the required information and be replaced in the future if a new UI is chosen. Because it is a web page, it may be accessed from any device on the local network.

Demo

For the Demo of the live project please follow the link

Environment

  • Python 3.7.3

Requirements

Software

  • Python3 3.7.3
  • paho-mqtt==1.6.1
  • numpy==1.19.5
  • mosquitto
  • wiotp-sdk
  • requests==2.25.1
  • RPi.GPIO==0.7.0
  • MATLAB
  • beacontools==2.1.0
  • gattlib==0.20201113
  • mpu6050-raspberrypi==1.2
  • Pillow==8.1.2
  • PyBluez==0.23
  • requests-oauthlib==1.0.0
  • responses==0.12.1
  • sympy==1.10.1
  • urllib3==1.26.5

Follow this link and follow the steps to install Bluez

pip install requirements.txt

Hardware

  • x2 Raspberry Pi 3b
  • x2 MPU6050 Accelerometer + gyro
  • x4 Mobile phones with bluetooth
  • 2 Power bank

To setup the hardware for both Pis, connect the following raspberry pi GPIO pins to the corresponding MPU pins.

GPIO 2 to SDA,
GPIO 3 to SCL,
5V to VCC,
GND to GND

Procedure

To Track Dog's Status

  1. Attach smart harness to dog
  2. Setup up other raspberry pi on trashcan
  3. ssh into both raspberry pis from a laptop
  4. setup the three bluetooth beacons at locations inducated on UI
  5. On the laptop, run the mqtt broker, the UI client and the code Laptop/laptop.py
  6. On the trashcan Pi, run trashCan.py in the RPi_Trash_Can folder
  7. on the smart harness, run dogPub.py in the RPi_dog folder
  8. next on the smart harness, run ble_detection.py in the Triangulation folder

Once everything is connected and running, the UI should display the status of the dog and trashcan, and should start plotting the coordinates it is calculating from the RSSI values.

To Graph MPU Data:

  1. Attach smart harness to dog
  2. run "python3 RPi_dog/dog_movement_collection/dataCollect.py"
  3. Follow along with prompts: Select task and name file
  4. Have dog complete task
  5. Program will end once dog remains still for 2-3 seconds
  6. Move new files onto a seperate device which has MATLAB installed
  7. run the MATLAB script "dogGraph.m"
  8. Follow prompts: give file name and title for graph
  9. Plot will be generated with accelerometer and gyro data
You might also like...

Our pre-processed MRI and PET images from ADNI-1/ADNI-2

Our pre-processed MRI and PET images from ADNI-1/ADNI-2

MRI-and-PET-data-from-ADNI Pre-processed MRI and PET images from ADNI-1/ADNI-2(https://adni.loni.usc.edu/) GitHib is so hard to upload large file, we

Oct 9, 2022

My machine learning pet project on (E-Commerce product reviews) with (Pairwise Ranking and Sentiment Analysis)

URL: https://www.projectpro.io/project-use-case/ecommerce-product-reviews-ranking-sentiment-analysis Problem description E-Commerce applications provi

Nov 18, 2022

Python tool for interacting with URLScan.io's API: Submit suspicious URL's to be scanned by their site and submit UUIDs to retrieve the data associated with that scan.

Yall Scan Python tool for interacting with URLScan.io's API. Submit suspicious URLs to be scanned by their website and submit UUIDs to retrieve the as

Nov 11, 2022

A Python flask based application which shortens a url provided by user whether they are registered or not.

URL Shortner A python flask application to shorten the URL provided by users whether registered or not. Free software: MIT license Documentation: http

Aug 16, 2022

When They Open Their Pin Code This Will Auto Change The Pin To Whatever You Want, Made By blob#0005

Roblox-Pin-Code-Sniper Setup: download python (https://python.org) open the file that u downloaded click add to path then next wait until its done ope

Jun 19, 2022

Code and Data repository for the paper titled "An IoT enabled system for enhanced air quality monitoring and prediction on the edge"

This is the code and data associated with the paper titled: "An IoT enabled system for enhanced air quality monitoring and prediction on the edge" The

Aug 14, 2022

A telegram bot in python capable of managing connection to the official Google scholar page available and interacting with the user to download the desired papers.

Google Scholar Bot Hello there! This is my first telegram bot in python, and it's capable of managing connection to the official Google Scholar page a

May 5, 2022

Geekshub is a Website which allows users, who sign-up for free profiles, to connect with friends, work colleagues or people they don't know, online

Geekshub is a Website which allows users, who sign-up for free profiles, to connect with friends, work colleagues or people they don't know, online. It allows users to share pictures, posts, and articles, as well as their own thoughts and opinions with however many people they like.

Sep 9, 2022

Random batch methods for binary interacting particle system.

Random batch methods for binary interacting particle system.

Random Batch Random batch methods (RBM) for interacting particle system (IPS) Brief Introduction to IPS and RBM Binary interacting particle system IPS

May 3, 2022
Owner
Priyam Garg
A First-Year Graduate Student. Experienced in Android App Development and Machine Learning. Highly Interested in Research.
Priyam Garg
An IoT-based house managing system in the ThingsBoard IoT platform. Transferring data with the server by MQTT protocol.

Simulation-of-a-Smart-House About In this project, we will simulate a smart house equipped with IoT devices to control and monitor the lights, open an

Siavash 2 Sep 20, 2022
System that allows a user to checkout and return library books, and creates recommendations for them based on what books they have previously read.

LibraryManagmentSystem System that allows a user to checkout and return library books, and creates recommendations for them based on what books they h

Olivia Gray 1 Aug 15, 2022
Eye-MMS: Miniature multi-scale segmentation network of key eye-regions in embedded applications

This is the official repository of the paper: Eye-MMS: Miniature multi-scale segmentation network of key eye-regions in embedded applications Eye-MMS:

Fadi Boutros 3 Aug 7, 2022
A Python script to translate eye movements to mouse cursor movements. A blink of the eye initiates the click event.

Eye-Controlled-Mouse-Cursor This program is a Python script that tracks the movement of your eyes and translates it as mouse movements on screen. The

Lestlin Robins 1 Aug 29, 2022
Built a GUI Based Face Recognition Module. Functionality that allows people to register their faces along with their name and enrollment number to make a paperless and smooth attendance system.

Face_recognition_based_attendance_system A python GUI integrated attendance system using face recognition to take attendance. In this python project,

null 1 Oct 25, 2022
Observe FastAPI app with three pillars of observability: Traces (Tempo), Metrics (Prometheus), Logs (Loki) on Grafana through OpenTelemetry and OpenMetrics.

FastAPI with Observability Observe FastAPI application with three pillars of observability on Grafana: Traces with Tempo and OpenTelemetry Python SDK

Blueswen 72 Nov 22, 2022
A package to generate, propagate and observe mock populations of fast stars in the Galaxy

Welcome to speedystar Python toolkit for the generation of mock catalogues of high-velocity stars Description speedystar allows you to generate, evolv

null 1 Aug 18, 2022
A web application that would provide a public, accessible resource that helps educate consumers about the brands they support so they can make well-informed, more ethical decisions.

hackKU3.0 Hackathon Project for HackKU 2022 Clarity Inspiration Our ultimate vision is to create a platform where users can look up a company's name a

Morgan Bergen 1 Aug 24, 2022