Top Banner
A Conceptual Approach to an Automated Quesadilla Maker Brenten Davis, David Anderson, Abdullah Alhajri EET 482 Dr. Shensheng Tang
26

Quesadilla Maker

Apr 16, 2017

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Quesadilla Maker

A Conceptual Approach to an Automated Quesadilla Maker

Brenten Davis, David Anderson, Abdullah Alhajri

EET 482

Dr. Shensheng Tang

Page 2: Quesadilla Maker

2

Table of Contents

Abstract. . . . . . . . . . . 3

Section I: Introduction. . . . . . . . . . 3 - 8

Section II: Design and Fabrication. . . . . . . . 8 - 12

Section III: Electronic Design. . . . . . . . . 12 – 16

Section IV: PLC and Programming. . . . . . . . 16

Section V: Machine Process. . . . . . . . . 17

Section VI: Budget. . . . . . . . . . 18

Section VII: Conclusions and areas for future development. . . . . 18

Section VIII: A Copy of PLC Program . . . . . . . 20

Page 3: Quesadilla Maker

3

Abstract:

This project identifies an area of need in the food service industry; the automation of food production. Additionally, the project combines automation and process control, circuit design, PLC programming, digital logic, manufacturing and materials science, and physics. During the project an automated quesadilla maker was created as a proof of concept system. While not ready for commercialization the learning experience for the students involved was great. The process for designing and engineering the physical construction, electronics and programming for the PLC and microcontroller were an extension of classroom learning.

Section I: Introduction

With rising costs for restaurants many owners and companies are turning to technology to automate processes that previously were handled by workers. The self-checkout that has become ubiquitous in grocery stores is beginning to move to fast food restaurants, with McDonald’s leading the way by installing ordering kiosks in their newest stores. Krispy Kreme Doughnuts has long used a machine to produce, proof, cook and glaze their glazed doughnuts. Some large buffet chains have developed smaller versions of the same process machine to automate and remove the cost of labor from making these confections, allowing for lower costs. Disney, at its Animal Kingdom theme park, has a pizza maker that is capable of producing eighteen hundred pizzas an hour and a company even sells a vending machine, the ‘Lets Pizza’, that cooks a customized pizza automatically. The deployment of these systems has allowed for these companies to produce an item with a low food cost but high labor cost and minimize the labor cost to allow for a greater profitability. In much the same way a quesadilla has a relatively low cost for the components but a higher cost for labor in production when smaller batches are to be made. In one particular scenario encountered, many products need to be produced rapidly on a limited area of grill space. While other costlier alternatives could and were proposed, limitations of space and budget would not allow an expansion of grill surfaces and the product was required by company standards to be available on the buffet hot bar. The “best” solution to this was to have an individual cook quesadilla on a hot plate one at a time. When researching the availability of a cooking system for the automated production of quesadillas, none were found that did not require considerable human interaction. The problem is as follows: There is not a system on the market for the automatic production of quesadillas. We are proposing to develop a system that would automatically produce a variety of quesadillas either with a standard build of ingredients or to allow a customer to select their desired fillings to be assembled automatically.

a) Objectives:

We are attempting to make a proof of concept system that will demonstrate the process to create such a technology. The completed project will, at a minimum, produce an edible product with minimal human interaction, and at its culmination will produce a customized product with no human interaction during production. The capability of output will be limited in the following ways:

Page 4: Quesadilla Maker

4

• By the lack of refrigeration of ingredients, limiting the useful time to 4 hours by Missouri and

USDA food safety requirements • By the capacity of the product hoppers that will need to be refilled by an operator

periodically. • By the capacity of the tortilla dispenser that will need to be refilled by an operator

periodically. The project will, secondly, help us to apply what we have learned in our time at Missouri Western including the development of state diagrams, process control, PLC programming, circuit and hardware design and fabrication.

b) Theoretical Approach:

We analyzed the steps involved in making quesadillas and broke it into these general steps:

1. Assemble necessary items 2. Dispense a tortilla onto the grill 3. Dispense cheese onto tortilla 4. OPTIONAL: Dispense meat and veggies onto tortilla 5. Dispense top tortilla 6. Close grill 7. Cook 8. Open grill 9. Serve tortilla

From this list we have developed the following set of steps with error controls to insure that the process will move through to the end, or will safely disengage if an uncorrected error is present. In general terms the process is as follows: Step 1: Check status of sensors

Checks to see that the carriage is in its ready state (away from heat source), that the grill is open and hot, and waits for input from the HMI. Input will either be to automatically produce a particular combination of ingredients or will take a customized input. Errors checked in this step: Carriage will return to ready location if not in place already. Grill will open if not already open. Process will not continue to next step until temperature sensor return value in operating range. If returned value is above operating range E-STOP will engage and LED denoting overheating on hot plate will light.

Step 2: Dispense a tortilla onto the grill

Carriage moves into location over the grill and dispenses a tortilla. Specific mechanism for dispensing tortilla has not been settled on at this time. Errors checked in this step: Carriage not located correctly will trigger State 11 to correct the location through moving the carriage. A tortilla not breaking the photo eye within a length of time will engage E-STOP and the LED indicating a tortilla dispenser error.

Step 3: Dispense cheese onto tortilla

Page 5: Quesadilla Maker

5

Carriage moves into location over grill and dispenses shredded cheese onto tortilla. Errors checked in this step: Carriage not located correctly will trigger State 11 to correct the location through moving the carriage. Cheese not breaking the photo eye will engage E-STOP and the LED indicating a cheese dispenser error.

Step4: OPTIONAL: Dispense meat and veggies onto tortilla

Carriage moves into location over grill and dispenses meat and/or vegies onto tortilla. This step is deemed optional depending on time left in the semester after getting the cheese to dispense correctly. The difficulty here will be moving from one to two dispensers as any further dispensers will essentially be copy and pasted from the second one’s systems. Errors checked in this step: Carriage not located correctly will trigger State 11 to correct the location through moving the carriage. Ingredients not breaking the photo eye will engage E-STOP and the LED indicating a meat/vegies dispenser error.

Step 5: Dispense top tortilla Carriage moves into location over the grill and dispenses a tortilla. Specific mechanism for dispensing tortilla has not been settled on at this time. Errors checked in this step: Carriage not located correctly will trigger State 11 to correct the location through moving the carriage. A tortilla not breaking the photo eye will engage E-STOP and the LED indicating a tortilla dispenser error.

Step 6: Close grill

Carriage moves to ready position and grill closing mechanism engages until sensor indicates grill is closed. Specific mechanism for closing grill has not been finalized at this time. Errors checked in this step: Carriage not located correctly will trigger State 11 to correct the location through moving the carriage. The grill closing mechanism not engaging will activate E-STOP and the LED indicating a failure of the mechanism. The grill closed sensor not closing will not allow the process to continue and will activate E-STOP and the LED indicating failure of the grill to close after a specified length of time.

Step 7: Cook

The grill closed sensor starts a countdown based on the ingredients chosen for the filling of the quesadilla, or possibly just a standard countdown for each depending on how difficult it is to implement. When the countdown ends a signal is sent to begin the next step.

Step 8: Open grill

The grill opening mechanism engages until the sensor indicated grill is in the open position. Specific mechanism for opening the grill has not been finalized at this time. Errors checked in this step: The grill opening mechanism not engaging will activate E-STOP and the LED indicating a failure of the mechanism. The grill open sensor not closing will not allow

Page 6: Quesadilla Maker

6

the process to continue and will activate E-STOP and the LED indicating failure of the grill to move to the open position after a specified length of time.

Step 9: Serve tortilla

This step has been deemed to be optional by the group as it has potentially the highest difficulty level and as it can be handled by an operator. If sufficient time is left in the semester we will attempt to complete this step.

From this list developed a process shown below in ‘Chart 1: Process for Quesadilla Maker’ that consists of 12 states currently defined. Each state is described briefly in Chart 2. Chart 1: Process for Quesadilla Maker

Chart 2: List of States for Quesadilla Maker

Description of States for Quesadilla Maker: State 1: System ready for input

System is at a ready state; all sensors report good readings. PLC waits for input signals from HMI Once activation given from HMI PLC signals first state.

Task1:D

ispen

ceto

r6llas

State2:CarrageMovementState3:DispenseTor6lla

Task2:Disp

enseChe

ese

State2:CarriageMovementState4:CheeseDispense

Task3:D

ispen

seM

eat(op

t) State2:

CarriageMovementState5:MeatDispense

Task4:D

ispen

seVegies

State2:CarriageMovementState6:VegiesDispense

Task5:D

ispen

ceto

r6llas

State2:CarrageMovementState3:DispenseTor6lla

Task6:C

ookProd

uct

State2:CarriageMovementState7:CloseGrillState8:CookState9:OpenGrill

Task7:D

ispen

seQue

sadilla

State10:DispensetoServingAreaResettoState1ReturntoTask1

State1:Systemreadyforinput.HMIreadytopromptfor

input.Carriageandsensorsreportreadystate.

State2:CarriageMovementCarriageinmo6ontodesired

loca6on

State3:DispenseTor6llaTor6lladispenserinloca6on,

dispencesonetor6lla

State4:CheeseDispenseCheesedispenserinproperloca6on,dispencescheese

State5:MeatDispenseMeathopperinproper

loca6on,dispencescheese.

State6:VegiesdispenseVegieshopperinproperloca6on,dispencescheese

State7:CloseGrillIfcarriageinresetposi6on,ac6vatesclosingmechanish

State8:CookIfgrillclosesensorreportstruestartscountdown.

State9:OpenGrillIfcountdownendsac6vatesgrillopeneingmechanismun6lopensensorcloses

State10:DispensetoServingArea

State11:Loca6onErrorIfallignmentisoffcorrects

bymovingcarriageapproprateamount.

State12:E-STOPThrownbysensor.Stopsalltaskprocesses,sounds

alarm,opensgrillifclosed.

Page 7: Quesadilla Maker

7

State 2: Carriage Movement PLC sends activation signals to carriage movement motor, moving carriage into position to dispense product. Positional sensor reports back to PLC as to location to determine when motor shuts off. If position is not correct State 11 engaged to correct location. If position is correct signals PLC ready for next state.

State 3: Dispense Tortilla

PLC starts counting down and sends activation to relay on dispensing mechanism until tortilla passes through photo eye. Sensor return resets countdown and signals PLC ready for next state. If no sensor return exists activates State 12.

State 4: Cheese Dispense

PLC sends activation signals to stepper motor on hopper. Photo eye checked to see if product was dispensed. Sensor return signals PLC ready for next state. No return will return to State 4 and activate a flag. If State 4 resolves without a sensor return from the photo eye State 12 is engaged

State 5: Meat Dispense

PLC sends activation signals to stepper motor on hopper. Photo eye checked to see if product was dispensed. Sensor return signals PLC ready for next state. No return will return to State 5 and activate a flag. If State 5 resolves without a sensor return from the photo eye State 12 is engaged

State 6: Vegies Dispense

PLC sends activation signals to stepper motor on hopper. Photo eye checked to see if product was dispensed. Sensor return signals PLC ready for next state. No return will return to State 6 and activate a flag. If State 6 resolves without a sensor return from the photo eye State 12 is engaged

State 7: Close Grill

PLC starts countdown and sends activation signal to relay to power grill closing mechanism. Successful closing of grill closes the grill close sensor signals PLC ready for next state and resets countdown. Failure of grill sensor to close within countdown engages State 12.

State 8: Cook

PLC starts countdown based on inputs from State 1 or a standard count if required cook times are determined to be close. End of countdown signals next state. No error handling in this state.

State 9: Open Grill

PLC starts countdown and sends activation signal to relay to power grill opening mechanism. Successful opening of grill closes the ‘Grill Lid Open Position’ sensor which signals the PLC ready for next state and resets the countdown. Failure of the opening sensor to close within countdown engages State 12.

State 10: Dispense to Serving Area

State not defined at this time State 11: Location Error Correction

If return from positional sensor is not within acceptable margin PLC signals carriage motor to move to correct position. This will be small movements.

State 12: E-STOP

Fatal error state. Will not move from state until error has been corrected and reset pressed on HMI. PLC signals alarm and disengages all activation signals to prevent damage to motors.

Page 8: Quesadilla Maker

8

Section II: Design and Fabrication

As our group started to talk about the idea of the automated quesadilla maker we had to decide who was going to do each part due to the massive size of the project. Mr. Anderson took the responsibility of building and designing the working mechanical parts, due to his experience working on farm equipment throughout his childhood. The mechanical parts can be broken down into four different sections: frame, carriage, dispensers, and cooking element. Each section had its own challenges and evolved several times throughout the entire building process.

a) Frame:

The frame of the quesadilla maker was the first mechanical part that we designed and built. We sourced the tubing through a local metal warehouse and looked through several sizes and gauges. It was decided to use a 1’’ x 1’’ 14-gauge bar due to the strength to weight ratio it offered. The frame is 68’’ long and 28’’ tall. The massive frame contains close to 28 feet of tubing that was wielded into place to support the carriage. The frame is an L-shaped structure with cross bracing horizontally and vertically to support the weight of the carriage. Other designs were discussed such as a box frame, where the carriage would hang from middle top of the frame, but it was decided that the L-shaped frame was the best fit for us due to the following reasons: • First was the simplicity of the design. The frame

is not required to support a large amount of weight; therefore, we did not want to waste time or money on an extravagant design.

• The second reason was that we did not want to limit ourselves to a specific size of the carriage. Since this is a prototype we knew that there would be many changes along the way, the L-shaped frame allowed us to adapt with those changes without a problem.

b) Carriage: After the design of the frame the focus switched to the carriage and how it would be mounted to the frame. The carriage is a 20’’ by 34’’ piece of ½’’ chip board that is mounted to the frame and carries the tortilla and cheese dispensers. It is the only part of the machine that will move back and forth; therefore, it is responsible for getting the dispensers to their designated dispensing location.

Page 9: Quesadilla Maker

9

The first design of the carriage was to have a 1’’ x 1’’ metal frame and wood mounted to the top of the carriage frame. The metal frame provided support and the wood allowed us to mount the dispensers wherever we desired on the carriage. After fabrication of the metal frame we decided the extra weight and support the carriage frame provided was unneeded. We decided that a piece of ½” chipboard would give us the support and light weight we desired. The second design of the carriage was the same size and served the same purpose, but did not included a metal carriage frame. When we decided on the design and built the carriage to the specifications that we had agreed on, we needed a way to mount the carriage to the frame and move it into its dispensing locations. First we had to decide how the carriage would move and then build a mounting system that would fit our design. We knew we wanted to hang the carriage with a track and rollers because it is the simplest and most economical way. We decided on a 6’ sliding door track and rollers, which are designed to be used in closet doors, to hang the carriage. Then we decided to use a guiding system attached to the bottom of the carriage to help the carriage to be moved uniformly. The guiding system utilized a 24” full extension kitchen ball bearing drawer slide. Now that we picked our two systems to move the carriage back and forth we needed to build a mounting system to connect everything to the frame. We took a 2’’x 4’’ piece of wood and cut it to the length of the sliding door track and attached the track to it. We then attached the 2’’x4’’ to the frame so that the track was on the front, side without the legs, of the frame where there is no vertical bracing. On the front side, closest to the grill, we mounted the sliding door guide to the horizontal metal bracing bar of the frame. When mounting the guide to the horizontal brace we had to use flat head bolts to insure that the track did not get caught on one of the mounting bolts. Now that the carriage was mounted, we needed a way to drive the carriage to and from its dispensing locations. Ideally we wanted to use a ball bearing shaft with a stepper motor that would be very precise and accurate when moving. With precision and accuracy comes a large price tag that would not fit into our budget. After looking we scavenged a 12V DC motor from an old project that would work for a drive motor. It was decided to drive the carriage with the motor using a chain and sprocket system, inspired by the shaft collar on the motor that had a small sprocket. An axle and sprocket supplied from a tire from an old child’s bike were welded to the collar on the motor in a direct drive system between the 12V motor and the carriage, and all sections of the axle were wielded together to ensure there would not be

Page 10: Quesadilla Maker

10

any slippage within the it. The only thing we needed would be a bike chain for the sprocket to sit in. A groove was cut horizontally in the middle of a 2’’x 4’’ so that the bike chain could sit inside the board completely. Next, the 2’’x 4’’ and bike chain were mounted to the carriage. Then the 12V drive motor, with the drive system attached (bike axle), was mounted so that the sprocket would sit inside the bike chain which would prevent slippage of the sprocket while driving the carriage.

c) Dispensers:

After the completion of building and mounting the carriage the next task was to decide how to dispense the tortillas and cheese. When discussing ways to dispense the cheese there were many different ideas that quickly came up. One idea was a cork screw shaft and stepper motor that is used in precise measurement applications such as in cappuccino makers. On the other hand, when we started talking about how to dispense the tortillas the ideas became few and far between. Tortilla dispensers aren’t made commercially so an original invention was needed. As we discussed how to dispense the cheese, we wanted to use the cork screw set up for a few reasons. One reason was that it was premade and a proven reliable system. The second reason was it would be very precise which would allow us to control exactly how much ingredient to dispense. The next step was to find a unit and see if it was in our price range. We never could find anything that fit the budget so the plan evolved and we decided on dry food dispensers. The dry food dispensers are most commonly used as cereal dispensers in the hotel industry. Each turn of the dispenser is equal to 1 ounce of ingredient, so we could still control the amount of ingredients dispensed through the use of a stepper motor. The 5V DC stepper motor is mounted to the carriage and is connected to the dry food dispenser through a keyed shaft. As we started to test the cheese dispenser we had problems with cheese piling up as it was dispensed onto the tortilla. We fixed this with a cheese grader that would usually be used for cutting blocks of cheese. Cheese graders are commercially made, but a functional mockup was made out of an old plastic container and fishing line. The new cheese grader spread the cheese evenly over the tortilla and solved the piling issue. The end of the semester was coming and we had not finalized a design for the tortilla dispenser. Since we had first talked about the design for the dispenser the best design was of a plastic container that had slits cut in the bottom and a sliding door mounted to a motor. The sliding door would be pulled away, exposing the slits that allowed each tortilla to be dispensed one by one. Each tortilla would be spaced at least an inch from each other and be held up by a piece of slick plastic that is mounted in the container at a 60-degree angle. The space between each tortilla allowed for a small amount of error when using a motor to slide the door away from one slit to the next. This original idea evolved several times through the building process.

Page 11: Quesadilla Maker

11

When starting to build the tortilla dispenser there was only 12’’ of space between the edge of the carriage and the dry food dispensers. With a limited amount of space careful consideration had to be taken to the size of materials selected. A 12V car window motor and mounting cable system was acquired to control the slide. The operation of the window system inspired the idea to use the same type of system on the sliding door that would release the tortillas. In the first design the motor was mounted in front of the dispenser with the cables connected to the middle of the disperser slide, and an eyelet to the back on the carriage. This would allow the use of the two mounted cables going separate ways to control the direction of the door, exactly how a car window opens and closes. The sliding door was made out of a piece of plastic covered three ring binder material and placed metal grommets into the door so the cable would not rip the binder while moving. Next, the cables were hooked to the sliding door with the cables going in separate directions and started to test the dispenser. When the first test was started it was quickly that there was a design error. The cable that went through the eyelet, which was attached to the carriage, and attached to back of the door was in the middle of the slit where the tortilla was getting dispensed. The cable in the middle prevented the tortilla from being dispensed. This was a major setback which forced the design back to the drawing board. To fix my problem a design was needed that would allow the cable to be moved to the side of the dispenser or a manual reset that would pull the door back to its original location without the help of automation. The easiest and most time efficient fix that was come up with was to move the eyelets to the outside of the dispenser and use a devise that would allow the motor to pull the door forward, while keeping tension in the backwards direction. The tension would pull the door back to its original position when the motor changed direction. Lastly we would make a manual stop that when the door retracted to its beginning position there would still be tension pulling back on the door. This would make sure that the starting position of the sliding door would be the exact same every time, which is crucial because the PLC program is running strictly off of timers instead of position sensors. Now that the design of the tortilla dispenser had been improved on the changes had to be implemented and what kind a devise that would apply tension to the sliding door had to be determined. The credentials of the devise required it to be 1” long at start and the ability to stretch to a length of 3 ¾”. A spring that could stretch to that specifications could not be found locally so rubber bands were used instead. Rubber bands are much more elastic than springs and are strong enough to hold the door in place. The manual stops were made off scrap pieces of 2’’x 4’’ and were placed on the outside of the dispenser in such a way that the door could rest against them but not be in the way of the dispensing tortilla. The new improvements worked as planned and we successfully made the first working tortilla dispenser. Now that we could successfully dispense the tortillas, we needed a mechanism that would help place the tortilla in the same spot every time. To be able to place the

Page 12: Quesadilla Maker

12

tortillas accurately we needed a ramp type devise that would set the tortillas down close to the grill. 1” x 1” boards were cut into right triangles with the desired slope and attached to the carriage. Then a piece of slick plastic was attached on top of the triangles so the tortillas could smoothly slide down the ramp. The ramp ensured that both the first and second tortillas were placed on top of each other to make a quality quesadilla

d) Cooking Element:

The last part of the mechanical design and building process was the cooking element. The cooking element includes a flat top grill (Panini press), 12V DC motor, which automatically opens and closes the grill, and a mounting plate that connects the grill to the motor. In general, the heating element of the project was fairly simple. The only fabrication required was to make the mounting plate. When designing the mounting plate for the grill we knew that the motor came with a premade collar shaft and the grill had a handle for opening and closing. However, the problem with the stock handle was that it was made of a cheap, non-supportive metal that could not be directly wielded on. Therefore, we needed to find something that we could weld the motor shaft collar too and then attach to the grill handle. We still had a few pieces of 1’’ x 1’’ metal tubing left over from the frame. It was decided to cut off a side of the square tubing and make it into a piece of flat stock steal. Then the flat stock could be welded to the shaft collar. The handle of the grill has two bolts on each side of the grill that connects the handle to the grill. To attach the piece of flat stock we used the same holes as the original but got long bolts so that they would be long enough to compensate for the flat stock mounting plate. This allowed to have automated opening and closing cooking element.

Section III: Electronic Design

a) Design

As Mr. Davis had the most experience in designing and building electronic systems and circuit boards he was chosen to be responsible for the electronic components of the quesadilla maker. One of the first of the electronic components to be purchased was the PLC as the requirements for it would dictate the design of the circuits. After considering PLCs of differing capacities and costs we went with the base model Ace from Veloncio.net. It was the most cost effective at $50 plus shipping and accessories. Additionally, the software for writing code for it, and for creating HMI were provided for free from the manufacturer making it one of the best values overall despite it’s more modest performance. When the relay boards that would interface the PLC with the motors were designed the initial design implemented was found to be unworkable and further refinement of the boards were needed. After consulting with Dr. Zhu a second board design was made and found to work with the intended results. Details of the design of the boards and of the connections to the PLC are found in section b. and section d.

Page 13: Quesadilla Maker

13

Block Schematic of Electronic Control System

b) Relay boards

The first board to be designed was the motor control boards. The initial design contained two of these boards, with the third and the selector board being added later in the design to accommodate a tortilla dispenser. The initial design was found to be not functional with the PLC as it was designed with a source output in mind. After reworking the layout, it was tested and the output lights lit appropriately. However, when connected to the motors it was found that there was not a significant enough difference in the voltage levels between power and ground to cause them to operate. After consulting with Dr. Zhu they were then redesigned and worked properly. Motor Control Board, typical

Page 14: Quesadilla Maker

14

With the PLC providing ground for the outputs it was necessary to connect the relay coils to the 12V source. A red LED was added between power and ground to show that the board had power to it. The first relay operates as a switch, sending power to the motor through the second relay’s normally closed side. Activation of the second relay reverses power and ground on the lines to the motors causing them to reverse direction. Lights on the activation lines and on the motor lines show that current is flowing (resistors for the motor line LEDs were accidentally omitted in the drawing.) Motor Selector Board (input line accidentally cut off at 12V line, should continue past to input)

The motor selector board works on a similar principle to the motor control board except that the activation output from the PLC goes through the relay to the two boards through the normally closed or normally open side, depending on activation status. LEDs are placed to show that power is given to board and that the activation has closed the relay.

c) Microcontroller for stepper motors

The design of the cheese, and potential meat and vegetable, dispensers called for the dispensing handles to be manipulated by a motor. Stepper motors that included a driving board and were rated at 5V DC, and were able to be overpowered with 9V DC, were purchased for around $5 each.

Page 15: Quesadilla Maker

15

The limited number of outputs for the PLC that we had meant that although the PLC had the software for, and therefore it was capable of, driving a stepper motor we would not be able to run them in that manner. It was decided to use a microcontroller programmed to run the stepper motor through the driving boards included would be the best option. A previously purchased Basic Stamp Homework board from Parallax Inc. was utilized for this task as the basics of the programming language were already familiar to some of the team members. PBasic code for interfacing PLC to Stepper Motors PLC output sets pin 0 to high which triggers the controller to drive the stepper.

' {$STAMP BS2} ' {$PBASIC 2.5} ' ' set variables: x VAR Word stepper VAR Nib steps VAR Word INPUT 0 ' set pins 8 - 10 as outputs, using DIRS to do so: DIRS.HIGHBYTE = %00001111 main: steps = 1050 IF (IN0 = 1) THEN clockStep GOTO main GOSUB clockStep PAUSE 1000 GOSUB counterClockStep PAUSE 1000 GOTO main clockStep: DEBUG "counter" , CR FOR x = 0 TO steps LOOKUP x//4, [%1100,%0110,%0011,%1001], stepper OUTS.HIGHBYTE.LOWNIB = stepper PAUSE 2 NEXT RETURN counterclockStep: DEBUG "clockwise", CR FOR x = 0 TO steps LOOKUP x//4, [%0011,%0110,%1100,%1001], stepper OUTS.HIGHBYTE.LOWNIB = stepper PAUSE 2 NEXT RETURN

The code as written was implemented into the controller and successfully turned the motor a half rotation. The motor was driven in a ‘high torque’ lower speed configuration. While the PLC was sinking, gave ground to the outputs, the connecting circuitry for the input pin 0 used a small relay to trigger the input pin. The microcontroller would rotate the motor 180º upon activation, dispensing approximately 3 oz. of product. Adding the additional dispensers would have required making the following modifications:

Page 16: Quesadilla Maker

16

• Changing pins 2 and 3 to inputs and triggering an output to select which dispenser will be turned on.

• The four wires for each driver board would come to the same output pins. Only one set of outputs would be required, allowing for additional expansion if desired.

• Changing the program to put pins 13-15 to high corresponding to the desired dispenser in order to activate a transistor acting as a power switch on the particular dispenser.

d) Interfacing with PLC (i.e. making more connections)

The PLC that was purchased contained six digital sinking outputs. The first version required four pins for controlling the motors on the carriage and the grill, as well as an activation for the stepper motor. Initially we had planned to first ad additional dispensing choices by using binary output on pins five and six, having the microcontroller interpret the inputs and select the appropriate dispenser. We had planned to purchase a different PLC unit with additional outputs and then to add the tortilla dispenser. However, budgetary constraints did not allow for the additional purchase.

It was therefore decided that having a completely automated process that completes a quesadilla was preferable. The next issue was that the addition of another motor meant that we needed two outputs from the PLC and we only had one available. It was decided to join the secondary direction activations onto one output as triggering them when there was no power to the board would not cause problems. The motor control selector board was added to send activation to the first relay on the two established motor boards, with its activation being on output one, the power relay activation on pin two, and the direction activation on pin three. In hindsight the board was unnecessary as the same could be accomplished with the activations for board one and two being on pin one and two. This freed up one output and allowed a third motor board to be added that controlled the tortilla dispenser motor.

Section IV: PLC and programming

The PLC from Velocio that was purchased was programmed slightly differently than the RSLogic that we were used to. In particular, the timer worked in a very different manner than on an Allan Bradley unit. There is no .TT or .DN with the Velocio unit; instead, the timer starts counting and doesn’t stop, even if the logic rung goes false. It must be manually stopped and reset using separate rungs. Additionally, all comparisons are done using less than, and greater than or equal to logic. The timer increments in ms, s, min, hour, day, week; giving a large amount of versatility in timing. However, what could be accomplished in two or three rungs of ladder logic in RSLogic takes several more rungs, up to 7 if you wish for something to take place when the timer is running, and a separate process to take place when the timer is ‘done’ (reaches a specified time constraint,) then to reset the timer at the end. While not terribly complicated once the differences are understood it is still time consuming to write and keep track of.

Page 17: Quesadilla Maker

17

Section V: Machine Process (Practical Approach)

Step 1: Start Position Step 2: Carriage Move and Dispense Tortilla

Step 3: Carriage Move Step 4: Dispense Cheese

Step 5: Carriage Move and Dispense Second Tortilla Step 6: Carriage Move back to Start and Grill

Close Step 7: Grill Open and Enjoy Quesadilla

Page 18: Quesadilla Maker

18

Section VI: Budget

Product Cost($)DryFoodDispenser 50Grill 40Wood 30MetalTubing(Frame) 30Hardware(nuts,bolts,misc.,etc.) 4012VMotors N/A(scrummaged)Slidingdoortrack/Guide 25PLC 75Wiring,Connectors,etc 20ElectronicBoards N/ARefurnishedpartsRelays,LED’s,resistors N/ARefurnishedpartsTotalProductCost 310

Section VII: Conclusions and areas for future development

The project, while not entirely successful at completing its objective to fully automate the cooking process, was a learning experience for each person involved. It allowed the participants to share their expertise, pool resources, and to learn from each other as to how this type of large scale project is made.

In the future it would be possible with the acquisition of another PLC, potentially with a greater number of outputs, and the purchase of motors more appropriate for the use in the project, to see it through to the fulfillment of it’s potential. As for commercialization, it is such a niche item that it may not be a viable commercial product. But who knows, maybe one day it will stand next to the pizza vending machine at a theme park waiting to take payment and dispense a hot, delicious quesadilla.

Page 19: Quesadilla Maker

19

Section VIII: A Copy of PLC Program

Page 20: Quesadilla Maker

outBit out1Bit Off Bit ResetRung#1

StartTimeri32 TimeCMP

Bit out1

outBit ResetRung#1i32

TimeCMP 2 sec

ResetTimeri32 TimeCMP

Bit restart

C:\Program Files\Velocio\demo\demo.viol page 1 of 7

A B C D E F

1

2

3

4

5

6

7

8

Rung

#1Ru

ng #2

Rung

#3Ru

ng #4

Page 21: Quesadilla Maker

outBit out2Bit ResetRung#1 Bit ResetRung#5

StartTimeri32 TimeSMA

Bit out2

outBit ResetRung#5i32

TimeSMA 2 sec

ResetTimeri32 TimeSMA

Bit out1

C:\Program Files\Velocio\demo\demo.viol page 2 of 7

A B C D E F

9

10

11

12

13

14

15

16

Rung

#5Ru

ng #6

Rung

#7Ru

ng #8

Page 22: Quesadilla Maker

outBit out3Bit ResetRung#5 Bit resetRung#9

StartTimeri32 TimeRC

Bit out3

outBit resetRung#9i32

TimeRC 2 sec

ResetTimeri32 TimeRC

Bit out2

C:\Program Files\Velocio\demo\demo.viol page 3 of 7

A B C D E F

17

18

19

20

21

22

23

24

Rung

#9Ru

ng #10

Rung

#11Ru

ng #12

Page 23: Quesadilla Maker

outBit out4Bit resetRung#9 Bit resetRung#13

StartTimeri32 TimeGMP

Bit out4

outBit resetRung#13i32

TimeGMP 2 sec

ResetTimeri32 TimeGMP

Bit out3

C:\Program Files\Velocio\demo\demo.viol page 4 of 7

A B C D E F

25

26

27

28

29

30

31

32

Rung

#13Ru

ng #14

Rung

#15Ru

ng #16

Page 24: Quesadilla Maker

outBit out5Bit resetRung#13 Bit resetRung#17

StartTimeri32 TimeRG

Bit out5

outBit resetRung#17i32

TimeRG 2 sec

ResetTimeri32 TimeRG

Bit out4

C:\Program Files\Velocio\demo\demo.viol page 5 of 7

A B C D E F

33

34

35

36

37

38

39

40

Rung

#17Ru

ng #18

Rung

#19Ru

ng #20

Page 25: Quesadilla Maker

outBit GrillMotorPow.Bit out1

Bit out3

outBit ReverseCarriageBit out2

outBit StepperMotorAct.Bit out3

outBit GrillMotorPow.Bit out4

C:\Program Files\Velocio\demo\demo.viol page 6 of 7

A B C D E F

41

42

43

44

45

46

47

48

Rung

#21Ru

ng #22

Rung

#23g #

24

Page 26: Quesadilla Maker

Bit out5

outBit ReverseGrillBit out5

no-op

C:\Program Files\Velocio\demo\demo.viol page 7 of 7

A B C D E F

49

50

51

52

53

54

55

56

Rung

#24Ru

ng #25

Rung

#26