automated milk and sugar dispenser kübra akbas and...

12
Automated Milk and Sugar Dispenser Kübra Akbas and Gabrielle Cord-Cruz Arduino Mini Project Advanced Mechatronics ME-GY 6933

Upload: others

Post on 05-Nov-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Automated Milk and Sugar Dispenser Kübra Akbas and ...engineering.nyu.edu/mechatronics/projects/ME7836/spring...20000 P a =(1000k g)(9.8 )h .174 m m3 m s2 =2 Design The automated

  

    

Automated Milk and Sugar Dispenser  Kübra Akbas and Gabrielle Cord-Cruz  

 Arduino Mini Project  

 Advanced Mechatronics  

ME-GY 6933                

Page 2: Automated Milk and Sugar Dispenser Kübra Akbas and ...engineering.nyu.edu/mechatronics/projects/ME7836/spring...20000 P a =(1000k g)(9.8 )h .174 m m3 m s2 =2 Design The automated

Introduction As technology advances and as tasks are becoming more and more automated, even the 

simplest things are expected to be automated. In this case, that simple “thing” is the coffeemaker. While most coffeemakers go through the entire process of making coffee without much human intervention, there are not many options for automatically adding milk or sugar after the coffee is made. Coffeemakers that involve putting in a pod, such as a Keurig or Nespresso machine, can include some powdered milk and sugar in the coffee pod. However, this limits the user’s options when it comes to how much of each ingredient they want. In order to overcome this limitation, a milk and sugar dispenser with varying settings was designed. The design involves 4 settings: light and sweet, average, only sugar, and only milk. Each of these settings dispenses a set amount of each ingredient specific to that setting.  Background 

A solenoid valve is a good option to control how much fluid goes into the system. A solenoid valve (Fig 1) operates with a conductive coil (solenoid) wrapped around a plunger. The solenoid is charged, which creates a magnetic field that magnetizes the plunger and pulls the plunger up so that the liquid can flow. 

 Figure 1: Direct Operated Normally Closed Solenoid (“Solenoid Valve Types.”) 

 Some of these solenoid valves have a minimum pressure requirement as well. This can be 

achieved by applying enough pressure head by the fluid. Pressure head of the fluid can be found by using the fluid mechanics equation: 

ghP = P 0 + ρ   (Eq. 1) Where P represents pressure, P0 is the atmospheric pressure, ⍴ is the fluid density, g is the acceleration of gravity, and h is the height of the fluid. Gauge pressure can then be found by subtracting 1 atm or 0.101325 MPa. For instance, if the minimum pressure requirement is 0.02 MPa, then the minimum head requirement for water would be given by the gauge pressure: 

1

Page 3: Automated Milk and Sugar Dispenser Kübra Akbas and ...engineering.nyu.edu/mechatronics/projects/ME7836/spring...20000 P a =(1000k g)(9.8 )h .174 m m3 m s2 =2 Design The automated

0000 Pa 1000 )(9.8 )h .174 m2 = ( kgm3

ms2 = 2  

  Design 

The automated sugar and milk dispenser (Fig. 2) is meant to be a user-interactive device. To achieve this goal, a Parallax LCD screen and buttons (Fig. 3) were used for the interaction. The LCD screen is used to display the options for the dispenser: 1. Light and Sweet (4 tbsp of milk, 4-5 sugar cubes), 2. Average Amount (2 tbsp of milk, 2-3 sugar cubes), 3. Sugar (2-3 sugar cubes), 4. Milk (2 tbsp of milk). Four buttons are used to allow the user to make their decision.   

 Figure 2. Automated Milk and Sugar Dispenser  Figure 3. Wiring and Buttons for Selection 

 An Adafruit plastic liquid solenoid valve (Fig. 4) was chosen for the purpose of being able to 

easily control the flow of the milk into the cup. This particular solenoid valve is normally closed and only permits flow in one direction, but only one direction is required for the project’s purpose. There is a minimum pressure requirement of 0.02 MPa in order for liquid to flow through the valve when opened. In order to achieve this pressure requirement, a tall liquid vessel was chosen. In order for the milk to aim through the hole and into a cup, a plastic elbow was chosen. In order to build the circuit for the liquid solenoid valve, a snubber diode, 1K ohm resistor, and a IRF520 transistor were used.   

2

Page 4: Automated Milk and Sugar Dispenser Kübra Akbas and ...engineering.nyu.edu/mechatronics/projects/ME7836/spring...20000 P a =(1000k g)(9.8 )h .174 m m3 m s2 =2 Design The automated

 Figure 4: Liquid Vessel and Solenoid Valve  

 For the sugar dispenser, a Parallax standard servo motor was used. A wheel with a 5cm 

diameter and four partitions was cut out of acrylic (Fig. 5) on the laser cutter. Three of the four partitions were covered with a plastic film to prevent sugar from entering the crevices, while the one partition was left open for sugar to enter. The wheel was fixed to the horns of a standard servo motor. The standard servo was used to turn 120 degrees from the sugar entering the crevice to the dispensing into the cup. Square tubing (Fig. 6) was used and held above the wheel to allow sugar cubes to enter the wheel.  

 Figure 5: Wheel for Sugar Dispenser Figure 6: Chute and Storage for Sugar  

 

3

Page 5: Automated Milk and Sugar Dispenser Kübra Akbas and ...engineering.nyu.edu/mechatronics/projects/ME7836/spring...20000 P a =(1000k g)(9.8 )h .174 m m3 m s2 =2 Design The automated

In order to achieve the stirring mechanism for the device, a Parallax continuous servo motor (Fig. 7) was considered and was held above the hole where the sugar and milk were dispensed. A standard coffee stirrer can be attached to the servo horn and the speed of the servo can be controlled for a certain amount of time before stopping. For the stirring mechanism, 50 rpm, which is the fastest speed according to the motor specs, was chosen to work for 10 seconds with 5 seconds in either the clockwise or counterclockwise direction. This stirring mechanism was meant to be actuated after both the milk and sugar were dispensed into the cup.   

 Figure 7: Stirring Mechanism 

 Figure 8 below shows the wiring scheme for the automated sugar and milk dispenser. Two 

separate breadboards were used: one for the solenoid valve and the other for the buttons and the powering of the servo motors and LCD.   

4

Page 6: Automated Milk and Sugar Dispenser Kübra Akbas and ...engineering.nyu.edu/mechatronics/projects/ME7836/spring...20000 P a =(1000k g)(9.8 )h .174 m m3 m s2 =2 Design The automated

 Figure 8: Wiring Scheme on Breadboard  

*Please note: The 3 pin version of the Parallax LCD was used for the prototype. Therefore, we modeled the wiring as such, with the power and ground pins, and the single I/O pin connected to 

Pin 6 on the Arduino   

                

5

Page 7: Automated Milk and Sugar Dispenser Kübra Akbas and ...engineering.nyu.edu/mechatronics/projects/ME7836/spring...20000 P a =(1000k g)(9.8 )h .174 m m3 m s2 =2 Design The automated

Code 

 

 

6

Page 8: Automated Milk and Sugar Dispenser Kübra Akbas and ...engineering.nyu.edu/mechatronics/projects/ME7836/spring...20000 P a =(1000k g)(9.8 )h .174 m m3 m s2 =2 Design The automated

 

 

7

Page 9: Automated Milk and Sugar Dispenser Kübra Akbas and ...engineering.nyu.edu/mechatronics/projects/ME7836/spring...20000 P a =(1000k g)(9.8 )h .174 m m3 m s2 =2 Design The automated

 

 

8

Page 10: Automated Milk and Sugar Dispenser Kübra Akbas and ...engineering.nyu.edu/mechatronics/projects/ME7836/spring...20000 P a =(1000k g)(9.8 )h .174 m m3 m s2 =2 Design The automated

 Cost 

Item Quantity Cost per Item Cost

Adafruit Solenoid Valve 1 $10.74 $10.74

Acrylic Sheet 1 $6.50 $6.50

Elbow Connection 2 $0.88 $1.76

Wooden Box 1 $7.99 $7.99

Arduino Uno 1 $19.99 $19.99

Parallax Servo Motor 2 $14.99 $29.98

IRF520 Transistor 1 $0.94 $0.94

Parallax 2x16 LCD 1 $24.99 $24.99

Total Cost $102.89

The total cost of the prototype was $102.89.  

9

Page 11: Automated Milk and Sugar Dispenser Kübra Akbas and ...engineering.nyu.edu/mechatronics/projects/ME7836/spring...20000 P a =(1000k g)(9.8 )h .174 m m3 m s2 =2 Design The automated

Results While the valve was working, the liquid was not passing through during the first few trials. It 

turned out that the height of the liquid was not providing enough pressure head to make it past the pressure drop across the valve, so the height of the liquid was increased so that more pressure is applied to the inlet. Although the flow is still fairly slow, it still manages to deliver the fluid to the destination and further improvements on how to increase the flow rate are given in the Future Work section. 

Another issue, due to the friction between the sugarcubes, was that the initial design of the sugar holder did not work. The initial design involved just the acrylic container that is in the current design, but without the metal chutes. The design was changed to include the two chutes to release sugar into the wheel in order to give the cubes a set path, but this also created friction and collision as both sugar cubes would be released from both directions. The final change was to use only one chute, which was more successful than the previous attempts and allows sugar to be dispensed without getting stuck.   Discussion 

Some improvements that could be made for the device is allowing an easier way of draining the milk after being used. Current standard coffee makers work in the same manner, with the only way of removing water from the reservoir is by having the water drained into the coffee maker jar, either as brewed coffee or just water. Currently, the method of removing all of the milk is by draining through the valve, but the flow velocity is slow and the mass flow rate is also very low. This could be improved by using a pump to apply more pressure to the inlet of the valve or to rearrange the valve so that it is vertical rather than horizontal so that the pressure drop across it is less. Another improvement could be an easier way of controlling the amount of sugar that enters the wheel. This could be achieved by making a flap at the end of the sugar container, which could be opened using a cam mechanism or another motor. Using other types of sugar, such as granulated sugar, could also then be used if there was a different sugar delivery system.   Future Work 

In order to improve upon this concept, it would be beneficial to make it more compact and attachable to any coffee machine so that the cup does not need to be removed from the coffeemaker then reinserted into the sugar-milk mixer. If it is attached to any coffee machine, this reduces the amount of work that the user has to do in order to get their final cup of coffee. It would also be beneficial to redesign the stirrer so that it operates similar to a robotic arm or to use a linear actuator, that way its length and position can be adjusted as necessary instead of having a set length and rotary motion. Another improvement would be to include a cooling or refrigeration system to the milk container, that way it does not spoil. Also, creating an easy replacement system for the milk would be beneficial so that the milk can be changed even if the container is not empty. If granulated 

10

Page 12: Automated Milk and Sugar Dispenser Kübra Akbas and ...engineering.nyu.edu/mechatronics/projects/ME7836/spring...20000 P a =(1000k g)(9.8 )h .174 m m3 m s2 =2 Design The automated

sugar is used instead of sugar cubes, then there should be a dehumidification system in order to prevent clumping. 

An improvement to the overall system would be to make the amount dispensed more specific. Instead of having preset options like “light and sweet” for more milk and sugar, it would be more beneficial to have settings like “2 fl oz of milk” or an input for the amount of milk. A similar option would be applied to the sugar as well, where the user can select the number of cubes or teaspoons they would prefer.  Conclusion 

The automated milk and sugar dispenser is successful in completing its required tasks of supplying milk, sugar, and stirring the mixture after a brewed cup of coffee is placed down and a user selects their desired amount. Although the prototype was successful, there are still refinements that could be made to the design.   References Chris. “Controlling A Solenoid Valve With Arduino.” BC Robotics, 2 July 2015, 

www.bc-robotics.com/tutorials/controlling-a-solenoid-valve-with-arduino/. “Solenoid Valve Types.” Tameson.com, tameson.com/solenoid-valve-types.html.  

11