Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Final report combined


Published on

  • Be the first to comment

  • Be the first to like this

Final report combined

  1. 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 782497 April, 2010<br />Table of Contents TOC o " 1-3" h z u Table of Contents PAGEREF _Toc258403099 h 2Table of Figures PAGEREF _Toc258403100 h 41.0Executive Summary PAGEREF _Toc258403101 h 52.0Introduction PAGEREF _Toc258403102 h 62.1Gant Chart PAGEREF _Toc258403103 h 73.0Need for Design PAGEREF _Toc258403104 h 74.0Literature and Patent Search Results PAGEREF _Toc258403105 h 85.0Marketing Analysis and Marketing Strategy PAGEREF _Toc258403106 h 86.0Engineering Design Constraints PAGEREF _Toc258403107 h 86.1Global Design Constraints: PAGEREF _Toc258403108 h 96.2Local Design Constraints: PAGEREF _Toc258403109 h 97.0User Requirements PAGEREF _Toc258403110 h 107.1User Requirements PAGEREF _Toc258403111 h 107.2System Requirements PAGEREF _Toc258403112 h 117.3Interface Requirements PAGEREF _Toc258403113 h 128.0Engineering Codes and Standards PAGEREF _Toc258403114 h 129.0Design Concepts PAGEREF _Toc258403115 h 1310.0Product Specifications PAGEREF _Toc258403116 h 1511.0Operational Scenarios PAGEREF _Toc258403117 h 1512.0High Level Block Diagram PAGEREF _Toc258403118 h 1612.1Volume Detection PAGEREF _Toc258403119 h 1612.2Fluid Dispensing PAGEREF _Toc258403120 h 1713.0Major Components PAGEREF _Toc258403121 h 1713.1Image Acquisition PAGEREF _Toc258403122 h 1713.2PC/Volume Calculation PAGEREF _Toc258403123 h 1813.3DAQ Device PAGEREF _Toc258403124 h 1913.4Valve and Circuitry PAGEREF _Toc258403125 h 1914.0Detailed Design PAGEREF _Toc258403126 h 2014.1Edge Detection PAGEREF _Toc258403127 h 2014.2Volume Calculation PAGEREF _Toc258403128 h 2114.4Valve Dispensing PAGEREF _Toc258403129 h 2215.0Major Problems PAGEREF _Toc258403130 h 2215.1Lighting PAGEREF _Toc258403131 h 2315.2Dispensing PAGEREF _Toc258403132 h 2416.0Integration and Implementation PAGEREF _Toc258403133 h 2516.1Image Acquisition and Volume Calculation PAGEREF _Toc258403134 h 2516.2Labview Transfer PAGEREF _Toc258403135 h 2516.3Valve Integration PAGEREF _Toc258403136 h 2616.4Water Reservoir PAGEREF _Toc258403137 h 2617.0Comments and Conclusions PAGEREF _Toc258403138 h 2618.0Team Members PAGEREF _Toc258403139 h 2618.1Brendan Baker PAGEREF _Toc258403140 h 2618.2Frederick Weissbach PAGEREF _Toc258403141 h 2718.3Sean Tovar PAGEREF _Toc258403142 h 27<br />Table of Figures<br /> TOC h z c " Figure" Figure 2.1: Gant Chart showing progress of each task PAGEREF _Toc258403155 h 7<br />Figure 9.1: Pugh matrix displayin alternative designs PAGEREF _Toc258403156 h 14<br />Figure 9.2: Description of alternative concepts PAGEREF _Toc258403157 h 14<br />Figure 12.1: Functional Block Diagram PAGEREF _Toc258403158 h 16<br />Figure 12.2: Volume Detection PAGEREF _Toc258403159 h 16<br />Figure 12.3: Fluid Dispensing portion of block diagram PAGEREF _Toc258403160 h 17<br />Figure 13.1: Webcam used for image acquisition PAGEREF _Toc258403161 h 18<br />Figure 13.2: PC used for volume calculation and hardware interface PAGEREF _Toc258403162 h 18<br />Figure 13.3: DAQ device used for outputting signal to the valve PAGEREF _Toc258403163 h 19<br />Figure 13.4: Schematic of circuitry controlling valve PAGEREF _Toc258403164 h 19<br />Figure 14.1: Image amplification PAGEREF _Toc258403165 h 20<br />Figure 14.2: Image subtraction of image with cup from image with no cup PAGEREF _Toc258403166 h 20<br />Figure 14.5: Cup plotted in real world units PAGEREF _Toc258403167 h 21<br />Figure 14.6: 3D model of the cup PAGEREF _Toc258403168 h 22<br />Figure 16.1: Main routine in Labview used to run the product PAGEREF _Toc258403169 h 25<br />1.0Executive Summary<br />With 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 s 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 <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.<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. The system will enhance the quality of purchasing beverages by consumers. This does not apply.<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<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 /> <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 s 1 1: Pugh matrix displayin alternative designs<br />Figure 9. SEQ Figure * ARABIC s 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.0Product Specifications<br />The product needed particular specifications to be met before it could perform correctly and consistently. These most important of the specifications are listed below:<br /><ul><li>The device must have a consistent lighting environment.
  2. 2. The camera being used must have a USB connection.
  3. 3. The valve must be able to be opened based off a 1mA output from DAQ device.
  4. 4. System must tell customer what the price of the dispensed fluid will be.
  5. 5. There must be an emergency shutdown switch that will directly cut power to the valve.</li></ul>11.0Operational Scenarios<br />There is a limited number of operational scenarios for the AVD & FDS. Its main function is to calculate the volume of a cup and accurately dispense the corresponding amount of fluid into the cup. A separate use could be to only use the device to detect the volume of a cylindrical object for other uses.<br />AVD & FDS: Detect the volume of a cup and dispense the correct amount of fluid.<br /><ul><li>This mode is the intended use for the product and we anticipate it being the most used.</li></ul>AVD: Detect volume of a cylindrical object.<br /><ul><li>This mode can be an optional mode that will use the same algorithm to detect the volume of any cylindrical object.</li></ul>12.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 s 1 1: Functional Block Diagram<br />12.1Volume Detection<br />Figure 12. SEQ Figure * ARABIC s 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 />12.2Fluid Dispensing<br />Figure 12. SEQ Figure * ARABIC s 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 />13.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 />13.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 13. SEQ Figure * ARABIC s 1 1: Webcam used for image acquisition<br />13.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 13. SEQ Figure * ARABIC s 1 2: PC used for volume calculation and hardware interface<br />13.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 13. SEQ Figure * ARABIC s 1 3: DAQ device used for outputting signal to the valve<br />13.4Valve and Circuitry<br />Figure 13. SEQ Figure * ARABIC s 1 4: Schematic of circuitry controlling valve34385256238875The 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 />14.0Detailed Design<br />right822960A 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 />14.1Edge Detection<br />Figure 14. SEQ Figure * ARABIC s 1 1: Image amplificationFigure 14. SEQ Figure * ARABIC s 1 2: Image subtraction of image with cup from image with no cupFigure 14.3: Image with filled holes51092104358640left3017520Normal 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 is used called ‘remove’ 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 and interpret the top edge of the cup as a linear function.<br />Figure 14.4: Isolated edge used to calculate volume<br />14.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 plane much more similar to an 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 method. Below is a figure containing the different plots relating to the steps described in this section. <br />Figure 14. SEQ Figure * ARABIC s 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 14. SEQ Figure * ARABIC s 1 6: 3D model of the cup<br />14.4Valve Dispensing<br />A 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 />15.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 />15.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 />15.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 />16.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 />16.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 />16.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 16. SEQ Figure * ARABIC s 1 1: 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 />16.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. To fix the error we used the Arduino board to invert the signal and provide protection to the DAQ card.<br />16.4Water Reservoir<br />Constructing a reservoir to hold the water that was to be dispensed turned out to be easier than initially anticipated. Constructing the stand that will hold the reservoir, which was made from a 5 gallon water jug, above the cup required the most construction was to make the stand that the<br />17.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 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. 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 />18.0Team Members<br />18.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. A small C code for the microcontroller was written by Brendan to control the valve in the fluid dispensing portion of the project where 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 />18.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 />18.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 />