Saturday, December 21, 2024

Gadget For Dual Protection From Viruses

efy tested DIY

The Corona pandemic is officially over but its ill effects are still being seen, especially in crowded places like popular markets and malls. Besides, one needs to guard against new viruses and mutations of Corona.

The World Health Organization (WHO) recommended keeping a two-meter distance from others and frequently rubbing hands with soap for at least 20 seconds before washing, as a safeguard. The proposed device can help in following the Distance Monitor & Handwashing Timer recommendations of WHO.

POC Video Tutorial In English:

The components required to build this gadget are listed in the Bill of Materials Table 1.

- Advertisement -
Table 1: Bill of Materials
ComponentsQuantity
Arduino Uno (MOD1)1
Ultrasonic sensor HC-SR04 (S1)1
HC-05 Bluetooth (MOD2)1
Buzzer (B1)1
LED11
Push-to-on switch (SW1)1
5V battery/5V adaptor1
Battery holder1

Circuit Connection

The circuit diagram of the gadget is shown in Fig. 1, while Table 2 shows the connections between the Arduino Uno board and the other devices used for the gadget.

Also Check: Interesting Arduino Projects

- Advertisement -
Arduino based Distance Monitor and Handwashing Timer Circuit
Fig. 1: Circuit Diagram


The circuit is built around Arduino Uno (MOD1), ultrasonic sensor HC-SR04 (S1), HC-05 Bluetooth module (MOD2), buzzer (B1), and LEDs. The ultrasonic sensor is used to maintain proper distancing, and a Bluetooth module is used to view the distance on mobile phones via the serial terminal/monitor of the Bluetooth. The red LED (built into Arduino Uno) and buzzer are used to alert violations of the 2-meter social distancing norm.

At the same time, the green LED (connected to the D8 pin of Arduino Uno) is used as the 20-second restricted time period indicator.

Table 2: Connections between the Arduino Uno board and the device
Arduino Uno PinDevice Connected
D12Echo pin of ultrasonic sensor
D10Trig pin of ultrasonic sensor
D8Anode pin of green LED
D13Anode pin red LED internally
connected in Arduino Uno board
D7Positive of buzzer
D2Push button switch
Tx-D1RXD pin of HC-05 Bluetooth module
Rx-D0TXD pin of HC-05 Bluetooth module

Arduino-based Distance Monitor – Working

The working of the gadget is simple. As soon as the distance of the person using this device becomes less than two meters, the red LED glows, and the buzzer sounds. This distance can also be seen on a mobile phone via the Bluetooth monitor.

Arduino based Distance Monitor and Handwashing Timer
Fig. 2: Arduino-based Distance Monitor and Handwashing Timer

For hand-washing, when the push-to-on switch is pressed, it enables the green LED for 20 seconds. The green LED remains on for 20 seconds to help you wash your hands properly with soap. Once the LED turns off, one can stop rubbing hands with soap and the hands can now be washed with water.

Arduino Code

To build this gadget, the code is created in Arduino IDE. First of all, pins are defined for LED, buzzer, and ultrasonic sensors, and then in the loop function, the sensor data is checked. Functions are sent for alerts and others. Then, by selecting the port, the code is uploaded. Fig. 3 shows a screenshot of the source code.

Arduino code for Distance Monitoring
Fig. 3: Screenshot of the source code

Construction and Testing

Assemble the circuit based on the circuit diagram, referring to Fig. 1 and Table 2. After proper assembly, power the device. Once it is powered, refer to the author’s prototype shown in Fig. 2. Now, on a phone, install a serial terminal app and connect it to the Bluetooth HC-05 of the device.

Distance Monitor DIY
Fig. 4: Phone showing the sensor data on a Bluetooth terminal monitor

The distance can be seen on the phone in real-time. When the distance is too close, the device will alert and also show in the serial terminal in real-time, as shown in Fig. 4.


Rakesh Jain, Assistant Professor in the ECE Department at Geetanjali Institute of Technical Studies, Udaipur, holds a master’s degree in VLSI, a BE degree in electronics and communication, and a diploma in electronics. His research areas are sensors and microcontrollers, and he has 30 copyrights, 5 design patent registrations, and 3 Indian utility patents to his credit. He is the recipient of the Mewar Scientist Award 2023

SHARE YOUR THOUGHTS & COMMENTS

EFY Prime

Unique DIY Projects

Truly Innovative Electronics

Electronics News

Latest DIY Videos

Electronics Components

Electronics Jobs

Calculators For Electronics