Top Banner
UNIVERSITY OF TEXAS AT SAN ANTONIO FINAL REPORT AUTOMATED VOLUME DETECTION & FLUID DISPENSING SYSTEM SUBMITTED BY: TEAM #2 BRENDAN BAKER FREDERICK WEISSBACH SEAN TOVAR SUBMITTED TO: With public beverage service in mind, the engineers from Team 2 have designed a device aimed at automating the industry. PROF. AUGUST ALLO UNIVERSITY OF TEXAS AT SAN ANTONIO 1 UTSA CIRCLE DRIVE SAN ANTONIO, TX 78249 7 APRIL, 2010
38
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Final report combined

university of texas at san antonio

Final Report

Automated Volume Detection & Fluid Dispensing System

SUBMITTED BY:

TEAM #2

BRENDAN BAKER

FREDERICK WEISSBACH

SEAN TOVAR

SUBMITTED TO:

With public beverage service in mind, the engineers from Team 2 have designed a device aimed at automating the industry.

PROF. AUGUST ALLO

UNIVERSITY OF TEXAS AT SAN ANTONIO

1 UTSA CIRCLE DRIVE

SAN ANTONIO, TX 78249

7 APRIL, 2010

Page 2: Final report combined

Table of Contents

Table of Contents.............................................................................................................................2

Table of Figures...............................................................................................................................4

1.0 Executive Summary..............................................................................................................5

2.0 Introduction...........................................................................................................................6

2.1 Gant Chart.........................................................................................................................7

3.0 Need for Design....................................................................................................................7

4.0 Literature and Patent Search Results....................................................................................8

5.0 Marketing Analysis and Marketing Strategy........................................................................8

6.0 Engineering Design Constraints...........................................................................................8

6.1 Global Design Constraints:...............................................................................................9

6.2 Local Design Constraints:.................................................................................................9

7.0 User Requirements..............................................................................................................10

7.1 User Requirements..........................................................................................................10

7.2 System Requirements......................................................................................................11

7.3 Interface Requirements...................................................................................................12

8.0 Engineering Codes and Standards......................................................................................12

9.0 Design Concepts.................................................................................................................13

10.0 Product Specifications........................................................................................................15

11.0 Operational Scenarios.........................................................................................................15

12.0 High Level Block Diagram.................................................................................................16

12.1 Volume Detection........................................................................................................16

12.2 Fluid Dispensing..........................................................................................................17

13.0 Major Components.............................................................................................................17

2

Page 3: Final report combined

13.1 Image Acquisition.......................................................................................................17

13.2 PC/Volume Calculation...............................................................................................18

13.3 DAQ Device................................................................................................................19

13.4 Valve and Circuitry.....................................................................................................19

14.0 Detailed Design..................................................................................................................20

14.1 Edge Detection............................................................................................................20

14.2 Volume Calculation.....................................................................................................21

14.4 Valve Dispensing........................................................................................................22

15.0 Major Problems..................................................................................................................22

15.1 Lighting.......................................................................................................................23

15.2 Dispensing...................................................................................................................24

16.0 Integration and Implementation..........................................................................................25

16.1 Image Acquisition and Volume Calculation...............................................................25

16.2 Labview Transfer........................................................................................................25

16.3 Valve Integration.........................................................................................................26

16.4 Water Reservoir...........................................................................................................26

17.0 Comments and Conclusions...............................................................................................26

18.0 Team Members...................................................................................................................26

18.1 Brendan Baker.............................................................................................................26

18.2 Frederick Weissbach...................................................................................................27

18.3 Sean Tovar...................................................................................................................27

3

Page 4: Final report combined

Table of Figures

Figure 2.1: Gant Chart showing progress of each task....................................................................7

Figure 9.1: Pugh matrix displayin alternative designs...................................................................14

Figure 9.2: Description of alternative concepts.............................................................................14

Figure 12.1: Functional Block Diagram........................................................................................16

Figure 12.2: Volume Detection.....................................................................................................16

Figure 12.3: Fluid Dispensing portion of block diagram..............................................................17

Figure 13.1: Webcam used for image acquisition.........................................................................18

Figure 13.2: PC used for volume calculation and hardware interface...........................................18

Figure 13.3: DAQ device used for outputting signal to the valve.................................................19

Figure 13.4: Schematic of circuitry controlling valve...................................................................19

Figure 14.1: Image amplification..................................................................................................20

Figure 14.2: Image subtraction of image with cup from image with no cup.................................20

Figure 14.5: Cup plotted in real world units..................................................................................21

Figure 14.6: 3D model of the cup..................................................................................................22

Figure 16.1: Main routine in Labview used to run the product.....................................................25

4

Page 5: Final report combined

1.0 Executive Summary

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.

5

Page 6: Final report combined

2.0 Introduction

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.

6

Page 7: Final report combined

2.1 Gant Chart

Figure 2.1: Gant Chart showing progress of each task

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.

3.0 Need for Design

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

7

Page 8: Final report combined

lines built up at the counter and disperse them across the available space at separate AVD&FDS

locations.

4.0 Literature and Patent Search Results

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

5.0 Marketing Analysis and Marketing Strategy

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.

6.0 Engineering Design Constraints

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.

8

Page 9: Final report combined

6.1 Global Design Constraints:

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.

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.

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.

Sustainability – Our product has the ability to have a initial large volume sales with sustained

sales via software and hardware improvements.

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.

Ethical Consideration – Proper disposal or recycling of spare or excess materials is our main

ethical consideration.

Health and Safety Issues – Sanitation of our product will have to be monitored because of the

flexibility of customers bringing their own drinking glass.

Social Ramifications – The purpose of this product is to enhance the well-being of society

through a greater flexibility of service.

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.

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.

6.2 Local Design Constraints:

Cost – The custom hardware, software, and precise instruments used could pose cost constraints.

Schedule – The product schedule is open due to the lack of similar product development.

9

Page 10: Final report combined

Manufacturability – Converting a prototype into a precise, large-scale manufactured product is

the main concern.

Engineering Codes and Standards – Precise instrumentation and aesthetics of our system is a

high standard within production.

Ethical Considerations – Our company is small enough that this particular constraint does not

seem to hinder our design.

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.

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.

7.0 User Requirements

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.

7.1 User Requirements

1.) System must be hands free during fluid dispensing.

2.) Device must calculate cost of dispensed fluid.

3.) User must be able to use any sized cup.

4.) User must be able to select what type of cup to use (i.e. glass, plastic, mug, etc.)

5.) Device must be simple to use and easy enough for a child.

10

Page 11: Final report combined

6.) Device must have an emergency shut down switch obvious to user.

7.) Device must have obvious ready/standby warnings for user.

8.) Device must have means of logging expenses per user.

9.) Device must be sanitary and protected from elements.

7.2 System Requirements

1.) System must be fully automatic.

2.) System must have dispensable pressure system.

3.) System must accurately detect the edges of a any sized cup.

4.) System must be able to accurately calculate the volume of any sized cup.

5.) A 12VDC solenoid valve will be used to dispense the fluid.

6.) Proper calculation and interface hardware must be used with PC.

7.) Device must have buffering volume due to predetermined cup thickness based on type.

8.) Device must be conveniently fast, with calculation and fill time under 30 seconds.

9.) Device must find volume within 90%, not to exceed 99% fillable volume.

10.) Any USB camera will be applicable for imaging.

11.) Proper ambient and back-lighting is necessary for imaging.

12.) A digital output of 5V is required to toggle powersupply to valve control.

13.) Physical housing must be robust to ensure consistant results.

14.) Device must have internet connection to be used with data logging system.

11

Page 12: Final report combined

7.3 Interface Requirements

1.) The system will interface via USB.

2.) System must be able to plug into standard 120V/60Hz outlet.

3.) Must be able to capture image from USB camera.

4.) Must be able to output digital 5V.

5.) Timing must be synchronous with dispensing system.

6.) Constant background image must be loaded before cup image taken.

7.) User interface must project all applicable data with live updating to ensure quality to user.

8.0 Engineering Codes and Standards

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.

DAQ Device – NI USB-6009

Standards –

• IEC 61010-1, EN 61010-1

• UL 61010-1, CSA 61010-1

Further standards of safety information for this device may be found at ni.com/certification

12

Page 13: Final report combined

Image Capture – Agama V2025 Webcam

Standards –

• Proper waste standards applicable per country

Contact local waste management authorities for more information on proper disposal.

Valve – Some cheap valve

Standards –

• Proper safe electrical connections and housing for public use maintained.

PC – Software and Hardware

Standards –

• 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.

9.0 Design Concepts

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.

13

Page 14: Final report combined

Figure 9.2: Pugh matrix displayin alternative designs

Figure 9.3: Description of alternative concepts

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.

14

Page 15: Final report combined

10.0 Product Specifications

The product needed particular specifications to be met before it could perform correctly and

consistently. These most important of the specifications are listed below:

1.) The device must have a consistent lighting environment.

2.) The camera being used must have a USB connection.

3.) The valve must be able to be opened based off a 1mA output from DAQ device.

4.) System must tell customer what the price of the dispensed fluid will be.

5.) There must be an emergency shutdown switch that will directly cut power to the valve.

11.0 Operational Scenarios

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.

AVD & FDS: Detect the volume of a cup and dispense the correct amount of fluid.

- This mode is the intended use for the product and we anticipate it being the most

used.

AVD: Detect volume of a cylindrical object.

- This mode can be an optional mode that will use the same algorithm to detect the

volume of any cylindrical object.

15

Page 16: Final report combined

12.0 High Level Block Diagram

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.

Figure 12.4: Functional Block Diagram

12.1 Volume Detection

Figure 12.5: Volume Detection

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.

16

Page 17: Final report combined

12.2 Fluid Dispensing

Figure 12.6: Fluid Dispensing portion of block diagram

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.

13.0 Major Components

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.

13.1 Image Acquisition

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.

17

Page 18: Final report combined

Figure 13.7: Webcam used for image acquisition

13.2 PC/Volume Calculation

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.

Figure 13.8: PC used for volume calculation and hardware interface

18

Page 19: Final report combined

13.3 DAQ Device

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.

Figure 13.9: DAQ device used for outputting signal to the valve

13.4 Valve and Circuitry

The 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.

19

Figure 13.10: Schematic of circuitry controlling valve

Page 20: Final report combined

14.0 Detailed Design

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.

14.1 Edge Detection

Normal 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.

20

Figure 14.3: Image with filled holes

Figure 14.11: Image subtraction of image

with cup from image with no cup

Figure 14.12: Image

amplification

Page 21: Final report combined

Figure 14.4: Isolated edge used to calculate volume

14.2 Volume Calculation

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.

Figure 14.13: Cup plotted in real world units

21

Page 22: Final report combined

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.

Figure 14.14: 3D model of the cup

14.4 Valve Dispensing

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.

15.0 Major Problems

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.

22

Page 23: Final report combined

15.1 Lighting

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.

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

23

Page 24: Final report combined

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.

15.2 Dispensing

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.

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.

24

Page 25: Final report combined

16.0 Integration and Implementation

The integration of the product is divided into three parts, image acquisition and volume

calculation, Labview transfer, and valve implementation.

16.1 Image Acquisition and Volume Calculation

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.

16.2 Labview Transfer

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.

Figure 16.15: Main routine in Labview used to run the product

As shown, the volume calculation is ensured to happen first and send its output to the DAQ

output timing subVI.

25

Page 26: Final report combined

16.3 Valve Integration

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.

16.4 Water Reservoir

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

17.0 Comments and Conclusions

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.

18.0 Team Members

18.1 Brendan Baker

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

26

Page 27: Final report combined

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.

18.2 Frederick Weissbach

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.

18.3 Sean Tovar

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.

27