View
214
Download
0
Tags:
Embed Size (px)
Citation preview
The Automated Drink The Automated Drink DispenserDispenser
Andy James
Brad Theophila
Kyle Wilhelm
OverviewOverview
Automates drink making processIntended for bar tenders and home bar
enthusiastsGraphical Computer InterfaceCustomizable Drink Set
How It WorksHow It Works
6 Bottle Carousel User specifies drink to be made Carousel rotates with gear and belt assembly
driven by a stepper motor - 360° of rotation Rotation controlled by detection through use of
photo interrupters Glass is pneumatically raised to push valves for
dispensing
Hardware SpecificationsHardware Specifications
Stepper Motor– 7.5° per step
Photo Interrupters Pneumatic Cylinder
– 5 lbs of force required– At least 2” of extension required
Glass– 7 oz.
Sensors/ActuatorsSensors/Actuators
Photo Interrupters– Two Interrupters
Outside Edge – calibration sensor – one detection hole
Inside Edge – bottle detection sensor – six detection holes
– Detection disc attached to rotation gear– Sensors placed end to end at outside rim of
detection disc
Sensors/ActuatorsSensors/Actuators
Stepper Motor– Gear/belt driven assembly– Gear ratio used to adjust rotational sensitivity
Must use small degree steps to accurately align with valve (60° between bottles, @ 7.5° this is only eight steps between bottles)
Rotation should be fast but fluid– Fast enough to satisfy user
– Fluid enough to prevent rotational stress of assembly
Sensors/ActuatorsSensors/Actuators
Pneumatic Cylinder– Push cylinder with spring return placed at static position
to line up with valves– Force needed measured to be 22 Newtons
Minimum of 5 lbs of driving force Must not overly stress assembly by using large amounts of force
– Depending on plate width, at least 1” extension Overshoot extension to 2”, guarantee valve closure Dampen excess extension using spring buffering
– Can also control maximum force applied to valve
– Motion needs to be quick without causing liquid to spill
User Interface FeaturesUser Interface Features
Dispense Multi-shot Drinks– Predefined or Custom
Dispense ShotsAdd/Remove Drinks from MenuAdd/Remove Known IngredientsDefine Bottle Contents
Add Drink InterfaceAdd Drink Interface
Make Drink InterfaceMake Drink Interface
Communications Communications SpecificationsSpecifications
Serial CommunicationCustom Protocol
– Messages sent to microcontroller– Acknowledgements sent back to PC, for every
message sent
Pseudo-Code for Drink Pseudo-Code for Drink Making Algorithm Making Algorithm
1. Send “CHECK_COMM” message to HC12
2. Poll for “COMM_ESTAB” acknowledgement from HC12
-If timeout occurs, notify user that there is a communication problem
3. Send “CALIBRATE” message to HC12, in order to set carousel to its initial position
4. Poll for “CAL_FIN” ackknowledgment message from HC12
Pseudo-Code for Drink Pseudo-Code for Drink Making Algorithm (Cont.)Making Algorithm (Cont.)
5. Send “MOVE” message containing bottle to move to
6. Wait for “MOVED_TO” acknowledgement from HC12
7. Send “UNITS” message containing number of units to pour from current bottle
8. Wait for “BOTTLE_POURED” acknowledgment from HC12
9. Loop back to instruction 5 until all instructions have completed
10. Send “RECIPE_COMP” message to HC12
11. Wait for “COMP_ACK” message from HC12-It would be possible for the user to initiate a bottle change at this point, or anytime after “COMM_ESTAB” is received, and no other instructions have been sent
Messages from PC to HC12Messages from PC to HC12Message Encoding Description
MOVE+<Bottle Number>
Parameter Value Range: 1 to 6 (Corresponds to bottle
number)
%00110000 or$30
The POUR message instructs the HC12 as to which bottle to pour from. The software will expect a “MOVED_TO_BOTTLE” acknowledgment from the HC12 after this message is sent.
UNITS+<Number of Units of Liquid>
Parameter Value Range: 1 to 5 (Corresponds to a unit of liquid
~ ½ oz)
%01000000 or$40
The UNITS message instructs the HC12 as to how many units of liquid to dispense from the current bottle. The software will expect a “BOTTLE_POURED” acknowledgment from the HC12 after this message is sent.
CHECK_COMM
%01010000 or$50
The CHECK_COMM message is simply a message used to establish communication with the HC12. The software will be expecting an acknowledgment back from the HC12 after this message is sent.
RECIPE_FINISHED %01011111 or$5F
The RECIPE_FINISHED message informs the HC12 that the current recipe has completed, and all bottles have been poured from.
FREE %01010001 or$51
The FREE message informs the HC12 that it should “free” up the stepper motor controlling the bottle carousel, so that the user can spin it around, and change a bottle(s).
CALIBRATE %01010010 or$52
The CALIBRATE message is used to initiate a calibration sequence, for moving the carousel back to its starting position. This message will be sent after each FREE message, as well as upon startup of the system.
Messages from HC12 to PCMessages from HC12 to PCMessage Encoding Description
MOVED_TO + <Bottle Number>
Parameter Value Range: 1 to 6 (Corresponds to bottle
number)
%01100000 or$60
The MOVED_TO_BOTTLE message informs the PC that the carousel has moved to the correct bottle, and the HC12 is waiting for the UNITS message from the PC.
BOTTLE_POURED
Parameter Value Range: 1 to 6 (Corresponds to number of
units)
%01100001 or$61
The BOTTLE_POURED message informs the PC that the current ingredient has been poured, how many units were poured, and also that the HC12 is waiting for another message.
COMM_ESTAB
%01110000 or$70
The COMM_ESTAB message informs the PC that the HC12 is receiving messages, and is ready to start receiving drink instructions.
COMP_ACK
%01110001 or$71
The COMP_ACK message informs the PC that the HC12 is aware that the current drink recipe has completed. The HC12 will then listen for the “CHECK_COMM” message from the PC.
CAL_FIN %01110010 or$72
The CAL_FIN message informs the PC that the HC12 has finished calibrating the carousel.
InitializationInitialization
Microcontroller Startup– Jump to EEPROM– Listen for Communication from PC
PC Startup– Ping microcontroller until ready– Send Calibration Message
RecoveryRecovery
Microcontroller Recovery– PC will know– User will restart Microcontroller
PC Recovery– Microcontroller will finish current task
Restrictions, Conditions, and Restrictions, Conditions, and AssumptionsAssumptions
Bottle Contents Provided– Must be reasonably accurate
Must use specified serial port (COMx)Maximum Bottle Volume of 1LUse only the provided glass
Feasibility and ProblemsFeasibility and Problems
Have CarouselPossible Timing Issues
– Dispensing
GUI– Must be simple and easy to use– Also must be powerful
Structural Integrity
Testing StrategyTesting Strategy
Start by testing individual components– Photo Interrupters, Motor, Pneumatic Cylinder
Test stand alone parts of the GUI– Drink and Ingredient Database
Test communication link between PC and HC12
Test control of hardware from HC12
System IntegrationSystem Integration
Stages– Establish initial PC to microcontroller
communication– Rotation Hardware– Dispensing Hardware– Finalize PC to Microcontroller
Communications
AcquireGears, Beltand Photo
Sensor Plate Attach Gearsand Photo
Sensor Plateto Dispenser
Final Testing
Test Rotation
Test Stepper
AcquireStepper
Acquire andAssemble
MotorController
AcquireCylinder andCompressor
Test Cylinder
Acquire PhotoInterrupters
Test PhotoInterrupters
Assemble andAttach Lift
Plate
Test PhotoInterrupters
with Rotation
Construct andIntegrate Final
Assembly
AttachCylinder/Plate
and TestValve
Actuation
Design andConstruct
Fancy Base
ConstructTemporary
Testing Base
Write to SerialPort from PC
Write to SerialPort from
HC12
EstablishComm.
BetweenHC12 and PC
Create GUISkeleton with
BasicFunctionality
FullyImplement
GUI to Sendall Messages
to HC12
ImplementComplete
Serial Comm.Protocol on
HC12
TestFunctionalityof GUI, PCand HC12Together
ReadInterrupters w/
HC12
ControlStepper w/
HC!2
OperateCylinder w/
HC12
Questions?Questions?