11. MECHANICAL DESIGN¶
Group assignment:¶
Design a machine that includes mechanism + actuation + automation
Build the mechanical parts and operate it manually.
Actuate and automate your machine.
Document the group project
Individual assignment:¶
Document our individual contribution.
Learning Process¶
- Documented the machine building process to the group page
- Documented your individual contribution to this project on your own website
- Linked to the group page from your individual page as well as from group page to your individual pages
- Shown how your team planned and executed the project (Group page)
- Described problems and how the team solved them (Group page)
- Listed future development opportunities for this project (Group page)
- Included your design files (Group page)
- Optionally included an aprox. 1 min video (1920x1080 HTML5 MP4) + slide (1920x1080 PNG) (Group page)
We created automatic filling machine for beverages for this week assignment. This machine works like “bartender” which mixes several kind of liquid/beverage based on request button.
This machine consists of main body from medium density particle board (MDF); the top side which to place the main bottle containing the drink to be mixed, the middle part to put the glass that will be filled and mixed with the beverages and also can be shifted with an automatic push opening mechanism and a controller on the front for orders. We embedded this part with sensors for taking the type of drink along with sensors.
Based on the distribution of this machining contribution, I work on the design and production of the main body, construction, assembly
Based on sketch we define in Group assignment, I try to specific the dimensions:
For group assignment you can find in HERE
Learning Outcomes¶
After conducted this assignment, many experiences, knowledge, and skills we gathered from:
- Work and communicate effectively in a team and independently
- Design, plan and build a automatic system
- Analyse and solve technical problems
- Recognise opportunities for improvements in the design
In this assignment I contribute on:
- Machine working algorithm
- Bottle opening sync system
- Embedded programming to run the machine
Machine working algorithm¶
The working principle of the machine is that when we want a certain drink, we can press a button on the machine, and the machine will get the drink according to the composition of the desired drink. There are four bottles each containing syrup, tea, ginger and coffee. From the four drinks, several kinds of drinks can be combined, such as ginger-tea and ginger-coffee.
So I’m trying to configure some drinks with the following key assignments:
- button 1: syrup drink
- button 2: Mixed ginger tea
- button 3: Coffee Ginger mix
- button 4: Ginger
then the algorithm that I made follows the following flowchart
Programming¶
I am using arduino programming to run the machine system. The coding I use:
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 20,4);
int input5Pin = 12;
int input4Pin = 11;
int input3Pin = 10;
int input2Pin = 9;
int input1Pin = 8;
int Sel1Pin = 17;
int Sel2Pin = 16;
int Sel3Pin = 15;
int Sel4Pin = 14;
int BuzzPin = 3;
int BUTTONstate1 = 0;
int BUTTONstate2 = 0;
int BUTTONstate3 = 0;
int BUTTONstate4 = 0;
int BUTTONstate5 = 0;
int Index;
int StepEn = 6;
int StepStep = 5;
int StepDir = 4;
int step1 = 575;
int step2 = 1150;
int step3 = 1725;
int step4 = 2300;
// this declares each of our buttons and their pins
// make sure that you use the pins your buttons are wired to
void setup()
{
Serial.begin(9600); // this begins the serial connection with a baud rate of 9600
lcd.begin();
lcd.backlight();
delay(250);
lcd.noBacklight();
delay(250);
lcd.backlight();
lcd.setCursor(0,0);
lcd.print("Automatic Filling");
lcd.setCursor(0,1);
lcd.print("Beverages");
delay(500);
lcd.setCursor(0,2);
lcd.print("Kamakaura - FA 2022");
lcd.setCursor(0,3);
lcd.print("Indonesia Student");
delay(3000);
lcd.clear(); //Then clean it
pinMode(input5Pin, INPUT);
pinMode(input4Pin, INPUT);
pinMode(input3Pin, INPUT);
pinMode(input2Pin, INPUT);
pinMode(input1Pin, INPUT); // these lines declare each of the buttons as an input
pinMode(Sel1Pin, OUTPUT);
pinMode(Sel2Pin, OUTPUT);
pinMode(Sel3Pin, OUTPUT);
pinMode(Sel4Pin, OUTPUT);
pinMode(BuzzPin, OUTPUT);
pinMode(StepEn, OUTPUT); //Enable
pinMode(StepStep, OUTPUT); //Step
pinMode(StepDir, OUTPUT); //Direction
digitalWrite(StepEn,LOW);
}
void loop()
{
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Choose your drink :");
lcd.setCursor(0,1);
lcd.print("1.Syrup");
lcd.setCursor(0,2);
lcd.print("2.Ginger-Tea");
lcd.setCursor(0,3);
lcd.print("3.Ginger");
lcd.setCursor(11,1);
lcd.print("4.Ginger");
lcd.setCursor(13,2);
lcd.print("Cofee");
delay(1000);
BUTTONstate1 = digitalRead(input1Pin);
BUTTONstate2 = digitalRead(input2Pin);
BUTTONstate3 = digitalRead(input3Pin);
BUTTONstate4 = digitalRead(input4Pin);
BUTTONstate5 = digitalRead(input5Pin);
{
/* Button 1 : + - */
if (BUTTONstate1 == HIGH)
{
/* Goto Selenoid1*/
digitalWrite(StepDir,HIGH);
lcd.clear();
lcd.setCursor(0,1);
lcd.print("Filling Chamber 1");
lcd.setCursor(0,2);
lcd.print("Syrop");
for(Index = 0; Index < step1; Index++)
{
digitalWrite(StepStep,HIGH);
delayMicroseconds(500);
digitalWrite(StepStep,LOW);
delayMicroseconds(500);
}
delay(500);
digitalWrite(Sel1Pin, HIGH);// Turn LED1 ON
delay(3000);
digitalWrite(Sel1Pin, LOW);
delay(1000);
/* Goto start*/
digitalWrite(StepDir,LOW);
for(Index = 0; Index < step1; Index++)
{
digitalWrite(StepStep,HIGH);
delayMicroseconds(500);
digitalWrite(StepStep,LOW);
delayMicroseconds(500);
}
delay(500);
digitalWrite(BuzzPin, HIGH);
delay(500);
digitalWrite(BuzzPin, LOW);
delay(500);
digitalWrite(BuzzPin, HIGH);
delay(500);
digitalWrite(BuzzPin, LOW);
delay(500);
lcd.clear();
lcd.setCursor(0,1);
lcd.print("Ready....!!");
delay(1000);
}
else{
digitalWrite(Sel1Pin, LOW);// Turn LED1 ON
digitalWrite(Sel2Pin, LOW);// Turn LED1 ON
digitalWrite(Sel3Pin, LOW);// Turn LED1 ON
digitalWrite(Sel4Pin, LOW);// Turn LED1 ON
}}
{
/* Button 2 : 2+,+ 3- */
if (BUTTONstate2 == HIGH)
{
/* Goto Selenoid2*/
digitalWrite(StepDir,HIGH);
lcd.clear();
lcd.setCursor(0,1);
lcd.print("Filling Chamber 2");
lcd.setCursor(0,2);
lcd.print("Tea");
for(Index = 0; Index < step2; Index++)
{
digitalWrite(StepStep,HIGH);
delayMicroseconds(500);
digitalWrite(StepStep,LOW);
delayMicroseconds(500);
}
delay(1000);
digitalWrite(Sel2Pin, HIGH);// Turn LED1 ON
delay(1500);
digitalWrite(Sel2Pin, LOW);
delay(1000);
/* Goto Selenoid3*/
digitalWrite(StepDir,HIGH);
lcd.clear();
lcd.setCursor(0,1);
lcd.print("Filling Chamber 3");
lcd.setCursor(0,2);
lcd.print("Ginger");
for(Index = 0; Index < step1; Index++)
{
digitalWrite(StepStep,HIGH);
delayMicroseconds(500);
digitalWrite(StepStep,LOW);
delayMicroseconds(500);
}
delay(1000);
digitalWrite(Sel3Pin, HIGH);// Turn LED1 ON
delay(1500);
digitalWrite(Sel3Pin, LOW);
delay(1000);
/* Goto start*/
digitalWrite(StepDir,LOW);
for(Index = 0; Index < step3; Index++)
{
digitalWrite(StepStep,HIGH);
delayMicroseconds(500);
digitalWrite(StepStep,LOW);
delayMicroseconds(500);
}
delay(500);
digitalWrite(BuzzPin, HIGH);
delay(500);
digitalWrite(BuzzPin, LOW);
delay(500);
digitalWrite(BuzzPin, HIGH);
delay(500);
digitalWrite(BuzzPin, LOW);
delay(500);
lcd.clear();
lcd.setCursor(0,1);
lcd.print("Ready....!!");
delay (1000);
}
else{
digitalWrite(Sel1Pin, LOW);// Turn LED1 ON
digitalWrite(Sel2Pin, LOW);// Turn LED1 ON
digitalWrite(Sel3Pin, LOW);// Turn LED1 ON
digitalWrite(Sel4Pin, LOW);// Turn LED1 ON
}}
{
/* Button 3 : 4+,-, 3- */
if (BUTTONstate3 == HIGH)
{
/* Goto Selenoid4*/
digitalWrite(StepDir,HIGH);
lcd.clear();
lcd.setCursor(0,1);
lcd.print("Filling Chamber 4");
lcd.setCursor(0,2);
lcd.print("Cofee");
for(Index = 0; Index < step4; Index++)
{
digitalWrite(StepStep,HIGH);
delayMicroseconds(500);
digitalWrite(StepStep,LOW);
delayMicroseconds(500);
}
delay(1000);
digitalWrite(Sel4Pin, HIGH);// Turn LED1 ON
delay(1500);
digitalWrite(Sel4Pin, LOW);
delay(1000);
/* Goto Selenoid3*/
digitalWrite(StepDir,LOW);
lcd.clear();
lcd.setCursor(0,1);
lcd.print("Filling Chamber 3");
lcd.setCursor(0,2);
lcd.print("Ginger");
for(Index = 0; Index < step1; Index++)
{
digitalWrite(StepStep,HIGH);
delayMicroseconds(500);
digitalWrite(StepStep,LOW);
delayMicroseconds(500);
}
delay(1000);
digitalWrite(Sel3Pin, HIGH);// Turn LED1 ON
delay(1500);
digitalWrite(Sel3Pin, LOW);
delay(1000);
/* Goto start*/
digitalWrite(StepDir,LOW);
for(Index = 0; Index < step3; Index++)
{
digitalWrite(StepStep,HIGH);
delayMicroseconds(500);
digitalWrite(StepStep,LOW);
delayMicroseconds(500);
}
delay(500);
digitalWrite(BuzzPin, HIGH);
delay(500);
digitalWrite(BuzzPin, LOW);
delay(500);
digitalWrite(BuzzPin, HIGH);
delay(500);
digitalWrite(BuzzPin, LOW);
delay(500);
lcd.clear();
lcd.setCursor(0,1);
lcd.print("Ready....!!");
delay(1000);
}
else{
digitalWrite(Sel1Pin, LOW);// Turn LED1 ON
digitalWrite(Sel2Pin, LOW);// Turn LED1 ON
digitalWrite(Sel3Pin, LOW);// Turn LED1 ON
digitalWrite(Sel4Pin, LOW);// Turn LED1 ON
}}
{
/* Button 4 : 3+, 3- */
if (BUTTONstate4 == HIGH)
{
/* Goto Selenoid3*/
digitalWrite(StepDir,HIGH);
lcd.clear();
lcd.setCursor(0,1);
lcd.print("Filling Chamber 3");
lcd.setCursor(0,2);
lcd.print("Ginger");
for(Index = 0; Index < step3; Index++)
{
digitalWrite(StepStep,HIGH);
delayMicroseconds(500);
digitalWrite(StepStep,LOW);
delayMicroseconds(500);
}
delay(1000);
digitalWrite(Sel3Pin, HIGH);// Turn LED1 ON
delay(3000);
digitalWrite(Sel3Pin, LOW);
delay(1000);
/* Goto start*/
digitalWrite(StepDir,LOW);
for(Index = 0; Index < step3; Index++)
{
digitalWrite(StepStep,HIGH);
delayMicroseconds(500);
digitalWrite(StepStep,LOW);
delayMicroseconds(500);
}
delay(500);
digitalWrite(BuzzPin, HIGH);
delay(500);
digitalWrite(BuzzPin, LOW);
delay(500);
digitalWrite(BuzzPin, HIGH);
delay(500);
digitalWrite(BuzzPin, LOW);
delay(500);
lcd.clear();
lcd.setCursor(0,1);
lcd.print("Ready....!!");
delay(1000);
}
else{
digitalWrite(Sel1Pin, LOW);// Turn LED1 ON
digitalWrite(Sel2Pin, LOW);// Turn LED1 ON
digitalWrite(Sel3Pin, LOW);// Turn LED1 ON
digitalWrite(Sel4Pin, LOW);// Turn LED1 ON
}}
}
Bottle opening synchronization system¶
When the drink is about to be poured, the solenoid opens so that the liquid can fall down. Need to synchronize the movement of the table by opening the solenoid so that the liquid does not spill outside the glass.
Each movement sequence made on the machine will be given a pause of about 1 second. This is to ensure the movement has been perfect in the specified position. For the duration of the active solenoid (open) is for 3 seconds. If there will be a drink combination, the duration of the active solenoid is 3 seconds divided by the number of mixed drinks to be selected.
Likewise, after the solenoid closes, it takes a pause of 1 second to ensure that the solenoid is completely closed and then the table can move to the next step.
Button Test¶
I’m trying to test all buttons whether they match the algorithm and the display on the LCD.
Functional Testing¶
After all the parts I tried to test, then it’s time for me to do a functional test. This test is to check whether all the algorithms that I have set in programming can run smoothly. Starting from buttons 1, 2, and so on. after the button is pressed whether the table can move to the desired position, then the solenoid in that position can be active.
From the test results, all function tests have been successful as in the following video:
Final Result¶
Finally the automatic filling machine for beverages has been completed and can run well. There are still some things that need to be patched, we will try to fix them in the next cycle.
Importance Files¶
Arduino program for Machine Design (.ino)