Machine Design
Fab Academy 2019

Machine Design







Group Assignment

  • Design a machine that includes mechanism+actuation+automation
  • Build the mechanical parts and operate it manually
  • Document the group project and your individual contribution

  • Machine Design : Output








    Idea: Vending Machine




    This week's assignment is that we have to design machine that include mechanism, actuation and automation. Considering to above requirements we looked at number of ideas among which vending machine was at top because of it's need and advantages. A vending machine is an automated machine that provides items such as snacks, beverages, cigarettes and lottery tickets to consumers after money, a credit card, or specially designed card is inserted into the machine. The first modern vending machines were developed in England in the early 1880s and dispensed postcards. Vending machines exist in many countries, and in more recent times, specialized vending machines that provide less common products compared to traditional vending machine items have been created. For designing the vending machine we are using this useful link.

    Seaga Small Vending Machine


    Benifits of having Vending Machine






    Easy Management: These machines are so easy to manage as nobody has to be there to sell any goods. All that needs to be done is the machine’s installation, and then you can simply monitor it’s progress from afar. There won’t be any payment problems either, as an instant cash payment is needed to buy items.
    No Overhead Costs: Operating vending machines carries no overhead costs as you eliminate the need for employees who sell food. You don’t have to worry about monthly wages and pay rolls, and there’s also no need for you to rent any extra work space.
    Time Saving: No precious time will be wasted preparing a beverage, as a hot drinks vending machine can dispense a drink in around 20 seconds, saving loads of time!
    Diversity of Products: The wide range of products can be sold using vanding machine for example fruits, the beverages, the drinks, and the snacks among the other products.
    Working Capability: Vending machines work 24 h day 365 days a year , They need neither stuff nor specialized attention , They does not take a long time , You will need short time to keep them serviced and stocked with the products .

    Machine Composition




    Machine is composed of following parts

  • Six discharging units.
  • An LCD
  • Cashless payment system
  • E-Payment
  • Task Division




    In order to make it possible we divided our work individualy as given below.

    1. CAD Modeling (Tariq)
    2. CNC Milling (Haider)
    3. Electronics (Zeeshan)
    4. Programming (Azmat)
    5. Wireless Communication and Mobile Application (Ali Raza)


    CAD Modeling




    This week's requirement is to design the mechanical design so for that our machine's body is primarly made of mdf cardboard. Cad modeling is part of our group member Mr. Tariq Shaikh where he used solidworks software for designing the mechanical design of vending machine. The cad is comprised of different parts like base part, back part, six discharging units and front panel with cash less payment and coin detection system. All of the parts are shown below in figure (a). Rendered assembly image is also shown figure (b) which looks real :D Figure (c) shows the acrylic based front side of vending machine which shall be laser cut after cnc machining.


    (a) CAD Parts


    (b) Rendered image of CAD Model


    (c) Front Panel made of Acrylic sheet in solidworks

    In order to avoid mistakes in cnc milling we initially laser cut the designed model by using cardboard with thickness of 4mm. Press-fit laser cut model is shown in figure below. From this laser cut we observed that there is no any such error in design therefore we can now move to cnc milling just to get the actual design.


    Laser cut of cad design

    CNC Milling




    This part was done by our group member Mr. Haider. In cnc milling we normally use vcarve software for generating toolpaths. Before generating any tool path he used dog bones in order to pressfit the design accurately and used tabs at various points just to hook up the parts in mdf card board. Since we are using the Liquid crystal display (LCD) so for that he used pocket toolpath and for cutting he used profile toolpath. The generated pocket tool paths, profile toolpaths and 3d view of toolpaths is shown below in figure(a), (b) and (c) respectively. Furthermore it can also be seen in figure (a) that there is joint between two parts i-e front panel which is minor mistake and was resolved after cnc milling.


    (a) V Carve pocket toolpaths


    (b) V carve profile toolpaths


    (c) 3D View of toolpaths

    We tried to cut this in shopbot where we used laminated 16mm thick mdf sheet. After cnc milling we assembled this machine in a team and proceeded further. The cutting process and assembly of design is shown figure (a) and (d) respectively. Furthermore we laser cut the front panel which is also shown figure (b) and (c). It was nice experience to work togethor.


    (a) CNC Milling by Shopbot

    An acrylic white sheet is used to cut the fron panel of vendig machine. In order to give it a look we just wrote the name fab lab khairpur and vanding machine at upper side of the panel. video shows the cutting process. All of the process was carried by our mate Tarik as he was assigned this part in group.


    (b) Laser cutting video of front side

    (c) Laser cutting of front panel


    (d) Assembly of Vending Machine


    Electronics




    In order to automate the machine we need to do some electronics which was assigned to me. Working with electronics is really a fun part and challanging as well because of their complex nature. In this machine we have four electronics parts which are used like Aduino Leonardo designed by azmat and me which we used for programming, six 360 degree continuous rotation servo motors used for discharging chambers, blutooth module used for communication and an LCD used for displaying the essential information of product. Working principle and functionality of the all major parts used in this machine is expressed one by one below.

    1. Arduino Loenardo
    2. The Arduino Leonardo is a microcontroller board based on the ATmega32u4. It has 20 digital input/output pins (of which 7 can be used as PWM outputs and 12 as analog inputs), a 16 MHz crystal oscillator, a micro USB connection, a power jack, an ICSP header, and a reset button. It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with a AC-to-DC adapter or battery to get started. As we have made this leonardo in previous week of embeded programming so we are using this board which can also be seen at my portfolio.

      Pin Configuration of Leonardo Board


      Leonardo Board used for machine


    3. Servo Motors
    4. Servo motors (or servos) are self-contained electric devices that rotate or push parts of a machine with great precision. Servos are found in many places from toys to home electronics to cars and airplanes. If you have a radio-controlled model car, airplane, or helicopter, you are using at least a few servos. In a model car or aircraft, servos move levers back and forth to control steering or adjust wing surfaces. By rotating a shaft connected to the engine throttle, a servo regulates the speed of a fuel-powered car or aircraft. Servos also appear behind the scenes in devices we use every day. We had to use six 360 degree servos which were not available in our fab inventory so we chanaged 180 degree servos to 360 degree servos. For making this happen we followed this youtube tutorial which explains well how to make 360 degree servo motors. Further more we needed servo cap which is also designed by our team mate Mr. Haider. The 3d printed servo cap can be seen below in figure (b). Since we have six servo motors so we repetatively 3d printed this part. Furthermore we made six separate coils for discharging chambers which can be seen in figure (c) and six servo motors used in machine are also shown in figure (d)

      .
      (a) Tutorial for making 360 degree servo motor


      (b) A transclucent 3d printed servo cap



      (c) Coils used for discharging chambers



      (d) Six servo motors used in discharging chambers


    5. Bluetooth
    6. Bluetooth technology is a short-range wireless communications technology to replace the cables connecting electronic devices, allowing a person to have a phone conversation via a headset, use a wireless mouse and synchronize information from a mobile phone to a PC, all using the same core system. The Bluetooth RF transceiver operates in the unlicensed ISM band centered at 2.4 gigahertz the same range of frequencies used by microwaves and Wi-Fi. The core system employs a frequency-hopping transceiver to combat interference and fading. In our machine we have used the hc 05 bluetooth module which can be seen below.


      HC 05 bluetooth module integrated with small PCB


    7. Liquid Crystal Display (LCD)
    8. LCD (Liquid Crystal Display) screen is an electronic display module and find a wide range of applications. A 16x2 LCD display is very basic module and is very commonly used in various devices and circuits. These modules are preferred over seven segments and other multi segment LEDs. The reasons being: LCDs are economical, easily programmable, have no limitation of displaying special & even custom characters (unlike in seven segments), animations and so on. A 16x2 LCD means it can display 16 characters per line and there are 2 such lines. We have used this type of lcd for showing the information for example product's or any kind of display message which can be shown below in figure.


      16x2 LCD is used in vending machine
    Programming







    #include
    #define m1 6
    #define m2 9
    #define m3 10
    #define m4 5
    #define m5 13
    #define m6 11
    //SoftwareSerial mySerial(8, 9); // RX, TX

    const int rs = 12, en = 8, d4 = A0, d5 = A1, d6 = A2, d7 = A3;
    LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

    String data;
    int barcode = 0;
    //variable to store data received
    void setup()
    {

    Serial.begin(9600);
    Serial1.begin(9600);
    // set up the LCD's number of columns and rows:
    lcd.begin(16, 2);
    pinMode(m1, OUTPUT);
    pinMode(m2, OUTPUT);
    pinMode(m3, OUTPUT);
    pinMode(m4, OUTPUT);
    pinMode(m5, OUTPUT);
    pinMode(m6, OUTPUT);
    lcd.print("hello, Welcome to FAB Lab Khairpur!");
    lcd.setCursor(0, 1);
    lcd.print("Maneged by Sukkur IBA Univeristy!");


    }

    //----------------------------start of the main program----------------------------

    void loop()
    {

    for (int positionCounter = 0; positionCounter < 13; positionCounter++)
    {

    // scroll one position left:
    lcd.scrollDisplayLeft();
    // wait a bit:
    delay(350);
    }
    if(Serial1.available())
    { // If anything comes in Serial1 (pins 0 & 1) lcd.clear();
    data = Serial1.readString();
    barcode = data.toInt();
    Serial.println(barcode);
    }
    //------------------------------Lays-------------------------------

    if(barcode == 120)
    {

    Serial.println(barcode);
    analogWrite(m1, 230);
    delay(2000);
    analogWrite(m1, 0);
    delay(50);
    barcode = 0;
    lcd.clear();
    lcd.print("You have chose Lays of Worth Rs.20");
    lcd.setCursor(0, 1);
    lcd.print("Thank you for Shopping With us. Good Day!");
    }
    //------------------------------Biscuits-------------------------------

    else if(barcode == 220)
    {

    //Serial.write(Serial1.read());
    analogWrite(m2, 230);
    delay(1500);
    analogWrite(m2, 0);
    delay(50);
    barcode = 0;
    lcd.clear();
    lcd.print("You have chose Biscuits of Worth Rs.20");
    lcd.setCursor(0, 1);
    lcd.print("Thank you for Shopping With us. Good Day!");
    }
    //------------------------------Chocklets-------------------------------

    else if(barcode == 320)
    {
    analogWrite(m3, 230);
    delay(1500);
    analogWrite(m3, 0);
    delay(50);
    barcode = 0;
    lcd.clear();
    lcd.print("You have chose Galaxy of Worth Rs.30");
    lcd.setCursor(0, 1);
    lcd.print("Thank you for Shopping With us. Good Day!");
    }

    //------------------------------Chocklets-------------------------------

    else if(barcode == 430)
    {

    analogWrite(m4, 230);
    delay(1500);
    analogWrite(m4, 0);
    delay(50
    );
    barcode = 0;

    lcd.c
    lear();
    lcd.print
    ("You have chose Dairy Milk of Worth Rs.30");
    lcd.setCursor(0, 1);
    lcd.print("Thank you for Shopping With us. Good Day!");
    }

    //------------------------------Chocklets-------------------------------

    else if(barcode == 520)
    { analogWrit
    e(m5, 230);
    delay(1500);
    analogWrite(m5, 0);
    delay(50);
    barcode =
    0;

    lc
    d.clear();
    lcd.print
    ("You have chose KitKat of Worth Rs.20");
    lcd.setCursor
    (0, 1);
    lcd.print("Thank yo
    u for Shopping With us. Good Day!");
    }
    //------------------------------Chocklets-------------------------------

    else if(barcode == 630){
    analogWrite(m6, 230);
    delay(1500);
    analogWrite(m
    6, 0);
    delay(50);
    barcode = 0;
    lcd.clear();
    lcd.print("You have chose Perk Chocklets of Worth Rs.30");
    lcd.setCursor(0, 1);
    lcd.print("Thank you for Shopping With us. Good Day!");
    }
    else{
    analogWrite(m1, 0);
    delay(500);
    analogWrite(m2, 0);
    delay(500);
    analogWrite(m3, 0);
    delay(500);
    analogWrite(m4, 0);
    delay(500);
    analogWrite(m5, 0);
    delay(500);
    analogWrite(m6, 0);
    delay(500);
    lcd.clear();
    //lcd.print("Sorry, Incorrect choise.");
    //lcd.setCursor(0, 1);
    //lcd.print("Please see the barcode menu if you need anything else. Thank you!");
    }
    //}
    //----------------------------end of the main program----------------------------
    }

    Wireless and Mobile Application




    In order to promote cashless payment in Pakistan we are adding e-payment feature in this vending machine. There are many problems regarding cash payment at food shops especialy in pakistan which are routinley observed and can be solved by adding this feature to made vending machine for example a user which does not have money in cash and wanted to buy an item, he may be in trouble to have that unless he find an atm machine near the shop. Furthermore if any user has cash which can not be changed by shopkeeper then he may be unable to buy that easily. Additionally, this machine could best be utilized in schools , colleges and universities where we have long lines of students with shortage of time awaiting to buy the snacks, candies and juices. So by installing this type of machine will not only reduce the tension of keeping change but also will save time and solve the issues of big lines waiting to buy single chocolate or ice cream.
    Now a days there is alot usage of smartphones in pakistan and it's increasing day by day so by taking that advantage we are using an especial type of applicationwhich shall be in user's cellphone that will read the barcode of specific item written outside of machine. For example If I need to buy the chocolate I will open the application and read that particular barcode of chocolate after that app will ask you to confirm the item you want to buy so if confirmed I will have my item. The method of transaction will be especial type of sim card issued by Jazz, a telecom operator available in pakistan. Initially the user has to credit his account in advance so that whenever he buy any item for example candy or chocolate he will be debited by that much amount and informed through a sms. In this machine we have weeded vinyl made barcodes which shall be scanned before purchasing any item. Vinyl made barcodes are shown in figure below.


    Barcodes of items placed inside machine


    During putting barcodes on final surface


    Future Work




  • Increased Capacity
  • Installment of machine at university cafeterias
  • Increased Security
  • Getting access from telecom operators