Automated Drink Machine Project Final Report Michelle Advena Alex Horejs Jefferson Medel Connor Petilli 12/15/2015 The Automated Drink Machine is a system that makes mixed drinks. Automated Drink Machine Page 2 Contents I. Overview .................................................................................................................................................... 5 Needs Statement ...................................................................................................................................... 5 Objective Statement ................................................................................................................................. 5 Description ................................................................................................................................................ 5 Marketing Diagram ................................................................................................................................... 6 II. Requirements specification ...................................................................................................................... 7 Needs ........................................................................................................................................................ 7 Analysis to justify specifications ............................................................................................................... 9 Drink Platform Subsystem .................................................................................................................... 9 Control System .................................................................................................................................... 10 III. Concept selection................................................................................................................................... 10 Survey of Existing Systems ...................................................................................................................... 10 The Inebriator ..................................................................................................................................... 10 Coca-Cola Freestyle ............................................................................................................................. 11 Bartendro 15 ....................................................................................................................................... 11 Concepts Considered and Chosen ...................................................................................................... 11 Rationale ............................................................................................................................................. 12 Survey of Dispensing Methods ............................................................................................................... 13 Optics .................................................................................................................................................. 13 Actuators ............................................................................................................................................. 13 Peristaltic Pumps................................................................................................................................. 13 Solenoid Valves ................................................................................................................................... 14 Pressurized Air .................................................................................................................................... 14 Methods Chosen and Rationale .......................................................................................................... 14 Drink Platform Systems Considered and Chosen with Rationales .......................................................... 15 Survey of Possible Platforms ............................................................................................................... 15 Platform 1 - Driven directly by a motor .............................................................................................. 15 Automated Drink Machine Page 3 Platform 2 - Driven by a motor through gears.................................................................................... 15 Survey of Possible Motors .................................................................................................................. 16 DC motor ............................................................................................................................................. 16 Servo motor ........................................................................................................................................ 16 Stepper motor ..................................................................................................................................... 16 Survey of Possible Sensors .................................................................................................................. 16 Photo cell ............................................................................................................................................ 16 Break beam sensor.............................................................................................................................. 16 Systems Considered and Chosen ........................................................................................................ 17 Cup Dispenser Systems Considered and Chosen with Rationales .......................................................... 20 Survey of Possible Sensors .................................................................................................................. 20 Survey of Possible Motors .................................................................................................................. 21 Control Systems Considered and Chosen with Rationales ..................................................................... 21 IV. Design .................................................................................................................................................... 23 System Diagram ...................................................................................................................................... 23 Subsystems ............................................................................................................................................. 23 Alcohol Dispensing .............................................................................................................................. 23 Mixer Dispensing................................................................................................................................. 23 Drink Platform ..................................................................................................................................... 24 Control System .................................................................................................................................... 26 User Interface and Control ..................................................................................................................... 29 Engineering Standards ............................................................................................................................ 31 Multidisciplinary Aspects ........................................................................................................................ 31 Mechanical Engineering ...................................................................................................................... 31 Computer Engineering ........................................................................................................................ 31 Electrical Engineering .......................................................................................................................... 31 Computer Science and Networking .................................................................................................... 31 Background ......................................................................................................................................... 31 Outside Contributors .......................................................................................................................... 31 V. Constraints and Considerations .............................................................................................................. 32 Extensibility ............................................................................................................................................. 32 Automated Drink Machine Page 4 Manufacturability ................................................................................................................................... 32 Reliability................................................................................................................................................. 32 Economic Context ................................................................................................................................... 32 Health and Safety Issues ......................................................................................................................... 32 Societal Context ...................................................................................................................................... 32 Sustainability ........................................................................................................................................... 33 Ethical...................................................................................................................................................... 33 VI. Costs....................................................................................................................................................... 33 VII. Testing................................................................................................................................................... 35 Drink Platform Subsystem ...................................................................................................................... 35 Component Testing ............................................................................................................................. 36 Control System ........................................................................................................................................ 36 VIII. Risks ..................................................................................................................................................... 37 Subsystem Risk Assessments .................................................................................................................. 37 Platform Subsystem Design ................................................................................................................ 37 Control System Communication ......................................................................................................... 37 Additional Risk Assessments ................................................................................................................... 38 IX. Milestone Charts .................................................................................................................................... 38 X. Critical Evaluation ................................................................................................................................... 42 Automated Drink Machine Page 5 I. Overview Needs Statement When entertaining groups of people, there are two major options for serving beverages to guests: hiring someone or employing a self-serve method. Hiring a professional server would involve a significant expense on the part of the host and is not really feasible for small, personal events. Though because the host is hiring a professional, it does offer a certain degree of quality control. Self-serve methods often include single-serve containers or having guests pour themselves drinks from a selection. A system is needed to dispense mixed drinks efficiently and accurately without the disorder of open self-serve containers, the inconvenience of measuring out liquids, or the cost of hiring a third party. Objective Statement The objective of this project is to design and prototype a system that will allow guests to order any existing or mixed drink without having to wait in a queue, allowing them to enjoy the event free from distraction and prevent them from distracting the other guests. The system will be controllable remotely. Guests will be able to queue pre-existing or custom ordered drinks for dispensing and proceed to the dispenser to retrieve the drinks when notified. Social media functions such as posting to a Facebook timeline or tweeting from Twitter will also be available to provide ways for the guests to enhance their experience. Description The Automated Drink Machine (ADM) dispenses measured amounts of liquids to create mixed drinks. Food-safe materials are be used for all parts involving the storage and dispensing of liquid ingredients. Motion controllers and sensors inform the controller as to the status of the platform holding the cups and drinks. There are six dispensers and every dispenser corresponds to a different liquid. The ADM is controlled via a command line interface. When turned on, the ADM centers the platform and displays a menu, giving the user several options. These options include dispensing single shots, dispensing a drink from a database, and adding a new drink to the database, Once the user selects an option, the ADM will wait for a cup to be placed on the platform, upon which it begins executing the selected option. Reaching for a drink while the platform is in motion will trigger a response from the IR break beam sensors, and stop the platform . Automated Drink Machine Page 6 Marketing Diagram A preliminary digital, 3-D sketch of system chassis can be seen below. The chassis will have the drinks, hoses, and various dispensers mounted to it to create the device. Figure 1: Preliminary Marketing Diagram Automated Drink Machine Page 7 II. Requirements specification Needs Table 1 below enumerates the customer’s needs. Table 1: Customer Needs No. Description 1 The system shall drinks/containers. 2 The system shall correctly dispense a measured amount of fluid. 3 The system will allow cups to move to their proper location. 4 The system will detect when a cup is placed on the platform. 5 The system will detect when a user is reaching for the cup. 6 The system will protect its components from spills. 7 The platform will move smoothly to prevent the liquid in cups from spilling. 8 The operation of the system shall not be noisy. 9 The dispensing system shall be able to function without manual user intervention. 10 The user will be notified when he or she needs to refill the cup dispenser 11 The cup dispenser will drop a new cup whenever a new drink is ordered 12 The dispensed drink shall be safe to drink. 13 The system will be able to be controlled remotely. 14 The system can be controlled from various mobile platforms. 15 Multiple clients can use the system at once 16 The system will allow preset drinks to be ordered 17 The system will allow custom drinks to be ordered 18 The system will allow multiple drink orders to be queued 19 The system will allow monitoring of a drink orders status 20 The system status shall be monitored by an elevated client. 21 The system shall provide a list of preset drinks available to the client. 22 The system shall allow the list of preset drinks to be modified by an elevated client provide a simplistic method for changing Automated Drink Machine 23 The system shall provide social media features. (Posting to Facebook timeline, Tweeting from Twitter) 24 Page 8 The system shall allow for multiple levels of verified clients. (provide access to system functions, alcoholic content) Engineering Specifications The table below enumerates the engineering specifications and the corresponding customer need(s). Table 2: Engineering Specifications No. Description Need(s) A The software handling drink orders will have the ability to queue drinks. 18 B The device handling drink orders will not need to be connected physically to the dispensing unit. 13 C The user shall be able to add and remove drinks manually from the machine via a provided container. 3 D A standardized interface/container will be used to store liquids. 1 E Cups will be easily replaceable. 1 F Machine will notify user when cups need to be replaced. 10 G The platform will be divided into uniquely coded sectors, one for every cup that the platform can hold. 3 H The platform will have slots with sensors where a cup will be placed. 3, 4 I The system will utilize sensors to detect when a user is reaching for a cup. 5 J Relevant portions of the platform will be watertight and waterproof to at least one full dispensed cup of water 6, 7 K The platform will be rotated by a low RPM motor 8, 3 L Ability to measure and dispense a set amount of alcohol in a multiple of 35mL. 2 Automated Drink Machine M Ability to measure and dispense a specified amount of a mixer (e.g, ½ cup or ¾ cup) Page 9 2 N Noise from normal operation will not exceed 60 dB. 8 O All valves, levers, etc. will be electronically (or electromechanically) operable. 9 P The cup dispenser will be replenished by feed 1 Q The cup dispenser will have a sensor that will detect the presence of the bottom cup 10 R Food-grade parts will be used for all components coming into contact with the liquids. 12 S The system will include a wireless network adapter. 13 T A web-based user interface will be provided. U The system shall provide user creation and authentication via a user database V All client actions will be available in the web-based user interface 16, 17, 18, 19, 21, 22 W Elevated client actions will be available to authenticated clients (e.g, modifying drink queue, system power, etc.) 20, 22 X The system will allow multiple network connected clients. 15, 18 Y The system will maintain a database of preset drinks. Z The drink database shall be modifiable by authenticated clients. 19, 14 24 16, 21, 22 22, 24 AA The system will interface with social media APIs. (Facebook, Twitter) 23 AB The web-based interface will allow multiple concurrent connections. 15 Analysis to justify specifications Drink Platform Subsystem The platform is circular to make it as compact as possible. Any other shape would cause gaps and unused space when rotating it. The moving platform holds cups which contain liquid Automated Drink Machine Page 10 inside of them, so the motor driving it moves at a slower and smoother rate. Sensors are the best way to detect if something is moving or in place. Sensors are mounted in grooves on the bottom of the platform so as to be less obtrusive. The grooves also make sure that the cups stay in place while the platform moves. The platform is divided into color-coded sectors to allow the Automated Drink Machine to easily convey where a user’s drink is located, and by extension, which drink is theirs since there is only once sup per sector. Lastly, the platform is waterproof and watertight to ensure that the components used in the system are not damaged in the case of accidental spills. Control System To provide a way for multiple clients to connect from multiple different platforms, the system will need to have an adapter for a multi-client wireless protocol. Considering the necessity of cross-platform support, the wireless protocol must further provide a unified form of communication on multiple platforms. A web-based interface provides both a method of multiple clients and cross-platform support assuming certain resources like an existing wireless network are available. Utilizing an existing wireless network, the system can connect and provide a webservice to other users on the network. Not only does this allow multiple wireless clients, but also a simple avenue for cross-platform support via existing web-based software concepts. The system must also have a database of drinks to satisfy the need for a client to view, modify, and select pre-set and custom drinks. An additional user database is also necessary to allow users to not only be created and authenticated, but also remembered for future events with the ADM to avoid recreating a user every time. To specifically provide aspects of social media like custom drink sharing, the software must have access to high level social media APIs. Most users are likely to be familiar with and regular users of existing social media services. As such, to provide a way to access and share on these platforms immediately, the inclusion of standard social media service functions can be achieve with existing APIs III. Concept selection Survey of Existing Systems The Inebriator Website: http://www.theinebriator.com One of the most popular drink mixers online with a large amount of information available via blog, the Inebriator was designed to mix alcoholic drinks at parties for attendees who do not have the inclination to mix their own drinks. It eliminates the need to look up and measure ingredients Automated Drink Machine Page 11 and produces repeatable results. Drink selection is made via an attached console with a rotary encoder. Drink dispensing is managed by an Arduino Mega 2560, while a Fez Panda II manages the drink selection console. Drink recipes are stored on a SD card in XML format. In addition to its ability to measure and dispense precise quantities of alcohol, the Inebriator dispenses drink mixers (e.g. orange juice) and uses a pressurized air tank to push the liquid through the tubes. RFID is used for to authenticate admin access. Coca-Cola Freestyle Website: www.coca-colafreestyle.com/home The most widely seen, commercially-available, custom drink maker, the Coke Freestyle is a soda fountain that allows users to mix a variety of beverage bases, (e.g., Coke, Diet Coke, water), with different flavors, (e.g., vanilla, cherry, lime), to form a customized drink. Micro-dosing technology is employed in dispensing the flavors, allowing them to be packaged in small cartridges. Drink selection is made via a touchscreen interface. Bartendro 15 Website: http://www.partyrobotics.com The Bartendro 15 is a high-end automated cocktail mixer with a base cost of $3,700. The system employs 15 peristaltic pumps to dispense accurate and repeatable cocktails. Controlled via smartphone, users can create custom create drinks, modify existing ones, or add new ingredients. Precision is emphasized in the setup with dispensing accurate to a ½ oz. When fully assembled, it is 36”x 24”x 12” and marketed for both home and business. Concepts Considered and Chosen The table below provides a comparison of features found in currently available systems as well as the features to be included in the designed system, where a check mark (✓) indicates the presence of a feature. The table focuses on the Inebriator and the Coca-Cola Freestyle, as these represent the private and commercially-available systems, respectively, most closely aligned with the project’s initial concept. Table 3: System Comparison Chart Feature The Inebriator Coke Freestyle ✓ Drink queue Drink database Custom mix (real-time) Planned (this project) ✓ ✓ ✓ ✓ Automated Drink Machine Drink selection automatically updates based on availability Page 12 ✓ Cooling system ✓ ice dispenser (manual fill) ✓ Carbonation system Drink Platform unknown mobile, linear stationary mobile, rotational ✓ Remote ordering Cup detection/sensing ✓ ✓ Precise volume measurement ✓ ✓ Push-and-hold to dispense ✓ Self-cleaning ✓ Phone app ✓ ✓ Touch interface ✓ ✓ Low/empty level detection ✓ ✓ Rationale The Automated Drink Machine (ADM) attempts to strike a balance between the userfriendly, polished appeal of the Coke Freestyle and the powerful features of a custom system like the Inebriator. To achieve this balance, a mobile interface with a user-friendly presentation was selected. To focus efforts on the mobile interface, an at-machine interface is not provided. Additionally, to facilitate the use of custom drinks, a dynamic drink database is used to allow for the most accurate drink creation and selection. With this system, the user does not have to worry about drinks that have been emptied or removed and are no longer available. These drinks then become available again immediately upon restocking and updating the database. To achieve the queue system as described, the specific method of implementation will be a rotating drink platform. The queueing system allows for the remote ordering system to work correctly. Without queueing, operation is effectively no different from normal at-machine ordering. With queuing and the rotating platform however, one can order a drink and have it begin preparation immediately, rather than after the guest in from of them has ordered. Automated Drink Machine Page 13 Survey of Dispensing Methods Optics Despite what the name implies, an “optic” (also known as a “non-drip measure”) has nothing to do with light. Instead, it is the British term used to describe a device that attaches to the top of a bottle of alcohol and, when inverted, dispenses a measured amount (e.g. 25 mL) of the spirit. The beauty of these is that they are simple to operate – all that needs to be done to dispense the liquid is press the lever, as the system is gravity-fed. This could easily be achieved with some a linear actuator. One drawback of this system is that brackets to hold the optic and the attached bottle need to be either bought (ideally from the same company that manufactures the optics) or made. Table 4 shows summarizing prices from the well-known UK optics manufacturer Beaumont. All optics listed in the table can be operated with a single hand, or in this case using a linear. actuator. Table 4: Prices for Beaumont Optics Product Price Per Unit* USD Approximate 25 mL Vogue £8.50 $12.65 25 mL Metrix SL £7.00 $10.42 25 mL Solo Professional £5.18 $7.71 Shelf Bracket £3.20 $4.71 Wall Bracket £2.44 $3.59 *At this time it is unknown if minimum purchase is 1 carton (100 units) or 1 unit. Actuators To determine the specifications needed for the actuator, more data on the optic is required. The main unknown is the amount of force required to operate the optic. This will drive the base cost of the actuator, as an increase in force corresponds to an increase in torque. Peristaltic Pumps Peristaltic pumps are ideal from a contamination standpoint in that no mechanical parts come into contact with the fluid being moved. Therefore, the only thing that ever needs to be sterilized is the inside of the tubing. However, this does mean that the tubing needs to be periodically replaced due to wear. Another potential drawback is that the pump does not provide a constant flow. Tubing can be chosen such that it meets any specific requirements for the fluids being pumped, such as food-safe or compatible with aggressive fluids. For example, McMaster-Carr Automated Drink Machine Page 14 manufactures food-safe tubing specifically for peristaltic pumps, “High-Purity White Silicone Rubber Tubing for Peristaltic Pumps.” From a “mixers” point of view, peristaltic pumps are ideal in that they can easily move more viscous fluids. They also provide an easy way to measure the amount dispensed, if sensors to detect fractions of a rotation are added. The makers of Bartendro sell the custom peristaltic pump they use (it contains additional hardware and software), as well as provide free schematics under the Creative Commons Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) license. Pricing for their dispenser starts at $120. When the fact that many peristaltic pumps are priced at over $100 is taken into consideration, the cost doesn’t seem as high. Solenoid Valves Solenoid valves could be used either individually or as sets of two. If used individually, solenoid valves could be used as an on/off switch in a gravity-fed system. In sets of two, the valves could be used similarly to an optic. Connected by tubing (where the volume between the two valves is equal to a specified amount, e.g. 25 mL), the top valve would open to allow liquid into the chamber. Once full, the top valve would close and the bottom valve would open, allowing the liquid to then flow into the drink. The advantage to using the valves over optics is that it can be programmed such that the chamber between the valves is only ever filled when a drink is about to be poured. The downside to that method is that there will be additional wait time while the chamber fills. Pressurized Air The idea behind using pressurized, or compressed, air is that all mixers would be kept a constant, low pressure. To dispense liquid, the pressure would be increased (forcing more air in) through one tube, which would in turn force liquid out a second tube. One risk when using pressurized air is that the air could potentially introduce impurities into the liquids. Another major concern is the amount of noise an air compressor would make when running. Methods Chosen and Rationale As seen in the Pugh table below, optics had the highest score for dispensing alcohol, while peristaltic pumps had the highest score for dispensing mixers. Thus, these are the two methods that will be employed. Note that ‘(A)’ denotes the criterion applies only to dispensing alcohol, while ‘(M)’ indicates the criterion applies only to dispensing mixers. Automated Drink Machine Table 5: Pugh Table for Dispensing Methods Page 15 Weight Optics Peristaltic Pumps Solenoid Valves Pressurized Air Ease of operation 1 1 1 1 1 Sterilization 2 1 1 0 -1 Noise level (quiet) 2 1 1 1 -1 Size (small) 1 1 1 1 -1 Beverage-safe 2 1 1 0 1 Ability to handle viscous substances (M) 1 -1 1 1 1 Ability to handle particulates (M) 1 -1 1 0 1 Non-gravity-fed (M) 3 -1 1 -1 1 Gravity-fed (A) 2 1 -1 1 -1 Availability 1 -1 1 1 1 Total (A) /11 - 9 7 7 -3 Total (M) / 14 - 2 14 3 4 Drink Platform Systems Considered and Chosen with Rationales Survey of Possible Platforms Platform 1 - Driven directly by a motor The motor will be attached directly to the bottom of the circular platform at its center. This will allow the motor to rotate the platform directly, with the platform’s angle matching that of the motor. Platform 2 - Driven by a motor through gears Automated Drink Machine Page 16 A large gear needs to be either built into or attached to the bottom of the circular platform. This will then be connected to a gear attached to the motor. There are several variations available. Survey of Possible Motors DC motor DC motors are two wire continuous rotation motors. They are generally high RPM and run until power is removed. The speed of the motor is controlled using pulse width modulation, a technique that rapidly turns the motor on and off. The rapid pulses make the motor appear to be running smoothly. Servo motor A servo motor is an assembly of four components: a DC motor, gearing set, control circuit, and position sensor. They are designed to be used for specific tasks where positions need to be accurately defined. They do not have a free range of motion and are limited to 180 degrees back and forth from its original position. Servo motors use three wires: power, ground and control. Servo motors use PWM to determine the position instead of the speed, locking into the specified position until told to move. Stepper motor Stepper motors are also used for specific tasks where the position is important. Unlike a servo motor however, they use toothed electromagnets arranged around a central gear to define position. They require an external microcontroller to control it. Stepper motors have locked positions of a certain degree for which they move into and are very accurate. Positioning errors are uncommon since the positions are physically predefined. Survey of Possible Sensors Photo cell This is a CdS photoresistor that has a high resistance in the dark, and a low resistance in the light. Photoresistors are small and cheap, but are heavily reliant on proper illumination to function. Break beam sensor The break beam sensor being considered is an infrared (IR) break beam sensor. It has two components. One emits a beam of infrared light while the other receives it with an infrared sensitive component. When the second component stops receiving the beam, the beam has been Automated Drink Machine Page 17 broken and there is an obstruction. Both components are required on opposite sides of the area being monitored. Systems Considered and Chosen The table below provides a comparison of the possible platform systems, motors, and sensors based on their use, attributes, and weighted fields. Table 6: Pugh Table for Platform Systems Platform 1 Platform 2 Simplicity .25 .25 .15 Modifiability .25 .15 .2 Aesthetic .5 .3 .45 Score 1 .7 .8 As seen above in Table 6, Platform 2, the platform driven by a motor through gear intermediaries is a better option. As can be seen in Figure 1, it already fits the current design and aesthetic by leaving a hole in the center of the platform for tubes and other components to pass through. While it is more complicated than the platform driven directly by a motor, it is easier to modify the rotational speed using a single motor since the platform already uses gears.. Automated Drink Machine Page 18 Table 7: Pugh Table for Motor Systems DC motor Servo motor Stepper motor Accuracy .55 .2 .4 .5 Cost .15 .1 .07 .08 Speed .3 .1 .22 .28 Score 1 .4 .71 .86 As seen in Table 7, a stepper motor is the best option for this system. While it is slightly more expensive than a DC motor, it is by far more accurate. Accuracy of the motor is paramount for this system since the machine may be run for extended periods of time and will be forced to rotate the platform numerous times. This system is responsible for making sure that the cups are in place when dispensing liquid for the mixed drinks. Errors in position may build up over time and cause spills if the cups are not in place. Furthermore, stepper motors work well at low speeds. Table 8: Pugh Table for Cup Detection Systems Photocell IR break beam sensor Accuracy .35 .18 .35 Cost .15 .15 .02 Size .3 .3 .13 Availability .2 .2 .15 Score 1 .83 .65 Automated Drink Machine Page 19 Photocells are not as accurate as break beam sensors, and lighting conditions can produce false positives or negatives. However, this downside can be mitigated by placing the photocell within the groove to detect cups when they are directly next to it. Furthermore, they are much smaller, cheaper, and widely available. They can be positioned to be hidden from view and will not affect the placement of the cups Table 9: Pugh Table for Interruption Detection Systems Photocell IR break beam sensor Accuracy .5 .25 .5 Cost .15 .15 .02 Size .2 .2 .15 Availability .15 .15 .11 Score 1 .75 .78 Accuracy is just as important when detecting outside interference. The machine needs to know when to stop operating to prevent spills from occurring. Since there is no way to make photocells more accurate as when detecting cups, accuracy was weighted more highly. The break beam sensor is much more expensive, but does not produce false positives or negatives since it only reports an obstruction when its beam is broken. Automated Drink Machine Page 20 Cup Dispenser Systems Considered and Chosen with Rationales Survey of Possible Sensors Table 10: Pugh Table for Cup Dispensing Sensor Systems Photocell IR break beam sensor Microswitch Accuracy .4 1.8 3.5 3 Cost .1 1.5 0.2 1 Size .2 3 1.3 0.7 Availability .35 2 1.5 2 Score 1 2.17 2.205 2.14 As shown above in Table 10, the IR break beam sensor is considered to be the best sensor for detecting the bottom cup of the dispenser. While IR break beam sensors are not the most cost-effective solution, they are the most accurate sensor. Accuracy was considered to be the most important feature for this sensor because the subsystem depends entirely on the presence of cups in the dispenser. Automated Drink Machine Survey of Possible Motors Table 11: Pugh Table for Cup Dispensing Motor Systems Page 21 DC motor Servo motor Stepper motor Accuracy .3 2 4 4 Cost .15 1 0.7 0.8 Speed .4 1 2.6 2.4 Score 1 1.15 2.345 2.28 As shown above in Table 11, the servo motor was chosen to drive the arm of the cup dispenser. Speed was considered to be the most important property for this motor because the subsystem needs to complete its task quickly or it will become a bottleneck for the rest of the machine. Control Systems Considered and Chosen with Rationales In general, the system must be complex enough to run a web-server as well as communicate with multiple sensors, actuators, and motors. From a software standpoint, there are three major platforms that provide both the software capabilities for running a web-service as well as the hardware capabilities of connecting to multiple peripherals at reasonable prices. These are the Arduino, Beaglebone, and Raspberry Pi. When comparing these platforms, all three have the capability of running high level software. In the case of the Arduino however, the technologies used for web-services are provided through custom APIs. The same is true for the inclusion of a High-Level Operating System like a Linux distribution. Both the Beaglebone and the Raspberry Pi can provide a HLOS whereas the Arduino in general can’t. Comparing just the Beaglebone and the Raspberry Pi, the software functionalities with respect to this risk component are essentially equivalent. The same can be said for their hardware interfacing functionalities. Both provide multiple digital GPIO interfaces but the Beaglebone provides the most digital GPIO with 65 pins. Both provide serial interfaces capable of point-to-point communication and bus communication as well. Given the challenges of running a full web-service on an Arduino, that platform isn’t appropriate for this component. As such the two major systems to consider are the Beaglebone Automated Drink Machine Page 22 and the Raspberry Pi. For both of these systems, the method of wireless network connectivity is also relatively simple. With these two systems, the best choice is a USB Wi-Fi module that conforms to current Wi-Fi standards. For this component, a miniature Wi-Fi USB module was selected to provide the smallest footprint even though space, given our current design, is not a major concern. When understanding the context of this specific component and ignoring the inconsequential differences between the two platforms, the only significant considerations between the two are hardware interfacing and cost. In terms of hardware interfacing, although the Raspberry Pi provides both digital GPIOs and serial interfaces, the Beaglebone provides significantly more digital GPIOs and a multitude of serial ports including 3 I2C busses, which are a likely choice for sensor communication. In terms of cost however, the Raspberry Pi, at a base model comes in at $35 which is slightly less than the $55 for a Beaglebone. However, as a group we have access to both the Raspberry Pi and Beaglebone platforms. As such, the cost of the platform itself is only a minor consideration. With that in mind, the most important consideration is hardware interfacing and in those terms, the Beaglebone black is the clear choice with multiple serial busses and 65 GPIOs for sensors that may not be accessible via serial protocols. Automated Drink Machine Page 23 IV. Design System Diagram Figure 2: Preliminary System Diagram Subsystems Alcohol Dispensing Optics, operated by linear actuators, are used to dispense alcohol. Two linear actuators, working in tandem, are required to fully pull up on the optic arm to actuate the optics and perform a clean pour. Mixer Dispensing Peristaltic Pumps are used to dispense the mixers. The pumps operate by pumping a preset number of “ticks” which represent quarter turns of the pumping mechanism. These ticks were calculated to dispense the same amount as the optics. Automated Drink Machine Page 24 Drink Platform The chosen system design takes the best of each field and combines them. The system uses a platform driven by a stepper motor with gears as intermediaries and both sensors. The photocells were used to detect cups, while the break beam sensor detected interference. The platform is 23.5” in diameter. Medium Density Fiberboard (MDF) was chosen as the material for the platform and its base due to being easily milled and easy to acquire. The subsystem design can be split into two main components. The first are the gears and motor, while the second is the platform and sensors. The platform was placed in top of a gear. The platform’s gear was then connect to the gear attached to the stepper motor via a belt and pinion gear. A hole in the platform’s support allowed wires from sensors inside of the platform to connect to other systems like the microcontroller, as well as allow tubes and other components to pass through unobstructed. The platform was supported by three caster wheels to reduce friction in the system. It was further supported by a cam roller to keep the platform centered for smooth rotations. The platform had six slots with which it could hold a cup, each marked by its own unique color. The slots are a half inch thick, allowing it to hold cups in place. The sensor is placed directly below a slot, allowing the system to register that a cup is there when it is almost completely dark. Surrounding the platform on the stationary portion of the system,next to each dispenser, are several break beam sensors. A diagram of the platform overhead and cross-section can be seen in Figures 3 and 4. Automated Drink Machine Figure 3: A top-down view of the platform-sensor system Figure 4: A cross-section of the platform-sensor system Page 25 Automated Drink Machine Page 26 The system design minimizes costs when possible and attempts to stay true to the initial design which other systems will be based upon to reduce inconsistencies between them. A break beam sensor would be more accurate than a photocell when detecting if a cup is in place, but are at minimum double the cost. They are also bulkier and would be harder to fit into the platform. A possible risk for the photocells detecting false positives is if there is a spill and a dark liquid is covering the sensor. This would, however, fall upon the user to stop and clean the machine. Control System In terms of hardware, the setup is relatively simple. The board (Beaglebone Black) will be configured with a standard flavor of the Ubuntu distribution. This will allow for full functionality of the device and provide an easy way to configure the device for testing and final production. From there, a USB Wi-Fi module is connected to the USB port on the board and configured in Ubuntu for network connectivity. The necessary sensors, when finalized, can be connected to one of the many serial or GPIO interfaces and configured from a kernel level if necessary. This setup allows for a very flexible system that can adapt to the many different sensors that may be necessary with ease. The remainder of the design constitutes software design as described below. The underlying structure has been designed to allow for many possible scenarios of user interaction so as to provide a somewhat generic solution. Automated Drink Machine Page 27 The major entities of the software design are shown in the table below with a description of their functions. Table 12: Entity Descriptions for System Controller Entity Description Database Connection External Interface System Controller Provides top level interconnection for sub-entities and overall control of the system. None None Drink Database None User Database None Drink Management Allows for selection and creation of drinks. User Provides user management including creation and Authentication authentication. User Interface Provides physical interface for user to interact with system. (order drink, monitor status) None User Device Drink Queue System Manages drink creation and organization and how it interacts with the hardware controller. None None Hardware Controller Allows for reading from sensors and controller external devices. None Sensors, Actuators, Motors, ... Social Interfaces Provides common social methods provided by existing APIs (posting, tweeting, …) None Social APIs Automated Drink Machine Page 28 A diagram of the connections between entities in table 12 can be seen in figure 5 below. In the diagram, the overall component structure can be seen with a box indicating what is included in the component, and what external entities the component interfaces with. Figure 5: Entity Connectivity Diagram Automated Drink Machine Page 29 User Interface and Control The user interface will consist of a cross-platform web-service based interface. Any user with a mobile device capable of connecting to an existing 802.11 Wi-Fi network will have access to this interface. As such, further methods of authentication will be utilized to confirm only those with permission have access to the interface. The specifics of the physical layout are not defined at this time. Figure 6 shows a general purpose interface that represents the general flow of user interaction. The figure shows the main user functionality from login to drink ordering with intermediary actions of drink modifying and current order monitoring. Underlying the graphical version of the user interface will be a command line interface that allows for the same functionality. This version of the interface will be used for intermediary testing as it provides a more development friendly way to modify and test subsystems with rapid changes. These rapid changes may be necessary as the platform, and possibly hardware interfaces change to meet new design needs. Automated Drink Machine Page 30 Figure 6: Mobile Interface Prototype Automated Drink Machine Page 31 Engineering Standards ❖ USB 2.0 ❖ WiFi Multidisciplinary Aspects Mechanical Engineering The construction of the ADM involves many mechanical engineering aspects. The system’s chassis and rotating drink platform are both mechanically based. The dispensing mechanisms also involve mechanical aspects, with linear actuators operating the optics and pumps moving the mixers. Computer Engineering The ADM requires a microcontroller to drive the various motors and sensors required to function. Allowing the various components of the ADM to work independently and then merging them together is a computer engineering aspect. Electrical Engineering The ADM requires a large number of motors and sensors that are wired to a controller and will draw non trivial amounts of power. A consideration for power consumption may be necessary. Computer Science and Networking A large component of the ADM is the web interface. This requires web design knowledge in order to create a usable UI and to ensure proper networking and security between a multitude of devices. Background The ADM required several courses including Interface & Digital Electronics, Electronics, and Software Engineering from the Computer Engineering curriculum. Our team also has experience in web design and manufacturability, as well as outside knowledge of wines and cocktails. Outside Contributors None. Automated Drink Machine Page 32 V. Constraints and Considerations Extensibility The components can be modified anywhere from slightly to extensively to introduce a wider variation of drinks. Modifying components within the machine can allow for the creation of shaken or mixed alcoholic drinks. Adding a carbonator would allow for custom carbonated drinks. The concept can also be applied to food instead of drinks. A theme can be selected for which a machine will accept various ingredients within multiple separated compartments and create a personalized dish with perfectly measured ingredients and cook time. Variations of a dish, like chicken or beef curry, can be selected based on the availability of ingredients, database recipes, and machine model. Manufacturability The ADM requires many custom parts. Some parts, notably the optics, would need to be shipped internationally. This forces a large initial investment. Once the materials are procured however, mass manufacturability is no longer out of reach, It can be setup quickly by a small dedicated team, and the program will only have to be written once. Reliability The ADM is a reliable machine, not prone to malfunctions or breakdowns. The parts are of good quality and procured from reliable manufacturers. As long as it is handled appropriately, it does not require constant maintenance. Economic Context The ADM is intended to be a direction option for serving drinks either in the foodservice industry or at a private event. Health and Safety Issues This system deals with dispensing beverages, meaning that all containers, tubing, etc. must meet regulatory standards as set forth by the FDA, 3A, and/or NSF. Societal Context The ADM relies on the customers to ensure that minors are not granted access to any alcoholic drinks. The ADM interface runs on a ticket system in which users are given a ticket by the ADM’s owner. Thus it falls on an honor code, as in any social gathering, to act and behave responsibly. Automated Drink Machine Page 33 Sustainability Though it was not designed with sustainability in mind, the ADM should be very sustainable so long as receives appropriate maintenance as no parts are prone to deteriorating quickly. Ethical A potential ethical issue to take into consideration is that the machine will likely be unmanned and unattended during a party. It would therefore be simple for someone under-aged to procure an alcoholic drink. VI. Costs Table 13: Cost Estimates Description Cost Our Cost Availability Timing Belt (22” / 110T) 6.00 5.70 Timing Hub Pulley 60 teeth / 3.80” diam.) 8.00 7.99 10 tooth pinion pulley (.25" bore / .0.63" diam.) 7.00 6.99 IR Break beam sensor (2x) 6.00 5.70 Adafruit 12.00 11.70 Adafruit Photocell Sensor (6x) Bartendro Dispenser (no liquid level detector) 120.00 119.99 35 ml optic and bracket set (2x) 50.00 47.88 1/2" x 2' x 2' MDF (2x) 10.00 3/4 x 3/4 x 1/8 Angle iron (20') 16ga CR Sheet (36'' x 96'') 2 in. Swivel Caster with NonMarking Rubber and Brake (2x) 11.90 7.00 6.49 40.00 33.00 16.00 Party Robotics Store 17.88 Online Automated Drink Machine Page 34 2 in. Swivel Caster with NonMarking Rubber (2x) 16.00 15.92 1" Plastic Caster Wheel (4x) 7.00 6.99 Beaglebone Black, Rev. A6A 55.00 0.00 $360.00 $298.13 Total Beaglebone *1 The platform and gears will likely be custom made and therefore do not have a cost yet. *2 There are two types available, one with a 10” range, and the other with 20” *3 The motor may still change depending on the microcontroller used. Automated Drink Machine Page 35 VII. Testing Drink Platform Subsystem The following tests are based on the engineering specifications table. Table 14: Drink Platform Test Strategy No. Description Engineering Spec(s) 1 Several randomly selected people are able to distinguish between the colors in each sector A 2 Cups remain in place and do not spill liquid when the platform starts moving, stops moving, or is in motion. The test should be performed for at least one hour of continuous use. B, E 3 The photocell sensor returns a positive only when a cup is in place above it regardless of lighting. Tests should be done in both well and dimly lit rooms C 4 Paper towels should be placed where components would be in the platform. Water will then be poured on the platform. The test is successful if the paper towels remain dry. D 6 The platform is able to rotate at least 180 degrees in both directions without being obstructed or obstructing other systems in the machine F Automated Drink Machine Page 36 Component Testing ● ● IR Break Beam ○ 5mm sensor - The effective range of this sensor at 3.3V and 5V operation was found to be approximately 20”” at 22” respectively, with both returning a voltage of 4.9V while the break beams were unbroken, and below .1V when broken. ○ 3mm sensor - The effective range at 3.3V and 5V operation was found to approximately 13” and 14” respectively, and returned voltages of 4.9V and 4V respectively while the brake beam remained unbroken. They returned below 1V when broken. Photocell Sensors ○ All of the photocells were tested using an Ohmmeter. ○ “Light” - Conditions with some light result in a resistance of 5-15kOhms ○ “Dark” - Conditions with little to no light result in a resistance of 200K->1MOhms Control System The testing for the control system serves as a more software design focused test starting with unit tests to confirm the functionality of each entity. Table 15: Control System Unit Tests Test Type Hardware controller Unit Test: Description Ensure individual expected functions are available. (cup detection, dispense functionality, rotate platform) Drink Management Ensure drinks can be searched, modified, and saved. Drink Queue System Ensure drinks can be ordered and monitored. Ensure multiple drinks can be ordered and are handled. (Virtual sensors/actuators used until other components complete) User Ensure users can be created and deleted as well as authenticated. Authentication (Method of authentication TBD) User Interface Ensure interface provides all functionality of system. Ensure interface works on desired platforms. (Virtual interface for purely aesthetic verification, non-functioning) Automated Drink Machine Social Interface Page 37 Ensure social functions perform as expected. After full unit tests are complete, the testing shall move into integration testing for just the software component. This will consist of testing units and how they interact with each other. While all units do not necessarily interact with every other unit at this time, all possible connections will be tested. Specific tests to verify would be interaction of the drink queuing system and the hardware controller as this is the major element linking software operation and hardware operation. User verification and the functions it allows will also be a major element to verify. This testing is allotted 2 Weeks in the beginning of next semester (August 24 to September 7). This will allow the complete interactions of the units to be examined and verified. Finally, full integration testing can begin after the integration testing of the software component is complete. This step relies on the other components as well however, meaning it can’t actually begin until all other components are at least in working stages. As such, the time frame for this testing is TBD. VIII. Risks Subsystem Risk Assessments Platform Subsystem Design Several risks were considered when designing the platform. The belt connecting the central gear and motor needs to be tight. This introduced the problem of the platform shifting off center. A cam roller was selected to minimize this problem. The motor may not be powerful enough to rotate the platform efficiently. An easily millable material was selected so that the platform could be made lighter. The slots may allow in too much light for the photocells to accurately detect when a slot if overhead. While this does not affect the detection of a cup being placed on the platform, it makes it difficult for the photocells to be used to center the platform. A thin film with a smaller hole was selected to be placed under each slot to prevent excess light from being detected. Control System Communication A major risk to consider when selecting the proper network based technologies is the security of these technologies. Allowing remote access to the system controller presents a security concern in terms a malicious attacker attempting to hijack the machine so to speak and operate it. As such, when connecting to the machine, it will be important to use some sort of Automated Drink Machine Page 38 secure communication or encryption protocol. For serving web resources this would most likely be SSL/TLS encryption. This would also apply to the command line interface communication which would be accomplished via an SSH connection with system level user login serving as the protection. Additional Risk Assessments The Platform is both heavy and not water resistant. As such the motion of the motor will be hindered and if not checked properly could lead to spillage which might damage the platform. A user reaching for a cup needs to trigger the break beam sensors in order to stop the platform from rotating. If they reach at an odd angle the device may not rotate properly, so more break beam sensors may be required. IX. Milestone Charts Platform Subsystem Desc Completion Date Team Member Modified Date Comments Sensor Materials Acquired 9/10/15 J.M. 10/19/15 Completed Motor Acquired Platform and Gears Acquired Platform, gears, and motors assembled Subsystem Platform and Motor Testing Verify Sensor specifications and functionality Sensors added to Platform subsystem Subsystem Sensor Testing Platform subsystem interfaces correctly with controller Platform cut 9/10/15 9/10/15 9/17/15 9/21/15 -- J.M. J.M. J.M. J.M., C.P. J.M. 9/17/15 11/22/15 11/30/15 12/1/15 11/5/15 Completed Completed Completed Completed Completed 9/22/15 9/27/15 10/25/15 J.M. J.M. J.M., A.H. 12/1/15 12/1/15 12/1/15 Completed Completed Completed 11/6/15 J.M., M.A. 11/22/15 Completed Completion Date 9/24/15 9/10/15 9/10/15 9/10/15 9/12/15 Team Member M.A. M.A. M.A. M.A. M.A. Modified Date 10/5/15 10/23/15 10/5/15 N/A 10/23/15 Comments Drink Dispenser Subsystem Desc Optics and Brackets acquired Linear Actuators acquired Peristaltic Pumps and tubing acquired Sensors for Pumps acquired Optics and Actuators tested manually Completed Completed Completed Removed Completed Automated Drink Machine Page 39 Pumps/Tubing assembled Pumps tested manually Bracket/Optic/Actuator rig assembled Pump/Sensors assembled 9/15/15 9/22/15 9/30/15 9/30/15 M.A. M.A., C.P. M.A., C.P. M.A. 12/1/15 11/21/15 Software for controlling actuators written Software for controlling pumps written Integration of software with pumps/actuators/optics 10/10/15 A.H., M.A 11/19/15 Completed Completed In Progress Removed (integrated) Completed 10/10/15 10/25/15 A.H., M.A A.H., M.A 11/19/15 12/1/15 Completed Completed N/A Automated Drink Machine Control Subsystem Desc Page 40 Completion Date 9/1/15 Team Member M.A. Controller Programmed Controller/Platform subsystem connectivity Controller/Dispenser Subsystem connectivity Controller/Sensor connectivity Subsystems Integration 9/15/15 10/25/15 A.H. A.H., J.M. 10/25/15 Website/Interface setup Command Line Interface Overall System Functionality 10/15/15 Beaglebone Acquired Frame Subsystem Desc Angle iron acquired Sheet metal acquired Cut sheet for waterjet submitted Sheet metal cut CAD model drawn Support rings and cross-bars soldered Rings soldered to angle iron Wheels attached to frame Modified Date Comments 11/30/15 Completed, donated by Dr. Becker-Gomez Completed Completed A.H., C.P., M.A. A.H. A.H., M.A., C.P., J.M. A.H. A.H. A.H., M.A., C.P., J.M. 11/30/15 Completed 112/1/15 12/1/15 Completed Completed N/A 12/1/15 12/1/15 Removed Completed Completed Completion Date 10/21/15 10/21/15 10/21/15 Team Member M.A. M.A. M.A. Modified Date 10/21/15 10/21/15 10/28/15 Completed Completed Completed 10/18/15 11/2/15 11/4/15 M.A. C.P. M.A. 10/28/15 11/15/15 11/1215 Completed Completed Completed 11/4/15 11/9/15 M.A. M.A. 11/20/15 11/22/15 Completed Completed 10/25/15 11/10/15 11/20/15 Comments Automated Drink Machine Page 41 PHASE TWO Cup Dispenser Subsystem Desc. Completion Date Team Member Modified Date Comments Cup Dispenser Materials Acquired N/A N/A N/A N/A Cup Dispenser Assembly Completed N/A N/A N/A N/A Cup Dispenser Integrated with Software N/A N/A N/A N/A Cup Dispenser Functions Independently N/A N/A N/A N/A Cup Dispenser Tests Passed N/A N/A N/A N/A Automated Drink Machine Page 42 X. Critical Evaluation The frame, platform, and dispensal systems were assembled with the help of RIT’s machine shop, whom were instrumental in getting the platform to a mechanically functioning state. General difficulty with the mechanical aspects however, required the design itself to be modified a number of times throughout the semester to account for new information with regards to how the platform would operate and what may or may not be possible in the given design. As such, difficulties were encountered when trying to decide the appropriate way to construct the platform. In hindsight, using MDF as the platform may not have been an appropriate choice due to the fact that it is both heavier than anticipated and easily ruined by water without and type of waterproofing. The overall structure, while solid in terms of its construction, had difficulty with staying rigid while the platform was in motion. This lead to difficulties in achieving a solid spin rate on the platform, which by itself already had difficulties achieving a consistent spin rate. All of these factors contributed to what we would consider a mechanically challenging project that may have been better accomplished with a more mechanical engineering minded approach. The original design called for graphical user interface, but what was realized was a simple command line interface. While this interface provides functionality to the user in terms creating and ordering drinks, it does not achieve all of the desired software interface goals. Specifically, the lack of visual feedback is an unfortunate omission that might have significantly increased the project's overall appeal. The control system was able to interact successfully with the stated hardware to provide a method for rotating the platform, detecting cups, and dispensing liquids. These basic hardware functions allow the platform to achieve its ultimate goal but did so in a very different way that originally envisioned. Because the stepper motor was unable to consistently step, the count of the stepper motor could not be used for accurate rotation. As such,. the photocell sensors were used to detect cups as they passed over them. This allowed the platform to detect not only when a cup was in position, but when the platform was rotated to a state such that the slots were aligned with the dispensers. These modifications in how the control system interacted with the hardware peripherals constituted changes to the original design but were able to achieve similar results to the intended ones. As an overall observation, many of the challenges we faced might have been avoided, or at least handled more effectively had better communication been employed. It’s clear that a very fluid channel of communication is critical to a project's success. Given the chance to implement this design again, a more communicative approach would definitely be attempted to facilitate the group's understanding of the project as a whole and the effectiveness in their individual tasks.