Yu Jiang Tham

Dream it. Build it.

Build your very own drink mixing robot! (part 1)

I built a robot that mixes drinks named Bar Mixvah.  It utilizes an Arduino microcontroller switching a series of pumps via transistors on the physical layer, and the MEAN stack (MongoDB, Express.js, Angular.js, Node.js) and jQuery for the frontend and backend.  In this post, I’ll teach you how I made it.  You can follow along and build one just like it!  I’ve also put the 3d model (blender), stl files, and the code up on GitHub for you guys to download.  See the link at the bottom of the page.  Here’s the video of the robot:

Navigation:

 

First, a little bit more about the robot.  The entire thing costs approximately $180 to make.  All of the parts are 3d printed, so you’ll need a 3d printer to build this.  I used the MakerBot Replicator 2X, but any 3d printer should do.  Total time to print the pieces is about 18 hours, depending on your settings, and assembly wiring, and  Here’s a list of parts that need to be purchased:

Other tools required for the job are: a hacksaw to cut two of the 12″ rods in half, a wire stripper, soldering iron, and solder to connect the wire to the pin connectors and coaxial power connector, and a multimeter to check your work.

For the first part of this tutorial, I’ll focus on the 3d model, printing, and assembling the physical robot.  The second part of the tutorial deals with the code, and the third part will deal with the operation of the robot.

 

Design

Bar Mixvah is designed to use a system of 5 peristaltic pumps that are switched by 5 bipolar junction transistors (TIP120), all controlled by an Arduino, which itself is controlled by the Johnny-Five package on the node.js/express web server that is running on your laptop/windows tablet (or maybe Raspberry Pi?  I haven’t tried).  Having it on a web server allows users to order from any device, be it a phone, tablet, or other laptop that can connect to your WiFi access point’s internal network.  Practicality-wise, maybe it’s not necessary.  However, in my experience, people seem to enjoy ordering from a tablet that they’re holding in their hands more  than a stationary screen attached to the robot.

The physical design of Bar Mixvah around the usage of 5/16″x12″ steel rods.  I chose this length and size because they’re sturdy, readily available at your local hardware store, and not too big or small.  They’re also relatively cheap at ~$2-3 per piece, depending on where you buy from.  The problem with 3d printing is that it’s goddamn slow.  If you want to build a medium sized robot like this one, it would take days to print all of the necessary parts.  In fact, you don’t even need to print these parts; you could fasten them together using plenty of other methods.  However, I don’t have access to a metal shop, am a terrible welder, and wanted a friendly looking robot, so I chose this combination of 3d printing the joints and connecting them via metal shafts.

Here’s a screenshot of the 3d model, which, fortunately, looks exactly like the real thing after I finished building it.  Ah, the miracles of science!

3dmodel

 

Printing the Parts

The stl files can mostly be printed in the orientation that they are in, however two files should be rotated 180 degrees on the x-axis so that they can be printed without major supports.  These two pieces are Center – Board Cover – Top.stl and Center – Common Drink Channel.stl.  Additionally, Center – Pump Holder.stl should be printed flat by rotating it 90 degrees so that no support pieces are needed.  You will need to turn on printing with supports to ensure that the holes where we will be inserting the 5/16″ steel rods are printed to the right size.

One more thing that has been brought to my attention: the .stl files are may be 10x smaller than they should be in your 3d printing software.  If that’s the case, you will need to scale up the objects 10x in all dimensions.  It seems to happen regardless of the 3d software that I use when I convert to .stl.  No idea why.

 

The Peristaltic Pumps

What is a peristaltic pump?  If the word sounds familiar to you, it’s because you most likely heard of peristalsis in one of your biology classes at some point in time.  Peristalsis is the system that your body uses to swallow food.  Your throat muscles contract and relax in a way to create a waveform that pushes food in your throat down into your stomach.  Peristaltic pumps work on the same principle, albeit with a slightly different execution.  The clear plastic tube extends through the pump, and rollers propelled by a DC motor create a waveform that pushes liquid through the tube.  Peristaltic pumps are safe and hygienic because liquid never actually contacts any part of the pump; only the plastic tubing is ever in contact with the liquid.

The peristaltic pumps come with some very short plastic tubing.  This is obviously inadequate for our current application, so we’ll have to replace the plastic tubing.  This requires us to take apart the pump.  Fortunately, this is not a hard thing.  Instead of trying to explain it, you can view the following video to figure out how it is done.

 

Soldering

Before connecting any wires, you’ll want to do all of the soldering.  You’ll have to solder the 5.5mm x 2.1mm coaxial power connector to two jumper wires, one for the positive lead and one for the negative lead.  Plug in your 12V DC power supply to the wall, then plug the coaxial power connector into the DC power supply.  Use your multimeter to find out which lead is positive and negative by placing the probes on two of the leads until you find that the multimeter says 12V; those are you positive and negative leads (if it says -12V, then you’ve got the positive and negative leads switched).  Unplug the coaxial power connector.  Strip two wires and solder one to each of the coaxial power connector’s leads.  After you’re done soldering, wrap any exposed metal around the leads in electrical tape.

Next, you’ll want to solder wires to the leads of the peristaltic pumps.  The positive lead of the pump should be labeled, so you should not need to guess.  If it is not labeled, you will just need to make note of which way the pump is turning and make sure that all of them are turning in the same direction.  Don’t worry about the polarity of the leads on the pump breaking anything, since connecting them backwards will just make the pump go in the opposite direction.  However, I want to emphasize that you’ll probably want to ensure all of the pumps are pumping clockwise (if they are facing you; you can see through the tiny circle in the middle which direction they are pumping when turned on).  After this is done, once again wrap the leads in electrical tape.

 

Wiring

Here’s where it gets a little bit tricky.  The actual wiring is not too complicated, but it requires a little bit of finesse due to the confines of space that we are working with.  Since we are fitting everything on a single breadboard, we need to ensure everything is placed in the right spot.

In case you haven’t used a breadboard in a while, each of the numbers running down the breadboard indicate an individual node.  The center divides the two sides, so they are separate nodes.  The (+) rail running up the left and right side of the breadboard is one node per side, and it is the same with the (-) rail.

The first thing that you should do before getting any wiring done is to hook up your pumps individually and ensure they are all working.  The photo below shows a little bit more complex of a circuit.  To check if it’s working, you can just connect the coaxial power connector and pump on a breadboard and plug in the power and ensure that the pump works.

IMG_2408

Here’s the wiring diagram for the robot.  As you can see, it’s relatively simple:

circuitdiagram

The tough part is that there is not much space, so you may need to have a set of needle-nosed pliers ready to put some of the things in.  I recommend adding everything except transistors in first.  Here’s how my breadboard looked like after I finished wiring it up:

IMG_2514

Obviously, yours may look slightly different.  However, I recommend placing the Arduino’s nano so that its USB port is on the edge of either side of the breadboard.

 

Assembly

After printing all of the pieces, remember which piece is which based on the 3d model.  Remove all of the support pieces from the 3d printed items with pliers and/or a flathead screwdriver.  It is likely that it will be a very tight fit for the steel rods, so you’ll need to push the rods in with a lot of force.  I recommend using gloves.

IMG_2405

Also, the order in which you assemble the robot IS important.  Here’s the order that I used to assemble.  Basically, you need to remember to assemble the middle parts first before connecting the left and right sides to them.

  1. Insert all 5 of the pump holders onto one of the steel rods
  2. Insert the drink tray into the center of two of the steel rods
  3. Insert the breadboard holder (bottom piece) into the center of one steel rod
  4. Assemble the left side, then assemble the right side
  5. Insert the steel rods for the drink tray, pump holders, and breadboard holder into the left side
  6. Connect all of the parts of the right side
  7. Insert each of the pumps into a pump holder and screw them in with two #4 screws each
  8. Attach the center channel to the top center section using two #6 screws
  9. Tape the breadboard to the center of the top-middle section, ensuring that the top piece of this section will fit over it
  10. Wire everything up based on the circuit schematic
  11. Place the top piece (labeled #BarMixvah in the photo below) over the breadboard, moving wires around until everything fits snugly inside
  12. Insert two #6 screws through the screw hole and tighten the nuts at the bottom to secure it in place

IMG_2519

 

Well, that’s all for this week.  Let me know if you have any questions in the comments and I’ll try my best to answer them.

GitHub link: https://github.com/ytham/barmixvah

Note that the 3D model and stl files are located in the CAD/ folder, and they are printed with the MakerBot Replicator 2X.

Stay tuned for part 2, the software design!

Follow me on twitter: @yujiangtham

Navigation:

Share on FacebookTweet about this on TwitterShare on Google+Share on LinkedInShare on StumbleUpon

68 Comments

  1. Great!!.

  2. Looking forward to part 2.
    Thats some great work, I’m gonna build that thing!

  3. Do you have any plans on selling this as a kit, as many of us don’t have access to a 3D printer.

    Cheers,
    Praneil

    • At this time I have no plans to sell it as a kit. If you don’t have a 3d printer, you can still build the robot. If you can find some material that will stick the metal rods together (maybe getting some clay and the hardening it, or welding the metal rods together perhaps), then it can be done. The meat of the robot is the software that controls it. I’m still writing part 2, which will be coming soon. Thanks! :)

      • You could probably make this using Sugru or you could use a 3d printing service like Shapeways or Ponoko. Only problem with those services is that they don’t want to recognize the .stl files for some reason. They keep saying the paths are out of range.

        Any suggestions on altering them so I could get these printed would be appreciated.

        • To be honest, I’m not sure. I’ve never used any of these services before, but I’m guessing that it’s because the coordinates of the .stl files are not centered at <0,0,0> due to the fact since they were exported in-place from the .blender model. There should be some sort of way to center and lay the prints flat. If you can do that, I think it might work.

      • Ryan Klingert

        May 27, 2014 at 10:53 pm

        I’m probably missing something but when opening the .stl files in maker ware in order to print them on my makerbot 2x they are abnormally small, when using the recommenced IN to MM conversion they are to big for the build platform, any suggestions ?

        • Sorry, I forgot to mention this in my blog post. I’ve updated it to mention the following: for some reason, .stl files seem to be shrunk 10x in all dimensions. I have no idea why. Happens w/ not just blender, but other software too. You need to scale it (keeping the aspect ratio) 1000% in MakerWare.

  4. Errol Minihan

    May 27, 2014 at 6:01 pm

    Looks great, order all my stuff on amazon and ebay here in the UK, going to start the 3d printer going tomorrow, can’t wait for part 2 and 3 and get this working……..

  5. Cool! I’m keen to build one, and yours is the best I’ve seen yet … I just ordered my pumps!
    Looking forward to part 2.

  6. Could this be scaled up to 10-12 drink sources, maybe using a standard Arduino if the Nano isn’t capable? This is an awesome project and something I’d really like to try out

    • Absolutely. It should support as many pumps as there are digital out pins. On the Nano I believe it’s 12 or 13. The main thing is that you need a power source that will support 12 pumps. Each pump is rated at 300mA, so 12*.3 = 3.6A. Therefore, you’ll probably want a 12V DC power supply that is 4+ amps. They’re pretty cheaply available on Amazon. :)

      (You’ll also probably want to modify the UI a little bit so that you have 2 rows of 6 pumps instead of rows of 5 pumps).

    • If you go beyond that, you will need to update your chassis connector more than likely to a 2.5mm from the 2.1mm that is shown in the parts list.

  7. Which 3D printer did you use, I would like to buy one, any suggestion?

    • Any 3d printer should do, but you’ll need to ensure the calibration is correct for the 5/16″ steel rods to be able to slide in w/ some friction. The rods should not be loose. I used Makerbot Replicator 2X w/ ABS plastic.

  8. Very cool. I’m an engineer at Microsoft and would like to see if we can get this ported to the .NET Micro Framework platform (e.g. NetDuino). Please let me know if you’re interested.

    • Very interesting. Unfortunately, I have absolutely no experience in .NET. However, all of the code is on GitHub (link is in the article) so you’re free to use it as you wish. Thanks!

  9. This looks great. Thanks for posting up the instructions.
    I’ve been thinking about doing something similar for a while and other than not knowing how to set up the software side due to a complete lack of programming skills (so looking forward to seeing how you did that) I was reluctant to use these 12v peristaltic pumps. They are rated at 100ml per minute so thought they might be a little slow. How did you find the pour time for drinks with a large single ingredient or mixer?

  10. Only 12 commits?! What a g.

  11. What units are your Blender models in? When I import the .stl files into my 3D slicer program the parts are incredibly small and they need to be scaled up. This looks like a cool project I look forward to your future posts. Thanks.

    • Units are in centimeters, but it looks like there’s some issue w/ Makerware thinking it is millimeters. Apply a 1000% scale to each .stl object (preserve aspect ratio) and everything should be the right size.

  12. WOW !! your project is Amazing .. I will certainly try to make one for my self. 3D Printing and drinks is the next best thing happening to Mankind.

  13. Great project. I have a couple of questions how is the menu programmed for this do we need to program each menu? I mean to say let’s suppose I need a drink of 200ml with different ingredents do I need to program the drink to mix those ingredents ? My other question is there a way lets say I find a drink on internet which says to mix different proportions and I can just copy that text and able to decode the ingredents and store it as a menu automatically can we do this ?

    • I’ll go over the details of how the drink system works in part 2, which should be done in the next few days. Ingredients are all in ratios, so there is no need to program for different sizes. As for your other question, the current system is a form to be filled out. If you want, you can write a parser in which you can copy and paste ingredients, but many websites use all sorts of different formats and names for ingredients and variations in how they are laid out. The way you’re thinking of would require a little bit of machine learning as well to match the text to your list of available ingredients. It does not seem trivial in the least, but the code is on github so you can go ahead and give it a whirl if you’d like. If you end up doing it, be sure to send a pull request!

  14. So your Arduino has to be permanently connected to the PC/Mac running the web-server, correct? How about switching to RPi so you can have the web server running directly on the board? Use a wifi dongle to connect to your local network and then you can have a truly standalone unit. The software would remain more or less the same. You could use a voltage regulator to power the RPi from the same 12V source, if you have enough amperage to spare.

    • That’s a great idea! Unfortunately I haven’t had as much experience with the RPi as I would like, so I decided to just stick w/ what I knew for this project. My next project will definitely involve the Pi since I want to do something more compact. Thanks!

    • What about getting rid of the Arduino completly?
      Since the Pi has some GPIO, we could use the ULN2803A and everything should work fine.
      Maybe I’ll throw a circuit together and test it.
      I have to look up, if Jonny five can communicate with the Pi pins.

  15. Hallo,

    to make it simple, Change the 5x TIP120 w/ Diodes and the 5x 2.2kOhm resistor to one ULN2803A:
    It is a Darlington Transistor Arrays witch Needs no additional components!
    You can drive it direct with the Arduino an the ULN2803A can direct drive the pump.
    With one single chip, you can drive all :-)

  16. I think I just found my next project. Looking forward to the rest of your posts.
    If I proceed forward, I’m happy to help you get this converted to a Raspberry Pi based unit.

  17. When are the next tutorials coming?!

  18. Very clever and interesting device. I know this may seem like a strange question but, if you would not mind, how long did it take you to design this? I am always challenging my team to “think simple” when they are working on proof-of-concept ideas. Some engineers find it difficult to boil a project down to its simplest terms in order to demonstrate the principles. Bravo to you, Yu Chiang!

    • Hi Mitch, thanks for your kind words. The total time from design and planning to doing the software to printing and building the robot was about 2 weeks. If you add in the time it took to receive my shipment of stuff from China, probably a total of 3-4 weeks.

  19. Great design and thanks for sharing. I’ve noticed an issue with the “Center – Common Drink Channel – Lower Piece.stl” file. It seems to have a edge sticking out the side of it. I’ve confirmed this when scaling up in Makerware. Also, the file fails when attempting to upload to NetFabb to see if it can be repaired.

  20. Awesome project! Can’t wait for part 2!

    I started building one awhile ago. With a front end running on a PC, SQLite database for the drinks and ingredients and the GUI done in Java, with an arduino back end. Got about 60% of the java code done and got distracted by another project. Hats off to you for a good clean design and getting it done so fast!

    I’m going to have to download your source and get to looking through it. Interested in how you did the interface and how the database is setup; never worked with mongo before.

    Thanks for posting all of your files and work also. Is part 2 done yet?? :)

  21. Amazing project. the idea is simple and excellent.
    I keen on to realize this great thing.
    Very thanks to share this experience with us !!

  22. This is cool. I’m new to reading wiring diagrams, can you post a better picture of your board. I’d like to see if i can compare yours to the wire diagram and learn from it. Thx.

  23. What size tube are you using ?

  24. Errol Minihan

    June 5, 2014 at 5:07 pm

    Got my pumps from China , got myULN2803A , still can’t get a decent 3d from the replicator dual, but I will get there, just waiting for part 2 and 3 get this baby going……

  25. Hi, nice work and great idea!!

    How many drink you can make with 5 ingredients? I see your db in your zip folder, but there are more of 5 ingredients.. I not understand, how we can maximize our cocktails with few ingredients?

    Thank you very much!
    Ciao!

  26. Hi Yu

    Thanks for the guide ! I really appreciate it, would it be possible to get some more images of the wiring ? it´s still a bit hard to figure it all out from the drawing + the one photo that is up now. Especially how the TIP120 connect up. I’m currently trying to do the wiring setup mentioned above + one using a ULN2803A.

    The ULN2803A is working until the point where it should power the DC motor, but it only output 0.2 volts to the motor, which apparently is by design, when I have figured out how to bypass that part (any input is very appreciated), I’ll share the wiring scheme .

    Getting it all up and running on a Raspberry pi is then the next step :)

  27. I am not certain the place you are getting your information, but
    great topic. I needs to spend some time studying more
    or understanding more. Thank you for magnificent
    information I used to be searching for this info for my mission.

28 Pingbacks

  1. Build your own drink mixing robot : Rifec Security
  2. Build your own robotic bartender with Arduino and a 3D printer
  3. Build your own robotic bartender with Arduino and a 3D printer | Technology News
  4. Build your own robotic bartender with Arduino and a 3D printer - teqarazzi
  5. Build your own robotic bartender with Arduino and a 3D printer | Tech Riding
  6. Build your own robotic bartender with Arduino and a 3D printer | Autoblog Market Premium WordPress Theme
  7. Build your own robotic bartender with Arduino and a 3D printer | Jackfolks
  8. Build your own robotic bartender with Arduino and a 3D printer | Find Your Books
  9. Build your own robotic bartender with Arduino and a 3D printer -TekDefender
  10. Build your own robotic bartender with Arduino and a 3D printer | A blog for your mind
  11. Bar Mixvah is a DIY robot bartender

 | Bits & Pieces from the Embedded Design World
  12. Build your own robotic bartender with Arduino and a 3D printer | review site
  13. Drink mixing robot | The Third Screen
  14. BarMixvah: 3D Printing a Robotic Bartender - CNCCookbook CNC Blog CNCCookbook CNC Blog
  15. В Калифорнии напечатали робота-бармена по имени Bar Mixvah - PrintReality
  16. Bar Mixvah le robot qui prépare vos cocktails | MonUnivers3D
  17. Meet Bar Mixvah, a robot bartender you can make yourself | buzzcarl
  18. Bar Mixvah - Not A Ritual Right Of Passage , So Much As A Do-It-Yourself Bartending Robot | Heeb
  19. Build your own drink-mixing robot for $180 | News | Geek.com | What Happen Today?!?
  20. A 3D Printed Robot Bartender - 3D Printing Industry
  21. May Tronix Linkdump « TikiRobot!
  22. Roundup: Mcor, Structured Polymers, Hasbro, and Drinks
  23. Bar Mixvah is 3D-printed automatic cocktail-making machine | HomeCrux
  24. Hvis du er både festabe og nørd – så se lige med her | Computer Viden information
  25. Votre propre bar automatisé avec l'Arduino! - tutoarduino.com
  26. Build your very own drink mixing robot! (part 3) | Yu Jiang Tham
  27. Cocktail Roboter - Cocktails auf Knopfdruck
  28. Build your own robotic bartender with Arduino and a 3D printer | AIVAnet

Leave a Reply

Your email address will not be published.

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

© 2014 Yu Jiang Tham

Theme by Anders NorenUp ↑