Cocktail Maker

by maximeulb22202 in Circuits > Arduino

54 Views, 3 Favorites, 0 Comments

Cocktail Maker

Cocktail maker - Mechatronics

The Gitlab repository containing all the CAD and Arduino codes is available using the following

link : https://gitlab.com/mechatronics-group-5/mechatronics-project .

INFO : This report is readable in a nicer form with the following pdf :


Supplies

Contents

1 Project motivation

1.1 Need Identification

1.2 Persona identification

2 Functional analysis and requirements

2.1 Functional analysis

2.2 Requirements list

3 State of the art and patent analysis

3.1 Competitor identification

3.2 Competitor analysis

3.2.1 Bartesian

3.2.2 GIG 15 Pro Under

3.2.3 The Bev by BLACK+DECKER

3.3 Competitors comparison

3.4 Patent analysis

3.4.1 Glass position

3.4.2 Mixer

3.4.3 Liquid level detection

3.4.4 Conclusion

4 Conceptual Design

4.1 Morphological Chart

4.2 Analysis of Solutions

4.2.1 Liquid Control and Dispensing

4.2.2 System Architecture and Power

4.2.3 Movement and Detection

4.2.4 Mixing and Motion Control

4.2.5 User Interface and Communication

4.2.6 Glass Support and Safety

4.3 Concept Generation

4.3.1 Concept 1: Rotating Platform System

4.3.2 Concept 2: Linear Track Design

4.3.3 Concept 3: Static Station Design

4.3.4 Concept Evaluation

5 Embodiment Design

5.1 High-Level Block Diagram

5.2 CAD Design

5.3 Material Selection

5.3.1 Structural Components (Base, Tray, and Top Fixture)

5.3.2 Support Beams

5.3.3 Mixing Shaft

5.3.4 Propeller and Gear Systems

5.4 Manufacturing Processes

5.4.1 Laser Cutting

5.4.2 3D Printing

5.4.3 Manual Processing

5.5 Assembly Process

5.5.1 Assembly Methods

5.5.2 Assembly Sequence

6 Subsystem Design

6.1 Mechanical systems

6.1.1 Stepper Motor Dimensions

6.1.2 Torque Calculation

6.1.3 Stepper Motor Specifications

6.1.4 Rotating Tray

6.1.5 Mixer

6.1.6 Structure

6.1.7 General Assembly

6.1.8 Pumps

6.2 Circuitry and sensors

6.2.1 Microcontroller

6.2.2 Liquid level sensors

6.2.3 Stepper motor

6.2.4 Pumps and Mixer power supply

6.2.5 LCD system and Bluetooth module

6.2.6 PCB

6.2.7 General circuit

6.3 Software

6.3.1 Initial stepper motor position

6.3.2 Level sensors

6.3.3 Liquid level

6.3.4 Bluetooth module

6.3.5 Mobile Application

6.3.6 Stepper motor

6.3.7 Liquid pouring and mixing

6.3.8 LCD screen

6.3.9 General flow diagram

7 Integration Guide

8 Critical review

9 Sustainability

10 Bill of Materials

11 Team presentation

12 Project repository

13 Conclusion

Abstract

This project focuses on the design and development of an automated cocktail-making machine, aimed at delivering a seamless and customizable drink preparation experience. The machine integrates mechanical, electronic, and software systems to simplify cocktail creation, offering both convenience and precision for users at home, small businesses, or events. Key features include a rotating platform for precise glass positioning, peristaltic pumps for accurate liquid dispensing, and a propeller-based mixing mechanism driven by a DC motor. The system also incorporates capacitive sensors to monitor liquid levels, an Arduino Mega for control, and dual user interfaces via Bluetooth and an LCD screen for enhanced usability. A robust construction using laser-cut wood, 3D-printed components, and aluminum support beams ensures durability while maintaining ease of assembly and maintenance. By addressing challenges such as accuracy, user interface design, and system reliability, the project demonstrates an innovative approach to automated cocktail preparation. The final prototype offers a cost-effective solution for creating professional-quality cocktails, merging functionality, aesthetics, and user-friendly operation. Further iterations could improve sustainability, leakage prevention, and scalability for broader applications.





Project Motivation

In recent years, the demand for personalized and automated solutions has surged, especially in the food and beverage industry. Hosting parties, gatherings, or simply enjoying a perfectly mixed drink at home can sometimes feel overwhelming, requiring precision, knowledge, and skill. A cocktail maker bridges the gap between convenience and quality, offering a tailored experience for individuals who love cocktails but lack the expertise or time to make them. 1.1 Need identification For small events or new businesses, hiring a professional bartender can be an unnecessary expense, especially when the goal is to provide quality cocktails without inflating costs. In Belgium, the average salary for a bartender exceeds 13.34€ per hour, with a monthly pay ranging from €2,000 to €3,000. [8] For small-scale operations, this cost may be hard to justify. A cocktail maker offers a more affordable solution, delivering the same results at a fraction of the price. At an estimated cost of €400, this device provides an accessible, user-friendly alternative that can mix a wide variety of cocktails with precision and consistency. Whether it’s for private parties, small business ventures, or even personal use, this innovation represents a massive cost-saver without compromising on quality. 1.2 Persona identification Our cocktail maker is designed to meet the needs of a wide range of users from private individuals to small businesses and event organizers, offering versatility and performance for various scenarios such as home use, hosting family gatherings, or private parties with friends, providing small businesses like bars, cafés, and pop-up ventures with a cost-effective solution for serving professional-quality cocktails without additional staff, and supporting event organizers in managing small-scale events like afterworks, team-building sessions, or private gatherings with 15–20 attendees.





Functional Analysis and Requirements

cccccc.PNG
dddd.PNG

2.1 Functional analysis

The Cocktail Maker is an automated device designed to prepare cocktails quickly, precisely, and according to user preferences. Its goal is to simplify cocktail preparation while providing a user-friendly experience. It can prepare cocktails by automatically mixing ingredients, offer a variety of predefined or customizable recipes, ensure precise dosing for each ingredient, and facilitate ease of use and maintenance. Its primary function is to prepare cocktails based on a selected or customized recipe automatically. Additionally, it allows users to choose a recipe via a mobile application, provides real-time updates on the preparation status, suggests recipes based on available ingredients, and ensures easy maintenance, including cleaning and ingredient replacement. The Cocktail Maker is designed to be ergonomic with an intuitive mobile app interface, technical with precise liquid dosing, and compatible with multiple types of liquid ingredients. It also ensures safety by preventing spills or leaks. The main technical functions include pumping different liquids from bottles, measuring and dispensing precise volumes of ingredients in the glass, mixing the ingredients homogeneously with a mixer. Additionally, it can detect liquid levels in the bottles, identify the presence of a glass on the tray, offer initial calibration for accuracy, and alert the user in case of errors or missing ingredients.

2.2 Requirements list

As can be seen on Table 2, some of the higher priority requirements were highlighted

Main(F0) priorities justification

• Max acceleration of the tray, this is important because a too large acceleration could lead the glass to fall over or the contents to spill out. This problem has been tackled by making a smooth acceleration curve on the stepper motor that controls the movement of the tray.

• Pipes food grade, obvious requirement for a cocktail-making machine since the liquids will flow through the pipes.

• The cocktail serving speed is related to the acceleration and speed curves of the servo motor controlling the tray but also the pumps speed. Pumps with a good flow rate have been chosen in order to accommodate this constraint. The acceleration and speed curves of the tray have been tested to find a good compromise between glass safety and rotating speed.

• Waterproof electronics / enclosures : since the device will handle fluids, it is mandatory that the electronics are well protected and that the materials are made out of water-resistant components. Cables are protected by external pipes and the electronic components are put on top of the machine and protected by a case.

Other constraints

• The machine dimensions should be chosen to be big enough to handle all the connected bottles but should also be transportable. Its height in particular should at least be superior to typical glass height.

• the weight of the device will only impact its transportability, it should be quite easy to carry for an average adult.

• Tray precision, the stepper motor moving the tray should be precise enough to allow exact control of the glass under the pipes.

• A maximum noise level: a too loud device would prevent people from pleasantly talking to each other. Silent components have been chosen, in particular for the stepper motor and the pumps.

• The ease of use of the machine plays an important role in the customer’s ability to order easily.

State of the Art and Patent Analysis

e70c97d1953d7378f5650368f2ead01f20e761b7.jpg
eeee.PNG
GIG1.jpg
ffff.PNG
GIG0.jpg
bev.jpg
gggg.PNG
hhh.PNG

3.1 Competitor identification

The market for cocktail-making machines is diverse, with each product targeting specific needs and user groups. A thorough analysis reveals significant differences in their design, functionality, ease of use, and intended audience. This analysis will enable us to identify gaps in the market where there is room to develop and introduce our own cocktail-making machine. By understanding the strengths and weaknesses of existing products, we can pinpoint opportunities to innovate and create a solution that addresses unmet user needs, positioning our machine uniquely in the competitive landscape. In this analysis, we focus on three prominent products: the Bartesian, the GIG 15 Pro Under, and the Bev by BLACK&DECKER. Each represents a distinct approach to cocktail preparation, from automated capsule-based systems to high-capacity professional machines. To ensure a comprehensive evaluation, we also establish a set of comparison criteria, allowing for an objective analysis of their features and limitations. This comparison not only provides insights into the competitive landscape but also lays the foundation for identifying opportunities for innovation and improve- ment in this field.

3.2 Competitor analysis

As discussed, we are going to analyze the three main machines on the market, each targeting a different audience. This analysis helped us identifying the audience of interest for the cocktail maker.

3.2.1 Bartesian

The Bartesian is an innovative machine designed to prepare premium cocktails at home in just a few seconds. Working similarly to a pod-based coffee machine, it uses capsules containing pre-measured cocktail ingredients. The user simply adds their preferred alcohol to the dedicated reservoirs (vodka, gin, tequila, whiskey, etc.), inserts a capsule, and selects the desired cocktail strength (light, regular, or strong). The machine then takes care of perfectly mixing the ingredients. Bartesian cocktails are well-balanced and ideal for casual use. It’s great for quick, convenient cocktails at home, especially for entertaining, allowing you to make drinks in seconds


3.2.2 GIG 15 Pro Under

The GIG 15 Pro Under is a professional-grade cocktail-making machine designed for intensive use in environments such as bars, restaurants, and high-end events. This machine stands out for its robustness, precision, and advanced features, automating and optimizing cocktail preparation. The GIG 15 Pro Under is designed for hospitality professionals seeking a high-performance solution to meet high demand while maintaining consistent quality. It’s especially suited for bars, clubs, and large events requiring fast, precise service.

3.2.3 The Bev by BLACK+DECKER

The Bev by BLACK+DECKER [2] is a user-friendly cocktail-making appliance designed to simplify the preparation of cocktails while delivering professional-quality drinks at home. Its intuitive design and functionality make it an appealing option for individuals who enjoy cocktails but don’t want to deal with the complexities of traditional bartending.

3.3 Competitors comparison

We decided to include in the table below the criteria that mattered most to us and compared them with our objective. Here is a brief explanation of each criterion considered in the comparison:

• Price: Refers to the initial cost of purchasing the machine, excluding additional ongoing expenses like capsules or maintenance.

• Mass: Indicates the weight of the machine, which affects portability and ease of setup.

• Size: Represents the physical dimensions of the machine, important for fitting into available space at home or in a professional setting.

• Number of Bottles: Refers to the maximum number of alcohol or ingredient bottles the machine can accommodate at once, which impacts versatility and the number of drink optionsavailable.

• Brewing Speed: The time it takes for the machine to prepare a single cocktail, affecting its efficiency and convenience.

• Mixing Capability: Whether the machine can mix different ingredients automatically to create cocktails.

• Ease of Cleaning: Describes how simple it is to maintain and clean the machine, which is crucial for regular use.

• Ingredient Capacity: The amount of liquid each ingredient reservoir can hold, determining how many cocktails can be made before refilling.

• Repairability: Indicates how easy it is to repair or replace parts of the machine in case of damage or wear.

• Use: Specifies whether the machine relies on pre-made capsules or other input systems, which affects flexibility and creativity in drink preparation.

• Amount of Brewable Cocktails: The maximum number of distinct cocktail recipes the machine can prepare, either through programming or capsule options. Our goals are as follows: We aim to create a machine priced around €400, making it affordable for people to rent and more cost-effective than hiring a bartender. Our objective is to build a highly professional machine that can offer a wide variety of cocktails due to the number of bottles it can accommodate. In conclusion, our goal is to combine the qualities of entry-level machines like the Bartesian or Black and Decker with the professionalism of machines suitable for larger-scale use, similar to the GIG 15 Pro under.

3.4 Patent analysis

A patent analysis must be conducted before starting to generate concepts for our product. Failure to do this could prevent us from having the freedom to operate for the cocktail maker, as some features could already be privatized.

3.4.1 Glass position

Managing the position and location of the glass is a big requirement for our product. There are several patents who came across that limit our choices, one of which involves placing a glass in one position from which multiple pipes connected to different inputs pour the liquid into the glass[5]. Other patented devices link every pipe to one central pipe that pours different liquids at a time[5]. There exists another system that pours every liquid in a hood and pours the mixed liquids with a dispenser into the glass[2]. Another patent has a robotic arm that places the glass under the output valves and horizontally moves the glass[7]. Considering all these patents, we thought of having a circular movement for the glass and having containers -bottles- on top of it. We will achieve this by having the user place the glass on a circular platform that rotates to every container/bottle. As honeycomb pipe systems are already patented, pipes will be linked to every bottle

3.4.2 Mixer

The classic methods involve shaking or vibrating a container. There exist other systems with a magnetic stirrer. We chose to use a system with a motor that quickly rotates a rod into the glass to mix the cocktail, a continuous servomotor will move this motor.

3.4.3 Liquid level detection

Liquid level detection is a main concern in our product, however, this domain is severely patented, in particular for capacitance detection systems. Nevertheless, the patents using this technology are specialized for foam detection and not for liquid level computation or they don’t have the same shape than ours [6], so we can use a capacitance system to verify the liquid levels of the bottles.

3.4.4 Conclusion

The patent analysis shows that we are not free to use many technologies for our cocktail maker. However we can still move around and find alternatives to the already filed patents. We have noted that the simplest and most effective means and technologies of manufacturing and designing our product are held for competitors, the only possible solution is to find a new way of designing certain functionalities of the cocktail maker or of day on the way in which the claims are written, for example if the mode of operation is not cited or if it is used for a certain type of situation and not another or yet the general design can be revised to circumvent its restrictions due to patenting.

Conceptual Design

iiiii.PNG
concept_01.png
concept_03.png
concept_3.png
concept_2.png
concept_02.png
concept_1.png
jjj.PNG

The cocktail maker is designed to automate the drink preparation process with minimal human interaction. At its core, the system must receive a drink order, prepare it accurately, and deliver it to the customer - tasks typically performed by a human bartender. Translating these requirements into technical terms, the system must be able to store ingredients, measure and dispense precise quantities, combine them in the correct order, and mix them appropriately. It must also interface with users, manage its inventory, and maintain proper safety and hygiene standards. These functional requirements give rise to several technical challenges that need to be addressed in our design:

• Movement and positioning of glasses

• Dispensing of liquids

• Support and detection of glasses

• Monitoring of ingredient levels

• System control and user interface

• Power distribution

• Position tracking

• Mixing mechanism

• Communication with users

4.1 Morphological Chart

The following morphological chart presents potential solutions for each of the technical challenges described above.

4.2 Analysis of Solutions

4.2.1 Liquid Control and Dispensing

Different methods for measuring and dispensing liquids were considered. For measurement, optical sensors offer simplicity but can be unreliable with varying liquid clarity. Pressure sensors provide accurate readings but add a level of complexity that is undesired. Conductivity measurements vary significantly between different liquids. Level sensors emerged as optimal, providing direct and reliable measurement regardless of the type of liquid. For dispensing the drinks, we strongly considered air pumps which are simple, however, they lack precision for small volumes which is largely the operating point for this cocktail maker. Gravitybased systems, while cost-effective, cannot ensure consistent flow rates and offer very little chance of being controllable. Liquid pumps, though more expensive, provide the necessary precision and flow control required for accurate drink preparation. Flow measurement can be handled through either flow meters or timed pumping. While flow meters offer direct measurement, timed pumping with characterized pumps provides sufficient accuracy with fewer components and reduced maintenance needs.

4.2.2 System Architecture and Power

The best and most cost-effective controllers in the market are of the Arduino brand, and while they offer ideal solutions, they have limitations when it comes to being used in the cocktail maker. For instance, the Arduino UNO lacks sufficient I/O ports, while the Nano’s processing power is limited. To this effect, the best solution is to develop a custom-made system, which, despite higher initial complexity, provides complete control over features and future expandability. Bottle orientation significantly impacts system reliability. Upside-down orientation risks leakage and complicates refilling. An upright orientation simplifies maintenance and reduces failure points, therefore, this option was selected for the design. For power supply, mechanical solutions would require complex transmission systems and introduce multiple failure points. Electric power provides reliable, consistent operation necessary for precise control of pumps, motors, and sensors while being more energy-efficient and easier to implement safety features.

4.2.3 Movement and Detection

For tray position detection, visual sensors are complex and environment-dependent. Encoders provide excessive precision at a higher cost. A simple init + switch system provides reliable positioning while minimizing complexity. Glass detection methods vary in reliability. Newton meters add unnecessary complexity, while infrared sensors can be affected by ambient light and liquid spillage. Limit switches provide straightforward, reliable detection regardless of environmental conditions.

4.2.4 Mixing and Motion Control

For stirring mechanisms, unaxed stirring rods risk glass contact and potential breakage. Glass turners require complex mechanical systems prone to failure. A propeller system offers effective mixing while maintaining simplicity, with controlled agitation that works across different drink types and volumes. Tray spinning requires precise control for glass positioning. DC motors, while cost-effective, lack the necessary positioning accuracy. Mechanical systems introduce maintenance concerns and wear points. Stepper motors provide the optimal balance, offering precise positioning and holding torque with reliable operation.

4.2.5 User Interface and Communication

Bluetooth connectivity allows for a variety of options including smartphones, laptops, and tablets. Bluetooth is also relatively easy to configure. RF systems risk interference in busy environments. Hard cable connections limit portability and increase maintenance points. An LCD interface provides direct visual feedback and menu access without relying on external devices. Both Bluetooth and LCD display are ideal for this system. This dual-interface approach provides flexibility for different use cases. The LCD ensures the system remains operable as a standalone unit, while Bluetooth connectivity enables enhanced features like remote control, drink customization, and system monitoring.

4.2.6 Glass Support and Safety

For glass support, clamping mechanisms risk glass damage and increase complexity. Multiple holder sizes require more space and parts. Base indents provide a simple, effective solution that accommodates various glass sizes while ensuring stability during operation. These analyses led to the selection of solutions that optimize reliability, precision, and maintainability while keeping system complexity manageable. From these chosen solutions, we can now develop complete system concepts.

4.3 Concept Generation

From the analysis of potential solutions, three distinct concepts were developed, each offering a different approach to automated drink preparation.

4.3.1 Concept 1: Rotating Platform System

This concept utilizes circular movement with a rotating platform. If the goal was to maximize precision and reliability while maintaining good user interaction, this concept would be ideal. The circular motion simplifies control while fixed dispensing stations ensure consistent drink preparation. The system also provides flexibility through its dual interface system, making it suitable for various use cases from home bars to commercial settings.

• Circular tray with base indents for glass positioning

• Fixed liquid pumps mounted above

• Stepper motor for precise platform rotation

• Integrated propeller mixing system that lowers into glass

• LCD interface mounted on front panel, with Bluetooth connectivity

• Level sensors in each bottle

• Custom control system managing all operations

4.3.2 Concept 2: Linear Track Design

This concept employs horizontal glass movement with a linear track system. If the goal was to reduce development time and make the overall structure more compact, then this concept would be more than ideal. We would also reduce the time taken to make a drink as it relies on a gravity-fed dispensing system.

• Glass moves on linear rail between dispensing stations

• Gravity-fed dispensing system with shot makers

• Multiple holder sizes to accommodate different glasses

• Mechanical mixing through glass rotation

• Pressure sensors for liquid level monitoring

• Arduino Mega control system

• RF communication interface

• DC motor drive system

4.3.3 Concept 3: Static Station Design

This concept eliminates glass movement in favor of a fixed position system. If the goal was to minimize mechanical complexity and reduce potential failure points while keeping costs low, this would be the preferred solution. The static design also allows for a more compact form factor, making it suitable for spaces where footprint is a primary concern.

• Fixed glass position

• Moving dispensing head with multiple nozzles

• Air pump dispensing system

• Clamping mechanism for glass security

• Optical sensors for liquid monitoring

• Simple Arduino UNO control

• Hardwired interface

• Unaxed stirring rod for mixing

4.3.4 Concept Evaluation

The different imagined concepts were compared based on criteria relevant to the design. Each concept is evaluated for every criterion on a scale from 1 to 5, where 1 is bad and 5 is good.

Selected Design:

Based on the evaluation, Concept 1 emerges as the superior design. While it involves higher initial costs due to more sophisticated components, its advantages in precision, reliability, and user experience outweigh this drawback. The rotating platform system provides better drink preparation accuracy through its pump system, more reliable operation through optimized movement patterns, and enhanced user interaction through its dual interface system. These features align with our previously selected solutions from the morphological chart, confirming the validity of our choices. This concept will form the basis for our detailed design.

Embodiment Design

high_level_diagram.png
Render_04_cocktail_maker.JPG

5.3 Material Selection

While the final product design underwent rigorous material selection analysis using Granta EduPack software, the prototype development followed a different approach driven by practical constraints and rapid development needs. The prototype materials were selected primarily based on ease of manufacturing with available tools and processes, quick iteration capability, cost-effectiveness for a single unit, and sufficient structural integrity for proof-of-concept testing. The materials selected for the prototype differed significantly from the final design, as detailed in the following subsections.

5.3.1 Structural Components (Base, Tray, and Top Fixture)

For the structural components, laser-cut wood and plexiglass were selected as the primary materials. This choice was driven by the readily available laser cutting facilities at our disposal, which enabled quick manufacturing turnaround and easy modifications when needed. These materials provided sufficient strength for testing purposes while remaining cost-effective for single-unit production.

5.3.2 Support Beams

The support beams were manufactured from aluminum, chosen for its commercial availability in the required dimensions. Aluminum proved to be easy to cut and modify, while offering a good strength-to-weight ratio. The material was also reasonably priced for the small quantities needed in prototype development.

5.3.3 Mixing Shaft

For the mixing shaft, steel was selected due to its availability in standard sizes and its adequate rigidity for prototype testing. The material was also chosen for its compatibility with our available mounting hardware, simplifying the assembly process.

5.3.4 Propeller and Gear Systems

The propeller and gear systems were produced using 3D-printed PLA. This choice facilitated rapid prototyping and enabled easy design iterations throughout the development process. PLA provided sufficient strength for proof-of-concept testing while keeping costs low during the configuration testing phase. This material selection approach, while different from the final product design, enabled rapid development and testing of the core functionalities. The prototype successfully demonstrated the feasibility of the design concepts, though the materials used would not be suitable for mass production or long-term commercial use. The experience gained from working with these materials also provided valuable insights that informed the final material selection process.

5.4 Manufacturing Processes

The manufacturing processes employed for the prototype were selected based on equipment accessibility and the need for rapid iteration, contrasting with the mass production processes planned for the final product. Our approach combined both machine-based and manual manufacturing techniques.

Primary Manufacturing Processes

5.4.1 Laser Cutting

The structural components, including the base, tray, and top fixture, were manufactured using laser cutting technology. This process allowed precise cutting of both wood and plexiglass sheets according to our CAD designs. The precision of laser cutting ensured accurate assembly fit and proper alignment of components.

5.4.2 3D Printing

For complex geometries such as the propeller and gear systems, Fused Deposition Modeling (FDM) 3D printing was employed using PLA material. This additive manufacturing process enabled quick iteration of designs and rapid production of custom parts that would have been costly or time-consuming to produce through other methods.

Secondary Manufacturing Processes

5.4.3 Manual Processing

A variety of hand tools and manual processes were essential for refining and assembling the prototype:

Hand drilling was also used for creating mounting holes and adjusting existing features. This process required careful measurement and marking to ensure proper alignment of components. We employed various drill bit sizes depending on the specific mounting requirements. Surface finishing was achieved through progressive sanding, using sandpaper of varying grits This process was particularly important for the wooden components to ensure smooth edges and surfaces. Metal components were refined using hand files to achieve precise fits and remove any burrs or sharp edges. This was particularly important for the aluminum support beams and steel shafts to ensure safe handling and proper assembly. Thread creation was necessary for various mechanical connections in the prototype. We used taps and dies to create internal threads on the aluminum shafts.

5.5 Assembly Process

The assembly of the cocktail maker prototype follows a bottom-up approach, organized into distinct sub-assemblies that can be manufactured and tested independently before final integration. This strategy minimizes assembly complexity and allows for quality control at each stage. The assembly process is divided into three main subassemblies:

Base Subassembly

The base subassembly forms the foundation of the system. The laser-cut wooden base plate is first prepared with threaded inserts for the support beams. The stepper motor is mounted centrally, and the gear system is installed with appropriate bearings. The plexiglass plate that holds the glass is then mounted and then this subassembly is tested for smooth rotation before proceeding.

Support Structure

The aluminum support beams are attached to the base using threaded fasteners. We need to ensure that the base and the beams are perfectly perpendicular, and that all the beams have the same height and are structurally sound.

Top Assembly

The top assembly consists of the plexiglass platform supporting the mixer mechanism. The mixing motor and propeller assembly are mounted on a sliding mechanism with belt drive.

5.5.1 Assembly Methods

Two primary assembly methods were considered for the prototype construction. The first option was permanent bonding using adhesives, which offered simple application and clean aesthetics with no visible fasteners. However, this method was ruled out due to its limitations in strength and the inability to disassemble components for maintenance or modifications. Instead, M3 mechanical fasteners were chosen as the primary assembly method. Despite creating visible connection points and adding slight weight to the structure, these standardized fasteners provided several crucial advantages: they enabled easy maintenance access, ensured high structural strength, and were readily available. The standardized size simplified both assembly and future modifications.

5.5.2 Assembly Sequence

The assembly of the prototype follows a strategic sequence designed to minimize interference risk while ensuring all components are easily accessible. The process begins at the base layer, progresses through the mechanical systems, and concludes with electronics integration. First, the wooden base plate is prepared with holes to provide secure mounting points. The stepper motor is then mounted centrally on this base using M3 bolts and washers, followed by installation of the gear system. Together, these components form the drive mechanism for the rotating middle layer. The next step involves installing the aluminum support beams. These hollow beams serve dual purposes: they provide structural support while also acting as cable conduits. Using M3 threaded fasteners, the beams are carefully aligned to ensure they are perfectly perpendicular to the base. The middle rotating layer is then installed, with particular attention paid to proper gear engage- ment with the base drive system. Once mechanical alignment is verified, the electronics assembly begins. The top platform is pre-assembled as a complete unit, including all electronic components such as the Arduino, motor drivers, and sensors. This approach allows the entire top section to be removed as one piece for maintenance. Wiring is carefully routed through the hollow aluminum support beams, connecting the stepper motor and bottom sensors to the top electronics. This internal cable routing not only protects the wiring but also provides a clean aesthetic appearance and prevents cable interference with moving parts. Finally, the mixing mechanism is installed, and all electrical connections are completed. The assembly concludes with a comprehensive testing phase to verify proper operation of all mechanical and electrical systems.

Subsystem Design(Mechanical Systems)

Capture d'écran 2024-12-31 102727.png
Mixer_parked_sized.JPG
PXL_20241218_115058737 (1).jpg
PROTO_structure.JPG
PROTO_render01.JPG
978-0-387-48998-8_16_Part_Fig32_HTML.jpg

6.1.1-6.1.2 : Please refer to the first picture.

6.1.3 Stepper Motor Specifications

• Pmax = 24 W

• Holding Torque = 59 Ncm

• Step Angle = 1.8◦ (variable)

6.1.4 Rotating Tray

The purpose of the tray is to bring the glass at the correct position. It must do without spilling the glass while not being too slow either. We determined experimentally that an acceleration of π/2 rad/s² (with the glass at 10 cm from the center) was giving good results, without taking any risks. To have enough room for the pumps and the mixer, we decided that the distance between the center of the glass and the axis of rotation would be 10 cm. In addition, it must be precise enough to avoid the ingredients being dispensed beside the glass and for the mixer to be well positioned. We chose in our requirements a precision of 1 cm which, with our 10 cm, gives an angular resolution of 1/10 rad or 5.73 deg. For the mechanism itself, we first thought about planetary gears. However, we quickly switched to bevel gears in order to gain space by putting the motor horizontally and avoid the backlash caused by the additional gear in the gear train. The main idea is to have a large crown gear fixed on the bottom of the tray and the pinion fixed on the motor. To ensure the horizontality of the tray, it is supported by four small wheels. Originally, we planned on 3D printing the crown gear in 4 parts that would connect while screwed to the tray. However, we later updated the design to have a slightly smaller gear that could be printed in one piece. The straight bevel gears were also changed for helical bevel gears to smooth the motion as much as possible. To make sure the teeth of the gears wouldn’t break, we computed their minimum face width. We can get the maximum stress σ in the tooth from the Lewis formula [3]:

σ = Wt*π/(pF Y) (1)

where Wt is the tangential tooth load [N], p is the circular pitch [m], F is the face width of the tooth [m] and Y is the Lewis shape factor [−]. This formula is made for cylindrical gears but due to the chosen gear ratio of 6, our gears are very close to a rack and pinion so we considered it valid in our case. To avoid gear interference, we had to put 16 teeth on the pinion. To have enough room for the stepper under the tray, the radius chosen for the pinion was roughly 20 mm which lead to a circular pitch of 7 mm. Rearranging this equation and looking for the minimum F for a maximum σ and a maximum Wt :

Fmin = Wt,max*π/(p*σmax*Y) (2)

The tangential stress depends on the torque of the motor T in the following way :

Wt = 2T/dp (3)

where dp is the pitch diameter of the pinion. Considering the maximum torque our motor is able to produce and the maximum tensile strength of 3D printed PLA in the direction normal to the layers (which is around 30 MPa [4]), We finally get :

Fmin = 2*Tmax*π/(p*σmax*Y*dp)

= 2 · 59 · 10−2π/(7 · 10−3 · 35 · 106 · 0.295 · 16 · 10−3)

= 3.74mm

A tooth width of 4 mm should thus be enough. However, since we made some approximations and in order to have a more robust gear, we chose to triple that number and used a tooth width of 12mm

6.1.5 Mixer

The mixing process is a major concern for the cocktail maker as it needs to be able to blend the cocktails homogeneously. This is achieved with a final step before the glass is ready. The most widespread mixing technique for cocktail making is shaking; however, in the case of our robot, this technique would have been very difficult to implement as it would require lots of components and good sealing of the glass to prevent spilling. Many techniques were investigated, and the most promising one was to use a propeller driven by a small DC motor. As can be seen on fig.10b, the system is constituted of 4 rails guiding the DC motor up and down as it is needed to lift the propeller to leave room for the glass’s movement to and from the mixing stage. Power transmission is achieved through a belt with one pulley attached to a continuous rotation servo motor at the bottom and a free rotating pulley at the top.

6.1.6 Structure

The structure consits of laser cutted 3mm thick mdf boards. The base and top parts are assembled with press-fits and they are kept together with 4 aluminium beams, which are screwed to the top and bottom with 6 screw per beam. The central part at the bottom is to secure the tray and prevent the pinon from derailing (11).

6.1.7 General Assembly

In the general assembly, most of the parts are present (pumps, Arduino, relays, glass,...) The CAD model is represented in fig.12.

6.1.8 Pumps

A peristaltic pump is a type of positive displacement pump that transports fluids through a flexible tube by imitating natural peristalsis—the rhythmic contraction and relaxation of muscles used to move substances along a pathway. In these pumps, rotating rollers compress the tube, creating a seal that propels the fluid forward. As the rollers rotate further, the compressed section of the tube reopens, allowing more fluid to be drawn in and ensuring a continuous flow [1]. This design (fig.13) offers two main advantages. First, the fluid only contacts the interior of the tubing, significantly reducing wear on the pump and simplifying cleaning—an essential feature when dealing with liquids that may be high in sugar content. Additionally, peristaltic pumps do not require priming, making them especially convenient for our application.

Subsystem Design(Circuitry and Sensors)

levelsensor (1).PNG
stepperdriver (1).PNG
stepperdriver_shematic (1).PNG
pumpmixer (1).PNG
pumpmixer_shematic (1).PNG
lcdbluetooth (1).PNG
lcdbluetooth_schematic (1).PNG
general_circuit (1).PNG
general_circuit_shematic (1).PNG

6.2.1 Microcontroller

To control the actuators and collect data from the sensors, we use an Arduino Mega 2560. This Arduino is necessary for our prototype because it contains many more pins than a UNO. In the end, our prototype contains a huge number of subsystems, including specific pins requested as communication pins for the Bluetooth module or the LCD screen, as well as numerous analog pins for liquid sensors, pumps, various motors, switches, and drivers.

6.2.2 Liquid Level Sensors

To ensure that liquid is always available in the bottles, we decided to integrate a sensor that will detect the remaining liquid level. To achieve this, we will utilize homemade capacitive sensors. Capacitive sensors are widely used to measure variations in capacitance, which is the ability of a component to store electrical charge. These sensors are ideal for detecting the liquid level in bottles because the capacitance varies depending on the presence or absence of the liquid inside the bottle.

The principle behind capacitive sensors is based on the concept of electrostatics. When two conductive materials are placed near each other, an electric field is created between them. This field can store charge, and the amount of charge stored depends on factors like the distance ddd between the conductors and the electric permittivity ϵϵϵ that lies between them, as we can see in these formulas:

C = ϵ · A/d (4)

In our case, the sensor consists of two hermetic cables (electrodes) that will be submerged in the liquid. These cables will act as the two plates of a capacitor. As the liquid level changes, the dielectric material between the electrodes changes, altering the capacitance value. When the bottle is empty, the dielectric material between the electrodes is primarily air (which has a low permittivity), so the capacitance is low. As the bottle fills with alcohol or other liquid, the dielectric material changes, and the permittivity increases, leading to a higher capacitance reading. The sensor will continuously measure this capacitance and, by comparing it to pre-calibrated values, determine if the bottle is full, partially filled, or empty. In order to calculate the remaining liquid level, we wrote a initialization code that determines the capacitance values for the empty and full states of the bottle. Once you have your reference values (empty and full capacitances), you can measure the current capacitance at any time using the sensor. The remaining percentage of liquid can be calculated using the formula:

Percentage of remaining liquid = Ccurrent −Cempty/(Cfull −Cempty) × 100 (5)

Where:

• Ccurrent is the capacitance measured at the current moment.

• Cempty is the capacitance when the bottle is empty.

• Cfull is the capacitance when the bottle is full.

Using this method, the system can also notify the user when the liquid level falls below 20%, sig-

naling that the bottle is nearly empty and needs to be replaced. Every time the bottle is replaced,

the initialization code is called again to recalibrate the sensor.


6.2.3 Stepper motor

In this system, the stepper motor, controlled via the AccelStepper library, is used to rotate a platform to specific positions. It manages to put the glass under the pumps and mixer’s position. It contains:

• 1 Stepperonline 202203101837 stepper motor

• 1 TMC 2209 driver for stepper motor

• 2 switch button

• 1 capacitor of 220μF

The AccelStepper library provides significant flexibility in controlling the stepper motor, allowing the platform to rotate in any direction, clockwise or counterclockwise, depending on the required task. It can also precisely control the rotation of the platform for the exact number of steps required to achieve a specific angle. In this system, one full revolution of the stepper motor corresponds to 1600 steps. However, due to the gear ratio of 6 in our setup, one full rotation of the platform requires 6 complete rotations of the stepper motor. This means that a complete revolution of the platform equals 9600 steps.

To guarantee accuracy and consistency, the platform’s initial position must be calibrated at the start of the operation. This is achieved using a switch strategically placed underneath the platform. The switch is positioned in a way that it gets activated whenever the glass support moves over it. During the initialization phase, the platform begins to rotate until the switch is triggered. At this moment, the system recognizes the current position of the stepper motor as the starting reference point, or step 0. The second switch will detect if the user placed their glass on the tray before taking their command.



6.2.4 Pumps and Mixer power supply

The purpose of this system is pouring the good liquid in the glass and mix the cocktail. To reach this objective: we need electronic components below:

• 3 peristaltic pumps

• 1 DC motor

• 1 4 channel DC 5V Relay

• 1 continuous rotation Servomotor

• 4 flyback diodes

The pumps and the DC motor of the mixer are connected to the relay in order to more easilymanage their activation and deactivation, the Pin + is connected to the first input of each relay, the Pin - is connected to the ground of the power supply and the power supply is connected at the second input of each relay. Then the pins of the Arduino controlling the pumps/motors are connected from the Arduino to the init 1,2,3,4 pins of the relay, and the VCC and GND pins are the power supply and the ground of the Arduino, the servo, when is connected directly to the Dc of the Arduino, to its ground as well as to the PWM pin which controls it. The pumps and the dc motor need a 12V alimentation and the servo need the 5V alimentation from the Arduino.

6.2.5 LCD system and Bluetooth module

The LCD gives a little graphic interface to choose the cocktail. The LCD model is a LCD 1602A 16x2 with I2C module to use less pins and simplify the circuitry. It is connected to the VCC and GND of the Arduino and to the special communication pins of the Arduino SLA and SCL. The Bluetooth module permits son send information from the sensors to the phone and receive the command from the phone’s user. It is connected to the VCC and GND of the Arduino and to the communication pins which correspond to it, the RX and the TX.

6.2.6 PCB

To make our circuit more solid, better ordered and more aesthetic, we decided to print part of it on a PCB, we connected all the power sources, its masses as well as the voltage coming from the Arduino. and its mass. We also took the opportunity to solder the capacity and the driver of the stepper motor in order to make their connections clearer and to limit their bulk.

Subsystem Design(Software)

lvl_sensor_flux_diag (1).PNG
app1flowdiag (1).PNG
aaaaaaa.PNG
bbbbb.PNG


6.3.1 Initial Stepper Motor Position

To initialize the position of the stepper motor, we rotate it until it comes into contact with the switch in INPUT PULLUP called initPin. When it comes into contact, the stepper stops and advances 45 steps to perfectly center the glass, defining this position as the initial position. This function is called at each end of the cycle to ensure there is no offset between the desired position and the position recorded by the stepper motor's serial monitor.

6.3.2 Level Sensors

To initialize the level sensor, we call the function initializeBottleCapacitance() to start by measuring the level of the empty bottle, then measure the full value. This allows the sensors to be calibrated to have a reference value and determine the liquid level in the bottle.

6.3.3 Liquid Level

Liquid level measurement is done by reading signals from the associated pins. A sensor reading returns a digital value. If this value differs significantly from the value captured during initialization, the sensor signals that the bottle is empty or almost empty. When a specific command, such as CHECK LEVELS(), is received via Bluetooth, the program cycles through all sensors to check the status of the bottles. The results are encapsulated in a JSON structure and returned to the user, providing an overview of liquid levels in each bottle in real-time. Information from level sensors also plays a crucial role in decision-making. For example, before starting to prepare a cocktail, the program automatically checks that all necessary bottles contain enough liquid. If a bottle is empty, an error message is displayed on the LCD screen, asking the user to replace the bottle, and the preparation is canceled to avoid errors.

6.3.4 Bluetooth Module

It is initialized via the Serial1 port with a baud rate set to 38400. The data received is processed as character strings and analyzed by the processCommand function, which decides what actions to take. Among the possible commands, CHECKLEVELS checks bottle levels by activating the checkBottleLevels function, which measures the capacities of the capacitive sensors and calculates the percentage of liquid remaining. In the event of a critical level, an alert is displayed on the LCD screen. A command such as REPLACEBOTTLE1 recalibrates the sensor for a newly installed bottle. Other commands, like MAKEMOJITO, trigger predefined sequences to mix ingredients using motors and pumps, according to programmed recipes. The Bluetooth module not only receives commands but also sends information back in JSON format, including updates on bottle status, ongoing processes, and relevant alerts. These messages are transmitted via Serial1.println for seamless integration with the external device.

6.3.5 Mobile Application

The mobile application was developed using Flutter and Dart, providing a cross-platform solution that works on both iOS and Android devices. The app implements the Bluetooth communication protocol to send commands to the cocktail maker and receive status updates. Through an intuitive user interface, users can browse available cocktail recipes, monitor real-time bottle levels, initiate cocktail preparation, and manage system maintenance tasks such as bottle replacement and recalibration. The application uses the flutter_bluetooth_serial package to handle Bluetooth communication, ensuring reliable data exchange with the Arduino system. When users interact with the interface, the app constructs appropriate command strings such as CHECKLEVELS or MAKEMOJITO and transmits them via the established Bluetooth connection. Simultaneously, it processes incoming JSON data from the cocktail maker, updating the interface to reflect the current system state, including bottle levels, preparation progress, and relevant alerts or notifications.

6.3.6 Stepper Motor

Functions from the AccelStepper.h library were used to move the glass from one position to the next. These functions use a list of positions and the number of positions to move the glass with an acceleration and deceleration curve, ensuring the glass does not tip over. Position lists are created at the start of the code along with the number of positions they contain. The moveTo(position) command performs a move by indicating the target position in steps. Then, a loop executes the run() command until the motor reaches the desired position, ensuring continuous and fluid movement.

6.3.7 Liquid Pouring and Mixing

To activate the pumps and the mixer, we divided the activations into cases handled by a switch(i). The switch(i) defines that, according to the value of i (the position in the list of target positions), the respective case will activate. For example, if i is 3, case 3 is called, activating the pump or mixer, and then deactivating it. To use the mixer, we call the servoSpeed() method, which activates the servo for a given time to lower the propeller into the glass, then activates the relay pin corresponding to the DC mixer. The propeller is raised by lightly activating the servo motor due to increased friction during ascent. This function is always called before the last i in the list because mixing is always the final step.

6.3.8 LCD Screen

For the LCD, we used the LiquidCrystalI2C.h library. With a standard LCD screen (not I2C), at least six pins of the Arduino are necessary for control. Thanks to the I2C interface, only two pins (SDA and SCL) are used, freeing up pins for other components or sensors. The library simplifies programming by integrating dedicated functions for display and backlight management, eliminating the need for complex code to manage I2C manually.

6.3.9 General Flow Diagram

You can see a general flowchart for the entire software.

Code for the Arduino

#include <AccelStepper.h>
#include <Servo.h>
#include <Stepper.h>
#include <LiquidCrystal_I2C.h>
#include <Capacitor.h>
#include <SoftwareSerial.h>
#include <ArduinoJson.h>

// #define BT_RX 18 // Pin for Bluetooth TX
// #define BT_TX 19 // Pin for Bluetooth RX
#define JSON_CAPACITY 128

// Bluetooth configuration
// SoftwareSerial bluetoothSerial(BT_RX, BT_TX);
StaticJsonDocument<JSON_CAPACITY> doc;

// Définition of stepper motors pins
#define STEP_PIN 2
#define DIR_PIN 23
Servo myServo;
int nombrePositions;

int emptyValues[3] = {0};
int fullValues[3] = {0};
int ctr_fails;

bool Init_system = true;
bool CheckBottles = false;

LiquidCrystal_I2C lcd(0x27, 20, 4);
// LiquidCrystal_I2C lcd(0x3F,20,4);

// Configuration du moteur pas à pas
AccelStepper stepper(AccelStepper::DRIVER, STEP_PIN, DIR_PIN);

// bottle sensors's Pin

Capacitor cap3(52, A14);//cap1
Capacitor cap2(50,A13);//cap2
Capacitor cap1(53,A15);//cap3
const int DCmixPin = 39;// DCMIX
const int pump3Pin = 40; //pump3
const int pump1Pin = 41; // pump1
const int pump2Pin = 38;//pump2
const int activateStep = 24;//enable pin to block the stepper
const int glassPin =42;//pin to detect the glass
const int initPin = 44;//pin to initialize the stpper motor position
const int nBottle = 3;//number of bottle
const int speed = 1;//speed of the servo motor
const int STEPS_PER_REVOLUTION = 1600*6; //number of steps to make 1 tray's turn
const int ACCELERATION = 400; // acceleration of stpper motor
const int MAX_SPEED = 800; // max speed of the stepper motor
//positions where the stepper motor coulds stop
const int positionpump1=STEPS_PER_REVOLUTION/8*2.5;
const int positionpump2=STEPS_PER_REVOLUTION/8*3.5;
const int positionpump3=STEPS_PER_REVOLUTION/8*4.5;
const int positionmixer=STEPS_PER_REVOLUTION/8*6.55;
const int positionfinish=STEPS_PER_REVOLUTION/8*7.8;
//list of positions in different lists
int positionsCiblesmojito[] = {positionpump1,positionpump2 ,positionpump3,positionmixer,positionfinish};
int positionsCiblesmargarita[] = { positionpump2, positionpump1,positionpump3,positionmixer,positionfinish};
int positionsCiblesrhumcoke[]={positionpump1,positionpump2,positionmixer,positionfinish};
int positionsCiblesvodcoke[]={positionpump3,positionpump2,positionmixer,positionfinish};

int nombrePositionsrhumcoke= sizeof(positionsCiblesrhumcoke)/sizeof(positionsCiblesrhumcoke[0]);
int nombrePositionsmojito= sizeof(positionsCiblesmojito)/sizeof(positionsCiblesmojito[0]);
int nombrePositionsvodcoke= sizeof(positionsCiblesvodcoke)/sizeof(positionsCiblesvodcoke[0]);
int nombrePositionsmargarita= sizeof(positionsCiblesmargarita)/sizeof(positionsCiblesmargarita)[0];

int positionwash1[] = { positionpump1,positionfinish};
int positionwash2[] = { positionpump2,positionfinish};
int positionwash3[] = { positionpump3,positionfinish};

const int nombrePositionswash1 = sizeof(positionwash1)/sizeof(positionwash1[0]);
const int nombrePositionswash2 = sizeof(positionwash1)/sizeof(positionwash1[0]);
const int nombrePositionswash3 = sizeof(positionwash1)/sizeof(positionwash1[0]);


//initialize the level sensors
void initializeBottleCapacitance(int bottleIndex)
{
Serial.print("Initializing Bottle ");
Serial.println(bottleIndex + 1);
lcd.clear();
lcd.setCursor(0, 0);// go to first line

lcd.print("Initializing");
lcd.setCursor(0, 1); // go to second line

lcd.print("Bottle ");
lcd.print(bottleIndex + 1);


delay(3000);
// Phase 1: measure the empty value
Serial.println("Phase 1: Ensure the bottle is empty.");
lcd.clear();
lcd.setCursor(0, 0);

lcd.print("Ensure bottle ");
lcd.print(bottleIndex + 1);
lcd.setCursor(0, 1);

lcd.print("is empty");
delay(5000); // Time to verify that the bottle is empty
int emptyValue = (bottleIndex == 0 ? cap1.Measure() :
(bottleIndex == 1 ? cap2.Measure() :
(bottleIndex == 2 ? cap3.Measure() : 0))) * 100;
emptyValues[bottleIndex] = emptyValue;
Serial.print("Empty value for Bottle ");
Serial.print(bottleIndex + 1);
Serial.print(": ");
Serial.println(emptyValues[bottleIndex]);

// Phase 2: measure the full value
Serial.println("Phase 2: Fill the bottle completely.");
lcd.clear();
lcd.setCursor(0, 0);

lcd.print("Fill bottle ");
lcd.print(bottleIndex + 1);
lcd.setCursor(0, 1);

lcd.print("completely");
delay(5000); // Temps pour fill the bottle
int fullValue = (bottleIndex == 0 ? cap1.Measure() :
(bottleIndex == 1 ? cap2.Measure() :
(bottleIndex == 2 ? cap3.Measure() : 0))) * 100;
fullValues[bottleIndex] = fullValue;
Serial.print("Full value for Bottle ");
Serial.print(bottleIndex + 1);
Serial.print(": ");
Serial.println(fullValues[bottleIndex]);
bool success = true;
// Check the values
if (fullValues[bottleIndex] <= emptyValues[bottleIndex])
{
ctr_fails ++;
if(ctr_fails <= 2){
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Error:");
lcd.setCursor(0, 1);
lcd.print("Check the sensor");
delay(5000);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Repeating the");
lcd.setCursor(0, 1);
lcd.print("operation");
initializeBottleCapacitance(bottleIndex); //Redo it if the values are inconsistent
}
else{
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Init failed,");
lcd.setCursor(0, 1);
lcd.print("Bypassing.");
delay(1000);
success = false;
}
}
ctr_fails = 0;
if (success){
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Init of bottle ");
lcd.print(bottleIndex + 1);
lcd.setCursor(0, 1);
lcd.print("complete!");
delay(1000);
lcd.clear();
}
}

// function to send bottle status
void sendBottleStatus(int bottleIndex, float percentage)
{
doc.clear();
doc["type"] = "bottle_status";
doc["bottle"] = bottleIndex + 1;
doc["level"] = percentage;
doc["is_low"] = percentage <= 20.0;

String response;
serializeJson(doc, response);
Serial1.println(response);
}

void checkBottleLevels()
{
for (int i = 0; i < nBottle; i++)
{
int capacitance = (i == 0 ? cap1.Measure() :
(i == 1 ? cap2.Measure() :
(i == 2 ? cap3.Measure() : 0))) * 100;

// Calculate the remaining liquid percentage
int delta = capacitance - emptyValues[i];
int range = fullValues[i] - emptyValues[i];
float percentage = (float(delta) / range) * 100.0;

if (percentage < 0)
percentage = 0;
if (percentage > 100)
percentage = 100;

// Send status to the
sendBottleStatus(i, percentage);

Serial.print("Bottle ");
Serial.print(i + 1);
Serial.print(": ");
Serial.print(percentage, 2);
Serial.print("%");

// Check if the bottle is empty or almost empty
if (percentage <= 20.0)
{
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("WARNING Bottle");
lcd.print(i + 1);
lcd.setCursor(0, 1);
lcd.print(" is almost empty!");
}
delay(1000); // Wait before moving to the next bottle
}
}

//control the mixer
void servoSpeed(float speed)
{
int newSpeed = speed * 100;
int value = map(newSpeed, -100, 100, 0, 180);
myServo.write(value);
delay(3600);
myServo.write(92);
digitalWrite(DCmixPin, LOW);
delay(3000);
digitalWrite(DCmixPin, HIGH);
newSpeed = speed * -100;
value = map(newSpeed, -100, 100, 0, 180);
myServo.write(value);
delay(4000);
myServo.write(92);
delay(2000);
}
//initialize the stepper motor's position
void initializeStepperPosition()
{
Serial.println("initialize");
stepper.setCurrentPosition(0);
stepper.moveTo(STEPS_PER_REVOLUTION);
// move the stepper with an acceleration and breaking curve
while (stepper.distanceToGo() != 0)
{
Serial.println(stepper.distanceToGo());
stepper.run(); // manage the mouvement
if (digitalRead(initPin) == HIGH)
{
Serial.println("Button pressed");
break;
}
}
stepper.setCurrentPosition(-35); // Défine the actual positon like departure positon
stepper.moveTo(0);

while (stepper.distanceToGo() != 0)
{
Serial.println(stepper.distanceToGo());
stepper.run();
}

lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Put the glass");
lcd.setCursor(0, 1);
lcd.print("on the tray");
while(digitalRead(glassPin)==LOW){
delay(10);
}
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Waiting for");
lcd.setCursor(0, 1);
lcd.print("your selection.");
delay(10);
}

// method to make selection of cocktail
void selection(String command)
{
// Send starting status
doc.clear();
doc["type"] = "status";
doc["status"] = "starting";
doc["cocktail"] = command;
String response;
serializeJson(doc, response);
Serial1.println(response);

if (command == "MAKE_MOJITO")
{


action3liquids(1000,1000,1000,pump1Pin,pump2Pin,pump3Pin,nombrePositionsmojito,positionsCiblesmojito);
}
else if (command == "MAKE_MARGARITA")
{


action3liquids(1000,1000,1000,pump2Pin,pump1Pin,pump3Pin,nombrePositionsmargarita,positionsCiblesmargarita);
}
else if (command == "WASH1")
{


actionwash(pump1Pin,nombrePositionswash1,positionwash1);
}
else if (command == "WASH2")
{


actionwash(pump2Pin,nombrePositionswash2,positionwash2);
}
else if (command == "WASH3")
{


actionwash(pump3Pin,nombrePositionswash3,positionwash3);
}
}

// function to wash one bottle
void actionwash(int pump ,int nombrePositions,int positionsCibles[])
{
lcd.clear();
lcd.print("Washing)");
Serial.println("stepperstart");

// Send in-progress status
doc.clear();
doc["type"] = "status";
doc["status"] = "in_progress";
String response;
serializeJson(doc, response);
Serial1.println(response);

for (int i = 0; i <nombrePositions ; i++)
{
// move the stepper motor to the next target position
stepper.moveTo(positionsCibles[i]);


while (stepper.distanceToGo() != 0)
{
stepper.run();
}
Serial.println("stepperdone");

// Activate the corresponding pump
switch (i+1)
{
case 1:
digitalWrite(activateStep, HIGH);
delay(50);
digitalWrite(pump, LOW);
delay(3000); // Temps d'activation
digitalWrite(pump, HIGH);
delay(50);
digitalWrite(activateStep, LOW);
break;

case 2:
initializeStepperPosition();
break;

}


}
}
// function to make cocktails who needs 2 liquids
void action2liquids(int time1,int time2,int firstpump,int secondpump,int nombrePositions,int positionsCibles[])
{
lcd.clear();
lcd.print("Cocktailing...:)");
Serial.println("stepperstart");

// Send in-progress status
doc.clear();
doc["type"] = "status";
doc["status"] = "in_progress";
String response;
serializeJson(doc, response);
Serial1.println(response);

for (int i = 0; i < nombrePositions; i++)
{

stepper.moveTo(positionsCibles[i]);


while (stepper.distanceToGo() != 0)
{
stepper.run();
}
Serial.println("stepperdone");

// Activate the corresponding pump or the mixer
switch (i+1)
{
case 1:
digitalWrite(activateStep, HIGH);
delay(50);
digitalWrite(firstpump, LOW);
delay(time1);
digitalWrite(firstpump, HIGH);
delay(50);
digitalWrite(activateStep, LOW);
break;

case 2:
digitalWrite(activateStep, HIGH);
delay(50);
digitalWrite(secondpump, LOW);
delay(time2);
digitalWrite(secondpump, HIGH);
delay(50);
digitalWrite(activateStep, LOW);
break;

case 3:
digitalWrite(activateStep, HIGH);
servoSpeed(1);
digitalWrite(activateStep, LOW);
break;
case 4:
// Send completed status
doc.clear();
doc["type"] = "status";
doc["status"] = "completed";
doc["cocktail"] = "MAKE_VODCOKE";
serializeJson(doc, response);
Serial1.println(response);

lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Your cocktail");
lcd.setCursor(0, 1);
lcd.print("is done :)");
delay(5000);
initializeStepperPosition();
break;
}


}
}
// function to make cocktails who needs 3 liquids
void action3liquids(int time1,int time2,int time3,int firstpump,int secondpump,int thirdpump,int nombrePositions,int positionsCibles[])
{
lcd.clear();
lcd.print("Cocktailing...:)");
Serial.println("stepperstart");

// Send in-progress status
doc.clear();
doc["type"] = "status";
doc["status"] = "in_progress";
String response;
serializeJson(doc, response);
Serial1.println(response);

for (int i = 0; i < nombrePositions; i++)
{

stepper.moveTo(positionsCibles[i]);


while (stepper.distanceToGo() != 0)
{
stepper.run();
}
Serial.println("stepperdone");


switch (i+1)
{
case 1:
digitalWrite(activateStep, HIGH);
delay(50);
digitalWrite(firstpump, LOW);
delay(time1);
digitalWrite(firstpump, HIGH);
delay(50);
digitalWrite(activateStep, LOW);
break;

case 2:
digitalWrite(activateStep, HIGH);
delay(50);
digitalWrite(secondpump, LOW);
delay(time2);
digitalWrite(secondpump, HIGH);
delay(50);
digitalWrite(activateStep, LOW);
break;
case 3:
digitalWrite(activateStep, HIGH);
delay(50);
digitalWrite(thirdpump,LOW);
delay(time3);
digitalWrite(thirdpump, HIGH);
delay(50);
digitalWrite(activateStep, LOW);
break;
case 4:
digitalWrite(activateStep, HIGH);
servoSpeed(1);
digitalWrite(activateStep, LOW);
break;
case 5:
// Send completed status
doc.clear();
doc["type"] = "status";
doc["status"] = "completed";
doc["cocktail"] = "MAKE_MARGARITA";
serializeJson(doc, response);
Serial1.println(response);

lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Your cocktail");
lcd.setCursor(0, 1);
lcd.print("is done :)");
delay(5000);
initializeStepperPosition();
break;
}


}
}

//function to communicate with the phone
void processCommand(String command)
{
command.trim();

// Print received command
Serial.print("Received command: ");
Serial.println(command);

if (command == "CHECK_LEVELS")
{
checkBottleLevels();
return;
}

if (command.startsWith("REPLACE_BOTTLE")) // REPLACE_BOTTLE_1, REPLACE_BOTTLE_2, ...
{
int bottleIndex = command.substring(14).toInt() - 1; // Extract bottle number
if (bottleIndex >= 0 && bottleIndex < 5)
{
Serial.print("Replacing bottle ");
Serial.println(bottleIndex + 1);
initializeBottleCapacitance(bottleIndex); // Reinitialize this specific bottle

// Send updated status after replacement
// Assuming 100% after replacement
sendBottleStatus(bottleIndex, 100.0);

}
else
{
Serial.println("Invalid bottle index.");
}
}
else if (command == "test")
{
// Send general status
doc.clear();
doc["type"] = "status";
doc["status"] = "ready";
String response;
serializeJson(doc, response);
Serial1.println(response);
Serial.println(response);
}
else
{
selection(command);
}
}
//setup pins and serial monitors
void setup()
{
Serial.begin(9600);
Serial1.begin(38400);

lcd.init();
pinMode(pump1Pin,OUTPUT);
pinMode(pump2Pin, OUTPUT);
pinMode(pump3Pin, OUTPUT);
pinMode(activateStep, OUTPUT);
digitalWrite(activateStep, LOW);
digitalWrite(pump1Pin, HIGH);
digitalWrite(pump2Pin, HIGH);
digitalWrite(pump3Pin, HIGH);
digitalWrite(DCmixPin ,HIGH);
myServo.attach(9);
pinMode(initPin, INPUT_PULLUP);
pinMode(DCmixPin,OUTPUT);
stepper.setMaxSpeed(MAX_SPEED);
stepper.setAcceleration(ACCELERATION);
}

void loop(){
lcd.backlight();

// Remove the while(true) loop and restructure
if (Init_system)
{
if (CheckBottles){
lcd.setCursor(0, 0);
lcd.print("Stabilizing");
lcd.setCursor(0, 1);
lcd.print("the sensors...");
cap1.Measure();
cap2.Measure();
cap3.Measure();
delay(2000);
for (int i = 0; i < 3; i++)
{
initializeBottleCapacitance(i);
}
lcd.clear();
lcd.print("Bottles init.");
lcd.setCursor(0, 1);
lcd.print("completed.");
delay(2000);
lcd.clear();
CheckBottles = false;
}
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Initializing");
lcd.setCursor(0, 1);
lcd.print("position...");
initializeStepperPosition();
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Connect to");
lcd.setCursor(0, 1);
lcd.print("the app.");
Init_system = false;
}

// Check for Bluetooth commands
if (Serial1.available())
{
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Waiting for");
lcd.setCursor(0, 1);
lcd.print("your selection.");
delay(10);
String command = "";
while (Serial1.available())
{
char incomingChar = Serial1.read();
if ((incomingChar >= 32 && incomingChar <= 126) || incomingChar == ' ')
{
command += incomingChar;
}
}
processCommand(command);
if (command == "CHECK_LEVELS" ||command.startsWith("REPLACE_BOTTLE")||
command == "test"||command == "MAKE_MOJITO"||command == "MAKE_MARGARITA"){
command = "";
}
static unsigned long lastCheck = 0;
if(millis()-lastCheck > 30000){
lastCheck = millis();
checkBottleLevels();
}
}

}

Integration Guide


This integration guide provides clear, step-by-step instructions to assemble and set up the system efficiently, ensuring all components are correctly installed and aligned for optimal performance:

  1. Assemble the Basic Structure: Begin by connecting the two laser-cut plates (top and bottom) to the four aluminum rods using the laser-cut supports. Ensure all connections are secure and aligned.
  2. Install Bearings and Central Support: Attach the four bearings to the structure using M5 screws. Mount the laser-cut central support for the rotating platform and secure the 3D-printed turning part using M3 screws.
  3. Install the Stepper Motor and Switches: Place the stepper motor with its 3D-printed pinion on the bottom plate. Attach the switches (using small 3D-printed mounts and M2.5 screws) for glass positioning and stepper initialization. Route their cables neatly along the aluminum rods.
  4. Attach the Gear and Turntable: Secure the gear to the plexiglass turntable with four M3 screws. Position the turntable onto the bearings and attach it firmly to the central support. Check for smooth rotation.
  5. Assemble the Upper Section: Mount the three pumps, Arduino Mega, relay module, Bluetooth device, and the 3D-printed holder for the LCD screen. Ensure all components are properly fixed and accessible.
  6. Install the Mixer Assembly:
  7. Attach the 3D-printed base (red part) to the lower plate using four screws.
  8. Insert the four vertical metal rods into the designated holes in the base.
  9. Mount the 3D-printed moving part (with the DC motor, black part) onto the rods. Secure the mixing rod with screws.
  10. Install the 3D-printed top part (blue part) onto the rods.
  11. Position the timing belt around the pulley connected to the servo motor and the moving part. Adjust the belt tension to ensure smooth operation without excessive strain.
  12. Complete Cable Management: Route and secure all cables, ensuring they are protected and do not interfere with moving parts.


Critical Review

In this section, we analyze the current implementation of the system and propose improvements to enhance functionality, reliability, and user experience. One area for improvement is the capacitive sensors used for empty bottle detection. While functional, these sensors could be refined by introducing an averaging mechanism or a more robust filtering process. This would help reduce noise and ensure more consistent and reliable detection, even under challenging conditions.

Another limitation is the inability to bypass sensor initialization through the app. Implementing an option for users to skip initialization in certain scenarios, such as during testing or maintenance, would add flexibility and improve convenience.

The pumps currently in use occasionally cause dripping issues. Upgrading to bidirectional pumps would address this problem, as they allow for flow reversal to clear the nozzles after each use. This would significantly enhance hygiene and reduce waste.

Leakage protection is another critical area for improvement. Adding better seals or integrating an automated leak detection system would safeguard the machine’s internal components, improving durability and reliability.

Adding a rotary switch for hardware control is another area worth considering. While the app provides an effective interface, a rotary switch would enable users to control the machine without relying on the app. This additional feature would make the system more intuitive and accessible, especially for users who prefer physical controls.

The washing sequence feature is currently incomplete. Finalizing this implementation would ensure that the machine meets higher hygiene standards, making cleaning and maintenance more efficient and reliable.

A useful new feature could be the ability to manage up to four glasses in stock. This would improve the system’s usability in high-demand scenarios by streamlining operations and reducing the need for frequent refilling.

Regarding the mixer, we faced challenges with the accuracy of continuous rotation servos, which rely on time delays for positioning. This approach occasionally led to errors, as the mixer moved more easily to its downward position than to its upward one. While adding end-of-course switches at the top and bottom to precisely stop the servo would be ideal, the current design made this solution difficult to implement. Instead, we opted for a cost-effective workaround by using a longer rise time than descent time. This approach ensures that the servo reliably blocks at the upward position, effectively resetting its position to zero.

In conclusion, there are many areas for improvement. Due to time constraints, we were not able to implement these in our prototype. While the last prototype works sufficiently, addressing these areas would significantly enhance the system’s performance, reliability, and user experience.

Sustainability

In the field of robotics, sustainability plays a crucial role in shaping the future of technology. As robots are increasingly integrated into various aspects of our lives, from industrial automation to personal devices, it’s essential to consider their environmental impact. To make our project more sustainable, we could aim to eliminate the use of non-recyclable plastics. For instance, the rotating platform in our cocktail maker is currently made from plexiglass, as we needed a waterproof material. While plexiglass offers practicality, it is not easily recyclable, which makes it less environmentally friendly. Exploring alternatives such as recycled or biodegradable plastics, or even natural waterproof materials, could be a step towards a more sustainable design. If we want to keep the transparency design, we could use tempered glass as an alternative material. Tempered glass is fully recyclable, waterproof, and highly resistant to scratches, while it may be more fragile under extreme impacts. This would obviously impact the price point.

Another way to add to the sustainability of the machine is to make each and every piece replaceable. The first step is to make it easy to disassemble; using screws instead of hot glue is an important step in the right direction. In addition to that, it’s important to use standard components that can be easily found online, maybe even providing the exact reference of every component in the user manual.

For energy-saving concerns, a power switch could easily be added to save energy when the machine is not in use. Finally, to avoid pump leakage, it would be better to use bidirectional pumps that can pump the leakage back into the bottle.

Bill of Materials

kkkk.PNG

Meet Our Team

lll.PNG
mmmm.PNG

About the Team

Who We Are: We are a group of passionate students at the EPB who love robotics and cocktails. That’s why we chose to combine these two interests into our exciting project. When we started, most of us barely knew each other or didn’t know each other at all. This project has been an incredible opportunity to bond and grow as a team, creating strong connections.

Conclusion

This project represents the successful integration of mechanical, electronic, and software systems to create an automated cocktail maker. From concept to prototype, we tackled challenges related to precision, reliability, and user experience, ultimately delivering a system that combines innovation with practicality. A thorough analysis of existing competitors, including the Bartesian, GIG 15 Pro Under, and the Bev by BLACK+DECKER, helped identify market gaps and opportunities. Through patent analysis, particularly regarding glass positioning, pump management, mixing mechanisms, and liquid leveldetection, we established clear technical boundaries for our design.The chosen rotating platform design, supported by efficient pumps, a precise mixing mechanism,and user-friendly interfaces like Bluetooth and LCD, ensures high-quality drink preparation with minimal human interaction. While the prototype demonstrates the feasibility of the design, there is room for improvement, including enhanced sensors, leak protection, and more sustainable material choices. This cocktail maker has the potential to meet the needs of both personal users and small-scale professional environments, offering convenience, cost-effectiveness, and customization. By addressing the identified areas for refinement, future iterations of the system could further enhance performance and usability, solidifying its place as a versatile and valuable tool in the food and beverage industry.

Bibliography

[1] Jordan M. Berg and Tim Dallas. “Peristaltic pumps”. en. In: Encyclopedia of Microfluidics and Nanofluidics. Ed. by Dongqing Li. Boston, MA: Springer US, 2008, pp. 1626–1633. ISBN: 9780387489988. DOI: 10.1007/978-0-387-48998-8_1198. URL: https://doi.org/10. 1007/978-0-387-48998-8_1198 (visited on 12/30/2024).

[2] BLACK & DECKER INC. “Automated drink maker”. US11820638B2. Nov. 2023. URL: https: / / worldwide . espacenet . com / patent / search / family / 081345965 / publication / US11820638B2?q=cocktail%20maker.

[3] Engineers Edge. “Lewis Factor Equation for Gear Tooth Calculations”. In: (). URL: https : //www.engineersedge.com/gears/lewis-factor.htm.

[4] Damir Hodzic. “Strength Comparison of FDM 3D Printed PLAMade by Different Manufacturers”. In: TEM Journal (). URL: https://www.temjournal.com/content/93/TEMJournalAugust_ 966_970.pdf.

[5] Bo Lin. “Automatic Cocktail Maker”. US2011113967A1. May 2011. URL: https://worldwide. espacenet.com/patent/search/family/040211087/publication/US2011113967A1? q=cocktail%20maker.

[6] NIPPON ALEPH. “CAPTEUR DE NIVEAU DE LIQUIDE DE TYPE CAPACITIF”. JP2021177125A. Nov. 2021. URL: https://worldwide.espacenet.com/patent/search/family/078409414/ publication/WO2021225131A1?q=electrode%20type%20liquid%20level%20sensor.

[7] PUSAN NATIONAL UNIV INDUSTRY-UNIV COOPERATION FOUNDATION. “Cocktail manufacturing equipment”. KR20200089572A. July 2020. URL: https://worldwide.espacenet. com/patent/search/family/071893912/publication/KR20200089572A?q=cocktail% 20maker.

[8] Salary Expert. “Bartender Average Base Salary”. In: (2024). Accessed December 22, 2024. URL: https://www.salaryexpert.com/salary/job/bartender/belgium/.

[9] The bartesian cocktail maker. Accessed December 22, 2024. 2024. URL: https://bartesian. com/en-eu/products/the-bartesian.

[10] UNIV NINGBO. “ Cocktail blending machine”. CN214457855U. Oct. 2021. URL: https:// worldwide.espacenet.com/patent/search/family/078143347/publication/CN214457855U? q=cocktail%20mixer