Make an Automatic Hand Sanitizer Dispenser

This project addresses a widespread concern stemming from viral diseases, emphasizing its relevance beyond the confines of any single pandemic. The automatic hand sanitizer dispenser offers a touch-free solution, minimizing the risk of germ transmission. By utilizing an IR sensor to detect hand movement and activating a DC motor pump, sanitizer is dispensed without requiring direct contact.

Hardware Required:

  • Arduino Uno R3
  • DC Motor
  • IR Sensor
  • NPN Transistor
  • Resistor
  • LED
  • Jumper Wires

Schematic Diagram:

Arduino Code:

const int IRSensor = A0;
const int motor = 13;
const int LedRed = 12;
const int LedGreen = 11;

void setup() {
  pinMode(IRSensor, INPUT);
  pinMode(motor, OUTPUT);
  pinMode(LedRed, OUTPUT);
  pinMode(LedGreen, OUTPUT);

void loop() {
  int statusSensor = digitalRead (IRSensor);
  if (statusSensor == 1){
    digitalWrite(motor, HIGH);
    digitalWrite(LedRed, HIGH);
    digitalWrite(LedGreen, LOW);
  else {
    digitalWrite(motor, LOW);
    digitalWrite(LedRed, LOW);
    digitalWrite(LedGreen, HIGH);

Considerations and Precautions

While automatic hand sanitizer dispensers offer numerous benefits, there are several considerations and precautions to keep in mind:

  • Proper Installation: Ensure that the dispenser is installed at an appropriate height and location to facilitate easy access for users.
  • Regular Maintenance: Routine maintenance and cleaning are essential to ensure the proper functioning of the dispenser and prevent clogs or malfunctions.
  • Battery Life: Battery-powered dispensers should have sufficient battery life to avoid disruptions in operation. Regularly monitor battery levels and replace them as needed.
  • Refill Requirements: Keep track of sanitizer levels and refill the dispenser as needed to ensure uninterrupted operation.

Future Implications and Advancements

As the world continues to grapple with the challenges posed by infectious diseases, the role of automatic hand sanitizer dispensers in public health is likely to evolve. Future advancements may include integration with smart technology, such as IoT connectivity for remote monitoring and management. Additionally, ongoing research and development efforts may lead to the introduction of new sanitizing agents and improved dispenser designs for enhanced efficacy.

Note: The automatic hand sanitizer serves as a proactive measure against the spread of viral diseases by promoting hand hygiene. Its utility extends beyond any specific outbreak, contributing to overall public health and safety.

Check out some of our products on the Amazon store.

Do you have questions regarding our STEM program?

Contact us anytime.

Take your first step into the magical world of coding for kids


More Posts

Send Us A Message

Coding For kids

Our courses which are tailored for grades 1 to 12, and our hands-on curriculum seamlessly integrates, preparing students for challenges and inspiring the next generation.


If you are a school searching for a cutting-edge makerspace solution that goes beyond conventional education, look no further. Partner with Makers’ Muse to unlock a world of innovation and transformative learning experiences for your students. 

Coding Toys

Discover a revolutionary coding journey for students with our cutting-edge educational toys. Partner with us to unlock innovative learning experiences that transcend traditional education.

Leave a Reply