Introduction: Automatic Liquid Dispenser
An automated dispenser is a super helpful addition for everyday use. With sanitation becoming ever more important, this device can be utilized to safely deliver soap or hand sanitizer. This particular creation employs a peristaltic pump which can handle substances that are generally harmful to standard pumps. Peristaltic pumps also offer a unique advantage allowing 100% of the internal plumbing to be replaced in case there is a need to repurpose the pump's use.
My goal was to make this project as easy to replicate as possible. Most of the electronic components can be substituted with similarly performing parts.
Please be sure to watch the gifs that are included with most steps for assembly clarification.
Everything was modeled, rendered, and animated using Fusion 360.
Step 1: Parts
- PCB board (2): 80mm X 20mm X 1.6mm
- Peristaltic pump and motor: I used this one
- Bottle to hold liquid: Dimensions are included in the image above.
- It is not crucial to find the exact dimensions listed in the photo above. As long as the bottle can fit in the designated space, screws will be used to attach the lid to the main body.
- Arduino Nano board
- Ultrasonic sensor
- Relay switch
- PCB Screw Terminal Block Connectors: Similar to this
- 12v 1A DC power source
- Screws (12): 6-32x3/8
- Silicone tubing: 2mm ID x 4mm OD
- Assorted wiring
Most of these components can be substituted with readily available parts found in your area.
Please notify me if you have problems with the vendors/products linked in this project, so I can make adjustments.
Step 2: 3D Printing
All of these parts were designed while taking into consideration standard printing dimensions.
Everything was designed using Fusion 360 and printed on both the Creality CR10 and Ender 3 Pro.
The Fusion 360 Cad software is a great option when designing parts for 3d printing. Everything is simplified and very easy to learn.
The pump was prototyped while using a 0.02mm layer height, although it is not required.
For some of the more intricate pieces, the use of supports will yield a better result.
Since I was using the Cura print slicer, I found the tree support feature to perform well when supports were required.
Step 3: Getting Started
Use the 3d printed jig to mark and cut the designated holes needed on the bottle lid. The lid can then be attached to the electronics base using two screws.
Step 4: Lower Cylinder
Before soldering the electronics together, attach the lower cylinder using four more screws.
Step 5: PCB Design
For this project, I wanted to make parts as interchangeable as possible, so I created a slot system that allows for the electronic components to be replaced with alternate pieces without compromising the plastic parts. With this system, a PCB containing the desired circuitry can be slotted into the model, eliminating the need for adhesive or specific fastening constraints. This system will make the process of sourcing materials easier and more cost-friendly.
Step 6: Core Electronics
First, we will solder the power PCB board. This board uses screw terminal block connectors to connect the Arduino and its main circuit to the power source and ultrasonic sensor while still allowing for disassembly and modifications in the future.
Secondly, installed all components into their respective places on the electronics base. This made it easy to measure the necessary wire lengths and ensure everything will fit into the final assembly. Following the wiring diagram, I soldered the components together.
Step 7: Tube Install
Once the electronics are in place, it is time to install the liquid tubing. The two smaller lengths will travel from the bottle to the lower cylinder to prevent a vacuum from occurring, while also protecting the electronics from leaks. The longer length travels from the bottle to the pump housing and eventually the spout.
Depending on how snugly the tubing is secured in the 3d printed base, it may be a good idea to use glue to create a stronger watertight seal.
I discussed this step with more detail in the comments below.
Step 8: Top Housing
Now that all of the core electronics have been installed in their designated places, attach the motor cap using the two screws provided. The pump with its pre-installed tube is then placed on top. Once the motor and pump are secure, install the middle ring. The ring has a grove on the back which should line up with the power exhaust on the electronics board. The main 12v power source can then be attached to the power board and positioned in the designated location. Finally, slide the top cylinder into the designated slots and attach them with four more screws.
Step 9: Sensor/Spout Preparation
My original design for the spout used an infrared sensor. This worked well and had a small form factor that allowed me to squeeze in an RGB diode as an indicator. The design worked great, but it was necessary to tune the infrared trigger frequency to cooperate with the varying light sources experienced. Due to complications in the final testing phases, I decided that it would be best to pivot to an ultrasonic sensor. I already had one of these sensors on hand and it works great, but it is a little bit of overkill for this application. Not wanting to disrupt the form factor I was previously using, I managed to squeeze the sensor by removing the LED and replacing the fasteners with a simple press fit. I suspect there are better sensor solutions available, so I am open to hearing suggestions about any small alternatives that I should consider.
To fit the sensor into the tight form factor, I first desoldered the preinstalled breadboard pins and replaced them with my own wires. To achieve the exact size required for the PCB board, it was necessary to slightly trim the corners. While adjusting the board size, it is crucial to ensure that no circuitry is damaged in the process. Once modifications are carefully made, the ultrasonic sensor should snugly fit into the designated holes allowing the lid to snap on top.
Once the sensor has been modified, it is important to test its features before continuing with the build.
Step 10: Installing Spout
Once the sensor is prepared for installation, the lower half of the spout can be attached with screws that pass through the top cylinder and are fastened to the backplate. The backplate has a designated location for the silicone tube as well as an opening for the required wiring to pass through. Once the spout is secure, the tube can be installed followed by the ultrasonic sensor and lid. The wires can then be attached to their respective connectors that were installed on the PCB board.
Step 11: End Caps
The last and easiest step of the installation process is to install the end caps. These should both achieve a secure press-fit with their respective pieces. Connect the bottom of the bottle to the lower cap. This assembly can be screwed into the lid creating a tight attachment. The top cap can then be pressed into the upper cylinder creating a finished product.
Step 12: Final Result
This project has definitely taken a lot longer than I imagined to develop, but I feel the final result was worth the effort. I would appreciate any suggestions you have on how I could improve my project or presentation form.
Step 13: Code
Here is a quick glimpse of the code I wrote for the process. You can access my Github for a downloadable version here.
I wanted to keep this code as simple as I could while still achieving full functionality. I highly recommend tweaking this code to fit your personal needs. Personally, I am going to replace my if statement found on line 30 for a switch case. This case will be coded to allow my dispenser to deploy different amounts of liquid depending on where my hand is in relation to the sensor.
Step 14: Files
Attached are all of the STL files used for this project. All of these parts were designed to fit small printing areas. I designed the pump using a 0.02mm layer height, although any reasonable settings will work. For some of the more intricate pieces, the use of supports will be necessary.
I have attached the full animation for the assembly below. Unfortunately, due to a recent update, the Fusion 360 animation workspace has a few glitches rendering the application temporary unusable. The animation is from an outdated version that is virtually similar barring one piece used in the spout.
Second Prize in the
3D Printed Contest