Food Device Challenge: BarBuddy

The BarBuddy is a personal bartender that can create a wide variety of drinks right at home. There have been times when we’re hosting guests and they request a drink, but only a few basic recipes come to mind. The BarBuddy solves this by knowing what alcohol and mixers are loaded in the machine and displays the cocktails that can be made as a result. But the BarBuddy doesn’t stop there. It also will pump the loaded ingredients and even allows customization if you prefer your drink a little stronger or a little lighter. The drink options the BarBuddy can create are endless and can be updated at any time by inputting your own recipes.

I started developing the BarBuddy right before COVID when I thought it would be fun to have a personal bartending machine at home. I’ve seen products on the market that offer this sort of solution but they all are either too expensive, use proprietary pods, or only have a set number of ingredients and recipes offered. As a Mechanical Engineer I wanted to challenge myself to come up with my own solution that gives some extra features these other products done. The general idea for my machine is there are bottles loaded with the different ingredients which are hooked up to different pumps. These pumps are controlled by a relay to turn them on and off depending on which ingredients are in the selected drink. Everything is controlled by a Raspberry Pi 3 B+ which displays the custom GUI I created. The backend of the code allows up to 8 different ingredients to be loaded and up to 50 different recipes. This information is easily updatable via a CSV file so you can swap in and out ingredients as they’re available and even update recipes depending on moods. The GUI will then show the list of recipes and allow adjustment for whichever ingredients are loaded.

BarBuddy BOM
BarBuddy BOM

I am a Mechanical Engineer by trade, so have limited experience in electronics and coding except for my other personal projects. Like with any other project though, I chose to break it down into parts to make it easier to tackle. The biggest skill gap I had here was programming a GUI for the Raspberry Pi. I have experience using Arduino and coding to control motors, relays, lights, etc., but a GUI was a little more advanced, so this was the biggest hurdle to get over.


BarBuddy Circuit Diagram

I began by writing some basic Python code to turn on and off a multichannel relay. I chose an 8-channel relay, meaning up to 8 pumps could be used to dispense up to 8 different ingredients. After this was figured out, I adapted the code to read a list of ingredients from a CSV file and assign them to each of the different pumps. Using the command line, I could then prompt the user to select an ingredient from a list and then turn on then off the corresponding pump loaded with this ingredient. Next step was to add several recipes to the CSV file which would serve as the recipes the machine could create. After some iteration, the code was setup to (1) read the first line of the CSV to determine which ingredients were loaded, (2) read all the recipes loaded onto the machine in the subsequent CSV file rows, (3) display the drink name options for the user to select via the command line, and (4) take the drink name selection from the user and turn on and off pumps of corresponding ingredients as necessary to pump the drink. A safety feature I chose to include in the code was to check to see if a cup was placed under the pump output by reading if a limit switch was triggered or not. With all this put together, the basic functionality of the machine was complete.


Drink Ingredients and Recipes CSV File

The next step for the project was to create a GUI that would easily show the different drink recipes available. This part of the project probably took the longest since I kept putting off figuring out how to write a GUI. I chose Python as the base code due to its simplicity and ability to run different libraries, specifically a GUI library called tkinter. There is plenty of documentation and examples of how to create a GUI using tkinter, but I had a general idea of how I wanted the interface to look and mocked this up for easy reference.

BarBuddy 3
GUI Mockup

The biggest hurdle was trying to figure out how to achieve this look, and luckily I found a great tutorial (https://www.youtube.com/watch?v=Qd-jJjduWeQ&ab_channel=ParthJadhav) on how to use Figma to visually create an interface and then a custom program to convert this visual design into Python code. I used the code generated as a starting point, then modified it heavily to add buttons where needed. Specifically, I made updates so buttons would only be displayed for loaded recipes and ingredients that were loaded. Additional functionality such as increasing and decreasing quantities of each ingredient via buttons was also added. This code was tied back in with the previously written code so ingredients of the specified quantities would be pumped when the user selected the make drink button. I kept playing around with different tkinter functions until I found a color scheme and layout I liked.

BarBuddy 4
GUI Iteration 1

BarBuddy 5
GUI Iteration 2

With the code out of the way I next had to figure out how to house everything together into a single unit that wouldn’t look too out of place in our kitchen. I used other kitchen appliances as inspiration, specifically coffee makers, until I came up with a design I liked. This took several iterations, but I finally came up with an idea that hid all the ingredient bottles and electronics. I designed the enclosure pieces to be cut out using my CO2 laser, however a similar design can also be created using just simple woodworking and other fabrication techniques.


Enclosure Iteration 1


Mounted Electronics


Mounted Pumps


Limit Switch for Cup Detection


Completed BarBuddy!

After over 3 years of on and off development, I am happy to show off the BarBuddy DIY Cocktail Maker! As an engineer, I find that once I finish a project I am always looking for ways to improve a design, and the BarBuddy is no exception. I’m fairly happy with how the code itself works, but I already have plans for how to improve some of the other components. For starters, the DC pumps used aren’t the best quality and I’ve already had a few burn out and stop working. Switching from diaphragm pumps to peristaltic pumps would likely increase the cost a little, but would also bring some better quality. I also run the machine off a Raspberry Pi 3 B+ since that’s what I had on hand. In the future I’d like to see if there is a cheaper option available since all I really need to do is control some relays and display a GUI. Adding on to this, it might be possible to host a web server where the GUI itself lives, so the user can connect to the machine via Bluetooth or a local website to select their drink that way. This would also cut down some costs by removing the touchscreen, also allowing the unit to shrink. The last update I can think of now is to figure out a way for the bottles to be better connected to the pumps. Right now I’m using condiment bottles and some flexible tubing but I’m not sure how these components would hold up over time. I’d also like to have some way for the bottles to be loaded into the machine upside down, but need to figure out some sort of valve to prevent leaking (think a water reservoir on a coffee machine). Doing so would decrease the amount of tubing needed and make the machine look cleaner under the hood.

So far I’m happy with how the BarBuddy has been functioning and it definitely gives lots of drink options for our guests. Even if we don’t have all the ingredients loaded it’s been helpful to have a list of recipes easily accessible as a jumping off point to take some at home cocktails to the next level. At some point I may even decide to offer the BarBuddy as a DIY kit (or maybe a finished product?) so other makers can create their own personal cocktail machine at home. Feel free to follow along on my website (www.tinybigdogdesigns.com) or my Instagram (https://www.instagram.com/tinybigdogdesigns/) where I’ll be posting updates and additional project files as I continue development.

1 Like

Thanks for the entry @jtaggard !