Introduction: Touchless Faucet With Door Control System for COVID-19

About: I am interested in Arduino and looking forward to discover more.

COVID-19 is a serious pandemic at this moment. The coronavirus is spreading quickly and easily between humans. There are ways to curb the spread of this virus and one way is to wash hands using soap for at least 20 seconds. Sometimes, if the person carelessly touches the faucet - which could be contaminated - after washing his/ her hands, he/she has a higher chance of contracting this coronavirus disease. If you go out, it is safe to wash your hands before entering your premises. You do not have to touch the door handle because the door lock system is automated. In my project, a person will only be granted access once he/ she washes his/ her hands.

The person could be wearing face masks when they go to public places but their hands may not be clean. Even if he/ she cleans their hands, they could touch the surface which was touched by a virus carrier. The virus carrier's hands would be contaminated. Coronavirus could last on a contaminated surface from several hours to days depending on the environmental conditions such as humidity and temperature. By washing your hands before entering the premises, this way of spreading coronavirus could be prevented.

In this project, I have made a prototype to wash hands safely with automatic door control system. I have made an touchless faucet so that you do not have to touch the surface of the faucet and is automatic. The prototype is cheap - only costs around $11 to build - and easy to make. This faucet is automatic and could also prevent wasting water when not in use.

I made this prototype using the resources at my home as I could not go out due to the lockdown in my country. You are allowed to remake this project or even improve it, but you could also try to convert any container of water into a faucet. I would suggest you to use a solenoid water valve instead of the submersible water pump. The tube is modelled as the faucet in this prototype. This model could be used in malls, offices and your home. This model could be used in places with automatic sliding doors or automatic door system, by replacing the single channel relay module with solid state relay module.

This prototype could also be used as an automatic alcohol-based hand sanitizer dispenser, but when using the hand sanitizer, the container should be closed as the alcohol could evaporate.


  • Arduino Uno
  • USB Type A/B cable
  • Solderless Breadboard - Half+ (You would only be needing the power rail of the breadboard)
  • Ultrasonic sensor module (HC-SR04)
  • IR tracking sensor module
  • Towerpro Micro servo motor - SG90
  • Relay module - 5V single channel relay module
  • LCD display module with I2C interface - 16x2
  • Submersible water pump - 5V (You could also use a solenoid water valve instead of this)
  • Male-to-Male Jumper wires
  • Female-to-Male Jumper wires

Step 1: Connections

Ultrasonic sensor module (HC-SR04)

  • VCC - 5V
  • Trig - D5
  • Echo - D4
  • GND - Ground

IR tracking sensor module

  • S - D3
  • (+) - 5V
  • (-) - Ground

Relay module

  • S - D6
  • (+) - 5V
  • (-) - Ground

Servo motor (SG-90)

  • S (Yellow/ Orange wire) - D9
  • (+) (Red wire) - 5V
  • (-) (Black/ Brown wire) - Ground

16x2 LCD display module with I2C interface

  • VCC - 5V
  • GND - Ground
  • SDA - A4
  • SCL - A5

Step 2: Code

If you want to wash your hands, place your hands within 15 cm from the ultrasonic sensor. According to my Arduino program, this will switch on the relay module. The submersible water pump is connected to the relay module and an external power supply. The external power supply can be adjusted to provide the appropriate voltage. The water pump is switched on and the water is pumped from the container to your hands through a tube, which is modelled as the faucet in this prototype.

After washing your hands, place your hand in front of the IR tracking sensor. The IR sensor sends a LOW signal when an object is detected within 2cm. The LOW signal makes the servo motor to rotate 90° and open the door (in this model). The door will automatically close after 10 seconds.

If you place your hand in front of the IR tracking sensor without washing your hands, the door will not open and the LCD display module will show a message asking you to wash your hands.

Step 3: Final Look

Congratulations! You've completed this project now. Take a look at the YouTube video above to see how this works.

If anyone has any questions or suggestions about this project, please feel free to comment below or send me an email at

Arduino Contest 2020

Participated in the
Arduino Contest 2020