Ratio Mixing
Use: For juice mixes
Liquids are simultaneously pumped at different rates. For example, when asked to make "Tropical", orange juice would be pumped at full speed while pineapple and mango are pumped at 10% speed creating a 10:1:1 mixture of juices. This allows you to fill you glass as long as the pour button is depressed and is ideal for juice drinks.
Volumetric Mixing
Use: For alcoholic beverages
Liquids are combined in specific quantities. This only works for drinks of predetermined size, but is more practical for alcohol as it can be quite expensive to waste and (to a limited extent) unhealthy to over consume.
ConfigurationThe first step is to chose whether you will configure your machine in a direct or reservoir configuration.
Mixing Reservoir
This is ideal for if you are going to be using a higher number of beverages (more than 3) as it will reduce the length of tubing and thickness of tubing bundles. The mixing reservoir configuration adds an intermediate reservoir where drinks are mixed before being delivered to the glass. Reservoir mixing requires an additional pump and can create waste when mixing in ratios as some mixed solution will remain in the reservoir. This can be solved by running pumps for a small duration after the button ceases to be depressed. Reservoirs are more accurate for volumetric mixing as there is less excess tubing and can be self cleaned from a water supply. This method also allows multiple drinks (of the same composition) to be mixed ahead of time and then poured on command. Adding a mixing element to the reservoir is not necessary in most situation, but can be useful for more viscous solutions.
Direct Mixing
Direct mixing involves pouring any number of solutions into a glass simultaneously. it is Ideal for small systems as it does not require as many pumps or have the added heft of the mixing reservoir. Direct mixing is not effective for volumetric mixing as there is a long length of tubing from the pump tat must be primed. This makes volumetric impossible without manual priming (which can be done by pressing the pour button until a tiny bit of solution is dispensed) and is generally inconvenient for volumetric mixing. Ratio mixing however, it best suited for the direct configuration although you will not see any benefits in performance when compared to resovoir ratio mixing.
Conclusion
Reservoir mixing is a more effective and elegant solution for setups with many pumps, but to keep it simple, direct mixing is more cost effective and should work just fine when manually primed.
Number of PumpsHow many pumps are connected to your machine will greatly influence the functionality you get from it. The number will change what configuration is best for you, and some of the parts you need.
Ten is the magic number
I chose to design my system for 10 pumps when complete for two reasons. First, you can get the bulk discount on motors, which will save a few bucks. More importantly, it splits up nicely. Using a mixing reservoir it allows eight pumps for distinct beverages, one pump water to flush the system in between beverages, and one pump to take the mix from the reservoir to the glass. I have not completed printing the pumps, so I do not have it set up this way yet.
Housing (Nonessential Components)Cutting
Arrange the buttons, drain, and faucet however you like. Cut holes that start small as you can always widen them. For these large holes I would highly recommend that you use wedge bits if you have them as I found it to be a much better experience than using hole saws. Make sure to drill a pilot for the jig saw, you cant just push it through the top like a mightier saw. I found that to get right angles I had to drill pilots at all corners of the drain hole. This wasn't an issue as the drain has a 1/4" lip that covers up my sloppiness.
Assembly
This step is quick, just use rope caulk (for non-permanent seal) or any permanent adhesive of your choice to install the drain and EL wire. The legs were attached with hot glue in my case but are completely extraneous. I however, think the under glow was worth it.
Finished
As Wikipedia puts it, "A peristaltic pump is a type of positive displacement pump used for pumping a variety of fluids. The fluid is contained within a flexible tube fitted inside a circular pump casing (though linear peristaltic pumps have been made). A rotor with a number of "rollers", "shoes", "wipers", or "lobes" attached to the external circumference of the rotor compresses the flexible tube. As the rotor turns, the part of the tube under compression is pinched closed (or "occludes") thus forcing the fluid to be pumped to move through the tube. Additionally, as the tube opens to its natural state after the passing of the cam ("restitution" or "resilience") fluid flow is induced to the pump. This process is called peristalsis and is used in many biological systems such as the gastrointestinal tract. Typically, there will be two or more rollers, or wipers, occluding the tube, trapping between them a body of fluid. The body of fluid is then transported, at ambient pressure, toward the pump outlet. Peristaltic pumps may run continuously, or they may be indexed through partial revolutions to deliver smaller amounts of fluid." What this really means is that it is like an infinite motorized push pop.
DIY Solution
On Ebay you can find peristaltic pumps for about $10. The only issue is that you will only get about 100mL/minute in flow, which leaves you waiting for over 3 minutes to fill a 12oz glass. This kind of performance would not be usable, so it was necessary to look into other options. Larger sized pumps are available, but have high lead times and are made by industrial sources, so there is a
quote process and minimum order. The only remaining option was custom fabrication. I just had finished building my 3D printer and decided to try putting it to use.
To drive the pump I settled on NEMA-17 steppers with the proper controllers. This was the best choice because they provide very simple and accurate speed control and can provide the torque necessary to pump fluid.
After looking I found a great model to start with. The pump is parametric (so you can scale it to fit your application) and there were hundreds of people who had successfully printed it before. The parameters I used can be found in the attachments section.
This model was not quite ready to be used in the project yet, so I put it into Fusion 360 and made some edits. To start I modified the hex in the center gear to fit the NEMA-17 steppers I bought. The new hole supports a 15mm long shaft with a 5mm radius and a flat cut down to 4mm. I also created a second part, so that the motor cannot only connected to the shaft but also be held onto the motor. It has a 102mm diameter to match that of the pump, is circular in shape, has a central 23mm cutout, and four 5mm in diameter holes for mounting with m3 6mm or 8mm screws.
Difficulties
This took much longer than it should have, as Fusions's workflow does not play nicely with STL files, but it was the only free option I had for parametric modeling. All said and done, I had two STL files ready to print after a few hours.
The first attempt at printing a pump was a mixed experience, I mis-entered the parameters in the thing customizer, and the resulting pump would not turn past a certain point. In addition to this, the print was messed up due to a jump midway through, seemingly from the table being knocked. I went back to Fusion with the right parameters and set out to printing the next morning.
After a few hours of adjustments I was able to get the printer working to my satisfaction again, difficulties in the process ranged from a loose extruder gear, dropping a set screw, and an awful time locking in PID settings.
The first print I was able to get off was a mount printed at 200 microns and 100mm/s with no retraction and a brim. Sadly, the PID tuning was wasted as the radiator 10ft from the printer kicked on midway through and gave it some trouble, leading to +/- 20C accuracy on the nozzle temperature. As a result the print walls were blotchy as is typical with low temperature or under extrusion. I adjusted to this issue by increasing the flow rate in the slicer slightly and retuning the PID settings.
I continued and was able to print one pump at 80mm/s (I did not want to overdue it and mess up overhangs on the gears, just one instance if how Simplify3D would have helped) with retraction (to avoid stringing on the gears) and still a 200 micron height for speed. Despite another auto tune the temperature did still occasionally vary more than the desired range of +/- 10C, but remained above 200C, which is only slightly on the low side for the filament. This barely succeeded (due to what I can only speculate is slicing problems as I ran benchmark prints first that did not experience the same issue) and had a shift over a few millimeters up that caused the gears to not mesh without post processing the print using sandpaper.
With a total print time of about 1.5 hours for the mount and 3.75 hours for the pump itself and the combined factor that I only got the printer working at noon today (Sunday 2/26), I have been unable to print the full set of pumps and mounts, and plan to print 1 or 2 a day (depending on my schedule) until I have a full set.
Assembly
First, check that your m3 screws fit in the mount. Either due to an error in the model, or the fact that the heads of the screws were bigger than I had designed for, they would not fir. To remedy this I countersunk the holes using a bit slightly smaller than the head and then punched them threw using a hex wrench.
Once they fit through use 4 of them to attach the mount to the motor. It is essential that they no not protrude, as this will interfere with the operation of the pump.
Proceed to use hot glue to attach the pump to the mount taking care to only apply glue to the perimeter gear. Before applying the glue, ensure that the pump fits onto the motor and it is a tight fit.
Repeat this for each pump.
Electronics
The wiring for the pumps is very easy and should be done for every motor. By referencing the coil diagram that shipped with the motors and the documentation for the controllers I determined the correct mapping.
The pairs are red with blue and black with green. Each wire should go to an out on the same side as the other in the pair.
Then, connect the four "in"s on the controller board to the PSoC. After you have connected enough motors you will have to add on another board to control them, I don't have a GPIO multiplexer on hand so I went with the approach of running it on an Arduino running as an I2C slave device. As soon as I have more pumps to test with I will get the code for this completed.
To drive the motors I took advantage of a timer and wrote a solution that mimics the behavior of the Arduino library to move the stepper through the four steps, by adjusting the delay in between transitions the speed of the motor can be changed.
Also, the light sensor is used so that the EL wire and button backlights are only turned on at night, in case of a midnight snack.
Making it an ApplianceTo give this the feel of a real appliance (and provide power for the large amount of peripherals) it is best to use a simple power supply that will also convert from AC 110V (or AC 250V for other regions) down to DC 12V which is used by motors, fans, and coolers.
Before the power supply can be used it needs to be able to connect to the wall and be turned on and off. This is done with a switch and adapter combo. Sadly, the combo comes with no connections made, so you need to connect the power switch to the wall adapter and then the switch to the power supply.
Yes, you can have Alexa with thatTo make it voice activated, I used Alexa. More specifically I wrote a short skill to take a drink order and send it to the machine.
Given that the purpose of this project isn't to learn to make skills, I won't go into much detail. What the skill does is determine what drink was ordered. Then it breaks this down into a ratio of different liquids. This is sent to the machine (which is using the MKR1000 for Wi-Fi). The machine "prepares" this by getting ready to dispense in the desired ratio. Finally, the skill returns a confirmation response telling the user that the beverage is ready.
You will need to set up an API and database as well (instructions on the way) so that the MKR1000 and Alexa can communicate.
API
The API is very basic, when there is a GET to the send method it updates the current beverage entry in the database with the color passed to the API. When there is a GET to the read method it retrieves the current beverage from the database and returns it. The MKR1000 polls this API once every 5 seconds when the machine has been turned on. All of this usage should fall under the AWS free tier.
MistakesI know for a fact there are some mistakes that I missed. If anything caches your eye feel free to mention it. The pump model doesn't seem to be the best and I would recommend finding a different one. I found that the current pump model over compresses the tubing and has trouble pumping, I am planning to try some different values and adjust the model, but doing so takes time.
Also, there are plenty of steps that I would like to go into more detail on. With the deadline coming up I will not have everything explained, but hope to add more eventually and put some finishing touches on the other aspects of the project.
Comments