Introduction: COVID-19 Human Detector Using Tinkercad Circuits

About: I am an IoTIAN with a focus on developing IoT & STEM products and Interested in IoT & STEM Technologies

Introduction: Are you also bored in this lockdown time because you don’t have any component to make or create something which is useful for our society in this pandemic time. So, don’t worry Tinkercad is everywhere which gives you the facility is free to create or test any project or circuit.

So, in this project we are creating a COVID-19 Human Detector using Arduino, 16x2 LCD, Potentiometer, PIR Sensor & Buzzer in Tinkercad. The PIR or Passive Infrared Sensor is a digital sensor which detects the movement of infrared lights from Humans & Animals. If any infrared light is detected by the PIR sensor then the buzzer will beep and it shows the status on LCD that there is any human or not.

So, by using this circuit you can create an automated sanitize chamber or a machine to detect that there is any human or not from 7-8 m of distance. So, let’s get started by gathering the components for this project in Tinkercad.

Step 1: Components and Tool

You will need the following components and tools for creating this COVID-19 Human Detector.

Components

  1. Arduino UNO R3,
  2. Breadboard (BB),
  3. 16x2 LCD,
  4. 1k ohm Resistor,
  5. 250 k ohm Potentiometer,
  6. PIR Sensor (HC- SR501),
  7. Buzzer.


Tools

  1. Tinkercad

Step 2: Setting Up the Circuit (Give Power to the BreadBoard From Arduino)

After gathering all the components in Tinkercad this time to wiring the circuit by interfacing with each other.

So, first of all, we are giving a common +5v and GND connection on the breadboard rail as shown in the image.

Step 3: Interface 16x2 LCD With Arduino

After completing the above step this time to interfacing a 16x2 LCD with Arduino. So, for this follow the following connections and above schematic-

  1. GND pin (LCD) --> GND rail (Breadboard),
  2. Power pin (LCD) --> +5v rail (Breadboard),
  3. LED Cathode pin (LCD) --> GND rail (Breadboard) with 1k ohm resistor,
  4. LED Anode pin (LCD) --> +5v rail (Breadboard),
  5. Read/Write pin (LCD) --> GND rail (Breadboard),
  6. RS pin (LCD) --> Digital pin 1 (Arduino),
  7. Enable pin (LCD) --> Digital pin 2 (Arduino),
  8. DB4 (LCD) --> Digital pin 4 (Arduino),
  9. DB5 (LCD) --> Digital pin 5 (Arduino),
  10. DB6 (LCD) --> Digital pin 6 (Arduino),
  11. DB7 (LCD) --> Digital pin 7 (Arduino).

Step 4: Interface Potentiometer With 16x2 LCD

After interfacing LCD with Arduino this time to interfacing potentiometer with LCD for the LCD contrast. So, for this see the following connection with LCD -

  1. Terminal 1 (Potentiometer) --> +5v rail (Breadboard),
  2. Terminal 2 (Potentiometer) --> GND rail (Breadboard),
  3. Wiper pin (Potentiometer) --> Contrast pin (LCD).

Step 5: Interface PIR Sensor With Arduino

Place your PIR sensor on the breadboard and connect it with Arduino with the following Connections:

  1. GND pin (PIR) --> GND rail (BreadBoard),
  2. Power Pin (PIR) --> +5v rail (BreadBoard),
  3. Signal Pin (PIR) --> Digital pin 13 (Arduino).

Step 6: Interface Buzzer With Arduino and Complete Your Circuit

When the human detected so for this, we are using a buzzer for beeping. Interface the buzzer using the following connection

  1. Positive pin (Buzzer) --> Digital pin 9 (Arduino),
  2. Negative Pin (Buzzer) --> Ground pin (Arduino).

After interfacing all the components your circuit has been completed for Covid-19 Human Detector as shown in the above image

Step 7: Also See This Video for Setting Up the Circuit

Step 8: Writing the Code (Include the Required Libraries)

Now, we will write our COVID-19 Human Detector Code. So, in this lesson, you will learn to write code that connects the LCD, PIR sensor, Buzzer and Arduino with each other

So, first of all, in our program, we will include the required libraries. So, here we are importing the LCD library with the following command

#include <LiquidCrystal.h>

Step 9: Create a LCD Object

After that create an LCD object using LiquidCrystal() function to define the RS, EN, D4, D5, D6, D7 pin no. The code is following for defining the pins

LiquidCrystal lcd (1,2,4,5,6,7);

Step 10: Define the Global Variables

So, after importing the required libraries and creating the object next step to define all global variables for sensor and buzzer with the following code

int pir_sensor =13;

int pir_reader;

int buzzer = 9;

Step 11: Configure the Void Setup Function ()

In void setup function we define only those functions which we want to execute only one time when the program is started. So in the void setup, we are writing the following lines of code

pinMode(13,INPUT); // For set the PIR signal pin as input mode

pinMode(buzzer,OUTPUT); // For set the Buzzer pin as OUTPUT mode

lcd.begin(16,2); //Start the 16x2 LCD

lcd.setCursor(4,0); // Set the LCD Cursor using lcd.setCursor

lcd.print("COVID-19"); //Print the message on LCD

lcd.setCursor(2,1); //Again set the LCD cursor

lcd.print("HUMAN DETECTOR"); //Again print the another message on different line

delay(2000); //Set the delay

lcd.clear(); // clear the LCD

Step 12: Configure the Void Loop Function:

This is a loop function of Arduino where we define all the functions and actions which we want to run in a loop. So, in this function, we write the following lines of code

pir_reader = digitalRead(pir_sensor); // Read the pir sensor using digitalRead function

if (pir_reader ==1){ //Use the if – else condition to trigger the action when the input is high

digitalWrite(buzzer,HIGH); //Set the pin HIGH of Buzze

lcd.setCursor(4,0); //Set the cursor of LCD

lcd.print("There is"); //Print the message on LCD

lcd.clear(); //Clear the LCD

lcd.setCursor(4,1); //Set the cursor of LCD

lcd.print(" Human"); //Print the message on LCD

}

else{ //use the else condition

digitalWrite(buzzer,LOW); //Set the pin low of Buzzer

lcd.clear(); //Clear the LCD

lcd.setCursor(4,0); //Set the cursor of LCD

lcd.print("There is"); //Print the message on LCD

lcd.setCursor(4,1); //Set the cursor of LCD

lcd.print("No Human"); //Print the message on LCD

delay(500); //Give a delay

Step 13: Complete Code

Here is the complete code of COVID-19 Human Detector.

Step 14: Test the Circuit

Now test the circuit of Covid-19 Human Detector by click on Start Simulation Button. See the above video.

Some Important points about this Circuit in Real World:

  1. After powering it will take a maximum of 60 seconds for initialization,
  2. This will take 5-6 seconds for reading another entry,
  3. In the sunniest area, this sensor will not work properly,
  4. You can increase/decrease the sensitivity and time by using its inbuilt pots.

Step 15: Other Projects by Using This Circuit:

The other project ideas you can make by using only this COVID-19 Human Detector but with some modification of code:

  1. Automated Sanitize Chamber,
  2. Thief Detector.

So, think about these above projects and make your own.

Step 16: Review

So, in this COVID-19 Human Detector project, you used a PIR sensor, Buzzer, a 16x2 LCD with the potentiometer, a 1k ohm resistor, Arduino, and Tinkercad tool. You also learned to interface different components with each other.