Sheshank Kindalkar
Published © GPL3+

Sharabha - |||

An automatic alerting device that prevents from getting infected from COVID-19 by touching a surface with virus present in it.

IntermediateFull instructions provided4 hours1,404
Sharabha - |||

Things used in this project

Hardware components

Arduino Nano R3
Arduino Nano R3
Any Model of Arduino can be used in this Project. But using nano strikes two things primarily it reduces cost and secondly, it save extra space.
×1
Ultrasonic Sensor - HC-SR04 (Generic)
Ultrasonic Sensor - HC-SR04 (Generic)
Objective: Detection
×3
Buzzer
Buzzer
Objective: Alert Signal
×1
Gravity:Digital Push Button (Yellow)
DFRobot Gravity:Digital Push Button (Yellow)
Objective: Circuit On/Off
×1
Rechargeable Battery, 3.7 V
Rechargeable Battery, 3.7 V
Objective: Power the Circuit
×1
Resistor 1k ohm
Resistor 1k ohm
×1
Mountable Clipboard Clips with Rubber Feet
×1

Software apps and online services

Arduino IDE
Arduino IDE
Objective: Programming the Arduino Board

Hand tools and fabrication machines

3D Printer (generic)
3D Printer (generic)
Objective: Printing the external Case
Soldering iron (generic)
Soldering iron (generic)
Objective: Soldering the Electrical Components
Multitool, Screwdriver
Multitool, Screwdriver
Objective: Fix Screw and other Electrical Components

Story

Read more

Schematics

Sharabha - ||| Advanced Circuit Diagram ( Using Arduino Nano)

This is the Advanced Circuit Diagram using an external battery and Arduino Nano.

Sharabha - ||| Basic Circuit Diagram

The Circuit Diagram Provided is a Basic Circuit Diagram with minimum features. You can make changes according to your requirement.

Code

Sharabha - ||| Arduino Code

Arduino
Read the Code carefully all the instructions are provided in form of Comments.
//Connections 
//Connections between Sensors and Arduino is made as defied below
//You can also add an LED for making it more attarctive
#define FRONT_ULTROSONIC_SENSOR_TRIGGERPIN 2
#define FRONT_ULTASONIC_SENSOR_ECHOPIN 3 
#define LEFT_ULTROSONIC_SENSOR_TRIGGERPIN 4
#define LEFT_ULTASONIC_SENSOR_ECHOPIN 5 
#define RIGHT_ULTROSONIC_SENSOR_TRIGGERPIN 6
#define RIGHT_ULTASONIC_SENSOR_ECHOPIN 7 
#define BUZZER_PIN 8


//Declaring the Time Duration and Distance of your Hand
//The distances are declared as interger variables
int front_hand_distance;
int right_hand_distance;
int left_hand_distance;

//The duration are declared the form of long because it can aslo be a huge number
long front_duration;
long right_duration;
long left_duration;

//This function runs only once in the beginning when the arduino is powered.
void setup()
{ 
  //Setting all the INPUT pins
  pinMode(FRONT_ULTASONIC_SENSOR_ECHOPIN,INPUT);
  pinMode(LEFT_ULTASONIC_SENSOR_ECHOPIN,INPUT);
  pinMode(RIGHT_ULTASONIC_SENSOR_ECHOPIN,INPUT);
  
  //Setting all Output pins
  pinMode(FRONT_ULTROSONIC_SENSOR_TRIGGERPIN,OUTPUT);
  pinMode(LEFT_ULTROSONIC_SENSOR_TRIGGERPIN,OUTPUT);
  pinMode(RIGHT_ULTROSONIC_SENSOR_TRIGGERPIN,OUTPUT);
  pinMode(BUZZER_PIN,OUTPUT);
  
  //Setting Baud Rate as 9600
  /*
  The baud rate is the rate at which information is transferred in a communication channel. Baud rate is commonly used when discussing electronics that use serial communication. In the serial port context, "9600 baud" means that the serial port is capable of transferring a maximum of 9600 bits per second.
  
  */
  Serial.begin(9600);
  //Send the signal as a conformation that code has execueted
  digitalWrite(BUZZER_PIN,HIGH);  //Buzzer on
  delay(2000); //For 2 seconds
}

//This function runs continiously until the power is being supplied to arduino.
void loop()
{
  
  
  
  //Make Buzzer off
  digitalWrite(BUZZER_PIN,LOW);
  
  //Set Ultrasonic Sensor Trigger Pin Initially to Low
  digitalWrite(FRONT_ULTROSONIC_SENSOR_TRIGGERPIN,LOW);
  digitalWrite(LEFT_ULTROSONIC_SENSOR_TRIGGERPIN,LOW);
  digitalWrite(RIGHT_ULTROSONIC_SENSOR_TRIGGERPIN,LOW);
  delayMicroseconds(2);
  
  //Power on the Ultrasonic Sensor Trigger Pin
  digitalWrite(FRONT_ULTROSONIC_SENSOR_TRIGGERPIN,HIGH);
  digitalWrite(LEFT_ULTROSONIC_SENSOR_TRIGGERPIN,HIGH);
  digitalWrite(RIGHT_ULTROSONIC_SENSOR_TRIGGERPIN,HIGH);
  delayMicroseconds(10);
  
  //Set Ultrasonic Sensor Trigger Pin to Low Again
  digitalWrite(FRONT_ULTROSONIC_SENSOR_TRIGGERPIN, LOW);
  digitalWrite(LEFT_ULTROSONIC_SENSOR_TRIGGERPIN, LOW);
  digitalWrite(RIGHT_ULTROSONIC_SENSOR_TRIGGERPIN, LOW);
  delayMicroseconds(2);
  
  //Calculating the distance based on data received
  //hand_distance from front sensor
  front_duration=pulseIn(FRONT_ULTASONIC_SENSOR_ECHOPIN, HIGH);
  front_hand_distance= front_duration*0.034/2;
 
 //hand_distance from left sensor
  left_duration=pulseIn(LEFT_ULTASONIC_SENSOR_ECHOPIN, HIGH);
  left_hand_distance= left_duration*0.034/2;
  
  //hand_distance from right sensor
  right_duration=pulseIn(RIGHT_ULTASONIC_SENSOR_ECHOPIN, HIGH);
  right_hand_distance= right_duration*0.034/2;
  
  
  //Sending Signal if detected
  //Change the values according to your facial Dimensions
  
  
  if((front_hand_distance <= 21)||(right_hand_distance <= 19)||(left_hand_distance <= 19))
  {
      digitalWrite(BUZZER_PIN,HIGH);
      delayMicroseconds(10);
      digitalWrite(BUZZER_PIN,LOW);
      delayMicroseconds(10);
      digitalWrite(BUZZER_PIN,HIGH);
      delayMicroseconds(10);
      digitalWrite(BUZZER_PIN,LOW);
      delayMicroseconds(10);
  
  }
  
}

Credits

Sheshank Kindalkar

Sheshank Kindalkar

1 project • 2 followers

Comments