Introduction: DIY Non Contact Hand Sanitizer Dispenser Without an Arduino or a Microcontroller
As we all know, the COVID-19 outbreak hit the world and changed our lifestyle. In this condition, Alcohol and hand sanitizers are vital fluids, however, they must be used properly. Touching alcohol containers or hand sanitizers with infected hands can spread the virus to the next person. In this article, we will build an automatic hand sanitizer dispenser that uses IR sensors to detect the presence of a hand and activates a pump to pour the liquid on the hand. The intention was to find the cheapest and easiest solution and design a circuit. Therefore no Microcontroller or Arduino has been used. Two designs have been introduced and you are free to select and build any of them. The first design uses SMD components and the second design is even simpler. It uses DIP components on a small single layer PCB board.
I. First Design:
[A] Circuit Analysis
You can consider the schematic diagram in figure 1. The P1 connector is used to connect 6V to 12V supply to the circuit. The C6 capacitor has been used to reduce the possible supply noises. The REG-1 is the famous AMS1117  LDO regulator that stabilizes the voltage at 5V.
Step 1: Figure-1: Schematic Diagram of the Automatic Hand Sanitizer Dispenser (First Design)
D2 indicates the proper power connection and R5 limits the LED current. D1 is an IR transmitter diode and R1 limits the D1 current, in other words, it determines the sensor’s sensitivity. U1 is the famous 555  timer IC that has been configured to inject a 38KHz pulse to the D1 (transmitter) diode. By turning the R4 potentiometer, you can adjust the frequency. C1 and C2 are used to reduce noise.
U2 is a TSOP1738 IR receiver . According to the TSOP17XX datasheet: “The TSOP17XX series are miniaturized receivers for infrared remote control systems. PIN diode and preamplifier are assembled on the lead frame, the epoxy package is designed as an IR filter. The demodulated output signal can directly be decoded by a microprocessor. TSOP17.. is the standard IR remote control receiver series, supporting all major transmission codes.” The TSOP1738 introduces an active-low output. It means the output pin of the U2 goes Low in presence of the 38KHz IR light. Therefore I used a cheap P-Channel NDS356 MOSFET  to drive the DC motor (liquid pump). D4 is a protective diode against reverse currents of the motor and C8 reduces the motor’s inductive noises. D3 is an LED that indicates the IR reception and activation of the liquid pump. C4 and C5 have been used to reduce the supply noises.
[B] PCB Layout
Figure 2 shows the PCB layout. As it is clear, all components except the IR transmitter diode and the TSOP IR receiver are SMD.
Step 2: Figure-2: PCB Layout of the Automatic Hand Sanitizer Dispenser (first Design)
I used the SamacSys component libraries (Schematic Symbols and PCB Footprints) for the AMS1117-5.0 , LM555 , TSOP1738 , and NDS536AP . The SamacSys libraries are free and follow IPC footprint standards. Using these libraries significantly reduces the design time and prevents design errors. To install the libraries you can either use a CAD plugin  (figure 3) or download them from the component-search-engine. I used Altium Designer, so I preferred to use the Altium plugin.
Step 3: Figure-3: SamacSys Supported CAD Plugins and the Used Components in the Altium Designer’s Plugin
Figure 4 and figure 5 demonstrate 3D views of the top and bottom of the PCB board
Step 4: Figure-4: a 3D View From the PCB Board (top)
Step 5: Figure-5: a 3D View From the PCB Board (bottom)
[C] Assembly and Test
Nothing is special in the parts assembly process. All components except TR and RE sensors are SMD. I had the intention to quickly test the circuit, so I used a semi-homemade PCB board without solder masks and silkscreen. Your task is much easier with a professional fabricated PCB board :-). Figure 6 shows the prototype.
Step 6: Figure-6: a Prototype of the Hand Sanitizer Dispenser (first Design) on a Semi-homemade PCB Board
After assembly, try to adjust the R1 and R4 to find the best fit and detection range. R1 defines the IR power (range) and R4 defined the transmission frequency.
Step 7: [D] Bill of Materials
II. Second Design
[A] Circuit Analysis
Figure 7 shows the schematic diagram of the device. The P3 connector is used to connect the +5V supply to the circuit. C4 and C5 capacitors are used to reduce the input supply noises. IC1 is the heart of the circuit. It is the famous LM393 comparator .
Step 8: Figure-7: Schematic Diagram of the Automatic Hand Sanitizer Dispenser (Second Design)
According to the LM393 datasheet: “The LM393 series are dual independent precision voltage comparators capable of single or split supply operation. These devices are designed to permit a common mode range?to?ground level with the single-supply operation. Input offset voltage specifications as low as 2.0 mV make this device an excellent selection for many applications in consumer, automotive, and industrial electronics.”
It is a cheap and handly IC. Generally, I suggest you if your application is a comparator, simply use comparator chips instead of OPAMPs. We used the first comparator of the chip and the R3 potentiometer defines the activation threshold. C2 reduces the possible noises on the middle pin of the potentiometer. D1 is an IR transmitter and D2 is an IR receiver diode. D2 is connected to the negative pin (-) of the comparator to be compared with the positive pin (+) voltage. The output pin of the comparator is active-low, however, it is better to be pulled-up using R4.
Q1 is the famous BD140 PNP transistor  that drives the pump (DC motor) and the D3 LED. D4 is a reverse protection diode and C3 reduces the pump inductive noises to not to affect the circuit stability. Finally, P1 is used to connect a blue 5mm LED to indicate a proper power connection.
[B] PCB Layout
Figure 8 shows the PCB layout of the second design. It is a single layer PCB board and all components are DIP. Pretty easy for everyone to build this DIY at home quickly.
Step 9: Figure-8: PCB Layout of the Automatic Hand Sanitizer Dispenser (second Design)
The same as the first design, I used the SamacSys component libraries (Schematic Symbols and PCB Footprints) for the LM393 , and BD140 . SamacSys libraries are free and follow IPC footprint standards. To install the libraries you can either use a CAD plugin  (figure 9) or download them from the component-search-engine. Using these libraries significantly reduces the design time and prevents design errors. I used the Altium Designer CAD software, so I preferred to install the Altium plugin.
Step 10: Figure-9: SamacSys Supported CAD Plugins and the Used Components in the Altium Designer’s Plugin
Figure 10 shows a 3D view from the assembled PCB board.
Step 11: Figure-10: a 3D View From the PCB Board (top)
[C] Assembly and Test
Figure 11 shows the assembled PCB board. It is a semi-homemade PCB board that I used to quickly test the concept. You can order it for fabrication. Nothing is special in soldering. All components are DIP. Pretty easy. Just do it :-). This design is easier and even cheaper than the first design. So I followed this one and completed the hand sanitizer dispenser device.
Step 12: Figure-11: a Prototype of the Sanitizer Dispenser (Second Design) on a Semi-homemade PCB Board
Figure 12 shows the selected liquid pump. This is probably the cheapest one in the market, however, I am satisfied with its operation.
Step 13: Figure-12: Selected Liquid Pump to Flow the Hand Sanitizer Liquid
Finally, figure 13 shows the complete hand sanitizer dispenser. You can select any similar glass or plastic container, such as a plastic coffee storage container. My selected one is a glass sauce container :-). I used a simple copper wire to bend and hold the hose. Turn the R3 potentiometer from the lowest sensitivity level, and slightly increase it to achieve your desired detection range. Do NOT make it too sensitive because the pump might act spontaneously without any trigger!
Step 14: Figure-13: a Complete DIY of the Hand Sanitizer Dispenser
Figure 14 shows the dispenser in the dark. The blue LED’s light (P1) gives an attractive view that should be mounted on the container lid.
Step 15: Figure-14: Hand Sanitizer Dispenser View in the Dark
Step 16: [D] Bill of Materials
Step 17: References
Main Article: https://www.pcbway.com/blog/technology/DIY_Automat...
: AMS1117-5.0 Datasheet: http://www.advanced-monolithic.com/pdf/ds1117.pdf
: LM555 Datasheet: http://www.ti.com/lit/ds/symlink/lm555.pdf?&ts=15...
: TSOP1738 Datasheet: https://eu.mouser.com/datasheet/2/427/introductio...
: NDS356 Datasheet: https://eu.mouser.com/datasheet/2/308/NDS356AP-D-...
: AMS1117-5.0 Schematic Symbol and PCB Footprint: https://componentsearchengine.com/part.php?partID...
: LM555 Schematic Symbol and PCB Footprint: https://componentsearchengine.com/part.php?partID...
: TSOP1738 Schematic Symbol and PCB Footprint: https://componentsearchengine.com/part.php?partID...
: NDS356 Schematic Symbol and PCB Footprint: https://componentsearchengine.com/part.php?partID...
: CAD Plugins: https://www.samacsys.com/library-loader-help
: LM393 Datasheet: http://www.ti.com/lit/ds/symlink/lm393-n.pdf?&ts=...
: BD140 Datasheet: https://www.mouser.com/datasheet/2/149/BD140-8886...
: LM393 Schematic Symbol and PCB Footprint: https://componentsearchengine.com/part.php?partID...
: BD140 Schematic Symbol and PCB Footprint: https://componentsearchengine.com/part.php?partID...