I purchased a Lynxmotion robotic arm last year and an Arduino (deci) to play around with. I had it serial controlled with a joystick and it was a great way to start in robotics. More recently I wanted to take on another micro-controller related project for a university science fair. Since it was going to be hosted at the on-campus pub, I thought it would be fitting to build a robot that would dispense alcohol into shot glasses.
I hope this instructable is easy to understand and I will try to include as much detail as possible so that anyone could make one for under 200 dollars. Please vote and comment on this instructable. It is my first one and I hope to make even better ones in the future.
DISCLAIMER: It is a experimental project and will require some basic electronic skills such as soldering and AVR programming. Modifications may cause damage to your micro controllers if you are not careful (since you are working with liquids). I DO NOT claim any responsible for such misfortunes. As well, this project is not fully documented as I was tight on time completing it, therefore more detail may be added as time goes on. If you have any question, please ask and I will be happy to help.
PS. During the build I discovered that there is competition and audience for this kind of robotics and to my surprise it is under the same name "BarBot" (link: robogames.net/barbot.php). I hope no one is angry that I used the same name. I do wish I could attend Robogames though.
Step 1: From Concept to Reality
Then I considered the features required:
Liquor Reservoir (I wanted at least 3 containers of minimum 500ml each in volume)
Tray for the shot glasses (I wanted at up to 4 shots to be served at once)
Human Interface (Controls for the selection of type of liquor to be intuitive)
Liquor Selector (A mechanism that chooses the selected type of liquor to dispense)
Dispensing volume controller (A mechanism that allows the control of volume of liquid per shot)
Initially, the idea was to directly use the robotic arm and attach a liquor dispensing mechanism to it, but this proved to be difficult due to a number of factors. First, I did not have proper sized valves so it was difficult to figure out how to transport the liquid to the dispenser on the arm without interruption. Second, I had 1/4" tubing (sourced locally at a hardware store) but it was not the silicone type and therefore not very flexible (too much torque will be required for the servo).
The next idea was to have the dispenser be stationary and have the tray with the glasses move under it. This had a few advantages: no need for a mechanical liquor sector as the tray could just move under the selected liquor container, and less torque would be needed for the main servo since the tray is horizontal and weight of the glasses (acting vertically) could be supported through structure.
The images below highlight some of the ideas, with them evolving to the final sketch at the end. Funny thing is I know AutoCAD and SolidWorks, but prefers to draw them because I get most of my ideas right before I go to bed (I have pen and paper prepared under the bed just for that :P).
Step 2: Building the Supporting Structure.
I am a fan of circles, and since the tray would be traveling in an arc, I decided to build the base based on circles (its a pun, I love puns). The main dimensions are based on the material constraints, so its pretty easy to see the general size of the whole structure by looking at the image below. However, the dimension are also based on the size of the shot glasses I used as well as the size of the Lynxmotion servo bracket (I wanted the tray to have the same curvature as the base so it looks like two intersecting half-circles).
I found that the easier way to prototype for structures like this is to build a 1:1 scale out of cardboard (this was faster for me than CAD and can provide similar insight on whether your designs will be feasible. Attached are pictures of the frame built with cardboard.
Step 3: Working With Polycarbonate
One important thing I have learned is that you NEED sharp tools and patience, especially when drilling large diameter holes. I had some decent hole saws that I assumed would go through like butter. Well, it did, it melted the material surrounding the hole as well, causing slight discoloration and a lot of headache. So remember to take it slow and do not apply too much pressure when drilling so it could cool.
Step 4: The Tray Arm
The tray arm is made from:
1 x Lynxmotion "L" Connector Bracket
1 x Lynxmotion Long "C" Servo Bracket
1 x Lynxmotion Multi-purpose Servo Bracket
1 x Hitec HS-645MG Servo, although a cheaper HS-422 would do as well.
4 x Small Snap-action switches with levers. There are great inexpensive contact sensors I got from All Electronics, a great online store
1 ft of Multi-wired cord (8 strands needed) I got this great 10-strand cable that is useful for situation such as this.
Most of the mounting screws will be available to you at your local hardware store. I used a few nuts, screws and bolts from the bracket kits.
Step 5: Liquor Containment Modules
How does it work? Basically, the servo adjusts the height of the the existing end (nozzle) of the tube. When the end of the tube is lowered below the the liquid level (analogous to the water table) of the of container, the pressure from the weight of the liquid pushes itself out. To stop the flow, simply raise the end above the liquid level. Without going through the fluid dynamics aspects of it, the flow rate is completely dependent of the vertical height of the liquid in the container.
This creates serious limitations. To have a higher flow rate I would need a taller liquid level, and that, in turns, means a way to raise the exist end of the tube above that as well. I simple terms, the more flow rate I want, the longer the dispense tube would have to be. That is not something I want, as I would prefer a more compact design. I the end, I settled for sacrificed flow speed for size.
I used a Voss water bottle which I picked up at my local Shopper's Drugs. It is 1L in volume are beautifully simple. Any bottles that are in the general volume range of 1L should do. The Voss bottles are especially nice, as the cap is big and flat, which made attaching the bracket a breeze.
The dispenser is made from a standard servo with two eye hooks and a 9in length of tubing. The mechanics of the dispenser is largely dependent on your individual setup, but there are a few things to look for. Make sure that the neck of the tubing is dipped below the lowest point of the container (see picture). This ensures the siphoning action is not interrupted by air bubbles from the back flow when the nozzle is up.
Step 6: Control Panel
The panel is made from:
1 x Small project box - I got mine from Radio Shack a long time ago, but All Electronics has a bunch to choose from
1 x Linear-tapered Potentiometer - I used a pot as it was what I had around, I think its a nice input but a slide pot may have been even more intuitive.
What I used (www.allelectronics.com/make-a-store/item/LTP-15M/15M-LINEAR-POTENTIOMETER/1.html)
Slide pot (www.allelectronics.com/make-a-store/item/SP-20K/20K-LINEAR-SLIDE-POT-OPEN-FRAME/1.html)
3 x Bright LEDs - These are just a great and simple way to indicate your drink choice, I had them mounted in the control panel, but I think it would be even cooler if they were attached to the container modules (perhaps with the liquor type indicated beside it). I also went for the more expensive option of having a metal mount.
1 x Push button switch - Just a simple start switch to let the BarBot know that you are ready.
You should be creative with your user controls. For example, you can mount the LEDs on the dispensing modules themselves and label them with the liquor. I chose to use a project box because I had a few of them that were lying around. I am an amateur when it comes to soldering and circuit layouts, so it was fairly messy.
Step 7: Interfacing With the Arduino
As I plan to use the Arduino for other projects (a tracked robot maybe :D), the wiring were all done with jumper wires and an inexpensive bread board. You can purchase the Arduino proto-shield if you would like the project to be permanent. In which case you might also consider a BareBones Arduino for cost savings.
I will not go into specifics of the pin connections setup as I believe that most people who are familiar with AVR programming will find the coding itself to be fairly straight forward. As for those people new to Arduino, I think it will be more fun to explore my coding and see for yourself what it is like. The Arduino website is a great source of references for syntax and the such. BE CREATIVE!
Step 8: Putting It All Together
Step 9: Afterthoughts
It's surprising how much fun building something like this was. I would recommend this type of project to any avid builder that are interested in robotic.
Please post comments and pm any questions to me.