DIY Automatic Alcohol Dispenser (No Arduino Needed)

243K1.1K520

Intro: DIY Automatic Alcohol Dispenser (No Arduino Needed)

Build the simplest $4 Automated Alcohol Dispenser without using Arduino. Keep your hands clean by filling it with liquid soap, hand sanitizer or with rubbing alcohol. By reducing physical contact, an automated dispenser keeps virus from spreading around in communal areas.

The Design:

I've seen several Arduino automated liquid dispensers circulating the web. I find using Arduinos a bit overkill for this specific project. Arduinos are far too expensive. I figured using a simple transistor or MOSFET would do the job, which would also drastically reduce the costs. Obviously, the absence of a micro controller removes control of over spilling, but then, I did find out that using a smaller nozzle would physically limit the flow of liquid. There are several two transistor RC circuits that would solve the over spilling problem but the single transistor design works well, given that you choose the proper nozzle size.

YouTube Tutorial:

STEP 1: Parts & Materials

Parts & Materials:

- Proximity Sensor ($0.6 - https://bit.ly/3ape7I2 )

- DC Water Pump ($1.8 - https://bit.ly/3ayT5qJor $3 - https://bit.ly/3aouip4 )

- TIP32C PNP Transistor ($0.2 - https://bit.ly/2UljPVM )

- 1N4007 Diode

- Aquarium Tubing

- Old Glass Jar

- Old Ballpen

- Sanitizer/ Rubbing Alcohol

STEP 2: Clean the Container

If you are planning to recycle a glass jar or container like mine. You can remove the label by peeling it, the remaining residue can be removed by using pure Acetone or hand wash alcohol.

STEP 3: Connect a Tube to Your Motor

Stretch your tube's end by using the end of your pliers while heating it using a lighter. The tube must be force fitted to your DC pump's liquid outlet. To can use a zip tie to keep it in place.

STEP 4: Drill Holes for Wire and Tube

Use your power drill for drilling holes for the wire and tube. Be sure to use the proper drill bit to give it a snug fit.

STEP 5: Cut the Excess Tube

Use a pair of scissors to cut the excess tube.

STEP 6: Add a Bendy Wire

To keep the tube from sagging, you can use chicken wire or copper wire to make the tube bendable. Simply insert the wire inside your tube. You can braid it to make the wired tube stiffer.

STEP 7: Makeshift Nozzle

A nozzle can be used to control the amount of fluid exiting the dispenser. I got mine from the tip of a dried out pen. You can try out a smaller nozzle to achieve a mist.

STEP 8: Hotglue the Sensor

You can use a nut and bolt to hold your sensor in place, or simply just use hot glue to mount it in place.

STEP 9: No PCB Needed - Superglue the Transistor

The project relies on a very simple circuit, using a transistor as a simple switching device. I didn't find the need to use a perf board or PCB. TIP32C is robust enough to handle the DC pump without heating up.You can simply mount your transistor using a few drops of superglue on the container's lid.

STEP 10: Schematic Diagram

Here's a simplified wiring diagram for the components.

Why not just connect the pump directly to the sensor's digital output? For one, the sensor's digital output can only handle a few militi-amps of current, connecting the pump directly to the IR sensor could damage the LM393 op-amp chip. Second, the sensor's digital output is HIGH by default when no object is detected or LOW when an object has been detected. This means you would need a logic inverter in order for the dispenser to work properly. Using a PNP transistor solves the two problem in a cost effective way.

STEP 11: Schematic Revision

MOSFET: Originally, the plan was to use a logic level MOSFET instead of a BJT. MOSFETs are designed to operate as switching devices, unlike a BJT which is often use to serve in the active region than on a saturated level. MOSFETs can also handle more current due to its material composition. The reason why I chose to use a BJT was due to its availability for hobbyists as they are more common than MOSFETs.

FLYBACK DIODE: The motor acting as an inductive load. A flyback diode is a diode connected across an inductor used to eliminate flyback, which is the sudden voltage spike seen across an inductive load when its supply current is suddenly reduced or interrupted. You can add a common rectifier diode such as a 1N4007 or a schottky diode for a faster response. From quick measurements and observations, the motor from the specific DC pump only emits very minute amounts of back EMF due to the motor's size and the shaft's reluctance to stop immediately. When it comes to switching, adding a fly back diode is a common practice in electronics. Although I haven't had problems with the absence of a fly back diode in this specific project, If a diode is available at hand, It would be better to add the diode just be sure.

STEP 12: Wire the Simple Circuit

Follow the diagram and solder the wires and components together, poorman style.

STEP 13: Add a USB Male Plug

The project was designed to operate at voltages under 6 volts. USB power was the most universally available source I could think of that gives 5 volts. You can get salvage any USB cable you have lying around. Cut the other end of the cable and use your wire stripper.

STEP 14: Hot Glue the Electronics

Once you have finished soldering the USB cable. You can test your project if it works. When you are confident with your wiring, you can cover the components under a blob of hot glue to keep it safe from touching each by accident and to make it waterproof as well.

STEP 15: Choose a Power Source

Since the project runs on USB power. You can use a AC USB charger or a power bank for supplying power to the dispenser. Depending on the capacity, a power bank would last weeks of operation. Using a powerbank makes the dispenser a lot portable too!

STEP 16: Calibrate the Sensor's Distance Threshold

The sensor comes with a tuning knob (trimmer resistor). You can use a flat head screwdriver to tune it. The knob limits the threshold range of detection. Turning it makes the sensor more sensitive or less sensitive.

STEP 17: Fill the Dispenser

You can now fill your dispenser with whatever liquid you want. It even works with viscous liquids such as liquid soap and dish washing liquids! I made this project specifically for hand wash alcohol since I use it often before and after eating.

STEP 18: Test It!

You're done! You can now test the project. Hope you guys enjoyed this tutorial!

284 Comments

I have a 9v dc battery, how can I use it to operate the project?
Pls guys i need this for my project so pls reply. Where did the blue wire came form? What is it called? I need this for my science project PLS ANSWER MY QUESTION
Is there a way to configure this to dispense a specific amount of "liquid"? I'm interested in making a couple of these for home. I have a special needs daughter that is Tube fed and we whole blend her food. We add certain oils to her diet and this dispenser looks like it may work for this. But it needs to be a specific volume. ie. 2 tbsp
Hi, just a feedback about using the proximity sensor (FC-51).
1. Its receiver LED (black) is very sensitive to light and very easy to be falsely triggered by ambient light, sun light, or flashlight and that will make the motor running continuously.
2. Suggest to find the FC-51 with LED facing downward and has a black cover.

BTW, thanks you for sharing this wonderful guide!
I forgot to ask, did you use diode in your build?
Correct me if I am wrong, if I want to add a Diode, I just have to solder it on the sensor legs right? At VCC (positive Diode leg) and GND ( negative Diode leg)?
No, the (flyback) diode should be soldered across the DC water pump, check attached diagram.
oh i see, thanks a lot, u are very helpful
After I done some research, I found out that this kind of sensor (the one facing down) can only detect items approximately <10mm from the sensor, apposed to the sensor originally used in the project, which can detect up to 20m.. I don't thing the sensor you suggested is appropriate for this project tho..
The reason that I suggested this downward-facing IR sensor with black cover is only for safety. I used the FC-51 and it was triggered 2 or 3 times by ambient/sun light and continuously spray out alcohol. The problem was solved after I switched to TRCT5000.

If you plan to use FC-51 then I still strongly recommend to make its LEDs facing downward and cover it with black material.

BTW, sharing my build and wish you make it very soon. Good Luck!
Oh I see, thanks a lot for the advice, cool design BTW 👍👍
May I know which legs to solder? Since the original project use 3 legged sensor and the one you recommended have 4 legs
Connect to VCC, GND, and DO. Check attached picture!
Ooo thanks a lot
As easy as it is to edit your instructable, even after it is published I can not figure
why you show a picture including a 1 milli ohm resistor and FAIL to include it
in your parts list. and you list a 1n4007 Diode but DO NOT include
that in any picture of parts needed...i bought everything on your parts list
(enough to make 5 full dispensers) went to build the project with
my kids and was missing a damn part!!!!! I am aware alot of us know the difference between a diode and a resistor but many don't and that is frustrating to sit down to a project only to have to put it off even longer now. Would take you less then 5 minutes to fix , what i find to be a HUGE error by not listing an item that is needed in your part list.

That being said, i salvaged the resistors needed from scrap devices in garage so i did not have to wait. and built 5 of these for $1.39 each (which includes the tubing i bought, already had 5 of these glass jars around from my instant coffee) and they all work GREAT!! Thank you!!!!
Hey, I wanted to do this project, but, do we need the diode tho? As I read above, the diode is not mandatory, I don't know about electronic but I am good at following instructions.
Hi can I see your proj? I want to see how you design it
Anyone please send PPT about this project
Hi, I've built several successfully, but all of a sudden, my current one will not dispense the sanitizer. The pump works with direct 5V application, but the sensor will not deliver the current to the pump. Any idea what the problem could be? I'm using a different/new sensor, but still no pump action.
More Comments