-
1Software
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.
-
2Construction 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. 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
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.