Doctor Santz: Automatic AI-based Hand Sanitizer Prototype

automatic ai based hand sanitizer prototype 1


COVID-19 has brought about an unprecedented number of infections and millions of deaths worldwide. The pandemic has also shown us how and why ‘Prevention is better than Cure’. Hence, we initiated a project to come up with a preventive measure during these COVID-19 times.

Objective and Benefits
The main objective is to create a contactless, real-world, portable, Artificial Intelligence-based Automatic Hand Sanitizer spraying system that can be used on a day-to-day basis. The goal is to build an AI system that detects people even at a distance of 1+ meter and automatically spray hand

Artificial Intelligence

The benefits of creating this system include:

  • The use of Artificial Intelligence (AI);
  • Contactless delivery, which is the need of the hour;
  • Portability;
  • Rechargeability;
  • It is a real-world prototype;
  • Scalability.

How is Doctor Santz better than existing solutions?
In today’s mass-market scenario, most of the hand sanitizer market share is dominated by manual hand sanitizers that need to be touched to be used. In case a person infected with Corona uses it, there is a higher likelihood of contraction for the next user who uses the same sanitizer. Sensor-based automatic hand sanitizers, where direct touch is not necessary, occupies the remaining minority market share.

However, the existing sensor-based automatic hand sanitizers come with certain disadvantages, which include:

  • The proximity of hands and sensor, which increases the chances of infection.
  • The traditional sensor-based system cannot differentiate between living things and non-living things or identify a particular class of living beings. For example, if a dog or cat is near the sensor, it will spray the sanitizer.

Unlike Sensor-based systems, Contactless AI-based Hand Sanitizer can identify humans and operate only if it detects humans. It will not work if it detects non-living things or any other living being.

Where can the system be installed?
The Contactless AI-based Hand Sanitizer model, Doctor Santz, can be installed in entrances and exits of venues, restrooms, and anywhere people gather. This includes houses, hospitals, IT parks, hotels, hostels, restrooms, food courts, factories, wedding venues, and educational institutions.

Concept & Model
Doctor Santz works on the principle of object detection. It uses the TensorFlow Lite Object Detection model to detect humans.

At the core, the TensorFlow Lite object detection uses a pre-trained quantized COCO SSD MobileNet v1 model and Coco’s labels file. The term ‘inference’ refers to the process of executing a TensorFlow Lite model on-device to make predictions of classes based on input data.

TensorFlow Lite inference typically follows these steps:

  1. Loading the model
  2. Transforming data to suit model input requirements
  3. Running inference & Interpreting the output
Artificial Intelligence

The PI camera feeds in the visual information to Raspberry PI 4, which is the system’s brain. It runs TensorFlow Lite Object Detection Model at its core. With the model’s help, the system detects people and assigns a probability score between 0 to 1 for each detection. Considering a threshold of 0.6, we take every detection it makes as true positive.

For every true positive detection, a signal is sent to Arduino Uno. The Uno acts as a protective shield to the Raspberry PI 4. Since it is a much cheaper option than the PI 4 and has better capabilities in driving hardware components than Raspberry PI 4, it’s a safer bet to include it in the circuit.

The Uno, in turn, instructs when to run the servo motor via the attached L293D driver.

The driver-cum-shield prevents the vibrations or spikes in current due to servo motors’ operation from affecting any other costlier circuit components. The servo is connected to the Hand sanitizer bottle.

Since AI inference is a continuous and heavy-duty task, it might take a toll on lower-end devices like Raspberry PI 4 and might reduce its life span. Therefore, it is necessary to keep it cool. The attached fan does this job.


  • The system does not work in dark areas where there is no light.
  • It is a prototype pioneering effort.
  • The system is not entirely autonomous. Every time the system boots, it needs to be connected to the internet, and commands need to be run for the system to become live.

However, manual intervention is not necessary after this step. To improve the system, one can further work upon these challenges.

Webinar video

Related Blogs

Businesses are embracing the scalability and flexibility offered by cloud solutions. However, cloud migration often poses…

Streamlit is an open-source Python library designed to effortlessly create interactive web applications for data science…

Fleet business is huge and ever-expanding. The global fleet market will grow at a CAGR of…

Scroll to Top