Computer Aided Water Monitoring and Control System J Baumeister ...
Computer Aided Water Monitoring and Control System J Baumeister ...
Computer Aided Water Monitoring and Control System J Baumeister ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>Computer</strong> <strong>Aided</strong> <strong>Water</strong> <strong>Monitoring</strong> <strong>and</strong> <strong>Control</strong> <strong>System</strong><br />
1. Introduction<br />
The <strong>Computer</strong> <strong>Aided</strong> <strong>Water</strong> <strong>Monitoring</strong> <strong>and</strong><br />
<strong>Control</strong> <strong>System</strong> or CAWMaCS is a shower<br />
control system that addresses the problems<br />
associated with the st<strong>and</strong>ard shower systems<br />
currently on the market. The first problem<br />
this project addresses is water conservation.<br />
Currently, Americans use twice as much<br />
shower-water as people in other countries<br />
with comparable st<strong>and</strong>ards of living. The<br />
second problem addressed is shower safety.<br />
Each year, there are thous<strong>and</strong>s of injuries<br />
<strong>and</strong> deaths resulting from shower related<br />
accidents. Team CAWMaCS feels that<br />
these accidents are preventable, <strong>and</strong> has<br />
taken several steps to solve this problem.<br />
The third <strong>and</strong> final problem addressed by<br />
this project is sudden temperature<br />
fluctuations in the shower. Temperature<br />
changes occur when an individual is taking a<br />
shower <strong>and</strong> another person or appliance in<br />
the same household creates a sudden water<br />
surge by flushing the toilet, starting a<br />
washing machine, etc. This draws water<br />
away from the shower <strong>and</strong> will result in a<br />
sharp increase or decrease in water<br />
temperature, creating an uncomfortable<br />
experience for the individual in the shower.<br />
Addressing these problems will bring many<br />
benefits including conserving environmental<br />
resources, preventing injuries, as well as<br />
J <strong>Baumeister</strong>, J Edwards<br />
A Mills, K Schutte<br />
University of Nebraska Lincoln<br />
The Peter Kiewit Institute<br />
Omaha, NE 68182 USA<br />
adding an overall convenience to the daily<br />
routine for Americans.<br />
2. Problem Formulation<br />
2.1 Problem Statement<br />
The original need for the project was to keep<br />
shower temperature constant during water<br />
pressure changes created by a toilet flush or<br />
sink being turned on. This concept has<br />
evolved to include water volume<br />
monitoring, wireless communication, <strong>and</strong><br />
information storage components. The final<br />
project design addresses two major needs:<br />
water conservation <strong>and</strong> shower safety.<br />
According to www.alternet.org, less than<br />
1% of the water on Earth is useable<br />
freshwater[1]. Since the amount of available<br />
fresh water is limited, it is important to<br />
conserve as much fresh water as possible so<br />
the plants <strong>and</strong> animals that depend on it can<br />
continue to thrive. The average American<br />
will save approximately 700 gallons of<br />
water per month by shortening their showers<br />
by one minute[2]. Fluctuating shower<br />
temperatures cause the user to spend time<br />
adjusting the water temperature, therefore<br />
wasting time <strong>and</strong> water. The CAWMaCS<br />
project eliminates fluctuating water<br />
temperatures, therefore saving time <strong>and</strong><br />
water in the shower. The project also<br />
monitors the amount of water being used by<br />
the shower <strong>and</strong> records this information in a
centralized database which can be easily<br />
accessible by the user. Making the user<br />
aware of the amount of water used in the<br />
shower <strong>and</strong> providing suggested usage<br />
totals, the user will be encouraged to reduce<br />
their total water usage. Using less water in<br />
the shower results in less water sent to the<br />
local wastewater treatment plant for<br />
processing. The result is less energy<br />
required to filter <strong>and</strong> recycle the water used<br />
for showering, resulting in the conservation<br />
of both freshwater <strong>and</strong> energy.<br />
The second goal of project CAWMaCS was<br />
the safety of its users. According to<br />
www.customer.honeywell.com, 30% of<br />
children under the age of 5 are involved in<br />
bathtub or shower-related burn injuries<br />
every year[3]. According to<br />
www.dulley.com, more than 5,000 children<br />
<strong>and</strong> elderly are scalded each year [4].<br />
Common scalding injuries occur in the<br />
shower when someone slips <strong>and</strong> grabs the<br />
valve h<strong>and</strong>le for balance, turning the water<br />
to its maximum heat setting. Young<br />
children have thinner skin <strong>and</strong> are more<br />
susceptible to burns. In addition, the elderly<br />
have reduced sensitivity to temperature <strong>and</strong><br />
can unknowingly scald themselves. Table 1<br />
provided by the National Burn Victim<br />
Foundation, illustrates elapsed time <strong>and</strong><br />
temperature ranges that will cause 3 rd degree<br />
burns in both children <strong>and</strong> adults.<br />
2.2 Background <strong>and</strong><br />
Research<br />
A number of related projects have been<br />
researched to gather information about<br />
shower systems currently on the market. By<br />
examining these existing solutions, the team<br />
has gained insight into technologies are<br />
available <strong>and</strong> which designs may work the<br />
best. In many cases the goal was to achieve<br />
a level of functionality similar to these<br />
products while maintaining a lower cost for<br />
the end-user.<br />
Table 1<br />
Time <strong>and</strong> Temperature Ranges to Cause 3 rd Degree Burns in<br />
Children <strong>and</strong> Adults<br />
2.2.1 Industrial Liquid <strong>Control</strong><br />
<strong>System</strong> (ILCS)<br />
This system is manufactured by Knight<br />
Equipment[5]. Its primary function is to<br />
automate chemical dispensing, but it also<br />
logs <strong>and</strong> timestamps daily user activities <strong>and</strong><br />
chemical usage data. It includes Windowsbased<br />
software to manipulate the logged<br />
data.<br />
Except the pumping aspects of this system<br />
<strong>and</strong> its industrial nature, this system is close<br />
to CAWMaCS. Examining this system was<br />
a useful method for exploring means of<br />
valve control, as well as user-interface<br />
design considerations.
2.2.2 Wattson<br />
Wattson is a system manufactured by DIY<br />
Kyoto[6]. The primary function is to make<br />
the user aware of their electricity<br />
consumption.<br />
The system consists of sensors that attach to<br />
a home's fuse box. These sensors are<br />
attached to a transmitter which samples <strong>and</strong><br />
sends the data periodically to a base station.<br />
The base station logs <strong>and</strong> displays the data<br />
on an LCD screen. This base station is a<br />
unique battery-powered embedded device<br />
that can be attached to a PC for more<br />
powerful data analysis. The base station can<br />
run for a year on a set of batteries.<br />
Although it positions itself in a separate<br />
market, it had some impact on our project.<br />
This system points to the advantages of<br />
having a dedicated embedded base station<br />
which was portable, low power, <strong>and</strong><br />
unobtrusive. Furthermore the means of<br />
communication may be custom-tailored for<br />
the application.<br />
2.2.3 Low Cost <strong>Water</strong> Flow<br />
Sensor <strong>and</strong> Ambient Display<br />
This is a project undertaken by two students<br />
from Carnegie Mellon University. Its<br />
purpose was raise awareness of water<br />
consumption. It consists of a piezo<br />
transducer as a means of determining if<br />
water was flowing in a pipe. A set of LEDs<br />
display different patterns depending on how<br />
long the water was flowing.<br />
Researching this project was important the<br />
unique user-interface element <strong>and</strong> detecting<br />
flow. It does not provide the amount of data<br />
as the flow sensor used in CAWMaCS, but a<br />
piezo transducer is an inexpensive, means to<br />
gather flow information like a flow<br />
sensor[7].<br />
2.2.4 <strong>Control</strong> valves<br />
There are two different types of valves on<br />
the market that are designed to maintain<br />
pressure <strong>and</strong> temperature in a shower[8].<br />
Anti-scald values exist in varying degrees of<br />
complexity. Some simply do not allow the<br />
hot water to be opened past a preset point.<br />
Others attempt to maintain equal pressure in<br />
both valves as a means to respond to<br />
pressure fluctuations. Both of these operate<br />
through mechanical means <strong>and</strong> cost<br />
anywhere from $15 to $250.<br />
The second product on the market is the<br />
thermostatic valves which are complex <strong>and</strong><br />
more expensive, ranging from $400 to<br />
$1000. They offer more control than a<br />
pressure-balance valve <strong>and</strong> may contain<br />
only mechanical parts or additionally<br />
electronic controls <strong>and</strong> memory systems.<br />
These are designed to maintain temperature<br />
<strong>and</strong> pressure. These two valve types are<br />
manufactured by Kohler <strong>and</strong> Moen.<br />
3 Project Requirements,<br />
Specifications, <strong>and</strong> Success<br />
Criteria<br />
As a means to measure the success of the<br />
project, 10 success criteria were defined.<br />
The benchmark for a successful project was<br />
determined to be completion of at least 8 out<br />
of the 10 success criteria. Five of the<br />
success criteria were defined by the course<br />
instructor <strong>and</strong> five of the success criteria<br />
were defined by Team CAWMaCS <strong>and</strong><br />
approved by the engineering faculty. The 10<br />
success criteria are listed below:<br />
1. The project team will create a bill of<br />
materials <strong>and</strong> order/sample all parts<br />
needed for the design.<br />
2. The project team will develop a<br />
complete, accurate, readable schematic<br />
of the design.
3. The project team will complete a layout<br />
<strong>and</strong> etch a printed circuit board.<br />
4. The project team will populate <strong>and</strong><br />
debug the design on a custom printed<br />
circuit board.<br />
5. The project team will package the<br />
finished product <strong>and</strong> demonstrate its<br />
functionality.<br />
6. The system will conserve 15% of<br />
monthly water usage compared to the<br />
industry st<strong>and</strong>ard of 2.5 gallons per<br />
minute.<br />
7. The system will eliminate the possibility<br />
of water temperature surpassing 115°F.<br />
8. The system will be capable of tracking<br />
<strong>and</strong> logging water for at least 365 days.<br />
9. The system will maintain water<br />
temperature within five degrees<br />
Fahrenheit of the user preset.<br />
10. Evidence of the system’s energy<br />
efficiency will be measurable.<br />
The first success criterion states that Team<br />
CAWMaCS must acquire all parts needed<br />
for the design of their product. This was<br />
necessary for the construction of the product<br />
prototype. Also, a bill of materials has been<br />
maintained for all parts acquired so that an<br />
accurate cost analysis may be provided.<br />
The second success criterion states that<br />
Team CAWMaCS must construct an<br />
accurate <strong>and</strong> complete schematic of the<br />
system. The schematic design was useful in<br />
a variety of different areas of the project. It<br />
has made circuit construction <strong>and</strong><br />
troubleshooting easier, <strong>and</strong> was also<br />
necessary for the PCB to be created. Orcad<br />
<strong>and</strong> Eagle software tools were used to<br />
design the schematics for the system.<br />
The third success criterion states that a<br />
printed circuit board (PCB) must be etched<br />
with the circuit created by Team<br />
CAWMaCS. The printer circuit boards were<br />
constructed by Sunstone Circuits with the<br />
grant that Team CAWMaCS applied for.<br />
The forth success criterion states that the<br />
PCB must be populated <strong>and</strong> debugged.<br />
After the PCB was created by Sunstone,<br />
Team CAWMaCS populated the board <strong>and</strong><br />
made minor corrections to fix problems that<br />
were discovered.<br />
The fifth success criterion states that Team<br />
CAWMaCS must package the prototype <strong>and</strong><br />
demonstrate its functionality. Team<br />
CAWMaCS demonstrated the finished<br />
prototype on three separate occasions: at E-<br />
Week on the UNL campus on April 23, 2010<br />
in the atrium at PKI on April 30, 2010 <strong>and</strong> at<br />
the final presentation on May 5, 2010.<br />
The sixth success criterion states that the<br />
shower system will use 15% less water than<br />
the current industry st<strong>and</strong>ard shower<br />
systems. This has been accomplished by<br />
notifying the user of the current temperature,<br />
regulating the current temperature, <strong>and</strong><br />
recording water usage history. This criterion<br />
ensures the environmental conservation of<br />
the system.<br />
The seventh success criterion states that<br />
water may not reach 115 degrees Fahrenheit<br />
in the shower at any time. The water<br />
temperature is constantly monitored in the<br />
shower system, so that if the temperature<br />
approaches 115 degrees Fahrenheit it will be<br />
reduced accordingly. This criterion helps to<br />
ensure user safety while in the shower.<br />
The eighth success criterion states that the<br />
system must monitor <strong>and</strong> log water usage<br />
statistics for one year. The daily water<br />
usage statistics are stored at the system base<br />
station. Displaying the user’s water usage<br />
history allows the user to track the progress<br />
of their water conservation efforts.
The ninth success criterion states that the<br />
water temperature in the shower will remain<br />
within five degrees of the user specified<br />
temperature. Keeping the water temperature<br />
virtually constant not only helps to conserve<br />
water, but also makes the shower experience<br />
more enjoyable by eliminating unwanted<br />
fluctuations in temperature.<br />
The tenth success criterion states that Team<br />
CAWMaCS will be able to measure the<br />
energy efficiency of the shower system.<br />
Since one of the objectives of the shower<br />
system is to conserve water <strong>and</strong> energy, it<br />
would be undesirable for the shower system<br />
to consume more energy than it saves.<br />
4 Production schedule<br />
Throughout the research, design, <strong>and</strong><br />
construction phases of the project, Team<br />
CAWMaCS had the advantage of being able<br />
to refer to a number of project planning<br />
documents in order to ensure that the team<br />
was not falling behind schedule. Two of<br />
these helpful documents were the PERT<br />
chart <strong>and</strong> the One Page Project Manager<br />
(OPPM). The Gantt chart has also been a<br />
helpful project planning tool.<br />
The PERT chart displayed all tasks that<br />
needed completion <strong>and</strong> identified the critical<br />
path. This helped identify which items<br />
needed the most resources dedicated to their<br />
completion <strong>and</strong> which items were not of<br />
critical importance.<br />
Another helpful planning tool, especially<br />
during the construction phase of the project,<br />
was the One Page Project Manager. The<br />
OPPM broke down all remaining tasks <strong>and</strong><br />
assigned each task a week that it needed be<br />
completed by. The OPPM also identified<br />
primary <strong>and</strong> secondary responsibility to the<br />
team members for every task that needed<br />
completion. If a task was falling behind<br />
schedule, this helped identify who was<br />
responsible. Team CAWMaCS referred to<br />
the OPPM regularly during the construction<br />
phase of the project to make sure that there<br />
weren’t any areas of the project that were<br />
falling behind schedule.<br />
Team CAWMaCS created a reasonable <strong>and</strong><br />
effective schedule <strong>and</strong> used it to keep<br />
production on track. However, one phase of<br />
the design that fell farthest behind schedule<br />
was the PCB creation. Team CAWMaCS’<br />
original plan was to have the first version of<br />
their PCB made locally. Any mistakes<br />
would be corrected, <strong>and</strong> the final design<br />
would be sent out to be professionally<br />
manufactured. After the local PCB machine<br />
broke down, Team CAWMaCS managed to<br />
adapt their strategy by ordering PCB boards<br />
from PCB manufactures while staying under<br />
budget. Changes were made to the project<br />
schedule to allow time for unforeseen<br />
technical difficulties that are out of the<br />
teams’ control.<br />
5 Detailed Engineering<br />
Analysis <strong>and</strong> Design Product<br />
Presentation<br />
5.1 Hardware Design<br />
This section of the document outlines each<br />
subsystem of the CAWMaCS project <strong>and</strong><br />
hardware design components contained in<br />
each. A top-down approach is taken for<br />
breaking the entire system down into several<br />
smaller subsystems. These subsystems are<br />
reviewed in more detail below.<br />
5.1.1 Power <strong>System</strong><br />
The power source for all subsystems of the<br />
CAWMaCS system comes from the<br />
household 120V AC supply. All integrated<br />
circuits <strong>and</strong> logic circuits in both the shower<br />
system <strong>and</strong> base station require either a<br />
regulated 5V DC source or 3.3V DC source.
Linear regulators were used to achieve these<br />
values.<br />
The valve control mechanism had the largest<br />
power consumption of the project. The<br />
Amulet MK-480272C graphical LCD<br />
consumes 1.5 Watts, the Crystalfontz<br />
CFAH2004K-TMI-JP LCD consumes 0.06<br />
Watts, <strong>and</strong> the XBee modules consume 0.15<br />
Watts each. All other components <strong>and</strong><br />
peripherals consume less than 0.06 Watts.<br />
By budgeting in an extra 2.5 Watts of power<br />
for each valve control motor places the total<br />
power consumption for the system at 7<br />
Watts.<br />
5.1.2 Reset <strong>System</strong><br />
The circuits in all subsystems have active<br />
low reset signals. For a reset to be triggered,<br />
a low signal needs to be applied for one<br />
minimum pulse length, or 100 µs. To<br />
achieve this, an RC circuit with a 1k resistor<br />
<strong>and</strong> a 1µF capacitor is implemented, giving<br />
a time constant of 1ms.<br />
5.1.3 Shower <strong>System</strong><br />
5.1.3.1 Sensors <strong>and</strong> <strong>Control</strong> Network<br />
Subsystem<br />
The water flow meter, temperature sensor,<br />
<strong>and</strong> valve control mechanism compose the<br />
sensor <strong>and</strong> control network of the shower<br />
system. The flow sensor is operated by a<br />
reed switch opening <strong>and</strong> closing a SPST<br />
switch to create a square output wave when<br />
water is flowing. The output from the flow<br />
meter is connected to port F of the<br />
Atmega64A microcontroller.<br />
The temperature sensor subsystem will<br />
consist of a MAX6675 integrated circuit <strong>and</strong><br />
thermocouple. The thermocouple is be<br />
inserted into a custom made ½” galvanized<br />
steel coupler. The chip select <strong>and</strong> output<br />
lines from the MAX6675 are connected to<br />
Port F of the Atmega64A.<br />
The valve control unit consists of two<br />
manual ball valves <strong>and</strong> two servo motors.<br />
The motors take a 5V DC input <strong>and</strong> are<br />
controlled by Port F of the Atmega64A.<br />
5.1.3.2 User Interface Subsystem<br />
The user interface subsystem consists of two<br />
dials for user input <strong>and</strong> an LCD to display<br />
information. The two dials are used to<br />
control water temperature <strong>and</strong> water<br />
pressure. The dials are connected to rotary<br />
encoders that are tied to Port C of the<br />
Atmega64A.<br />
The LCD for the user interface system is the<br />
CFAH2004K-TMI-JP. The eight data lines<br />
from the LCD are connected to Port A of the<br />
Atmega64A. The LCD draws power from a<br />
regulated 5V DC source. The brightness of<br />
the backlight is adjustable via 10k<br />
potentiometer.<br />
5.1.3.3 Wireless Communication<br />
Subsystem<br />
The main component of the wireless<br />
communication subsystem is the XBee<br />
series 1 wireless module. This module<br />
operates under IEEE 802.15 specifications.<br />
There is an XBee radio as part of both the<br />
shower system <strong>and</strong> the base station system.<br />
The radios utilize RF communication <strong>and</strong><br />
have a range of 400 ft. The radios<br />
communicate with the Atmega64A<br />
microcontrollers via USART. The radios<br />
are connected to Port D of both the shower<br />
system <strong>and</strong> base station Atmega64A<br />
microcontrollers.<br />
5.1.4 Base Station <strong>System</strong><br />
The primary component of the base station<br />
subsystem is the graphical LCD. The<br />
graphical LCD is used to display water<br />
usage information to the user in the form of<br />
a line graph over time. The LCD being used<br />
is the Amulet MK-480272C. The LCD<br />
communicates with the Atmega64A via
USART on Port E. Figure 1 is a high-level<br />
block diagram of the system.<br />
5.2 PCB Design<br />
There was a significant amount of<br />
consideration that went into the PCB design.<br />
There are four boards in total: the base<br />
station board, the shower control board, the<br />
shower switch board, <strong>and</strong> the shower LCD<br />
board. The shower system was broken into<br />
three boards from the beginning, because<br />
while the actual mounting mechanism was<br />
yet unclear, it was clear that the switches<br />
<strong>and</strong> LCD would have to be mounted at<br />
differing distances from the surface of the<br />
wall. The controller itself could technically<br />
be anywhere on the rear of the wall. For this<br />
reason they were separated <strong>and</strong> designed to<br />
be connected via st<strong>and</strong>ard IDC pairs. These<br />
boards had no real constraint on size or<br />
shape. By contrast, the base station board<br />
was constrained by the size <strong>and</strong> shape of the<br />
case we had chosen for it.<br />
While the ICs were mostly surface mount<br />
due to availability constraints, for passive<br />
components, through-hole parts were used<br />
for two reasons. First, we had a large stock<br />
of them <strong>and</strong> thus wouldn’t have to purchase<br />
any. Second, space <strong>and</strong> electrical constraints<br />
were minimal <strong>and</strong> so the additional<br />
challenge of board population <strong>and</strong><br />
procurement costs far outweighed any<br />
benefits.<br />
A significant problem faced was providing<br />
adequate isolation between the servos <strong>and</strong><br />
the controller. To solve this problem, the<br />
servos were driven at a higher voltage than<br />
the logic so that a linear regulator could<br />
provide isolation. Additionally, the ground<br />
planes were joined at only a small point. A<br />
similar technique was used for the graphical<br />
LCD which requires a higher voltage for its<br />
backlight.<br />
PCB design techniques were employed.<br />
Figure 1<br />
High Level Block Diagram of CAWMaCS Project<br />
Figure 2 Shower Board Populated PCB<br />
Figure 3 Base Station Populated PCB
Traces were laid to take the most direct<br />
route to keep them electrically short, <strong>and</strong><br />
busses were kept together for logical<br />
reasons. Traces were also generally laid with<br />
obtuse inner angles to minimize reflection<br />
effects <strong>and</strong> noise. Related components were<br />
grouped together, <strong>and</strong> bypass caps were<br />
used on all ICs including the linear regulator<br />
output. On the shower controller, sensor<br />
inputs were placed on the same side of the<br />
board to ease wiring later on. Ground <strong>and</strong><br />
power planes were employed on all boards<br />
so that the digital ICs could benefit from the<br />
capacitive effect it provides, as well as a low<br />
impedance outlet to ground to prevent<br />
ground bounce.<br />
The PCB used in the final prototype was<br />
manufactured by Sunstone Circuits <strong>and</strong><br />
populated by Team CAWMaCS. The<br />
shower control PCB <strong>and</strong> base station PCB<br />
are shown below in Figures 2 <strong>and</strong> 3.<br />
5.3 Software Design<br />
One of the primary functions of the software<br />
design in the shower system is to control the<br />
servo motors that open <strong>and</strong> close the ball<br />
valves, which restrict hot <strong>and</strong> cold water<br />
flow. In order to achieve accurate<br />
temperatures required by the project success<br />
criteria, the motors must be able to achieve<br />
very precise <strong>and</strong> calculated movements.<br />
Also, sensor data received by the<br />
Atmega64A microcontroller must be<br />
received accurately.<br />
Two peripherals provide real time updates to<br />
the system via hardware interrupts. User<br />
input comes from two dials connected to<br />
rotary encoders. Users use the dials to<br />
control water temperature <strong>and</strong> pressure.<br />
<strong>Water</strong> flow rate is measured by a paddle<br />
wheel sensor. The paddle wheel sensor uses<br />
a reed switch to generate interrupts on the<br />
microcontroller.<br />
The feedback provided by the thermocouple<br />
<strong>and</strong> flow sensor is used in a PID system to<br />
regulate the servo positions. This allows<br />
external events, such as a change in water<br />
pressure or user changes via the control<br />
knobs to be accounted for <strong>and</strong> corrected by<br />
changing the motor position.<br />
There are two pieces of information the<br />
system uses to set valve positions: the ratio<br />
of the valves (hot to cold) <strong>and</strong> the amount<br />
the valves are open. To simplify, the system<br />
uses a linear approach with the ratio <strong>and</strong><br />
total values ranging from zero to one. This<br />
is best described by the Table 2.<br />
Table 2: Linear Approach with Ratio <strong>and</strong> Total Values<br />
Ranging from Zero to One<br />
From a mathematical st<strong>and</strong>point, the method<br />
is simple but powerful. The ratio is<br />
multiplied by the total giving a scale<br />
percentage. This result is scaled by a factor<br />
of two, allowing all possible states to be<br />
reached. As this scaling can result in values<br />
greater than 1, all Hot <strong>and</strong> Cold values are<br />
limited to a maximum value of 1.<br />
Each servo motor has a set range of motion<br />
measured in microseconds. The range spans<br />
about 1000 microseconds for each motor<br />
<strong>and</strong> changes to the input value result in a<br />
linearly proportional respond from the<br />
motor. To choose the servo positions, the<br />
hot water servo is directly proportional to<br />
the ratio while the cold water servo is<br />
proportional to 1 – ratio.<br />
While somewhat difficult to design, the true<br />
challenge with a PID controller is in tuning.<br />
There are several tuning methods but most if<br />
not all require heavy testing <strong>and</strong> a good<br />
underst<strong>and</strong>ing of the mathematics of a PID
system. The team invested time in several<br />
tuning methods but was unable to reach an<br />
optimal solution. This is not to say no<br />
solution was found but that better solutions<br />
exist. A flowchart for the PID control<br />
system used in project CAWMaCS is shown<br />
in Figure 4.<br />
The first used method was manual “guess<br />
<strong>and</strong> check” tuning where the output of the<br />
PID controller was sampled <strong>and</strong> manually<br />
adjusted until the output stabilized in the<br />
minimum amount of time. This process was<br />
difficult to perform as this is an “on-line”<br />
method meaning CAWMaCS needed to be<br />
running water to generate the needed data.<br />
The team found the tuning process was<br />
somewhat dependent on the input values, the<br />
water temperatures <strong>and</strong> pressures; response<br />
to changes was not as fast as expected[9].<br />
Figure 4: Flowchart of PID system used in CAWMaCS<br />
The second method, one of the Ziegler<br />
Nichols methods, while seemingly simple in<br />
theory, proved to be very difficult. The<br />
process involves using only proportional<br />
gain, increasing the gain value until the<br />
system oscillates at a fixed frequency[9].<br />
The period of these oscillations <strong>and</strong> the<br />
proportional gain value are used to find the<br />
proportional, integral <strong>and</strong> derivative gains<br />
directly. The major difficulty with this<br />
system came from the data generation<br />
process. Getting the system to oscillate at a<br />
fixed rate proved to be nearly impossible.<br />
This may be due to the relatively slow<br />
sample rate (5Hz) used in CAWMaCS.<br />
Without an accurate measurement of the<br />
oscillation period, the PID gains could not<br />
be accurately measured <strong>and</strong> the system<br />
could not be properly tuned. The team<br />
believes this tuning process could be used<br />
with future revisions of CAWMaCS if<br />
higher speed sensors are used.<br />
Overall the PID controllers used give<br />
acceptable performance for a prototype<br />
system. If CAWMaCS were to be exploited<br />
commercially, more effort will need to be<br />
placed in this area. Future improvements<br />
will likely be settled around the possibility<br />
of changing from servo to DC or stepper<br />
motors <strong>and</strong> finding a valve that is truly<br />
linear in performance, better matching the<br />
control system.<br />
6 Discussion, Conclusion, <strong>and</strong><br />
Recommendations<br />
The original problems being addressed by<br />
Team CAWMaCS was water conservation<br />
<strong>and</strong> shower safety. Team CAWMaCS felt<br />
that an excessive amount of water was being<br />
wasted in current shower systems. In<br />
addition, the statistical evidence of injuries<br />
<strong>and</strong> deaths resulting from shower accidents<br />
was significant enough to address. The<br />
shower system designed <strong>and</strong> detailed in this<br />
report addresses these problems. Five<br />
specific success criteria were defined as a<br />
means by which to measure the success of<br />
the project. The five project specific success<br />
criteria are:
1. The system will conserve 15% of<br />
monthly water usage compared to the<br />
industry st<strong>and</strong>ard of 2.5 gallons per<br />
minute.<br />
2. The system will eliminate the possibility<br />
of water temperature surpassing 115°F.<br />
3. The system will be capable of tracking<br />
<strong>and</strong> logging water for at least 365 days.<br />
4. The system will maintain water<br />
temperature within five degrees<br />
Fahrenheit of the user preset.<br />
5. Evidence of the system’s energy<br />
efficiency will be measurable.<br />
Team CAWMaCS considered several<br />
alternative solutions for the system to<br />
generate the best possible design. The final<br />
design consists of a shower system that<br />
accurately measures water temperature <strong>and</strong><br />
flow rate while keeping the water<br />
temperature constant. Current water<br />
temperature is also displayed to the user.<br />
<strong>Water</strong> usage history is wirelessly transmitted<br />
to the system base station, where usage<br />
history can be viewed up to one year in the<br />
past.<br />
The budget defined for the project was $600.<br />
This amount is significantly lower than the<br />
cost of currently available systems that<br />
perform similar tasks. In addition to the<br />
monetary budget, approximately 1,080 man<br />
hours was the estimated labor cost<br />
distributed among the four team members of<br />
Team CAWMaCS.<br />
Testing conducted on the system has<br />
provided evidence that all of the project<br />
success criteria have been met. Therefore,<br />
the system is capable of conserving water<br />
<strong>and</strong> creating a safer environment. However,<br />
due to the complex installation procedure, it<br />
is the recommendation of Team CAWMaCS<br />
that the shower system be installed mainly<br />
in buildings being newly constructed or<br />
remodeled. Installing the system into an<br />
existing household would be an<br />
inconvenience <strong>and</strong> also create additional<br />
costs not accounted for in the budget defined<br />
by Team CAWMaCS.<br />
7 References<br />
[1] T. McCarthy, “10 Amazing Facts About<br />
Worldwide <strong>Water</strong> Use,” October 2009. [Online].<br />
Available:http://www.alternet.org/water/143275/1<br />
0_amazing_facts_about_worldwidewater_use<br />
[Accessed: Nov 6, 2009].<br />
[2] Virginia Department of Education, “Lessons<br />
from the Bay.” [Online]. Available:<br />
http://www.doe.virginia.gov<br />
/VDOE/LFB/lessonplans/wastingwater/backgroun<br />
d.html. [Accessed: Nov 6, 2009].<br />
[3] Honeywell, “Scalding Statistics.” [Online].<br />
Available: http://customer.honeywell.com/<br />
<strong>Water</strong><strong>Control</strong>/ Cultures/en-<br />
US/Prevention/Scalding+Statistics/default.htm.<br />
[Accessed:Nov 6, 2009].<br />
[4] J.Dulley, “New shower valves hold water<br />
temperature steady.” [Online]. Available:<br />
http://www.dulley.com/docs/f556.htm.[Accessed:<br />
Nov. 6, 2009].<br />
[5] Knight LLC, “Industrial Liquid <strong>Control</strong><br />
<strong>System</strong>.” [Online]. Available:<br />
http://www.knightequip.com/pdf/b_ilcs.pdf.<br />
[Accessed: Nov 6, 2009].<br />
[6] Diy Kyoto, “Wattson.” [Online]. Available:<br />
http://www.diykyoto.com/uk. [Accessed: Nov 6,<br />
2009].<br />
[7] S. Kuznetsov, “Low Cost <strong>Water</strong> Flow Sensor<br />
<strong>and</strong> Ambient Display.” [Online]. Available:<br />
http://www.instructables.com/id/Low_Cost_<strong>Water</strong><br />
_Flow_Sensor_<strong>and</strong>_Ambient_Display [Accessed:<br />
Nov 6, 2009].<br />
[8] Keidel Supply Co., “Thermostatic Shower<br />
Valves,” [Online]. Available:<br />
http://www.keidel.com/design/select/showersvalve.htm.<br />
[Accessed: Nov, 6 2009].<br />
[9] Shaw, John. “PID Algorithm <strong>and</strong> Tuning<br />
Methods,” Process <strong>Control</strong> Solutions. [Online].<br />
Available:<br />
http://www.jashaw.com/pid/tutorial/pid6.html.<br />
[Accessed: April 2010]