DIY Automatic Hand Sanitizer Dispenser




Introduction: DIY Automatic Hand Sanitizer Dispenser

About: I am New Pew, I create electronic projects and share these creations on my YouTube channel. In every video I mainly show how you can make these innovative creations yourself! There is a description of each pro…

In this project I will show you how to build an automatic hand sanitizer dispenser. Since the use of hand sanitizers has increased enormously with the Covid 19 outbreak, I thought it would be a good idea to make a decent non-contact dispenser that also looks presentable.


There are already several designs available on the internet. The difference from these designs is that with this design there is no contact between the alcohol and the pump. The air pump puts pressure on the bottle so that the liquid comes out through the other tube. In addition, it naturally also differs in appearance. The dispenser does not have its own reservoir but can be placed on the bottle of hand sanitizer. When the bottle is empty, the dispenser can be put on a new bottle.


The challenges were controlling the air pump and limiting the liquid flow. The air pump can be controlled with an Arduino, this would make the costs much too high. That is why I opted for a proximity sensor and a simple circuit with a PNP transistor and a resistor to control the pump. Limiting the liquid flow is achieved by the use of thin tubes and a small nozzle.

YouTube tutorial:

Parts & Materials:

Step 1: Making the Housing

I made the top and bottom of the housing using a self-made template.

The housing is made of thin plastic that I cut from an old plastic storage box. Copy the shape from the template onto the plastic plate. This can be done by tracing the shape with a marker or by sticking the template with adhesive tape. Cut the shape out of plastic twice.

Step 2: Install the Cap

Stick a cap to the bottom plate using a glue gun. For this you can use the cap of the bottle of disinfection or another cap of the same size.

Many bottles of disinfectant liquid have a DIN 28 cap, this format is used on many bottles (for example soft drinks) and is the most universal. You can also use a different size.

Step 3: Drill Holes for Tubing

Drill 2 holes slightly thicker than the tubing through the cap and bottom plate.

Step 4: Mount the Air Pump

Mount the air motor with some hot glue on the bottom plate. It is important that the 2 holes from step 3 remain free so that the tubing can still pass through.

Step 5: Mounting the Proximity Sensor

A small hole has to be made through the bottom plate for the sensor to see through. Hold the sensor where it should be and mark the hole. Cut out the hole with a Stanley knife. Now place the sensor and mount it with some hot glue.

Step 6: Mounting the Transistor

Mount the transistor with a little bit of hot glue on the bottom plate.

Step 7: Connecting the Resistor and Electrical Wiring

For the connection of the electrical part I have made a simple diagram that you can follow. Below are the connections written out again:

  • Connect Resistor between Proximity sensor OUT and Transistor B
  • Connect Proximity sensor VCC with Transistor E using red wire
  • Connect Transistor C with DC Air Pump + using red wire
  • Connect Proximity sensor GND with DC Air Pump – using black wire

The USB connections are described in the next step.

Step 8: The USB Connection

For this project I used a USB connection. The components used operate at voltages under 6 volts, so the USB connection (5 volts) was an obvious choice. Because the USB connection can be powered by a charger or by a power bank, it is also universal.

Use the male USB plug. Cut and strip the cable on the other side. Connect USB cable to the Proximity sensor:

  • Connect Red wire with Proximity sensor VCC
  • Connect Black wire with Proximity sensor GND

Step 9: Test and Calibrate

Connect the USB cable to a power supply. If the connections are good, the "power LED" (left) should now light up. The "Object detection LED" (right) lights up when the sensor detects something. By turning the tuning knob (trimmer resistor) you can set the range of the sensor. Set it to respond to a few centimetres away. After setting, disconnect the USB cable from the power supply.

Step 10: The Nozzle

Twist off the front of a ballpoint pen. This will be used as a nozzle.

Drill a hole through the bottom plate through which the screw thread of the nozzle fits, the nozzle should not be able to go all the way through. Place the nozzle in the bottom plate. Mount it with a little bit of hot glue.

Step 11: Assemble the Tubing

Connect a tube to the air pump outlet. Place the tube to the cap and put it in a little bit.

Put another tube in the nozzle and also pull it through the cap. This tube must have enough length to reach the bottom of the bottle. Secure all tubes securely with some hot glue.

Step 12: Assembling the Bottle

Hold the dispenser next to the bottle and determine how long the tube should be. Cut it to the correct length. Now place the dispenser on the bottle and tighten it.

Step 13: Finishing the Housing

Take the second plastic plate from step 1. Determine how high the enclosure should be so that all components fit inside. Cut a strip to this width and long enough to go around the entire top plate. Mount the strip all around to the top plate with hot glue. Make a recess at the back for the USB cable. Then mount the cap with a few drops of hot glue on the dispenser.

For the look I chose to spray paint the housing. Some hot glue was showing in some places and I had made a few scratches on it.

Step 14: Ready!

The automatic hand sanitizer dispenser is ready to use!

Tip: If the dispenser continues to drip for too long, this can be solved by making a (SMALL) vent hole through the cap.

I hope you enjoyed the project!

Stay healthy and see you soon!

Be the First to Share


    • Game Design: Student Design Challenge

      Game Design: Student Design Challenge
    • Block Code Contest

      Block Code Contest
    • Make it Glow Contest

      Make it Glow Contest



    Question 1 year ago

    I have made this device but the problem is that the device keep dispensing the liquid if I keep hand close to sensor. I expect that it should stop dispensing liquid after dispensing 9-10 drops of liquid so that if a naughty kid try to trick this device it may not empty the bottle because sensor detecting some object there. Do you know the solution or suggest some?


    Answer 3 months ago

    Adding a super capacitor (1/4F would probably work) along with a 12 ohm resistor in series between the 5V supply and the emitter, would probably do it.
    Adds a couple of dollars but would limit the run time of the motor.


    Question 2 years ago on Step 7

    Hi, i will make your project but I have a problem, I don't have the tip32c so I wanted to ask you which one I can use


    Answer 2 years ago

    Any PNP or PFET transistors with at least 200mA should do. It has to be good enough if they have the same package as in the pictures, just make sure to buy a P-type transistor.

    Tyler szymanski
    Tyler szymanski

    2 years ago

    i plan on making this for my teacher


    2 years ago

    How consistently does it dispense the sanitizer through the whole bottle? It is really fun that you are effectively making an aerosol hand sanitizer setup since you are using positive air pressure to push the material up the tube.
    How rigid is the bottle does it bulge at all during the dispensing?