Twitter icon
Facebook icon
LinkedIn icon
Google icon
Reddit icon
StumbleUpon icon
Del.icio.us icon

CoGate

Added to IoTplaybook or last updated on: 07/20/2020
CoGate

Story

CoGate

CoGate

A smart AI-based gate which will open if the person will be wearing the mask with a sanitizing pathway based on liquid sanitizing for humans and UV sanitization for electronic gadgets.

Introduction & the Problem.

There is widespread Corona Virus in the entire world and we have no solution rather have precautions and wearing masks is one of the essential. Since we found many people are entering without the mask to offices so I made this project.

As per the problem, we have come with an excellent solution which will solve this problem.

Introducing CoGate, a smart AI-based gate that will only allow those who will be wearing masks and not allow who are not having masks.

Things used in this project

Hardware components

Arduino UNO & Genuino UNO
Arduino UNO & Genuino UNO
 
× 1

Newark

Adafruit

Arduino Store

CPC

Webcam, Logitech® HD Pro
Webcam, Logitech® HD Pro
 
× 1

Newark

SG90 Micro-servo motor
SG90 Micro-servo motor
 
× 1

Adafruit

Ultrasonic Sensor - HC-SR04
SparkFun Ultrasonic Sensor - HC-SR04
 
× 1

Sparkfun

Jumper wires (generic)
Jumper wires (generic)
 
× 1

Newark

 

Software apps and online services

Arduino IDE
Arduino IDE
 
  Arduino
VS Code
Microsoft VS Code
 
 

Visual Code Studio

 
p5.serialcontrol
 
  GitHub
 
Google Teachable Machine
 
 

Google
Teachable 
Machine

 
p5.js
 
  P5*js

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
 
   
Wire Stripper & Cutter, 18-10 AWG / 0.75-4mm² Capacity Wires
Wire Stripper & Cutter, 18-10 AWG / 0.75-4mm² Capacity Wires
 
 

Newark

Introduction & the Problem.

There is widespread Corona Virus in the entire world and we have no solution rather have precautions and wearing masks is one of the essential. Since we found many people are entering without the mask to offices so I made this project.

As per the problem, we have come with an excellent solution which will solve this problem.

Introducing CoGate, a smart AI-based gate that will only allow those who will be wearing masks and not allow who are not having masks.

CoGate : How it works?

  • The AI-based Gate: The gate is based on realtime Computer Vision and Machine Learning. It is built with a camera that is connected with Google's Teachable Machine Image processing platform. The camera will detect whether the person is wearing a mask or not. If the person will be wearing the mask then it will send the signal to open the gate, to the microcontroller (here, Arduino) via Serial Port Interface (we are using p5 Serial Port). If the person will not be wearing a mask then the gate will not open.
  • The UV & Sanitizing Chambers:The pathway of CoGate will also have a sanitizing chamber, of liquid for humans and a UV sanitizing chamber for electronic gadgets, and at the last, there'll be another gate to let the person enter into the office/building.
  • The crowd controller: The last gate can be used as a counter (in malls especially) to enter a particular number of people to avoid crowds over that place.

Installing the AI-Based Mask Detector:

  • Download the Zip file. And store it in your local directory.
  • As per the circuit diagram, connect the Arduino.
  • As per the circuit diagram, connect the Arduino.
  • Open CoGate folder in any HTML editor and go to sketch.js and change the COM Port according to your COM Port.
  • Connect your device's serial port. Download and unzip p5.js serial control program. Connect your device to USB and run the p5.serialcontrol.exe (for Windows). You may have to set it allowed to run in your antivirus program.
  • Employ the power of AI!Upload the code(below) to Arduino
#include <Servo.h>
  Servo myservo;
  char result;

  void setup() {
     Serial.begin(9600);
      myservo.attach(9);
     myservo.write(90);
  }

  void loop() {
      while (Serial.available() > 0) {
          result = Serial.read();
          switch (result) {
              case '2':
                   myservo.write(90); 
                 break;
         }
      }
      delay(100);
  }
  • Run the index.html and make sure that you are connected to the internet.
  • Now you are good to go!

Some working Images:


1 / 5


2 / 5


3 / 5


4 / 5


5 / 5

Thank You!

Schematics

Servo Connection

Here I've used two servos, but you can use one for the experiment.

 

Code

CoGate

saswatsamal / CoGate

Wearing mask, please enter! — Read More

Latest commit to the master branch on 6-14-2020  - Download as zip

Credits

Saswat Samal

  Saswat Samal

 

 

Hackster.io

This content is provided by our content partner Hackster.io, an Avnet developer community for learning, programming, and building hardware. Visit them online for more great content like this.

This article was originally published at Hackster.io. It was added to IoTplaybook or last modified on 07/20/2020.