Close
0%
0%

Contactless Hand Sanitiser Dispensing System

Hand sanitisation is important to stop spreading Covid-19 and other transmissible diseases.

Similar projects worth following
0 followers
Hand sanitisation is important to stop spreading Covid-19 and other transmissible diseases. Even touching the container spout is unhygienic, so it is better to deploy an auto-dispenser to sanitise your hands without touching anything except the sanitising liquid. It can be useful especially for industrial units, workplaces, hospitals, and shopping centres, etc.
But most conventional contactless sanitisers use an LDR and infrared (IR) sensors, which frequently malfunction due to the ambient sunlight and high ambient, etc. So here is an auto-dispenser that uses ultrasonic sensing instead to dispense the sanitiser.

The relevant equipment and shells of the project are customized in Moko, and I am quite satisfied with Moko's electronic manufacturing service.

The circuit diagram of contactless hand sanitiser dispensing system is shown in Fig. 2. It includes 12V power supply, Arduino Uno (Board1), ultrasoic sensor HC-SR04 (US1), 5V single-changeover relay module (RM1), and 12V DC motor (M1).

Ultrasonic sensor. Ultrasonic sensors are widely used to detect obstacles in robotic systems. They provide excellent non-contact range detection between 2cm and 400cm with an accuracy of 3mm.

The ultrasonic sensor used is shown in Fig. 3. Since it operates on 5 volts, it can be used directly with an Arduino or any other 5V logic microcontroller. Its technical specifications are listed in Table 1.

The VCC pin is used to give power supply to the ultrasonic sensor. So, it needs to be connected to 5V pin of the Arduino. Trig pin triggers the ultrasonic sound pulses. Here, it is connected to pin D3 (digital I/O pin 3) of Arduino. Echo pin produces a pulse when the reflected signal is received back. The length of the pulse produced by Echo pin is proportional to the time it takes for the transmitted signal to be detected. This pin is connected to pin D2 (digital I/O pin 2) of Arduino. GND pin should be connected to ground.

HC-SR04 ultrasonic sensor has an inbuilt ultrasonic transmitter and receiver. When pulse is provided to its Trig pin for 10µs or more, the ultrasonic transmitter sends sonic burst of eight pulses at 40kHz frequency. These pulses travel through the air and after colliding with the object get reflected back. The receiver gets the reflected signal. Meanwhile the Echo pin goes high to start forming the beginning of the echo-back signal. The time for which the Echo pin remains high (width of the Echo pulse) gives the time taken for generated ultrasonic sound to travel to the object and return. Using this time and the speed of sound in air, the distance of the object can be found using the simple relationship:

Distance=Speed×Time

The speed of sound in air at room temperature is 340 metres per second, or 0.034 centimetres per microsecond. So, assuming time taken to return is 300µs,

Total Distance Covered=0.034cm /µs×300µs

This is the total distance covered by the pulse during its forward and return movement. The actual distance is half of it. So,

Distance=(0.034cm/µs×300µs)/2
=5.115cm

Here, the ultrasonic sensor is used to detect hands that may be only 10cm from the sensor. So, variable resistor VR1 is connected at analogue pin A0 of Arduino to set the desired range of distance.

When hands are detected, signal from the sensor is sent to Arduino Nano. The Arduino’s nano microcontroller is the main controller, which is programmed to access data from the ultrasonic sensor. The microcontroller performs some logical operations and sends signal to control relay RL1.

5V relay module. The 5V relay module comprising interface board SRD-05VDC-SL-C can be controlled directly by an Arduino board, or an AVR or PIC microcontroller. Its input signal voltage range is 0-5V. A 2-channel relay module has been used in the prototype, but a single-channel relay module (shown in Fig. 4) is recommended. Pin descriptions of the single-changeover relay module are listed in Table 2.

The normally-open (NO) relay contact is open and the normally-closed (NC) contact is closed when the relay is not energised. The relay module (dotted lines box in Fig. 2) comprises an optocoupler, switching transistor, capacitor, and resistor connected to status LED, freewheeling diode, and inductive coil.

Optocoupler IC(4N25)

The optocoupler’s true function is to provide proper isolation between the DC power of relay and the input signal. It has an internal LED across its pins 1 and 2, which is used to trigger base of the transistor to produce the same signal across output terminals 4 and 5 of 4N25. In this way, we get the...

Read more »

Source Code.zip

Source Code

x-zip-compressed - 947.00 bytes - 04/06/2022 at 09:19

Download

PCB and Component Layout PDFs.zip

PCB and Component Layout PDFs

x-zip-compressed - 231.02 kB - 04/06/2022 at 09:19

Download

  • 1 × Arduino Uno (Board1)
  • 1 × ultrasoic sensor HC-SR04 (US1)
  • 1 × 5V single-changeover relay module (RM1)
  • 1 × 12V DC motor (M1)
  • 1 × Optocoupler IC(4N25)

View all 9 components

  • 1
    Software

    Arduino IDE 1.8.15 is used to write, compile, and upload the source code to Arduino board. The program code Dispenser.ino is written in Arduino programming language. The flowchart of the program is shown in Fig

    Arduino Nano has pre-burned bootloader to upload the code to Arduino, so external hardware programmer is not required. A mini-A to mini-B USB cable is needed instead of a standard USB cable.

    Compile the code and upload program to the Arduino Nano. Make sure you have chosen appropriate board and COM port from Tools menu for communication between Arduino and PC/laptop.

  • 2
    Construction and testing

    A PCB layout for the circuit is shown in Fig 1. and its component layout in Fig 2. After successfully assembling the circuit on PCB and uploading source code in Arduino Nano, connect 12V DC power supply to the Arduino and pump. Then provide 5V DC power supply to the relay driver section and HC-SR04 sensor from 5V pin of Arduino.

    Fig. 1: PCB layout

                       Fig. 1: PCB layout

                       Fig. 2: Component layout of the PCB

    Enclose the circuit in a suitable box as shown in Fig. 3. Properly mount the ultrasonic sensor at the bottom of the enclosure with the sensor facing downward. Adjust the time and range using respective potentiometers and put your hands below the sensor within the 10cm range. The sanitiser should flow out of the nozzle for ten seconds, after which the pump would switch off, until the sensor detects the next set of hands.

                                          Fig. 3: Proposed enclosure

View all instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates