Introduction: Build Your Own BARBOT

Ever wanted a robotic liquor server?

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

My first step was to consider my available resources. I had 5 servos, a 14" by 14" piece of 1/4" polycarbonate, the Arduino, and a few servo brackets from Lynxmotion. (Purchase from www.robotshop.ca/)

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 had a piece of polycarbonate left over from an underwater camera case I built last year. Originally it was destined for a computer case mod that I started but never finished. I felt bad for it as it was just sitting there waiting to be useful. It was a 14" by 14" square, so just over a square foot. Unfortunately it is also the only material for this project that I do not know where a good and well-priced source could be found. I hope avid readers of this instructable could provide their insight on this matter (so I could update this).

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

Despite being strong and aesthetically crystal-like, polycarbonate is relatively easy to work with. The major cuts were done on a band saw, although a jigsaw, hacksaw or dremel could have been used as well. Too ensure a nice clean look, all cuts were then sanded with a belt sander. Some smaller corners had to be filed smooth first then sanded.


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 a piece of polycarbonate with holes that will allow the glasses to sit 2/3 of the way. There are contact switches glued under each hole to allow the Arduino to sense the presence of the glasses (we wouldn't want to waste liquor now).


The tray arm is made from:

1 x Lynxmotion "L" Connector Bracket
(www.robotshop.ca/lynxmotion-connector-bracket-asb-06b-3.html)

1 x Lynxmotion Long "C" Servo Bracket
(www.robotshop.ca/aluminum-long-c-servo-bracket-asb-05-3.html)

1 x Lynxmotion Multi-purpose Servo Bracket
(www.robotshop.ca/lynxmotion-aluminum-multi-purpose-servo-3.html)

1 x Hitec HS-645MG Servo, although a cheaper HS-422 would do as well.
(www.robotshop.ca/hitec-hs422-servo-motor.html)

4 x Small Snap-action switches with levers. There are great inexpensive contact sensors I got from All Electronics, a great online store
(www.allelectronics.com/make-a-store/item/SMS-242/SMALL-SNAP-ACTION-SWITCH-W/-LEVER/1.html)

1 ft of Multi-wired cord (8 strands needed) I got this great 10-strand cable that is useful for situation such as this.
(www.allelectronics.com/make-a-store/item/10CS22/10-CONDUCTOR-SHIELDED-CABLE-W/-DRAIN/-/1.html)

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

This was by far the most difficult part of the build. In fact I am still not completely satisfied with the performance (volume flow mostly). The problem lies in my choice of driving the liquid - through gravity. I did not want to increase the cost and difficulties of this project through the addition of a powered pump so I opted for the easier way.

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.

The Container
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.

Dispenser
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 control panel allows you to choose the drinks. I have a very basic setup with LEDs and a pot for selection. You can be more creative and use a LCD if you optimize the output pins used, which was my original plan before I run out of time.

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
(www.allelectronics.com/make-a-store/category/219/Enclosures/1.html)

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.
(www.allelectronics.com/make-a-store/item/IND-13B/5MM-ULTRA-BRIGHT-LED-W/METAL-CASE-BLUE/1.html)


1 x Push button switch - Just a simple start switch to let the BarBot know that you are ready.
(www.allelectronics.com/make-a-store/item/PB-138/SPST-N.O.-PUSHBUTTON-RED/-/1.html)


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

This section will be covered in brief as I am a beginner at AVR programming so I am only qualified to give you hints and tips. Make sure you have the latest version (0018) of the compiler so your servo library is up to date. I have uploaded the sketch, but keep in mind that many of the variables have been set to my specific conditions (servo angles, pouring time, etc). You will have to experiment with your set up to determine your own settings.

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

This section will cover some of the little things that I encountered along the way of building this BarBot as well as final finishing touches. As always, pictures will do me a more justice than endless paragraphs.

Step 9: Afterthoughts

Well, I did receive first place for the fair so overall I was very pleased with the project. I loved explaining the workings and purpose of the robot and getting their reactions. I think more forethought would have made the build process more smooth, but trial and error helped along the way.

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.