Sauce It! Arduino-based Automatic Sauce Dispenser

Anh Hoang

Issue 66, January 2023

A handy kitchen assistant that can dispense various pre-recorded sauce recipes with a click of a button.

Thanks to microcontrollers such as Arduino and Raspberry Pi, makers can now easily solve real-world problems in their home or workplace with commonly available electronics, a 3D printer and some coding.

In this curious example, Anh, has made a machine that dispense various ingredients to make different sauce recipes that the machine creates by recording users dispense them. We had SO many questions, so we caught up with Anh to hear all about it.

Tell us about yourself, Anh, and what got you interested in electronics.

I am currently an undergraduate at UTS studying Mechanical and Mechatronic Engineering. Like many people in the community, I got interested in electronics from watching thousands of creative people building smart gadgets and projects on YouTube. This passion really took place when my brother purchased an Arduino Kit as a gift for me after he finished studying in the US. I really got hooked on this hobby and always try to come up with solutions that innovate and assist my daily life.

Your project is something we haven’t seen before. What was the reason for you to design and build your project?

For those of you who cook a lot, you understand the frustration of having to remember all the sauce recipes. For example, one day, you would like to make Pad Thai. You will need to search up on the Internet for "Pad Thai Sauce Recipe" which returns "2 tablespoons of fish sauce, 3 tablespoons of soy sauce, etc...".

I personally found this to be very time-consuming. So, one dinner when I was making Pho, I imagined a machine that would contain all main types of sauce I use, that can remember all the sauce recipes I usually make, and can dispense all of these recipes by a click of a button.

It’s great when makers have that light bulb moment to know how to solve a problem. How does your project work and what parts does it use?

It essentially has 4 sauce containers stored internally, in which there are 4 DC pumps that can dispense each of the types of sauces correspondingly. There are also an LCD display and 4 push buttons that each control the dispensing function of these 4 DC pumps. Everything is powered by a 12V DC power supply and the program is run on an Arduino UNO.

  1. In the default mode, if a sauce bowl is detected to be in place, when the user presses each button, the corresponding sauce would be dispensed via the DC pumps.
  2. In the "Create New Recipe" mode, the user can also do the same thing, however, each time a button is pressed, the Arduino would remember how long each button is pressed for. It then stores all of these into different global variables, which essentially stores all the sauce recipes.
  3. In the "Choose Recipe" mode, the user can simply choose a recipe that they have already created in 2nd mode, then the machine can automatically dispense the entire sauce combination corresponding to that recipe.

Parts Used:

  1. Arduino compatible UNO
  2. Relay Module (4 channel)
  3. 4 DC pumps
  4. 12V power supply
  5. 5 Push button
  6. LCD I2C
  7. IR sensor
  8. Hook up wires
  9. Sauce containers (can be anything like a bottle)

What prototyping was involved and what challenges you needed to overcome?

Prototyping was done while experimenting with the dosing of the machine. This was done to essentially obtain the most accurate amount of sauce displayed in "millilitres" on the LCD from the duration of button-pressing.

Challenges arose when I realised the DC pumps I had on hand were not appropriate for the application as they are not Air Pumps. They were instead submersible pumps, which does not provide enough pressure for the sauce containers. So eventually, I purchased the suitable pumps from eBay for the completion of the project.

That’s good advice for our readers wanting to use pumps in their project. How accurate are the doses?

As mentioned, displaying the doses in millilitres was part of the prototyping stage. Essentially, I experimented and drew a graph which plots the actual amount of sauce in "millilitres" against the duration of the button press in "milliseconds". After 20 data points, it was concluded that for every 1000 milliseconds (or 1 second) a button is pressed, 20ml of sauce is dispensed. This method was quite accurate as I had evaluated the tolerance to be only around +-5%.

Important for balanced sauce flavours, we’re sure. How did you go about coding it? Did you design from scratch or repurpose other code?

I coded this program from scratch. Essentially the Arduino sketch consists of multiple states and if statements that keep track of which state the system is currently in. I used an integer variable and increment it every time it moves on to the next state. The variable is then reset to 0 when a mode is completed.

It’s great that you have been able to design and print a custom 3D enclosure.

The 3D enclosure was designed on Solidworks and printed with a Prusa MK3s in black PLA.

To design the enclosure, I had measured rough dimensions of all the components required to be housed inside the enclosure. Then, I drew quick and rough 3D models of these components. Only then did I start designing the actual enclosure itself. I put every components inside a Solidworks assembly and see how they actually fit with each other to make sure that the enclosure is most compact as possible while still able to house all required components internally.

The wall was 3mm in thickness as I found this to be optimal to maintain strength while not resulting in too long of a print.

We’re curious whether someone could adapt your project for other applications?

I definitely think the possibilities are endless. The same code can be applied to a cocktail machine or even a bio-medical

device where multiple substances constitute a big recipe. Obviously, the dosing needs to be much more accurate to ensure safety. However, I think that can be a good starting point.

A cocktail machine sounds brilliant! If our readers wanted to make something similar for themselves, do you have the code and 3D print files available?

Yes! I will include them so your readers can download from your website.

Wonderful, thank you. Where can our readers find more details about your build?

You can see a video of it working here on YouTube: https://www.youtube.com/watch?v=YF93uTHy0y4

Is there anything else that our readers should know that we haven't discussed?

There is an IR sensor that detects whether a sauce bowl is in place. Sauce will only be dispensed if the sauce bowl is detected. This ensures the users won't accidentally make a mess while operating the machine.

There are also Sauce level indicators on the side of the machine which let users see how much each type of sauce is remaining.

Brilliant! Thanks for sharing, Anh. We look forward to seeing what other interesting projects you make in the future.

Anh Hoang

Anh Hoang

Mechanical and Mechatronic Engineering Student