SlideShare a Scribd company logo
1 of 31
university of texas at san antonioFinal ReportAutomated Volume Detection &                                  Fluid Dispensing SystemSubmitted By:Team #2Brendan BakerFrederick WeissbachSean TovarSubmitted To:With public beverage service in mind, the engineers from Team 2 have designed a device aimed at automating the industry.Prof. August AlloUniversity of Texas at San Antonio1 UTSA Circle DriveSan Antonio, TX 782493 May, 2010<br />Table of Contents TOC  quot;
1-3quot;
    Table of Contents PAGEREF _Toc260386107  2Table of Figures PAGEREF _Toc260386108  41.0Executive Summary PAGEREF _Toc260386109  52.0Introduction PAGEREF _Toc260386110  62.1Gant Chart PAGEREF _Toc260386111  73.0Need for Design PAGEREF _Toc260386112  74.0Literature and Patent Search Results PAGEREF _Toc260386113  85.0Marketing Analysis and Marketing Strategy PAGEREF _Toc260386114  86.0Engineering Design Constraints PAGEREF _Toc260386115  96.1Global Design Constraints: PAGEREF _Toc260386116  96.2Local Design Constraints: PAGEREF _Toc260386117  107.0User Requirements PAGEREF _Toc260386118  117.1User Requirements PAGEREF _Toc260386119  117.2System Requirements PAGEREF _Toc260386120  127.3Interface Requirements PAGEREF _Toc260386121  128.0Engineering Codes and Standards PAGEREF _Toc260386122  139.0Design Concepts PAGEREF _Toc260386123  1410.0High Level Block Diagram PAGEREF _Toc260386124  1610.1Volume Detection PAGEREF _Toc260386125  1610.2Fluid Dispensing PAGEREF _Toc260386126  1711.0Major Components PAGEREF _Toc260386127  1711.1Image Acquisition PAGEREF _Toc260386128  1711.2PC/Volume Calculation PAGEREF _Toc260386129  1811.3DAQ Device PAGEREF _Toc260386130  1911.4Valve and Circuitry PAGEREF _Toc260386131  1912.0Detailed Design PAGEREF _Toc260386132  2012.1Edge Detection PAGEREF _Toc260386133  2012.2Volume Calculation PAGEREF _Toc260386134  2112.4Valve Dispensing PAGEREF _Toc260386135  2212.5Product Hardware PAGEREF _Toc260386136  2213.0Major Problems PAGEREF _Toc260386137  2313.1Lighting PAGEREF _Toc260386138  2313.2Dispensing PAGEREF _Toc260386139  2414.0Integration and Implementation PAGEREF _Toc260386140  2514.1Image Acquisition and Volume Calculation PAGEREF _Toc260386141  2514.2Labview Transfer PAGEREF _Toc260386142  2614.3Valve Integration PAGEREF _Toc260386143  2614.4Water Reservoir PAGEREF _Toc260386144  2714.5Integration PAGEREF _Toc260386145  2815.0Comments and Conclusions PAGEREF _Toc260386146  2816.0Team Members PAGEREF _Toc260386147  2916.1Brendan Baker PAGEREF _Toc260386148  2916.2Frederick Weissbach PAGEREF _Toc260386149  2916.3Sean Tovar PAGEREF _Toc260386150  3017.0References PAGEREF _Toc260386151  31<br />Table of Figures<br /> TOC    quot;
Figurequot;
 Figure 1.1: AVD & FDS PAGEREF _Toc260384477  5<br />Figure 2.1: Gant Chart showing progress of each task PAGEREF _Toc260384478  7<br />Figure 9.1: Pugh matrix displayin alternative designs PAGEREF _Toc260384479  14<br />Figure 9.2: Description of alternative concepts PAGEREF _Toc260384480  15<br />Figure 12.1: Functional Block Diagram PAGEREF _Toc260384481  16<br />Figure 12.2: Volume Detection PAGEREF _Toc260384482  16<br />Figure 12.3: Fluid Dispensing portion of block diagram PAGEREF _Toc260384483  17<br />Figure 11.1: Webcam used for image acquisition PAGEREF _Toc260384484  18<br />Figure 11.2: PC used for volume calculation and hardware interface PAGEREF _Toc260384485  18<br />Figure 11.3: DAQ device used for outputting signal to the valve PAGEREF _Toc260384486  19<br />Figure 11.4: Schematic of circuitry controlling valve PAGEREF _Toc260384487  19<br />Figure 12.1: Fill holes command PAGEREF _Toc260384488  20<br />Figure 12.2: Image subtraction PAGEREF _Toc260384489  20<br />Figure 12.3: Image amplification PAGEREF _Toc260384490  20<br />Figure 12.4: Isolated edge used to calculate volume PAGEREF _Toc260384491  21<br />Figure 12.5: Cup plotted in real world units PAGEREF _Toc260384492  21<br />Figure 12.6: 3D model of the cup PAGEREF _Toc260384493  22<br />Figure 12.7: Protoboard of valve circuitry PAGEREF _Toc260384494  22<br />Figure 12.1: Placed cup that will get volume calculated PAGEREF _Toc260384495  25<br />Figure 14.2: Main routine in Labview used to run the product PAGEREF _Toc260384496  26<br />Figure 14.3: 12V DC valve with proper plumbing into water reservoir PAGEREF _Toc260384497  27<br />Figure 14.4: Test results for determining flow rate PAGEREF _Toc260384498  27<br />Figure 14.5: Successful prototype dispensing water PAGEREF _Toc260384499  28<br />1.0Executive Summary<br />Figure 1. SEQ Figure  ARABIC  1 1: AVD & FDS37490401184910With public beverage service in mind, Team 2, the engineers behind ‘Drinks Unlimited!’ have designed a device aimed at automating the industry.  Stemming from the inconvenience of long lines and bad service, and the technology deprived traditional industry standard of human clerks, an idea of using a hands free and adaptable system surfaced.  A marketable device would be created to accomplish two main tasks; allow the user to apply any common type of beverage apparatus and automatically fill the device hands free.  The design evolved into the AVD&FDS, or Automatic Volume Detection and Fluid Dispensing System.  Originally planned, the AVD&FDS would capture an image of the cup, integrate vertical edges and convert to volume, log the data, and then use a constant pressure system provided by a mechanical engineering senior design team to equally dispense the correct volume.   Though the prototype idea and goal of operation stayed consistent, machine operation and implementation have changed due to problems and realizations during the prototyping process.  Mainly, the method of volume calculation from the image of the drinking apparatus has differed vastly.  The process proved to be more difficult, with a majority of efforts being noise removal and proper edge detection for all cup mediums.  Code changes were made daily to adjust to each set up of different cameras and housing ideas.  The design also went through many phases of lighting environments, as this is an important aspect of finding cup edges.  The use of LabView as an interface for the user, data logging, and digital output was also implemented.  Finally, using the constant pressure system provided by the mechanical engineering team was altered due to the type of valve used in their design.  The valve requires pulses to turn valve on and off, and the FDS warrants a constant signal for an open valve.  This will be safer and more fail-proof.  Currently, for prototyping, a gravity based water dispenser will be used that will produce a constant flow rate due to constant reservoir level.  The data logging system was also removed for the prototype, though pending deadlines, an example system may be incorporated for proof of concept.  The final prototype hardware and software contains a PC, loaded with MATLAB and LabView and relevant image processing toolkits, a cheap USB webcam, a data acquisition device for digital output, a backlight assembly with LED lighting, a fluid valve, a gravity based reservoir, and an emergency shut off switch.  The final design works efficiently, quickly, and consistently.<br />2.0Introduction<br />Technology has allowed consumer independence in numerous markets and even more distributors. All a consumer has to do to buy a product is simply enter a credit card number and they walk out the door with their new purchase or it arrives in the mail the next day. This process is fast, involves no clerk or miscounted change, is easy, and reliable. This experience is similar to what the AVD&FDS can offer. It detects the volume of a given container and will dispense a beverage of the user’s choice into the container without any input from the user beyond placing the container in the system. This system is completely consumer based and independent of employee/consumer interaction. The prototype developed will allow a consumer to pick a type of drinking cup i.e. glass, plastic/cardboard, coffee mug, and then simply place the cup under the dispenser and press go. The system will take care of the rest. It will correctly charge you for the amount of fluid dispensed and subtract the amount from a user account.  This device will give the consumer a full glass of water without ever having to get close to the dispenser, thus making this device much more sanitary than the current standard used today. The design team as a whole has extensive experience in control system development and implementation that will help in their individual contribution to the design.  Imagine if people started to carry their own drinking bottles and mugs to work, the gym, airports, etc with no fear of germs and knowing they are being charged exactly for the amount filled into their glass. Plastic bottles and littering could be drastically reduced while keeping the consumption of the same product the same.<br />2.1Gant Chart<br />Figure 2. SEQ Figure  ARABIC  1 1: Gant Chart showing progress of each task<br />As the gant chart shows, the design process was split up into sections that directly tied into one another. The first part of the process was to conceptualize the idea and write down a design that was feasible to prototype during the allotted time. Once the design was in place, the rest of the process was devoted to separately working on the individual parts necessary to make this a successful prototype. Ordering parts, hardware, and the GUI came along at different rates than the software development because of the heavy dependence on the software. The innovation is through the code development.<br />3.0Need for Design<br />The need for this design arises from the long lines seen and experienced by every consumer in different situations. Large crowds during the morning rush at coffee shops, waiting in line during halftime of a sporting event, trying to get the attention of a bartender during a crowded night, the list goes on. This device could take the dependence off of the employee and usually understaffed concession stand, and put the responsibility in the consumer’s hands. This would alleviate the lines built up at the counter and disperse them across the available space at separate AVD&FDS locations.<br />4.0Literature and Patent Search Results<br />A Google patent search did not reveal any device that computes volume with the process we have chosen. Some similar products include an automatic bartender that has predetermined amounts of each ingredient programmed.  The literature search produced mixed results, while the patent search produced arguably good results, there were none directly related.  While this was good for being able to move forward with the design concept, there was little guidance that could be gained from existing patents at the time of research.  Some of the more relevant patent searches were the Fluid Volume Sensor – Patent 5303585,  3D ultrasound-based instrument for no invasive measurement of amniotic fluid volume -  Patent pending application No. 10701955. <br />Literary articles were somewhat related but either used technologies unavailable to us or did not work properly with exactly what we were doing.<br />Song  Wang, Feng  Ge, and Tiecheng  Liu, “Evaluating Edge Detection through Boundary Detection,” EURASIP Journal on Applied Signal Processing, vol. 2006, Article ID 76278, 15 pages, 2006. doi:10.1155/ASP/2006/76278<br />Adnan Khashman, “Noise-Dependent Optimal Scale in Edge Detection,” IEEE International Symposium on Industrial Electronics, 2002. ISIE 2002.<br />Siddique, Junaid I., Barner, Kenneth E., 2002. “Nonlinear Image Decomposition for Multi-resolution Edge Detection Using Gray-level Edge Maps,” Optical Engineering Volume 41, November  <br />5.0Marketing Analysis and Marketing Strategy<br />The AVD&FDS has the potential for commercial and home use. Fluid dispensing systems, i.e. fountain drinks, are a popular feature among many restaurants and concession stands. Our product could expand these featured services into a new dimension for these businesses without the extra expense of an employee to monitor the system. What this means is that the drink dispensing system could be deployed at a separate location, apart from the actual restaurant or concession stand, and still make money because of the automation that will be embedded in the product. The long lines formed at crowded events, such as collegiate or professional athletic events, could be a thing of the past when the machines disperse the lines amongst themselves. Several other areas that may not contain the restaurant but contain this product could include food courts, airports, shopping centers, etc. Creating a product that has the ability to shrink lines and attract more consumers for the business is the goal of this system. In the home, this product could be a feature of the refrigerator. Common household drinks could be attached inside and the dispenser could be on the outside of the refrigerator. Stand alone water kiosks could house the system and use reverse osmosis water to offer customers purified drinking water while on the go. This system could be implemented at parks, businesses, or anywhere with a lot of foot traffic and people that would like to refill their own personal bottle and be charged only for the water. In our marketing strategy, we will focus on education and accessibility. Water dispensing is not a new concept to customers; however, our kiosks will essentially be a new way to obtain the water. With the growing increase in environmental awareness, we want this to be our first marketing avenue. By having our machine in readily available locations, it will increase the amount of traffic that the machine gets; this is a benefit, both to us and to the respectable businesses. <br />6.0Engineering Design Constraints<br />The design constraints applicable to the design are listed below in their respected category. The global constraints are limitations that affect the product in a global market as opposed to the local constraints that are focused on a local market.<br />6.1Global Design Constraints<br />Engineering Codes and Standards - Our design abides within the codes and standards designated by each supplier of the engineering equipment. The system will enhance the quality of purchasing beverages by consumers while being responsible and safe.<br />Economic Factors – This standard does affect our project because of its commercial benefits. The product will have to be affordable with a low economic risk.<br />Environmental Effects – Large scale manufacturing of this product could lead to proper disposal of waste electronics and the recycling of plastics and spare metals. This would affect our product given the right production scale.<br />Sustainability – Our product has the ability to have a initial large volume sales with sustained sales via software and hardware improvements.<br />Manufacturability – This manufacturing of this product will depend on the potential sales volume. Electronics can be outsourced while assembly of the product can be done nationally.<br />Ethical Consideration – Proper disposal or recycling of spare or excess materials is our main ethical consideration.<br />Health and Safety Issues – Sanitation of our product will have to be monitored because of the flexibility of customers bringing their own drinking glass.<br />Social Ramifications – The purpose of this product is to enhance the well-being of society through a greater flexibility of service.<br />Political Factors – This constraint is the least applicable to our design because it is a consumer based product that will have little to no impact on legislative decisions.<br />Legal Issues – Health and safety regulations along with electronic security will be the main risks of using this product because of the public used dispenser and stored accounts.<br />6.2Local Design Constraints<br />Cost – The custom hardware, software, and precise instruments used could pose cost constraints.<br />Schedule – The product schedule is open due to the lack of similar product development.<br />Manufacturability – Converting a prototype into a precise, large-scale manufactured product is the main concern.<br />Engineering Codes and Standards – Precise instrumentation and aesthetics of our system is a high standard within production.<br />Ethical Considerations – Our company is small enough that this particular constraint does not seem to hinder our design.<br />Health and Safety Issue – General safety issues involved in the making of the product will apply in the factory, i.e., steel toed shoes, safety goggles, emergency protocols, etc.<br />Legal – Health and safety issues of the employees will have an impact on the contract structure and insurance that the company will offer along with specific procedures to manufacture the product.<br />7.0User Requirements<br />The design has a list of requirements to ensure the device is operable by a first time user while being fail-safe and sanitary.  The list of requirements for the product is shown below. The device also must ensure marketability and capable of upgrades to properly adhere to a changing market. After the user requirements, there is a list of system requirements and interfacing requirements for the technical hardware limitations.<br />7.1User Requirements<br />1.) System must be hands free during fluid dispensing.<br />2.) Device must calculate cost of dispensed fluid.<br />3.) User must be able to use any sized cup.<br />4.) User must be able to select what type of cup to use (i.e. glass, plastic, mug, etc.)<br />5.) Device must be simple to use and easy enough for a child.<br />6.) Device must have an emergency shut down switch obvious to user.<br />7.) Device must have obvious ready/standby warnings for user.<br />8.) Device must have means of logging expenses per user.<br />9.) Device must be sanitary and protected from elements.<br />7.2System Requirements<br />1.) System must be fully automatic.<br />2.) System must have dispensable pressure system.<br />3.) System must accurately detect the edges of a any sized cup.<br />4.) System must be able to accurately calculate the volume of any sized cup.<br />5.) A 12VDC solenoid valve will be used to dispense the fluid.<br />6.) Proper calculation and interface hardware must be used with PC.<br />7.) Device must have buffering volume due to predetermined cup thickness based on type.<br />8.) Device must be conveniently fast, with calculation and fill time under 30 seconds.<br />9.) Device must find volume within 90%, not to exceed 99% fillable volume.<br />10.) Any USB camera will be applicable for imaging.<br />11.) Proper ambient and back-lighting is necessary for imaging.<br />12.) A digital output of 5V is required to toggle powersupply to valve control.<br />13.) Physical housing must be robust to ensure consistant results.<br />14.) Device must have internet connection to be used with data logging system.<br />7.3Interface Requirements<br />1.) The system will interface via USB.<br />2.) System must be able to plug into standard 120V/60Hz outlet.<br />3.) Must be able to capture image from USB camera.<br />4.) Must be able to output digital 5V.<br />5.) Timing must be synchronous with dispensing system.<br />6.) Constant background image must be loaded before cup image taken.<br />7.) User interface must project all applicable data with live updating to ensure quality to user.<br />8.0Engineering Codes and Standards<br />The device has been constructed to operate safely within any engineering codes and standards.  The pertinent standards applicable to the AVD&FDS design are due to the collaboration of hardware devices used in the final prototype.<br />DAQ Device – NI USB-6009<br />Standards –<br />• IEC 61010-1, EN 61010-1<br />• UL 61010-1, CSA 61010-1<br />Further standards of safety information for this device may be found at ni.com/certification<br />Image Capture – Agama V2025 Webcam<br />Standards – <br />• Proper waste standards applicable per country<br />Contact local waste management authorities for more information on proper disposal.<br />Valve – Some cheap valve<br />Standards –<br /> • Proper safe electrical connections and housing for public use maintained. <br />PC – Software and Hardware<br />Standards –<br />• All traditional standards applicable with the use of a personal computer, licensed software, and the credentials of external coding help have been acknowledged and sternly implemented.<br />9.0Design Concepts<br />AVD & FDS does exactly what it says, detects volume and dispenses fluid automatically. This concept could have been implemented two other ways that deviate from the design chosen and described in this report. Below is a Pugh matrix that shows the other concepts considered before prototyping of the product began.<br />Figure 9. SEQ Figure  ARABIC  1 1: Pugh matrix displayin alternative designs<br />Figure 9. SEQ Figure  ARABIC  1 2: Description of alternative concepts<br />The final design chosen was the original design idea, concept 1 with a timer based off of calculated volume, even though it did not score the highest in the Pugh matrix. The reason this concept was chosen was because of the integrity and originality of the idea. The other two concepts were still somewhat original, but other similar devices are on the market and the engineering behind the ideas did not meet the novelty and originality initially conceived. The final prototype will include volume detection, hands free fluid dispensing, but there will be no barcode system. Further design ideas do include a barcode system and a way to receive cash to pay for the dispensed drink also.<br />10.0High Level Block Diagram<br />Below is the functional block diagram of AVD & FDS. There are not a lot of external checks that the system must go through in order to function properly. The majority of system checks is done internally via software.<br />Figure 12. SEQ Figure  ARABIC  1 1: Functional Block Diagram<br />10.1Volume Detection<br />Figure 12. SEQ Figure  ARABIC  1 2: Volume Detection<br />This porttion of the block diagram is the part of the product responsible for accurately calculating the volume of any random cup. The webcam is in a static position continuously recording an image and the user sends a command to store an image. Once the user makes this input, the PC uses MATLAB to run through the algorithm of computing the volume.<br />10.2Fluid Dispensing<br />Figure 12. SEQ Figure  ARABIC  1 3: Fluid Dispensing portion of block diagram<br />The fluid dispensing portion of the product is shown in this block diagram. Once the volume detection portion of the product has finished its calculation, the program calculates how long to turn on the valve based off a flow rate. As long as the output from the PC is high, the circuitry will allow the valve to be turned on. The ESD (Emergency Shut Down) is a precautionary measure taken just in case the output from the PC does not turn off or if the calculated volume is more than the cup will hold.<br />11.0Major Components<br />The AVD & FDS has three major stages: image capture, volume detection, and fluid dispensing. Each of these include different pieces of hardware that must all be compatible with one another.<br />11.1Image Acquisition<br />The first stage of the process starts with capturing an up to date image of the background. After this is done, the image is saved and used for the image subtraction after the next image is captured containing the cup. The image acquisition is done by using a Agama HD webcam that is plugged directly into the PC via USB connection and MATLAB. The webcam must be kept in a rigid, static position as shown in the figure for consistency in image acquisition so as not to affect the code and pixel:inch ratio.<br />Figure 11. SEQ Figure  ARABIC  1 1: Webcam used for image acquisition<br />11.2PC/Volume Calculation<br />The next major component of the product is the PC, which performs the volume calculation. The PC will be responsible for calculating the volume and outputting the correct time for the valve to stay open via the USB DAQ device. <br />Figure 11. SEQ Figure  ARABIC  1 2: PC used for volume calculation and hardware interface<br />11.3DAQ Device<br />The device that outputs the logic high that signals the valve to turn on is the NI USB-6009 DAQ device. This device can be used for analog/digital inputs as well as analog/digital outputs. Our use for this device entails using a digital output for the calculated time that the valve is to be turned on.<br />Figure 11. SEQ Figure  ARABIC  1 3: DAQ device used for outputting signal to the valve<br />11.4Valve and Circuitry<br />Figure 11. SEQ Figure  ARABIC  1 4: Schematic of circuitry controlling valve36461705557520The last phase of the entire process is the dispensing portion of the system. The circuitry and valve of the system ensure that the signal from the DAQ device allows the fluid to flow for the correct amount of time. A 2N3904 transistor was used to receive the initial 5V signal from the DAQ the output of the BJT was sent to the gate of an IR510 MOSFET. Both transistors are powered from a 12V power supply. The MOSFET was chosen because of the high current rating its specifications say it will allow. The BJT was needed to condition the 5V signal and change the current load to Ic rather than Ib and protect the current load needed from the DAQ. <br />12.0Detailed Design<br />A detailed design and description of each process the design goes through in order to achieve its desired function will be mentioned in the section.<br />4987290158496025184101584960143510384810Figure 12. SEQ Figure  ARABIC  1 1: Fill holes commandFigure 12. SEQ Figure  ARABIC  1 2: Image subtraction12.1Edge Detection<br />Figure 12. SEQ Figure  ARABIC  1 3: Image amplificationNormal edge detection functions built into MATLAB could not be used in this product because of the inconsistency in cup colors and shapes. Instead, image subtraction was used in order to decipher exactly what was placed in view of the camera. An initial image is taken with no cup in the picture. This picture serves as the base picture that the image with the cup will be subtracted from. The result is something similar to that of a “negative” image. Figure 14.1.1 shows an example of this. This picture is then amplified by raising the absolute value of all pixels to a fractional exponent. This amplifies all values to enhance the brightness of any pixels.  The next part of this process is to fill in any dark spots that are completely surrounded by white pixels.  The next figure shows this step. Notice how the “E” and “P” are filled in with white pixels. This step makes the conversion to a binary image much easier for the software to decide what needs to be turned black and what needs to be turned white.  After the image is turned into a binary image, the software iterates through 10 rows and performs a ConvexHull. This takes all white pixels in a region and connects all of them and fills in any black holes. This gives a completely filled in image of white pixels representing the outline of the given cup. A bwmorph function called ‘remove’ was used to isolate the outer edge of the cup for further analysis. Below is a figure of this process. The cup is turned on its side so that the integration, further along in the code, can interpret the top edge of the cup as a linear function.<br />Figure 12. SEQ Figure  ARABIC  1 4: Isolated edge used to calculate volume<br />12.2Volume Calculation<br />The top edge of the cup is used to calculate the volume. This is done by taking an average of the values of the rows and then a negated subtraction of each row from this value in order to keep the cup with the same edge orientation. This puts the cup on a plane much more similar to a xy plane that has negative values. With the proper pixel to inch ratio conversion, the cup goes through further processing to cut off the top and bottom of the cup. This step is done by looking for columns with only two white pixels in it. This determines where the top and bottom start. The new line is plotted in real world dimensions (inches) and used to calculate the volume via the disk integration method. Below is a figure containing the different plots relating to the steps described in this section. <br />Figure 12. SEQ Figure  ARABIC  1 5: Cup plotted in real world units<br />The last plot on the bottom of the figure 14.2.1 is the information used to calculate the volume, which is the top line of the cup tilted on its side in figure 14.1.4. This information produces a virtual 3D cup that is shown in the figure below.<br />Figure 12. SEQ Figure  ARABIC  1 6: 3D model of the cup<br />12.4Valve Dispensing<br />41948106370320A solution was needed to be able to control the valve with the software package, but since the output signal from the DAQ card was not sufficient to power the valve, we needed some extra hardware to provide the power to the valve on command.   A transistor network was developed to accept the 5V, 1.4mA logic high signal input into a BJT, which in turn will switch a MOS transistor to power on the valve. The valve will be turned on as long as the signal from the DAQ, calculated from oz/sec flow rate, is on.<br />12.5Product Hardware<br />Figure 12. SEQ Figure  ARABIC  1 7: Protoboard of valve circuitryThe product contains a small list of needs in order to function properly and efficiently. The first of these needs is a camera to acquire the image of the cup, which is an Agama V2025 Webcam (any camera with an option of 800x600 resolution will work). Second, a constant, white background with extra lighting is needed to ensure a contrast between the cup and background that the camera will see regardless if the cup is clear or not. This is accomplished via a 5k cathode backlight as a first option or a combination of a coiled up LED rope light and two separate lamp lights for this project. The dispensing portion of the product requires a water reservoir or water line with constant pressure so as the code and valve circuitry can dispense the correct amount of fluid.<br />13.0Major Problems<br />The AVD&FDS encountered a few unforeseen problems that warranted immediate attention before progressing further and inexplicably altered the final design.  Though these problems were not the most difficult or time consuming parts of the design process, they were unplanned issues that affected the future of the prototype and required creative solutions.<br />13.1Lighting<br />One large issue that surfaced during the design process numerous times was lighting environment around the camera and prototype assembly.  Because the AVD&FDS uses a set of two pictures, one with a cup and a constant without, any lighting changes between the two pictures would provide a difference and transmute to noise in the image to be processed.  Controlling the ambient and back light would prove to be a necessity.  Direct ambient light provides too much concentration of light in the imaging area.  The large glares and shadows produced from the direct light altered the way the camera detected the edges of the cup.  More importantly, the cup needed to rest on a stand that would reflect the right amount of light so that the cup bottom edge would be defined, no shadow would appear on the stand, and a reflection would not appear.  Finally, the background behind the cup had to illuminate sufficiently to create a contrast from the cup.  Originally, the problem was easily solved by using a cold-cathode tube lighting board.  This fluorescent board was very bright with illumination constant over the entire surface area.  Most importantly, the device was not alternating current.  When videoed or imaged, AC current lighting sources create a shuttering effect depending on the rate (usually around 60Hz).  This is much like recording a video of a computer monitor.  Limited by a production-weary budget, using the expensive lighting board as a background light was ruled out and alternatives were sought.  <br />The solution was to build a completely custom cup housing and lighting assembly.  Ambient light control depends on the setting of the prototype device, though future plans include a completely enclosed housing.  Direct ambient light has since been filtered using high thread count linens of no color.  This will refract the light enough without dropping the intensity too much.  The cup base went through a large series of changes, a new model being issued with each lighting, camera, or code change.  Black foam, polished metal, reflective tape, white cardboard, white plastic, white linen, wood, and other materials found their way under the cup.  Currently, the optimal physical setting has been a cube shaped transparent plastic box which rests on an out-of-view piece of wood.  This has provided a definite edge at the bottom of the cup, no shadow or glare with the current light settings, and no reflection evident enough for the camera.  Lastly, and most importantly, the custom backlight has been realized and implemented in a prototype environment.  The very rear or the backlight housing is a large piece of cardboard covered with reflective tape.  An LED rope, purchased from Wal-mart, was attached on the reflective cardboard in a tight spiral pattern.  In front of the LED rope is a transparent textured plastic surface, used to refract the direct light emitting from individual LEDs into many tiny light sources.  A translucent plastic surface is next to filter the light even more, followed by a couple sheets of high thread count linens to create a consistent glow over the entire surface.  This has been an adequate design that can be cheaply reproduced.<br />13.2Dispensing<br />Another major problem encountered was the fluid dispensing system.  The original means of dispensing was based on a mechanical engineering team’s final design of a pressurized keg tap.  This was optimal as it would provide pressure, constant flow over the course of the keg, and a valve built in.  Their first prototype used a motor, which coincidently worked off a 5volt input.  At this point, we had a 5volt output with minimal current, so the first task was to create a relay system in order to boost current output.  Suddenly the mechanical engineering project motor was switched to a servo that ran on a open/close system of +4 volts to -4volts.  At first, using an inverter with a switch or an H-bridge circuit was initialized, but the AVD&FDS engineers abandoned the idea due to safety and controllability issues when using the servo.  <br />The design now needed a valve and dispensing system.  A few types of valves were purchased, with the main stipulation being the minimum fluid pressure and current requirements.  Numerous prototype ideas for a dispenser and fluid reservoir were debated upon, but most were either far too expensive or outside the means of the teams expertise.  Also, a custom built gravity based system with a lookup table of flow rate introduced into the code to compensate for the change based on volume of liquid in reservoir was realized that led to the conclusive design.  For such a prototype, the gravity based reservoir is constructed from a large plastic 5 gallon reservoir with a valve attachment at the bottom.  The top of the bottle was removed both to prevent a vacuum and easy means of refilling.  To keep a constant flow rate, the prototype will have a designated water level, and after each cup fill during a presentation, the used water will be immediately poured back into the reservoir.  Future plans of a failsafe or pressurized system are still producible.<br />14.0Integration and Implementation<br />The integration of the product is divided into three parts, image acquisition and volume calculation, Labview transfer, and valve implementation.<br />14.1Image Acquisition and Volume Calculation<br />The image acquisition and volume calculation is all done in the MATLAB code. This is the novelty and originality of the product. Once the code was functioning properly, it had to be transferred to Labview so that the DAQ device could be used. This was accomplished relatively easy with a few minor changes in the wording of some of the code. <br />Figure 12. SEQ Figure  ARABIC  1 1: Placed cup that will get volume calculated<br />14.2Labview Transfer<br />The Labview transfer did not take a long time. It was completed in a small amount of time with complete sub VI’s for volume calculation (MATLAB script) and DAQ output timing. Below is a screenshot of the main routine in Labview that the product will use to run.<br />Figure 14. SEQ Figure  ARABIC  1 2: Main routine in Labview used to run the product<br />As shown, the volume calculation is ensured to happen first and send its output to the DAQ output timing subVI.<br />14.3Valve Integration<br />The valve was completed relatively easily. The only setback to this part of the design was the wait on parts to arrive. During the testing of the valve switching hardware, the circuit inexplicably began responding to the open/close signal in an inverse manner.  Tests to find the source of the problem included swapping both transistors with spare parts, changing power supplies, changing the location of the valve and changing resistor values.  After extensive testing, the odd behavior could not be reversed or explained.  We fixed the problem by inverting the signal from the DAQ in the Labview code. <br />Figure 14. SEQ Figure  ARABIC  1 3: 12V DC valve with proper plumbing into water reservoir<br />14.4Water Reservoir<br />Constructing a reservoir to hold the water that was to be dispensed turned out to be easier than initially anticipated. This was done by simply cutting the top off of the top and implementing the valve at the bottom of the jug. Constructing the stand that will hold the reservoir, which was made from a 5 gallon water jug, above the cup required the most construction. The goal of this stand was to successfully house the reservoir directly above the cup’s location so as to eliminate any tubing to direct the flow of the fluid. The reservoir also had to have the valve properly installed to hold the water and release on command. Once this was accomplished, testing was done to acquire the approximate flow rate with the reservoir completely full to ensure the maximum amount of pressure was flowing out of the valve. The process and results were recorded and a flow rate was determined. Figure 14.4 shows results from this test. As shown<br />Figure 14. SEQ Figure  ARABIC  1 4: Test results for determining flow rate<br />the average flow rate is around 1.63 oz/sec with some margin for error. This flow rate was implemented into the final design and used for the prototype.<br />14.5Integration<br />Once the flow rate was determined and all of the housing was built, the final prototype was tested for the first time on April 13, 2010. The code had to have minor changes to it to compensate for a new PC but the device worked immediately without any further complications. The testing and demonstration of the prototype occurred all in one day because of the accurate results that were obtained from the preliminary tests. <br />Figure 14. SEQ Figure  ARABIC  1 5: Successful prototype dispensing water<br />15.0Comments and Conclusions<br />This project provided the team with unparalleled experience in project development and documentation. Planning a project with a budget and having milestones that must be reached by specific deadlines really helped the group gain insight into the professional world. As a whole, the team functioned well together and made sure the most important tasks took priority over tasks that could be done in a timely manner or were not imperative to the functional product. Extensive testing with random cups found from customers has shown the product does work with cups never tested before and can handle its proposed functionality. Further refinement of the current code could yield a more consistent volume detection and even a more precise measurement with a more controlled environment. Adding an additional camera to detect edge thickness automatically is also a route the group has discussed for further enhancing this product. Special thanks go to the Robotics and Intelligent Machines (RIM) Laboratory and member Thomas Whitney for letting us use his research equipment and providing information that was instrumental to the completion of the product.<br />16.0Team Members<br />16.1Brendan Baker<br />Brendan Baker’s assignments and contributions to the project included the image processing and volume detection of the cups with the guidance from an expert in machine vision, Thomas Whitney, as well as the construction of the housing and backlight panel for the lighting environment. Brendan was also heavily involved with team member Frederick Weissbach in the Labview programming and GUI. He also helped design how the water was to be housed and dispensed. These responsibilities enabled him to gain a much better understanding of the image processing toolbox in MATLAB and the knowledge of what an ideal lighting environment entails.  His achievements include successfully detecting the volume of a random cup to within 3% consistently, making a back panel that diffuses the light correctly, and constructing the prototype water dispensing system. In the group, Brendan was also the group journal record keeper, oversaw the budget, and kept track of the progress of each task on the gant chart. <br />16.2Frederick Weissbach<br />Frederick Weissbach applied his advanced skills in LabVIEW and MATLAB as well as his ability to creatively solve problems to work with his teammates and complete the AVD&FDS.  With class experience with coding in both C language and MATLAB, and including research experience in the Robotics and Intelligent Machines lab using LabVIEW, Frederick could apply himself to multiple areas of design process.  He worked closely with the other team members and graduate student Thomas Whitney on developing the MATLAB code for edge detection and volume calculation.  Notably, he also contributed to the final LabVIEW setup and GUI, and hardware design and prototyping.  Frederick used his basic skills of HTML to develop a website for the team and also developed the team poster.<br />16.3Sean Tovar<br />Sean Tovar worked in developing the valve circuitry and aided in other hardware developments.  He handled the ordering of parts, built and tested the valve circuitry, and also worked in implementing the circuitry into the overall design. Sean also contributed in the weekly status reports as well as handling all software logistical problems for the EE Sr. Design Lab.<br />17.0References<br />Gonzalez, Rafael C., Richard E. Woods, and Steven L. Eddins. Digital Image Processing Using MATLAB. Upper Saddle River, N.J.: Pearson Prentice Hall, 2004. Print.<br />Dr. Brent Nowak – RIM Lab Director<br />Dr. Lars Hansen – Electrical Engineering Sr. Lecturer<br />Mr. Thomas Whitney – RIM Lab Engineer<br />
Automating Public Beverage Service
Automating Public Beverage Service
Automating Public Beverage Service
Automating Public Beverage Service
Automating Public Beverage Service
Automating Public Beverage Service
Automating Public Beverage Service
Automating Public Beverage Service
Automating Public Beverage Service
Automating Public Beverage Service
Automating Public Beverage Service
Automating Public Beverage Service
Automating Public Beverage Service
Automating Public Beverage Service
Automating Public Beverage Service
Automating Public Beverage Service
Automating Public Beverage Service
Automating Public Beverage Service
Automating Public Beverage Service
Automating Public Beverage Service
Automating Public Beverage Service
Automating Public Beverage Service
Automating Public Beverage Service
Automating Public Beverage Service
Automating Public Beverage Service
Automating Public Beverage Service
Automating Public Beverage Service
Automating Public Beverage Service
Automating Public Beverage Service
Automating Public Beverage Service

More Related Content

What's hot

Autodesk Fusion 360 presentation
Autodesk Fusion 360 presentationAutodesk Fusion 360 presentation
Autodesk Fusion 360 presentationSharanAllad
 
AutoCAD Presentation 2021 (Internship Project)
AutoCAD Presentation 2021 (Internship Project)AutoCAD Presentation 2021 (Internship Project)
AutoCAD Presentation 2021 (Internship Project)Kumar Gaurav
 
Autocad training report
Autocad training reportAutocad training report
Autocad training reportPawan Kumar
 
Writing and Presenting an Industrial Training Report
Writing and Presenting an Industrial Training ReportWriting and Presenting an Industrial Training Report
Writing and Presenting an Industrial Training ReportBC Chew
 
Design Engineering Report
Design Engineering ReportDesign Engineering Report
Design Engineering ReportChauhan Vishal
 
Problem solving techniques pdf
Problem solving techniques pdfProblem solving techniques pdf
Problem solving techniques pdfRanvijay Akela
 
Internship Presentation 1 Web Developer
Internship Presentation 1 Web DeveloperInternship Presentation 1 Web Developer
Internship Presentation 1 Web DeveloperHemant Sarthak
 
Android technical quiz app
Android technical quiz appAndroid technical quiz app
Android technical quiz appJagdeep Singh
 
Industrial training report
Industrial training reportIndustrial training report
Industrial training reportReshmi R
 
Pick and Place Robotic Arm 1
Pick and Place Robotic Arm 1Pick and Place Robotic Arm 1
Pick and Place Robotic Arm 1Dixit Patel
 
AUTOCAD Report
AUTOCAD ReportAUTOCAD Report
AUTOCAD ReportAMIT RAJ
 
Software training report on AutoCAD and Staad Pro. Civil Engineering
Software training report on AutoCAD and Staad Pro. Civil EngineeringSoftware training report on AutoCAD and Staad Pro. Civil Engineering
Software training report on AutoCAD and Staad Pro. Civil EngineeringJAPJEETSINGH13
 

What's hot (20)

Autodesk Fusion 360 presentation
Autodesk Fusion 360 presentationAutodesk Fusion 360 presentation
Autodesk Fusion 360 presentation
 
AutoCAD Presentation 2021 (Internship Project)
AutoCAD Presentation 2021 (Internship Project)AutoCAD Presentation 2021 (Internship Project)
AutoCAD Presentation 2021 (Internship Project)
 
Autocad training report
Autocad training reportAutocad training report
Autocad training report
 
Writing and Presenting an Industrial Training Report
Writing and Presenting an Industrial Training ReportWriting and Presenting an Industrial Training Report
Writing and Presenting an Industrial Training Report
 
Design Engineering Report
Design Engineering ReportDesign Engineering Report
Design Engineering Report
 
Problem solving techniques pdf
Problem solving techniques pdfProblem solving techniques pdf
Problem solving techniques pdf
 
Internship Presentation 1 Web Developer
Internship Presentation 1 Web DeveloperInternship Presentation 1 Web Developer
Internship Presentation 1 Web Developer
 
BN Venkateshwar Rao-Resume
BN Venkateshwar Rao-ResumeBN Venkateshwar Rao-Resume
BN Venkateshwar Rao-Resume
 
Android technical quiz app
Android technical quiz appAndroid technical quiz app
Android technical quiz app
 
Industrial training report
Industrial training reportIndustrial training report
Industrial training report
 
Pick and Place Robotic Arm 1
Pick and Place Robotic Arm 1Pick and Place Robotic Arm 1
Pick and Place Robotic Arm 1
 
AUTOCAD Report
AUTOCAD ReportAUTOCAD Report
AUTOCAD Report
 
Presentation on robotics
Presentation on robotics Presentation on robotics
Presentation on robotics
 
6 weeks software training report
6 weeks software training report    6 weeks software training report
6 weeks software training report
 
Industrial Training Report-1
Industrial Training Report-1Industrial Training Report-1
Industrial Training Report-1
 
Auto cad ppt
Auto cad pptAuto cad ppt
Auto cad ppt
 
Using New Media
Using New Media Using New Media
Using New Media
 
report
reportreport
report
 
Autocad Presentation
Autocad PresentationAutocad Presentation
Autocad Presentation
 
Software training report on AutoCAD and Staad Pro. Civil Engineering
Software training report on AutoCAD and Staad Pro. Civil EngineeringSoftware training report on AutoCAD and Staad Pro. Civil Engineering
Software training report on AutoCAD and Staad Pro. Civil Engineering
 

Similar to Automating Public Beverage Service

Final report combined
Final report combinedFinal report combined
Final report combinedTeam 02
 
‘ESURVEY HYDRAULICS’ A TOOL FOR DESIGN OF WATER SUPPLY DISTRIBUTION NETWORK
‘ESURVEY HYDRAULICS’ A TOOL FOR DESIGN OF WATER SUPPLY DISTRIBUTION NETWORK‘ESURVEY HYDRAULICS’ A TOOL FOR DESIGN OF WATER SUPPLY DISTRIBUTION NETWORK
‘ESURVEY HYDRAULICS’ A TOOL FOR DESIGN OF WATER SUPPLY DISTRIBUTION NETWORKIRJET Journal
 
Fluid flow product-overview
Fluid flow product-overviewFluid flow product-overview
Fluid flow product-overviewMarino Valjak
 
Basic Datalogger Water Level Measurement
Basic Datalogger Water Level MeasurementBasic Datalogger Water Level Measurement
Basic Datalogger Water Level MeasurementHydroG Resources
 
Firmware Functional Tester for Household Washing Machine Controller using Lab...
Firmware Functional Tester for Household Washing Machine Controller using Lab...Firmware Functional Tester for Household Washing Machine Controller using Lab...
Firmware Functional Tester for Household Washing Machine Controller using Lab...IRJET Journal
 
DISCUSSION ON DIGITAL OILFIELD FULL-FIELD OPTIMIZATION
DISCUSSION ON DIGITAL OILFIELD FULL-FIELD OPTIMIZATIONDISCUSSION ON DIGITAL OILFIELD FULL-FIELD OPTIMIZATION
DISCUSSION ON DIGITAL OILFIELD FULL-FIELD OPTIMIZATIONwle-ss
 
SE4011 (D Herron)
SE4011 (D Herron)SE4011 (D Herron)
SE4011 (D Herron)Dan Herron
 
iaetsd A novel approach towards automatic water conservation system
iaetsd A novel approach towards automatic water conservation systemiaetsd A novel approach towards automatic water conservation system
iaetsd A novel approach towards automatic water conservation systemIaetsd Iaetsd
 
Analysis and Reduction of Production Waste in the Process of Production of Fr...
Analysis and Reduction of Production Waste in the Process of Production of Fr...Analysis and Reduction of Production Waste in the Process of Production of Fr...
Analysis and Reduction of Production Waste in the Process of Production of Fr...IRJET Journal
 
Valve and Actuator Catalog EMEA - Catalog Ecostruxure Building Solution
Valve and Actuator Catalog EMEA - Catalog Ecostruxure Building SolutionValve and Actuator Catalog EMEA - Catalog Ecostruxure Building Solution
Valve and Actuator Catalog EMEA - Catalog Ecostruxure Building SolutionBassam Gomaa
 
Report IDP material analysis
Report IDP   material analysisReport IDP   material analysis
Report IDP material analysisSuhaimi Alhakimi
 
Water Supply Measurement and Management System Based on IoT with Water Leakag...
Water Supply Measurement and Management System Based on IoT with Water Leakag...Water Supply Measurement and Management System Based on IoT with Water Leakag...
Water Supply Measurement and Management System Based on IoT with Water Leakag...IRJET Journal
 
Implementation of Customised SCADA for Cartoner Packaging machine for Cost Ef...
Implementation of Customised SCADA for Cartoner Packaging machine for Cost Ef...Implementation of Customised SCADA for Cartoner Packaging machine for Cost Ef...
Implementation of Customised SCADA for Cartoner Packaging machine for Cost Ef...IRJET Journal
 
DESIGN AND ASSEMBLY OF COMPACT PCB FOR HOME AUTOMATION
DESIGN AND ASSEMBLY OF COMPACT PCB FOR HOME AUTOMATIONDESIGN AND ASSEMBLY OF COMPACT PCB FOR HOME AUTOMATION
DESIGN AND ASSEMBLY OF COMPACT PCB FOR HOME AUTOMATIONIRJET Journal
 
Atos Worldline Project I Rui Zhu Telerex
Atos Worldline Project I Rui Zhu TelerexAtos Worldline Project I Rui Zhu Telerex
Atos Worldline Project I Rui Zhu TelerexRui Zhu
 
IRJET- Water Level Monitoring System
IRJET- Water Level Monitoring SystemIRJET- Water Level Monitoring System
IRJET- Water Level Monitoring SystemIRJET Journal
 
Design and Simulation of a Water Supply System for Eramala Panchayat
Design and Simulation of a Water Supply System for Eramala PanchayatDesign and Simulation of a Water Supply System for Eramala Panchayat
Design and Simulation of a Water Supply System for Eramala PanchayatIRJET Journal
 

Similar to Automating Public Beverage Service (20)

Final report combined
Final report combinedFinal report combined
Final report combined
 
‘ESURVEY HYDRAULICS’ A TOOL FOR DESIGN OF WATER SUPPLY DISTRIBUTION NETWORK
‘ESURVEY HYDRAULICS’ A TOOL FOR DESIGN OF WATER SUPPLY DISTRIBUTION NETWORK‘ESURVEY HYDRAULICS’ A TOOL FOR DESIGN OF WATER SUPPLY DISTRIBUTION NETWORK
‘ESURVEY HYDRAULICS’ A TOOL FOR DESIGN OF WATER SUPPLY DISTRIBUTION NETWORK
 
Fluid flow product-overview
Fluid flow product-overviewFluid flow product-overview
Fluid flow product-overview
 
Basic Datalogger Water Level Measurement
Basic Datalogger Water Level MeasurementBasic Datalogger Water Level Measurement
Basic Datalogger Water Level Measurement
 
Firmware Functional Tester for Household Washing Machine Controller using Lab...
Firmware Functional Tester for Household Washing Machine Controller using Lab...Firmware Functional Tester for Household Washing Machine Controller using Lab...
Firmware Functional Tester for Household Washing Machine Controller using Lab...
 
DISCUSSION ON DIGITAL OILFIELD FULL-FIELD OPTIMIZATION
DISCUSSION ON DIGITAL OILFIELD FULL-FIELD OPTIMIZATIONDISCUSSION ON DIGITAL OILFIELD FULL-FIELD OPTIMIZATION
DISCUSSION ON DIGITAL OILFIELD FULL-FIELD OPTIMIZATION
 
Scada Analysis1.2
Scada Analysis1.2Scada Analysis1.2
Scada Analysis1.2
 
SE4011 (D Herron)
SE4011 (D Herron)SE4011 (D Herron)
SE4011 (D Herron)
 
iaetsd A novel approach towards automatic water conservation system
iaetsd A novel approach towards automatic water conservation systemiaetsd A novel approach towards automatic water conservation system
iaetsd A novel approach towards automatic water conservation system
 
Analysis and Reduction of Production Waste in the Process of Production of Fr...
Analysis and Reduction of Production Waste in the Process of Production of Fr...Analysis and Reduction of Production Waste in the Process of Production of Fr...
Analysis and Reduction of Production Waste in the Process of Production of Fr...
 
TouchED
TouchEDTouchED
TouchED
 
Valve and Actuator Catalog EMEA - Catalog Ecostruxure Building Solution
Valve and Actuator Catalog EMEA - Catalog Ecostruxure Building SolutionValve and Actuator Catalog EMEA - Catalog Ecostruxure Building Solution
Valve and Actuator Catalog EMEA - Catalog Ecostruxure Building Solution
 
Report IDP material analysis
Report IDP   material analysisReport IDP   material analysis
Report IDP material analysis
 
WIPAC Monthly - April 2018
WIPAC Monthly - April 2018WIPAC Monthly - April 2018
WIPAC Monthly - April 2018
 
Water Supply Measurement and Management System Based on IoT with Water Leakag...
Water Supply Measurement and Management System Based on IoT with Water Leakag...Water Supply Measurement and Management System Based on IoT with Water Leakag...
Water Supply Measurement and Management System Based on IoT with Water Leakag...
 
Implementation of Customised SCADA for Cartoner Packaging machine for Cost Ef...
Implementation of Customised SCADA for Cartoner Packaging machine for Cost Ef...Implementation of Customised SCADA for Cartoner Packaging machine for Cost Ef...
Implementation of Customised SCADA for Cartoner Packaging machine for Cost Ef...
 
DESIGN AND ASSEMBLY OF COMPACT PCB FOR HOME AUTOMATION
DESIGN AND ASSEMBLY OF COMPACT PCB FOR HOME AUTOMATIONDESIGN AND ASSEMBLY OF COMPACT PCB FOR HOME AUTOMATION
DESIGN AND ASSEMBLY OF COMPACT PCB FOR HOME AUTOMATION
 
Atos Worldline Project I Rui Zhu Telerex
Atos Worldline Project I Rui Zhu TelerexAtos Worldline Project I Rui Zhu Telerex
Atos Worldline Project I Rui Zhu Telerex
 
IRJET- Water Level Monitoring System
IRJET- Water Level Monitoring SystemIRJET- Water Level Monitoring System
IRJET- Water Level Monitoring System
 
Design and Simulation of a Water Supply System for Eramala Panchayat
Design and Simulation of a Water Supply System for Eramala PanchayatDesign and Simulation of a Water Supply System for Eramala Panchayat
Design and Simulation of a Water Supply System for Eramala Panchayat
 

More from Team 02

Status report8
Status report8Status report8
Status report8Team 02
 
Status report7
Status report7Status report7
Status report7Team 02
 
Status report6
Status report6Status report6
Status report6Team 02
 
AVD & FDS Proposal
AVD & FDS ProposalAVD & FDS Proposal
AVD & FDS ProposalTeam 02
 
Status Report5
Status Report5Status Report5
Status Report5Team 02
 
Status Report3
Status Report3Status Report3
Status Report3Team 02
 
Status Report2
Status Report2Status Report2
Status Report2Team 02
 
Status Report1
Status Report1Status Report1
Status Report1Team 02
 
Status Report4
Status Report4Status Report4
Status Report4Team 02
 

More from Team 02 (9)

Status report8
Status report8Status report8
Status report8
 
Status report7
Status report7Status report7
Status report7
 
Status report6
Status report6Status report6
Status report6
 
AVD & FDS Proposal
AVD & FDS ProposalAVD & FDS Proposal
AVD & FDS Proposal
 
Status Report5
Status Report5Status Report5
Status Report5
 
Status Report3
Status Report3Status Report3
Status Report3
 
Status Report2
Status Report2Status Report2
Status Report2
 
Status Report1
Status Report1Status Report1
Status Report1
 
Status Report4
Status Report4Status Report4
Status Report4
 

Automating Public Beverage Service

  • 1. university of texas at san antonioFinal ReportAutomated Volume Detection & Fluid Dispensing SystemSubmitted By:Team #2Brendan BakerFrederick WeissbachSean TovarSubmitted To:With public beverage service in mind, the engineers from Team 2 have designed a device aimed at automating the industry.Prof. August AlloUniversity of Texas at San Antonio1 UTSA Circle DriveSan Antonio, TX 782493 May, 2010<br />Table of Contents TOC quot; 1-3quot; Table of Contents PAGEREF _Toc260386107 2Table of Figures PAGEREF _Toc260386108 41.0Executive Summary PAGEREF _Toc260386109 52.0Introduction PAGEREF _Toc260386110 62.1Gant Chart PAGEREF _Toc260386111 73.0Need for Design PAGEREF _Toc260386112 74.0Literature and Patent Search Results PAGEREF _Toc260386113 85.0Marketing Analysis and Marketing Strategy PAGEREF _Toc260386114 86.0Engineering Design Constraints PAGEREF _Toc260386115 96.1Global Design Constraints: PAGEREF _Toc260386116 96.2Local Design Constraints: PAGEREF _Toc260386117 107.0User Requirements PAGEREF _Toc260386118 117.1User Requirements PAGEREF _Toc260386119 117.2System Requirements PAGEREF _Toc260386120 127.3Interface Requirements PAGEREF _Toc260386121 128.0Engineering Codes and Standards PAGEREF _Toc260386122 139.0Design Concepts PAGEREF _Toc260386123 1410.0High Level Block Diagram PAGEREF _Toc260386124 1610.1Volume Detection PAGEREF _Toc260386125 1610.2Fluid Dispensing PAGEREF _Toc260386126 1711.0Major Components PAGEREF _Toc260386127 1711.1Image Acquisition PAGEREF _Toc260386128 1711.2PC/Volume Calculation PAGEREF _Toc260386129 1811.3DAQ Device PAGEREF _Toc260386130 1911.4Valve and Circuitry PAGEREF _Toc260386131 1912.0Detailed Design PAGEREF _Toc260386132 2012.1Edge Detection PAGEREF _Toc260386133 2012.2Volume Calculation PAGEREF _Toc260386134 2112.4Valve Dispensing PAGEREF _Toc260386135 2212.5Product Hardware PAGEREF _Toc260386136 2213.0Major Problems PAGEREF _Toc260386137 2313.1Lighting PAGEREF _Toc260386138 2313.2Dispensing PAGEREF _Toc260386139 2414.0Integration and Implementation PAGEREF _Toc260386140 2514.1Image Acquisition and Volume Calculation PAGEREF _Toc260386141 2514.2Labview Transfer PAGEREF _Toc260386142 2614.3Valve Integration PAGEREF _Toc260386143 2614.4Water Reservoir PAGEREF _Toc260386144 2714.5Integration PAGEREF _Toc260386145 2815.0Comments and Conclusions PAGEREF _Toc260386146 2816.0Team Members PAGEREF _Toc260386147 2916.1Brendan Baker PAGEREF _Toc260386148 2916.2Frederick Weissbach PAGEREF _Toc260386149 2916.3Sean Tovar PAGEREF _Toc260386150 3017.0References PAGEREF _Toc260386151 31<br />Table of Figures<br /> TOC quot; Figurequot; Figure 1.1: AVD & FDS PAGEREF _Toc260384477 5<br />Figure 2.1: Gant Chart showing progress of each task PAGEREF _Toc260384478 7<br />Figure 9.1: Pugh matrix displayin alternative designs PAGEREF _Toc260384479 14<br />Figure 9.2: Description of alternative concepts PAGEREF _Toc260384480 15<br />Figure 12.1: Functional Block Diagram PAGEREF _Toc260384481 16<br />Figure 12.2: Volume Detection PAGEREF _Toc260384482 16<br />Figure 12.3: Fluid Dispensing portion of block diagram PAGEREF _Toc260384483 17<br />Figure 11.1: Webcam used for image acquisition PAGEREF _Toc260384484 18<br />Figure 11.2: PC used for volume calculation and hardware interface PAGEREF _Toc260384485 18<br />Figure 11.3: DAQ device used for outputting signal to the valve PAGEREF _Toc260384486 19<br />Figure 11.4: Schematic of circuitry controlling valve PAGEREF _Toc260384487 19<br />Figure 12.1: Fill holes command PAGEREF _Toc260384488 20<br />Figure 12.2: Image subtraction PAGEREF _Toc260384489 20<br />Figure 12.3: Image amplification PAGEREF _Toc260384490 20<br />Figure 12.4: Isolated edge used to calculate volume PAGEREF _Toc260384491 21<br />Figure 12.5: Cup plotted in real world units PAGEREF _Toc260384492 21<br />Figure 12.6: 3D model of the cup PAGEREF _Toc260384493 22<br />Figure 12.7: Protoboard of valve circuitry PAGEREF _Toc260384494 22<br />Figure 12.1: Placed cup that will get volume calculated PAGEREF _Toc260384495 25<br />Figure 14.2: Main routine in Labview used to run the product PAGEREF _Toc260384496 26<br />Figure 14.3: 12V DC valve with proper plumbing into water reservoir PAGEREF _Toc260384497 27<br />Figure 14.4: Test results for determining flow rate PAGEREF _Toc260384498 27<br />Figure 14.5: Successful prototype dispensing water PAGEREF _Toc260384499 28<br />1.0Executive Summary<br />Figure 1. SEQ Figure ARABIC 1 1: AVD & FDS37490401184910With public beverage service in mind, Team 2, the engineers behind ‘Drinks Unlimited!’ have designed a device aimed at automating the industry. Stemming from the inconvenience of long lines and bad service, and the technology deprived traditional industry standard of human clerks, an idea of using a hands free and adaptable system surfaced. A marketable device would be created to accomplish two main tasks; allow the user to apply any common type of beverage apparatus and automatically fill the device hands free. The design evolved into the AVD&FDS, or Automatic Volume Detection and Fluid Dispensing System. Originally planned, the AVD&FDS would capture an image of the cup, integrate vertical edges and convert to volume, log the data, and then use a constant pressure system provided by a mechanical engineering senior design team to equally dispense the correct volume. Though the prototype idea and goal of operation stayed consistent, machine operation and implementation have changed due to problems and realizations during the prototyping process. Mainly, the method of volume calculation from the image of the drinking apparatus has differed vastly. The process proved to be more difficult, with a majority of efforts being noise removal and proper edge detection for all cup mediums. Code changes were made daily to adjust to each set up of different cameras and housing ideas. The design also went through many phases of lighting environments, as this is an important aspect of finding cup edges. The use of LabView as an interface for the user, data logging, and digital output was also implemented. Finally, using the constant pressure system provided by the mechanical engineering team was altered due to the type of valve used in their design. The valve requires pulses to turn valve on and off, and the FDS warrants a constant signal for an open valve. This will be safer and more fail-proof. Currently, for prototyping, a gravity based water dispenser will be used that will produce a constant flow rate due to constant reservoir level. The data logging system was also removed for the prototype, though pending deadlines, an example system may be incorporated for proof of concept. The final prototype hardware and software contains a PC, loaded with MATLAB and LabView and relevant image processing toolkits, a cheap USB webcam, a data acquisition device for digital output, a backlight assembly with LED lighting, a fluid valve, a gravity based reservoir, and an emergency shut off switch. The final design works efficiently, quickly, and consistently.<br />2.0Introduction<br />Technology has allowed consumer independence in numerous markets and even more distributors. All a consumer has to do to buy a product is simply enter a credit card number and they walk out the door with their new purchase or it arrives in the mail the next day. This process is fast, involves no clerk or miscounted change, is easy, and reliable. This experience is similar to what the AVD&FDS can offer. It detects the volume of a given container and will dispense a beverage of the user’s choice into the container without any input from the user beyond placing the container in the system. This system is completely consumer based and independent of employee/consumer interaction. The prototype developed will allow a consumer to pick a type of drinking cup i.e. glass, plastic/cardboard, coffee mug, and then simply place the cup under the dispenser and press go. The system will take care of the rest. It will correctly charge you for the amount of fluid dispensed and subtract the amount from a user account. This device will give the consumer a full glass of water without ever having to get close to the dispenser, thus making this device much more sanitary than the current standard used today. The design team as a whole has extensive experience in control system development and implementation that will help in their individual contribution to the design. Imagine if people started to carry their own drinking bottles and mugs to work, the gym, airports, etc with no fear of germs and knowing they are being charged exactly for the amount filled into their glass. Plastic bottles and littering could be drastically reduced while keeping the consumption of the same product the same.<br />2.1Gant Chart<br />Figure 2. SEQ Figure ARABIC 1 1: Gant Chart showing progress of each task<br />As the gant chart shows, the design process was split up into sections that directly tied into one another. The first part of the process was to conceptualize the idea and write down a design that was feasible to prototype during the allotted time. Once the design was in place, the rest of the process was devoted to separately working on the individual parts necessary to make this a successful prototype. Ordering parts, hardware, and the GUI came along at different rates than the software development because of the heavy dependence on the software. The innovation is through the code development.<br />3.0Need for Design<br />The need for this design arises from the long lines seen and experienced by every consumer in different situations. Large crowds during the morning rush at coffee shops, waiting in line during halftime of a sporting event, trying to get the attention of a bartender during a crowded night, the list goes on. This device could take the dependence off of the employee and usually understaffed concession stand, and put the responsibility in the consumer’s hands. This would alleviate the lines built up at the counter and disperse them across the available space at separate AVD&FDS locations.<br />4.0Literature and Patent Search Results<br />A Google patent search did not reveal any device that computes volume with the process we have chosen. Some similar products include an automatic bartender that has predetermined amounts of each ingredient programmed. The literature search produced mixed results, while the patent search produced arguably good results, there were none directly related. While this was good for being able to move forward with the design concept, there was little guidance that could be gained from existing patents at the time of research. Some of the more relevant patent searches were the Fluid Volume Sensor – Patent 5303585, 3D ultrasound-based instrument for no invasive measurement of amniotic fluid volume - Patent pending application No. 10701955. <br />Literary articles were somewhat related but either used technologies unavailable to us or did not work properly with exactly what we were doing.<br />Song Wang, Feng Ge, and Tiecheng Liu, “Evaluating Edge Detection through Boundary Detection,” EURASIP Journal on Applied Signal Processing, vol. 2006, Article ID 76278, 15 pages, 2006. doi:10.1155/ASP/2006/76278<br />Adnan Khashman, “Noise-Dependent Optimal Scale in Edge Detection,” IEEE International Symposium on Industrial Electronics, 2002. ISIE 2002.<br />Siddique, Junaid I., Barner, Kenneth E., 2002. “Nonlinear Image Decomposition for Multi-resolution Edge Detection Using Gray-level Edge Maps,” Optical Engineering Volume 41, November <br />5.0Marketing Analysis and Marketing Strategy<br />The AVD&FDS has the potential for commercial and home use. Fluid dispensing systems, i.e. fountain drinks, are a popular feature among many restaurants and concession stands. Our product could expand these featured services into a new dimension for these businesses without the extra expense of an employee to monitor the system. What this means is that the drink dispensing system could be deployed at a separate location, apart from the actual restaurant or concession stand, and still make money because of the automation that will be embedded in the product. The long lines formed at crowded events, such as collegiate or professional athletic events, could be a thing of the past when the machines disperse the lines amongst themselves. Several other areas that may not contain the restaurant but contain this product could include food courts, airports, shopping centers, etc. Creating a product that has the ability to shrink lines and attract more consumers for the business is the goal of this system. In the home, this product could be a feature of the refrigerator. Common household drinks could be attached inside and the dispenser could be on the outside of the refrigerator. Stand alone water kiosks could house the system and use reverse osmosis water to offer customers purified drinking water while on the go. This system could be implemented at parks, businesses, or anywhere with a lot of foot traffic and people that would like to refill their own personal bottle and be charged only for the water. In our marketing strategy, we will focus on education and accessibility. Water dispensing is not a new concept to customers; however, our kiosks will essentially be a new way to obtain the water. With the growing increase in environmental awareness, we want this to be our first marketing avenue. By having our machine in readily available locations, it will increase the amount of traffic that the machine gets; this is a benefit, both to us and to the respectable businesses. <br />6.0Engineering Design Constraints<br />The design constraints applicable to the design are listed below in their respected category. The global constraints are limitations that affect the product in a global market as opposed to the local constraints that are focused on a local market.<br />6.1Global Design Constraints<br />Engineering Codes and Standards - Our design abides within the codes and standards designated by each supplier of the engineering equipment. The system will enhance the quality of purchasing beverages by consumers while being responsible and safe.<br />Economic Factors – This standard does affect our project because of its commercial benefits. The product will have to be affordable with a low economic risk.<br />Environmental Effects – Large scale manufacturing of this product could lead to proper disposal of waste electronics and the recycling of plastics and spare metals. This would affect our product given the right production scale.<br />Sustainability – Our product has the ability to have a initial large volume sales with sustained sales via software and hardware improvements.<br />Manufacturability – This manufacturing of this product will depend on the potential sales volume. Electronics can be outsourced while assembly of the product can be done nationally.<br />Ethical Consideration – Proper disposal or recycling of spare or excess materials is our main ethical consideration.<br />Health and Safety Issues – Sanitation of our product will have to be monitored because of the flexibility of customers bringing their own drinking glass.<br />Social Ramifications – The purpose of this product is to enhance the well-being of society through a greater flexibility of service.<br />Political Factors – This constraint is the least applicable to our design because it is a consumer based product that will have little to no impact on legislative decisions.<br />Legal Issues – Health and safety regulations along with electronic security will be the main risks of using this product because of the public used dispenser and stored accounts.<br />6.2Local Design Constraints<br />Cost – The custom hardware, software, and precise instruments used could pose cost constraints.<br />Schedule – The product schedule is open due to the lack of similar product development.<br />Manufacturability – Converting a prototype into a precise, large-scale manufactured product is the main concern.<br />Engineering Codes and Standards – Precise instrumentation and aesthetics of our system is a high standard within production.<br />Ethical Considerations – Our company is small enough that this particular constraint does not seem to hinder our design.<br />Health and Safety Issue – General safety issues involved in the making of the product will apply in the factory, i.e., steel toed shoes, safety goggles, emergency protocols, etc.<br />Legal – Health and safety issues of the employees will have an impact on the contract structure and insurance that the company will offer along with specific procedures to manufacture the product.<br />7.0User Requirements<br />The design has a list of requirements to ensure the device is operable by a first time user while being fail-safe and sanitary. The list of requirements for the product is shown below. The device also must ensure marketability and capable of upgrades to properly adhere to a changing market. After the user requirements, there is a list of system requirements and interfacing requirements for the technical hardware limitations.<br />7.1User Requirements<br />1.) System must be hands free during fluid dispensing.<br />2.) Device must calculate cost of dispensed fluid.<br />3.) User must be able to use any sized cup.<br />4.) User must be able to select what type of cup to use (i.e. glass, plastic, mug, etc.)<br />5.) Device must be simple to use and easy enough for a child.<br />6.) Device must have an emergency shut down switch obvious to user.<br />7.) Device must have obvious ready/standby warnings for user.<br />8.) Device must have means of logging expenses per user.<br />9.) Device must be sanitary and protected from elements.<br />7.2System Requirements<br />1.) System must be fully automatic.<br />2.) System must have dispensable pressure system.<br />3.) System must accurately detect the edges of a any sized cup.<br />4.) System must be able to accurately calculate the volume of any sized cup.<br />5.) A 12VDC solenoid valve will be used to dispense the fluid.<br />6.) Proper calculation and interface hardware must be used with PC.<br />7.) Device must have buffering volume due to predetermined cup thickness based on type.<br />8.) Device must be conveniently fast, with calculation and fill time under 30 seconds.<br />9.) Device must find volume within 90%, not to exceed 99% fillable volume.<br />10.) Any USB camera will be applicable for imaging.<br />11.) Proper ambient and back-lighting is necessary for imaging.<br />12.) A digital output of 5V is required to toggle powersupply to valve control.<br />13.) Physical housing must be robust to ensure consistant results.<br />14.) Device must have internet connection to be used with data logging system.<br />7.3Interface Requirements<br />1.) The system will interface via USB.<br />2.) System must be able to plug into standard 120V/60Hz outlet.<br />3.) Must be able to capture image from USB camera.<br />4.) Must be able to output digital 5V.<br />5.) Timing must be synchronous with dispensing system.<br />6.) Constant background image must be loaded before cup image taken.<br />7.) User interface must project all applicable data with live updating to ensure quality to user.<br />8.0Engineering Codes and Standards<br />The device has been constructed to operate safely within any engineering codes and standards. The pertinent standards applicable to the AVD&FDS design are due to the collaboration of hardware devices used in the final prototype.<br />DAQ Device – NI USB-6009<br />Standards –<br />• IEC 61010-1, EN 61010-1<br />• UL 61010-1, CSA 61010-1<br />Further standards of safety information for this device may be found at ni.com/certification<br />Image Capture – Agama V2025 Webcam<br />Standards – <br />• Proper waste standards applicable per country<br />Contact local waste management authorities for more information on proper disposal.<br />Valve – Some cheap valve<br />Standards –<br /> • Proper safe electrical connections and housing for public use maintained. <br />PC – Software and Hardware<br />Standards –<br />• All traditional standards applicable with the use of a personal computer, licensed software, and the credentials of external coding help have been acknowledged and sternly implemented.<br />9.0Design Concepts<br />AVD & FDS does exactly what it says, detects volume and dispenses fluid automatically. This concept could have been implemented two other ways that deviate from the design chosen and described in this report. Below is a Pugh matrix that shows the other concepts considered before prototyping of the product began.<br />Figure 9. SEQ Figure ARABIC 1 1: Pugh matrix displayin alternative designs<br />Figure 9. SEQ Figure ARABIC 1 2: Description of alternative concepts<br />The final design chosen was the original design idea, concept 1 with a timer based off of calculated volume, even though it did not score the highest in the Pugh matrix. The reason this concept was chosen was because of the integrity and originality of the idea. The other two concepts were still somewhat original, but other similar devices are on the market and the engineering behind the ideas did not meet the novelty and originality initially conceived. The final prototype will include volume detection, hands free fluid dispensing, but there will be no barcode system. Further design ideas do include a barcode system and a way to receive cash to pay for the dispensed drink also.<br />10.0High Level Block Diagram<br />Below is the functional block diagram of AVD & FDS. There are not a lot of external checks that the system must go through in order to function properly. The majority of system checks is done internally via software.<br />Figure 12. SEQ Figure ARABIC 1 1: Functional Block Diagram<br />10.1Volume Detection<br />Figure 12. SEQ Figure ARABIC 1 2: Volume Detection<br />This porttion of the block diagram is the part of the product responsible for accurately calculating the volume of any random cup. The webcam is in a static position continuously recording an image and the user sends a command to store an image. Once the user makes this input, the PC uses MATLAB to run through the algorithm of computing the volume.<br />10.2Fluid Dispensing<br />Figure 12. SEQ Figure ARABIC 1 3: Fluid Dispensing portion of block diagram<br />The fluid dispensing portion of the product is shown in this block diagram. Once the volume detection portion of the product has finished its calculation, the program calculates how long to turn on the valve based off a flow rate. As long as the output from the PC is high, the circuitry will allow the valve to be turned on. The ESD (Emergency Shut Down) is a precautionary measure taken just in case the output from the PC does not turn off or if the calculated volume is more than the cup will hold.<br />11.0Major Components<br />The AVD & FDS has three major stages: image capture, volume detection, and fluid dispensing. Each of these include different pieces of hardware that must all be compatible with one another.<br />11.1Image Acquisition<br />The first stage of the process starts with capturing an up to date image of the background. After this is done, the image is saved and used for the image subtraction after the next image is captured containing the cup. The image acquisition is done by using a Agama HD webcam that is plugged directly into the PC via USB connection and MATLAB. The webcam must be kept in a rigid, static position as shown in the figure for consistency in image acquisition so as not to affect the code and pixel:inch ratio.<br />Figure 11. SEQ Figure ARABIC 1 1: Webcam used for image acquisition<br />11.2PC/Volume Calculation<br />The next major component of the product is the PC, which performs the volume calculation. The PC will be responsible for calculating the volume and outputting the correct time for the valve to stay open via the USB DAQ device. <br />Figure 11. SEQ Figure ARABIC 1 2: PC used for volume calculation and hardware interface<br />11.3DAQ Device<br />The device that outputs the logic high that signals the valve to turn on is the NI USB-6009 DAQ device. This device can be used for analog/digital inputs as well as analog/digital outputs. Our use for this device entails using a digital output for the calculated time that the valve is to be turned on.<br />Figure 11. SEQ Figure ARABIC 1 3: DAQ device used for outputting signal to the valve<br />11.4Valve and Circuitry<br />Figure 11. SEQ Figure ARABIC 1 4: Schematic of circuitry controlling valve36461705557520The last phase of the entire process is the dispensing portion of the system. The circuitry and valve of the system ensure that the signal from the DAQ device allows the fluid to flow for the correct amount of time. A 2N3904 transistor was used to receive the initial 5V signal from the DAQ the output of the BJT was sent to the gate of an IR510 MOSFET. Both transistors are powered from a 12V power supply. The MOSFET was chosen because of the high current rating its specifications say it will allow. The BJT was needed to condition the 5V signal and change the current load to Ic rather than Ib and protect the current load needed from the DAQ. <br />12.0Detailed Design<br />A detailed design and description of each process the design goes through in order to achieve its desired function will be mentioned in the section.<br />4987290158496025184101584960143510384810Figure 12. SEQ Figure ARABIC 1 1: Fill holes commandFigure 12. SEQ Figure ARABIC 1 2: Image subtraction12.1Edge Detection<br />Figure 12. SEQ Figure ARABIC 1 3: Image amplificationNormal edge detection functions built into MATLAB could not be used in this product because of the inconsistency in cup colors and shapes. Instead, image subtraction was used in order to decipher exactly what was placed in view of the camera. An initial image is taken with no cup in the picture. This picture serves as the base picture that the image with the cup will be subtracted from. The result is something similar to that of a “negative” image. Figure 14.1.1 shows an example of this. This picture is then amplified by raising the absolute value of all pixels to a fractional exponent. This amplifies all values to enhance the brightness of any pixels. The next part of this process is to fill in any dark spots that are completely surrounded by white pixels. The next figure shows this step. Notice how the “E” and “P” are filled in with white pixels. This step makes the conversion to a binary image much easier for the software to decide what needs to be turned black and what needs to be turned white. After the image is turned into a binary image, the software iterates through 10 rows and performs a ConvexHull. This takes all white pixels in a region and connects all of them and fills in any black holes. This gives a completely filled in image of white pixels representing the outline of the given cup. A bwmorph function called ‘remove’ was used to isolate the outer edge of the cup for further analysis. Below is a figure of this process. The cup is turned on its side so that the integration, further along in the code, can interpret the top edge of the cup as a linear function.<br />Figure 12. SEQ Figure ARABIC 1 4: Isolated edge used to calculate volume<br />12.2Volume Calculation<br />The top edge of the cup is used to calculate the volume. This is done by taking an average of the values of the rows and then a negated subtraction of each row from this value in order to keep the cup with the same edge orientation. This puts the cup on a plane much more similar to a xy plane that has negative values. With the proper pixel to inch ratio conversion, the cup goes through further processing to cut off the top and bottom of the cup. This step is done by looking for columns with only two white pixels in it. This determines where the top and bottom start. The new line is plotted in real world dimensions (inches) and used to calculate the volume via the disk integration method. Below is a figure containing the different plots relating to the steps described in this section. <br />Figure 12. SEQ Figure ARABIC 1 5: Cup plotted in real world units<br />The last plot on the bottom of the figure 14.2.1 is the information used to calculate the volume, which is the top line of the cup tilted on its side in figure 14.1.4. This information produces a virtual 3D cup that is shown in the figure below.<br />Figure 12. SEQ Figure ARABIC 1 6: 3D model of the cup<br />12.4Valve Dispensing<br />41948106370320A solution was needed to be able to control the valve with the software package, but since the output signal from the DAQ card was not sufficient to power the valve, we needed some extra hardware to provide the power to the valve on command. A transistor network was developed to accept the 5V, 1.4mA logic high signal input into a BJT, which in turn will switch a MOS transistor to power on the valve. The valve will be turned on as long as the signal from the DAQ, calculated from oz/sec flow rate, is on.<br />12.5Product Hardware<br />Figure 12. SEQ Figure ARABIC 1 7: Protoboard of valve circuitryThe product contains a small list of needs in order to function properly and efficiently. The first of these needs is a camera to acquire the image of the cup, which is an Agama V2025 Webcam (any camera with an option of 800x600 resolution will work). Second, a constant, white background with extra lighting is needed to ensure a contrast between the cup and background that the camera will see regardless if the cup is clear or not. This is accomplished via a 5k cathode backlight as a first option or a combination of a coiled up LED rope light and two separate lamp lights for this project. The dispensing portion of the product requires a water reservoir or water line with constant pressure so as the code and valve circuitry can dispense the correct amount of fluid.<br />13.0Major Problems<br />The AVD&FDS encountered a few unforeseen problems that warranted immediate attention before progressing further and inexplicably altered the final design. Though these problems were not the most difficult or time consuming parts of the design process, they were unplanned issues that affected the future of the prototype and required creative solutions.<br />13.1Lighting<br />One large issue that surfaced during the design process numerous times was lighting environment around the camera and prototype assembly. Because the AVD&FDS uses a set of two pictures, one with a cup and a constant without, any lighting changes between the two pictures would provide a difference and transmute to noise in the image to be processed. Controlling the ambient and back light would prove to be a necessity. Direct ambient light provides too much concentration of light in the imaging area. The large glares and shadows produced from the direct light altered the way the camera detected the edges of the cup. More importantly, the cup needed to rest on a stand that would reflect the right amount of light so that the cup bottom edge would be defined, no shadow would appear on the stand, and a reflection would not appear. Finally, the background behind the cup had to illuminate sufficiently to create a contrast from the cup. Originally, the problem was easily solved by using a cold-cathode tube lighting board. This fluorescent board was very bright with illumination constant over the entire surface area. Most importantly, the device was not alternating current. When videoed or imaged, AC current lighting sources create a shuttering effect depending on the rate (usually around 60Hz). This is much like recording a video of a computer monitor. Limited by a production-weary budget, using the expensive lighting board as a background light was ruled out and alternatives were sought. <br />The solution was to build a completely custom cup housing and lighting assembly. Ambient light control depends on the setting of the prototype device, though future plans include a completely enclosed housing. Direct ambient light has since been filtered using high thread count linens of no color. This will refract the light enough without dropping the intensity too much. The cup base went through a large series of changes, a new model being issued with each lighting, camera, or code change. Black foam, polished metal, reflective tape, white cardboard, white plastic, white linen, wood, and other materials found their way under the cup. Currently, the optimal physical setting has been a cube shaped transparent plastic box which rests on an out-of-view piece of wood. This has provided a definite edge at the bottom of the cup, no shadow or glare with the current light settings, and no reflection evident enough for the camera. Lastly, and most importantly, the custom backlight has been realized and implemented in a prototype environment. The very rear or the backlight housing is a large piece of cardboard covered with reflective tape. An LED rope, purchased from Wal-mart, was attached on the reflective cardboard in a tight spiral pattern. In front of the LED rope is a transparent textured plastic surface, used to refract the direct light emitting from individual LEDs into many tiny light sources. A translucent plastic surface is next to filter the light even more, followed by a couple sheets of high thread count linens to create a consistent glow over the entire surface. This has been an adequate design that can be cheaply reproduced.<br />13.2Dispensing<br />Another major problem encountered was the fluid dispensing system. The original means of dispensing was based on a mechanical engineering team’s final design of a pressurized keg tap. This was optimal as it would provide pressure, constant flow over the course of the keg, and a valve built in. Their first prototype used a motor, which coincidently worked off a 5volt input. At this point, we had a 5volt output with minimal current, so the first task was to create a relay system in order to boost current output. Suddenly the mechanical engineering project motor was switched to a servo that ran on a open/close system of +4 volts to -4volts. At first, using an inverter with a switch or an H-bridge circuit was initialized, but the AVD&FDS engineers abandoned the idea due to safety and controllability issues when using the servo. <br />The design now needed a valve and dispensing system. A few types of valves were purchased, with the main stipulation being the minimum fluid pressure and current requirements. Numerous prototype ideas for a dispenser and fluid reservoir were debated upon, but most were either far too expensive or outside the means of the teams expertise. Also, a custom built gravity based system with a lookup table of flow rate introduced into the code to compensate for the change based on volume of liquid in reservoir was realized that led to the conclusive design. For such a prototype, the gravity based reservoir is constructed from a large plastic 5 gallon reservoir with a valve attachment at the bottom. The top of the bottle was removed both to prevent a vacuum and easy means of refilling. To keep a constant flow rate, the prototype will have a designated water level, and after each cup fill during a presentation, the used water will be immediately poured back into the reservoir. Future plans of a failsafe or pressurized system are still producible.<br />14.0Integration and Implementation<br />The integration of the product is divided into three parts, image acquisition and volume calculation, Labview transfer, and valve implementation.<br />14.1Image Acquisition and Volume Calculation<br />The image acquisition and volume calculation is all done in the MATLAB code. This is the novelty and originality of the product. Once the code was functioning properly, it had to be transferred to Labview so that the DAQ device could be used. This was accomplished relatively easy with a few minor changes in the wording of some of the code. <br />Figure 12. SEQ Figure ARABIC 1 1: Placed cup that will get volume calculated<br />14.2Labview Transfer<br />The Labview transfer did not take a long time. It was completed in a small amount of time with complete sub VI’s for volume calculation (MATLAB script) and DAQ output timing. Below is a screenshot of the main routine in Labview that the product will use to run.<br />Figure 14. SEQ Figure ARABIC 1 2: Main routine in Labview used to run the product<br />As shown, the volume calculation is ensured to happen first and send its output to the DAQ output timing subVI.<br />14.3Valve Integration<br />The valve was completed relatively easily. The only setback to this part of the design was the wait on parts to arrive. During the testing of the valve switching hardware, the circuit inexplicably began responding to the open/close signal in an inverse manner. Tests to find the source of the problem included swapping both transistors with spare parts, changing power supplies, changing the location of the valve and changing resistor values. After extensive testing, the odd behavior could not be reversed or explained. We fixed the problem by inverting the signal from the DAQ in the Labview code. <br />Figure 14. SEQ Figure ARABIC 1 3: 12V DC valve with proper plumbing into water reservoir<br />14.4Water Reservoir<br />Constructing a reservoir to hold the water that was to be dispensed turned out to be easier than initially anticipated. This was done by simply cutting the top off of the top and implementing the valve at the bottom of the jug. Constructing the stand that will hold the reservoir, which was made from a 5 gallon water jug, above the cup required the most construction. The goal of this stand was to successfully house the reservoir directly above the cup’s location so as to eliminate any tubing to direct the flow of the fluid. The reservoir also had to have the valve properly installed to hold the water and release on command. Once this was accomplished, testing was done to acquire the approximate flow rate with the reservoir completely full to ensure the maximum amount of pressure was flowing out of the valve. The process and results were recorded and a flow rate was determined. Figure 14.4 shows results from this test. As shown<br />Figure 14. SEQ Figure ARABIC 1 4: Test results for determining flow rate<br />the average flow rate is around 1.63 oz/sec with some margin for error. This flow rate was implemented into the final design and used for the prototype.<br />14.5Integration<br />Once the flow rate was determined and all of the housing was built, the final prototype was tested for the first time on April 13, 2010. The code had to have minor changes to it to compensate for a new PC but the device worked immediately without any further complications. The testing and demonstration of the prototype occurred all in one day because of the accurate results that were obtained from the preliminary tests. <br />Figure 14. SEQ Figure ARABIC 1 5: Successful prototype dispensing water<br />15.0Comments and Conclusions<br />This project provided the team with unparalleled experience in project development and documentation. Planning a project with a budget and having milestones that must be reached by specific deadlines really helped the group gain insight into the professional world. As a whole, the team functioned well together and made sure the most important tasks took priority over tasks that could be done in a timely manner or were not imperative to the functional product. Extensive testing with random cups found from customers has shown the product does work with cups never tested before and can handle its proposed functionality. Further refinement of the current code could yield a more consistent volume detection and even a more precise measurement with a more controlled environment. Adding an additional camera to detect edge thickness automatically is also a route the group has discussed for further enhancing this product. Special thanks go to the Robotics and Intelligent Machines (RIM) Laboratory and member Thomas Whitney for letting us use his research equipment and providing information that was instrumental to the completion of the product.<br />16.0Team Members<br />16.1Brendan Baker<br />Brendan Baker’s assignments and contributions to the project included the image processing and volume detection of the cups with the guidance from an expert in machine vision, Thomas Whitney, as well as the construction of the housing and backlight panel for the lighting environment. Brendan was also heavily involved with team member Frederick Weissbach in the Labview programming and GUI. He also helped design how the water was to be housed and dispensed. These responsibilities enabled him to gain a much better understanding of the image processing toolbox in MATLAB and the knowledge of what an ideal lighting environment entails. His achievements include successfully detecting the volume of a random cup to within 3% consistently, making a back panel that diffuses the light correctly, and constructing the prototype water dispensing system. In the group, Brendan was also the group journal record keeper, oversaw the budget, and kept track of the progress of each task on the gant chart. <br />16.2Frederick Weissbach<br />Frederick Weissbach applied his advanced skills in LabVIEW and MATLAB as well as his ability to creatively solve problems to work with his teammates and complete the AVD&FDS.  With class experience with coding in both C language and MATLAB, and including research experience in the Robotics and Intelligent Machines lab using LabVIEW, Frederick could apply himself to multiple areas of design process.  He worked closely with the other team members and graduate student Thomas Whitney on developing the MATLAB code for edge detection and volume calculation.  Notably, he also contributed to the final LabVIEW setup and GUI, and hardware design and prototyping.  Frederick used his basic skills of HTML to develop a website for the team and also developed the team poster.<br />16.3Sean Tovar<br />Sean Tovar worked in developing the valve circuitry and aided in other hardware developments. He handled the ordering of parts, built and tested the valve circuitry, and also worked in implementing the circuitry into the overall design. Sean also contributed in the weekly status reports as well as handling all software logistical problems for the EE Sr. Design Lab.<br />17.0References<br />Gonzalez, Rafael C., Richard E. Woods, and Steven L. Eddins. Digital Image Processing Using MATLAB. Upper Saddle River, N.J.: Pearson Prentice Hall, 2004. Print.<br />Dr. Brent Nowak – RIM Lab Director<br />Dr. Lars Hansen – Electrical Engineering Sr. Lecturer<br />Mr. Thomas Whitney – RIM Lab Engineer<br />