Introduction: 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 - )

- DC Water Pump ($1.8 - $3 - )

- TIP32C PNP Transistor ($0.2 - )

- 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!

Trash to Treasure Contest

Participated in the
Trash to Treasure Contest