Face Mask Detector => Covid Preventer!

by nallajp in Circuits > Arduino

1440 Views, 2 Favorites, 0 Comments

Face Mask Detector => Covid Preventer!

WhatsApp Image 2020-06-21 at 6.02.00 PM.jpeg
mask_detector

The number 1 thing health officials want people to do during this pandemic is to wear a mask when going out to public places, but some people still turn a blind eye to the warning.

Enter ..... COVID PrevEnter!

This robot uses the Pixy2 camera to detect the mask. If the mask is found the green LED will turn on. If the mask is not found the red LED will turn on with a buzzer beep.

Supplies

Hardware

Pixy2 Camera

Arduino(I am using an Arduino nano but uno or mega will work.Other models will not work)

LED*2(Red*1 and Green*1)

220 Ohm Resistor*2

Piezo Buzzer

Breadboard

Novoo battery

Jumper wires

Cable- Micro USB to USB(for programming and power)

Software

Arduino IDE

Pixymon v2

Train Pixy2 to Mask

Screenshot (18).png
Screenshot (17).png
Screenshot (19).png

Connect Pixy2 to a computer and open pixymon.

Point Pixy2 at a mask.

Go to actions-set signature 1.

Drag click to draw a box in the center of the mask.

It should show a box around the mask and in the center, it will say s=1.

Go to file-configure and select signature labels.

Type face mask into signature1 box.

It should show the same thing but it will say face mask instead of s=1.

Connect Everything Up

arduino_contest_circuit.jpg

First, connect the Arduino GND to Breadboard.

Next, connect LED's and Buzzer GND to GND.

After that connect LED 5V to the resistor.

Connect the green LED resistor to pin 8 and red LED to pin 9.

Connect Buzzer 5V to pin 7.

Connect pixy2 to Arduino using given cable(On the pixy2 it is keyed but on the Arduino orientation matters, if you are using an Arduino nano the cable faces inwards but if you are using uno or mega cable faces outward).

Install Libraries

Screenshot (26).png
Screenshot (25).png
Screenshot (27).png

The Pixy2 uses a library to make code simpler. To install it follow these steps:

Go to the Pixy2 downloads page and download the zip library.

Open the Arduino IDE.

Click sketch-libraries-add zip library.

Find the zip file you downloaded and select it.

Code

Screenshot (21).png
Screenshot (22).png
Screenshot (23).png

Upload the attached code.

Thank You

AD19-Thanks-Newsletter-1024x559.jpg

Thank you for reading this instructable. If you like this project please vote for it in the Arduino contest.