You are on page 1of 29

1

CAMIGUIN POLYTECHNIC STATE COLLEGE


INSTITUTE OF ENGINEERING & COMPUTER STUDIES
Balbagon, Mambajao, Camiguin

TOUCHLESS FAUCET (USING ARDUINO)

Technical Report

In Partial Fulfillment

to the course

AC 121:

Computer Programming

by:

Maria Jesusa D. Cabilogan

Janice Caneos

Nel Mark L. Honculada

Jay Lopena

August 2022

1
2

ABSTRACT

Coronavirus has spread rapidly and many countries have been affected by this
pandemic. While some countries are recovering, other countries are still in lockdown
and some are suffering from the second wave of coronavirus.
Today, touchless faucets are as much a part of our daily lives. Since these
faucets are preset to shut off after a certain amount of time, they save a significant
amount of water, and accidental flooding can't occur if a user leaves it running. And,
because they are hands-free, they help reduce the spread of germs which is very much
needed during this New Normal. Further research and development will allow
manufacturers to continually roll-out enhanced features that will make touchless faucets
more convenient to use, as well as easy to install. As new technologies are created, the
touchless faucet will continue to evolve offering new solutions to people’s needs.
By programming Arduino UNO R3 microcontroller to switch on the relay module
when the ultrasonic sensor detects the hand within 10 cm. The submersible water pump
is switched on along with the relay module and begins to pump water through the tube
connected to it.
Key Words: Ultrasonic sensor, Relay module, Arduino Uno R3, Submersible water
pump

2
3

TABLE OF CONTENTS

Title ……………………………………………………………………………………..……. 1
Abstract ……………………………………………………………………………………... 2
Table of Contents ………………………………………………………………………….. 3

Introduction ……………………………………………………………………..……….…..4
Body ………………………………………………………………………………………...…5
I. Components Used ……………………………………………………….…….5-10
II. Wiring Connections …………………………………………………………...…11
III. Steps on Connecting the Wirings …………………………………………..12-15
IV. How System Works ……………………………………………………………...16
V. Circuit Diagram …………………………………………………………….…….17
VI. Schematic Diagram ……………………………………………………..…….…18
VII. Observations ………………………………………………………………….….19
Figures, Tables, and Formula …………………………………………………………....20
I. Formula …………………………………………………………………………...20
II. Flowchart of the System ………………………………………………………...21
Conclusion …………………………………………………………………………….…....22
Recommendations ………………………………………………………………………...23
References ……………………………………………………………………………..…. .24
Appendix A ………………………………………………………………………………... 25
Code of the Diagram …………………………………………………………….25-26
Appendix B ……………………………………………………………………………..….27
Algorithm ……………………………………………………………………..……..27
Appendix C …………………………………………………………………………………28
Documentation ………………………………………………………………………28

3
4

INTRODUCTION

COVID-19 is a serious pandemic not only here in the Philippines but in whole
other areas of the world. The corona virus is spreading quickly and easily between
humans through contact with each other. Staying at home is not an option for others for
they need to go to their workplace to work for their family’s livelihood it is known that
contact within the workplace cannot be avoided within co-workers they might be
wearing face masks but their hands are still vulnerable to be contaminated with the virus
for it can stay on any surface.
However, there are ways to lessen the risk of the virus spreading within the
workplace by washing your hands with water and soap thoroughly using a touchless
faucet. There are many variations of faucets but touchless faucets are safer within the
workplace because it doesn’t need contact to be opened minimizing the risk of touching
surfaces that might be contaminated by a potential virus carrier. Rucksikaa, R. (2020)
Touchless faucet system for COVID-19 is an idea that concerns the well-being of
workers within the workplace to reduce the risk of them carrying the virus to their homes
and have a safe working environment.
To help prevent the spread of COVID-19 we have made an automatic
touchless faucet using Arduino Uno R3 which detects the hands within 10 cm and
allows safe hand washing. We have programmed our Arduino microcontroller to
switch on the relay module when the ultrasonic sensor detects my hand within 10
cm. The submersible water pump is switched on along with the relay module and
begins to pump water through the tube connected to it. Taloustutkimus (2020,
December)
Arduino comprises of both a physical programmable circuit board (commonly known as
a microcontroller) and a programming software, or IDE (Integrated Development
Environment) that can be run on a PC, used to compose and transfer PC code to the
circuit board. It can be done by using the Arduino programming language (based on
Wiring), and the Arduino Software (IDE), based on processing. unlike other
programmable circuit boards, the Arduino does not require a different equipment (called
a software engineer) to upload code to the circuit board, one can essentially utilize a
USB link. Also, the Arduino IDE utilizes a rearranged rendition of C++, making it simpler
to figure out how to program. In a word, Arduino make the functions of the
microcontroller into a more accessible package. Henry, N. et al. (2014)

4
5

BODY

I. COMPONENTS USED
This system consists of the following components to integrate the system goal:

COMPONENTS
1. Arduino Uno R3
2. Relay Module
3. Ultrasonic Sensor
4. Breadboard
5. Submersible Water Pump
6. Jumper wires

Table 1: Components of Touchless Faucet

Arduino UNO
The Arduino Uno is an open-source microcontroller board based on the
Microchip ATmega328P microcontroller and developed by Arduino.cc. The board is
equipped with sets of digital and analog input/output (I/O) pins that may be interfaced to
various expansion boards (shields) and other circuits. The board has 14 digital I/O pins
(six capable of PWM output), 6 analog I/O pins, and is programmable with the Arduino
IDE (Integrated Development Environment), via a type B USB cable. It can be powered
by the USB cable or by an external 9-volt battery, though it accepts voltages between 7
and 20 volts.

Figure 1. Arduino UNO R3 microcontroller

5
6

ARDUINO UNO R3 SPECIFICATION


Microcontroller Atmega328
Operating Voltage 5V
Input Voltage (recommended) 7-12V
Input Voltage (limits) 6-20V
Digital I/O Pins 14 (of which 6 provide PWM output)
Analog Input Pins 6
DC Current per I/O Pin 40 mA
DC Current for 3.3V Pin 50 mA
Flash Memory 32 KB (Atmega328) of which 0.5 KB used by bootloader
SRAM 2 KB (Atmega328)
2
EEPROM 1 KB (Atmega328)
Clock Speed 16 MHz

Table 2: Specifications of Arduino Uno R3

Jumper Wires
Jumper wires are used for making connection between items on the breadboard
and Arduino’s header pins. We will be using M-M and M-F. Though jumper wires come
in a variety of colors, the colors don’t actually mean anything. This means that a red
jumper wire is technically the same as a black one. But the colors can be used as an
advantage in order to differentiate between types of connections, such as ground or
power.

Figure 2: Jumper wires

6
7

Relay Module
The pump can be switched on and off using a relay. The relay will automatically turn on
to operate a water solenoid when the moisture content is below the predetermined level.
The relay will automatically dis-energize or switch off when the moisture content
exceeds the predetermined level.

Figure 3: Relay Module

RELAY MODULE SPECIFICATION


Channel 1 channel
Relay Voltage 5V
Dimensions 56.5mm x 17mm x 20 mm
Weight 16.5g

Table 3: Specifications of Relay Module

Submersible Water pump


A submersible pump is an air-tight sealed motor close-coupled to the pump body.
The main advantage of this type of pump is that it prevents pump cavitation, a problem
associated with a high elevation difference between pump and fluid surface. A
submersible pump never requires priming as the whole assembly is submerged in the
fluid.

7
8

Figure 4: Submersible Water Pump

SUBMERSIBLE WATER PUMP SPECIFICATION


DC Voltage 3-5V
Maximum Lift 40-110cm / 15.75″-43.4″
Flow rate 80-120L/H
Outside diameter of water outlet 7.5mm / 0.3″
Inside diameter of water outlet 4.7mm / 0.18″
Diameter Approx. 24mm / 0.95″
Length Approx. 45mm / 1.8″
Height Approx. 33mm / 1.30″
Material Engineering plastic
Driving mode Brushless dc design, magnetic driving
Continuous working life 500 hours 500 hours
Low Noise

Table 4: Specifications of Submersible Water Pump

Ultrasonic Sensor
As the name indicates, ultrasonic sensors measure distance by using ultrasonic
waves. The sensor head emits an ultrasonic wave and receives the wave reflected back
from the target. Ultrasonic Sensors measure the distance to the target by measuring the
time between the emission and reception.

8
9

Figure 5: Ultrasonic Sensor

ULTRASONIC SENSOR SPECIFICATION


Power Supply 5V DC
Quiescent Current <2mA
Working Current 15mA
Effectual Angle <15°
Ranging Distance 2cm – 400 cm/1″ – 13ft
Resolution 0.3 cm
Measuring Angle 30 degrees
Trigger Input Pulse width 10uS
Dimension: 45mm x 20mm x 15mm 45mm x 20mm x 15mm

Table 5: Specifications of Ultrasonic Sensor

Breadboard
A breadboard is a construction base used to build semi-permanent prototypes of
electronic circuits. Unlike stripboard (Veroboard), breadboards do not require soldering
or destruction to tracks and are hence reusable. For this reason, breadboards are also
popular with students and in technological education. A variety of electronic systems
may be prototyped by using breadboards, from small analog and digital circuits to
complete central processing units (CPUs).

9
10

Figure 6: Breadboard

Arduino Software (IDE)


Arduino IDE is open-source software, designed by Arduino.cc and mainly used
for writing, compiling & uploading code to almost all Arduino Modules. It connects to the
Arduino hardware to upload programs and communicate with them. The program or
code written in the Arduino IDE is often called as sketching. It is official Arduino
software, making code compilation too easy that even a common person with no prior
technical knowledge can get their feet wet with the learning process.

10
11

II. Wiring Connections

Ultrasonic Sensor Connections

Ultrasonic Sensor Breadboard/Arduino Uno R3


Trig D5 (Breadboard)
Echo D4 (Arduino Uno R3)
VCC 5V (Arduino Uno R3)
GND Ground (Arduino Uno R3)

Table 6: Ultrasonic Sensor Connections

Relay Module Connections


Relay Module Breadboard/Arduino Uno R3

S D6 (Arduino Uno R3)

(+) 5V (Breadboard)

(-) Ground (Breadboard)

Table 7: Relay Module Connections

Arduino Uno R3 Connections


Arduino Uno R3 Breadboard

5V Breadboard

GND Breadboard

Table 8: Arduino Uno R3 Connections

11
12

III. Steps on Connecting the Wirings

Step 1: Connect VCC from the Sensor to the Terminal strips of breadboard.

Step 2: Connect Trigger from the Sensor to the Terminal strips of breadboard.

Step 3: Connect Echo from the sensor to D4 of the Arduino.

12
13

Step 4: Connect GND from the Sensor to Terminal strip of breadboard.

Step 5: Connect S from Relay to the Terminal strips of breadboard.

Step 6: Connect (+) of Relay to Terminal strips of breadboard.

13
14

Step 7: Connect (–) of Relay to the Terminal strips of breadboard.

Step 8: Connect 5V of Arduino to Terminal strips of breadboard.

Step 9: Connect GND of Arduino to Terminal strips of breadboard.

14
15

Step 10: Connect the negative (-) wire from USB to negative (-) wire of Water pump and
connect positive (+) wire from USB to positive (+) wire of Water pump then connect it in
the NO of the Relay.

15
16

IV. How System Works

Our ultrasonic sensor serves as the input for our Arduino base
touchless faucet. The ultrasonic sensor will detect an object through
wave and if it detects, the waves will come back to the sensor. If it
detects an object or if the sensor will detect an object that can trigger to
it. It will automatically turn ON the submersible water pump.
The sensor has a distance limit of 10cm based on what we write on
our code and if it is less than 10cm then the submersible water pump will
automatically turn ON and if it is more than 10cm it will automatically
turn OFF and by this process the automatic turn off and on of the
submersible water pump is due to the relay module that serves as the
electric switch.

Figure 7: Systematic Process of the System

16
17

V. Circuit Diagram

Figure 8: Circuit Diagram of the System

17
18

VI. Schematic Diagram

Figure 9: Schematic Diagram of the System

18
19

VII. Observations

We noticed early on in the project's creation that it was a lot of work, not pleasing to
look at, and time-consuming. We ran across a number of issues while working on this
project, but we are happy to say that we were able to solve them all. Numerous issues
were encountered, such as the fact that the project's circuit diagram is missing in some
parts. Additionally, the supplies needed for this project have been challenging to
acquire. Sometimes we need to troubleshoot some components since it is not working.
Due to our expertise with coding errors and irregular components, this project
was challenging and time-consuming. All of our parts must be handled carefully
because of this. We must, however, buy a replacement component for any broken parts
for which there is no spare. Because of this, this project requires a lot of money and
patience.
Having this prototype works as a potential solution for the problem in COVID-19
where people are having difficulty in going out and using faucets that may give them
bacteria from people with Covid already. Also, aside from preventing the virus, people
can also save time and energy in using this prototype.

19
20

FIGURES, TABLES AND FORMULA

I. Formula

Formula in getting the distance from the sensor to the obstacle in cm;

duration 331.3
distance = 2 x 10000

Whereas:

 ultrasonic sensor is our variable that has a value from the sensor reading.
 331.3 is the speed of sound in air in m/s

20
21

II. Flowchart of the System

Figure 10: Flowchart of the Touchless Faucet (Using Arduino)

21
22

CONCLUSION

According to our observation in making a touchless faucet it can be said that the
project was completely successful. The Arduino, the relay, and the water pump sync
and connected together as we follow the wirings and the flow of the circuit diagram.
Therefore, we conclude that the project in making the touchless faucet was successful.
A touchless faucet also known as “contactless”, “touch-free”, or “hands-free”,
turns on and off with a simple swipe of hands. When the sensor detects motion, it
signals to the valve to turn and allow the water to flow through the spout. Touchless
faucets have four components that enable them to work: the sensor, solenoid valve,
power source and spout. The eco-friendly and economical benefit for touchless faucets
is related to the sensor. These faucets are motion activated and water will only flow if
hands pass directly in front of the sensor. No more dripping or running faucet just place
the hands in front of the sensor and the water can wash away without touching
anything. This is particularly helpful in keeping germs and bacteria to a minimum.
Touchless Faucet in times in Covid-19 is very useful. Through the use of
technology many things got invented. In technology it gives us the freedom to live in a
better way and helps make our life easy. Technology helps in better communication,
treatment of diseases, has helped reached space, and wherever you look around it is
there. It not only helps to develop the present but also the future. The touchless faucet
using Arduino the program in our project did will. The program applications on the
microcontroller can run the system and programs properly so that the water in touchless
faucet using Arduino and ultrasonic sensor can work well. Ultrasonic sensors can detect
the object at a distance of 10 cm.
All in all, touchless faucet is having a big help in our lives. Thanks to the people
who invented this kind of thing. It became more successful. It has a great strength that
can make our life easier.

22
23

RECOMMENDATION

- Instead of 9v battery we change it to USB cable so we have sustainable power


supply.

- Make an Interaction Design Process that aims to maximize product usability was
applied during the development.

- The researcher makes an upgrade about touchless faucet that is user-friendly and
easy to plug in regular water pipe for standard hand-washing routine.

- Bigger version of this project, so that the government can use this to install in the
public to minimize the spread of viruses.

23
24

REFERENCES

- Rucksikaa, Raajkumar (2020). Touchless Faucet with door control for Covid-19.

(Issue No. 1)

- Taloustutkimus (2020, December). Demand for touchless faucets is increasing


remarkably in both private and public spaces.
(Issue No. 2)

- Nick Henry, Kelton Ho, Nick Huff, Robert Pollum and Brian Wirsing (2014).
Sensor Technology Interface Final Report.
(Issue No.3)

24
25

APPENDIX A

I. Code of the Diagram

#define trig 5 //declaration of variable for raw data from the


sensor
// declaration of variable for raw data from the
#define echo 4
sensor
const int Relay = 6;
//constant read only for the Relay
long duration;
// storing the variable or constant values with 64-
bits storage.

int distance; // declaration of variable

void setup() { //start of the code that run once

pinMode(trig, OUTPUT); // set the trigger pin as an output device

pinMode(echo, INPUT); // set the echo pin as an INPUT device


pinMode(Relay, OUTPUT); // set the relay module as an Output device
Serial.begin(9600); // establishes a serial communication between the
Arduino board to the connector up to the serial
}
monitor of Arduino IDE with 9600 baud rates (is
the rate at which information is transferred in a
communication channel.

void loop() { // main code that runs repeatedly

digitalWrite(trig, LOW); //set the trigger off

delayMicroseconds(5); //pauses for 5 microseconds

digitalWrite(trig, HIGH); // set the trigger on


25

digitalWrite(trig, LOW);
26

26
27

27
28

28

You might also like