Ultrasonic Measurement of Sink Drain Rate
Class Project (Group of 3)
Class: Experimentation and Measurements (ME 103, UC Berkeley)
Timeline: April 2021 - May 2021
Skills used: Design of Experiments, MATLAB, circuit design, Arduino
For our final group project in this experimentation and measurements class, we were tasked to design any experiment we desired using the electronics kit, called the MicroKit, provided by the ME department as well as any tools we had at home. Our group decided to use the ultrasonic sensor in the MicroKit to construct a device that measured the drain rates – change in water level per unit time – of the sinks each group member had in their kitchens. By comparing experimental values to theoretical and calibration values, we discovered several limitations of our experimental assumptions that require further research to understand more clearly.
The complete project report can be found here, and the presentation slides here.
Process
Experiment assumptions
To simplify our experimental calculations, we applied the following assumptions to our experimental setup:
The sink is a perfect rectangular prism with negligible curvature
The area of the kitchen drain is a perfect circle
The area of the kitchen drain (A1) is much smaller than the area of the sink parallel to the drain’s surface (A2)
And from the continuity equation, velocity of water level decreasing is much slower than the velocity of the water through the drain
Circuit design and data logger setup
The circuit we designed for our ultrasonic sensor is shown here. The sensor we used, the HC-SR04, outputs a 5V “Echo” signal which we had to transform into a 2.5V signal with a voltage divider for use with the ESP32 microcontroller, which uses 3.3V logic.
As for the programming, we used a NewPing object from the <NewPing.h> library in Arduino to operate the ultrasonic sensor and convert digital sensor readings into distance readings in centimeters every 500ms. Using a MATLAB data logger extrapolated from one provided from a previous class assignment, we were able to log this distance data onto a .csv file for data processing and conversion into change in water height over time.
Data collection
We set our ultrasonic sensor circuit on a fixed platform above a flat surface on our sinks, which were filled up to a water level of 20cm from the bottom of the sink. When the sink water level had stabilized at this initial level, the data logger was started and the sink unplugged. Once all the water had exited the drain, the logger was stopped.
Obtaining theoretical values
In order to evaluate the validity of our assumptions, we calculated theoretical drain rate values using Bernoulli’s principle and the continuity equation. As shown in the diagram, our dependent variable is v1 starting from the Bernoulli equation. Applying the assumptions stated above and the continuity equation, we obtain the drain rate expression shown below. We calculated the theoretical drain rates for each of our sinks given that they all have different dimensions and geometries.
Obtaining calibration values
We also sought calibration values as a sanity check that our sensor readings were reasonable. This was done by using a stopwatch to time how long it took for the water level to reach zero from the same initial water level as the sensor trials. Calibration drain rate was calculated by dividing the initial water level by the stopwatch reading.
Data and uncertainty analysis
Below are the data collected for each group member as well as the calibration and theoretical values we obtained using the aforementioned methods. Uncertainties for raw data such as distance were calculated from the resolution uncertainty of the apparatus, and for processed data such as drain rate this was propagated using Gauss’s uncertainty propagation formula.
3 Key Contributions to the Group
1. Debugged initial experimental procedure to obtain control variables such as the requirement for fixed positioning of sensor above a flat area of the sink bottom surface, initial water level and water temperature
2. Performed experimental data collection and calibration procedures consistently to yield repeatable results
3. Obtained uncertainty values for each raw and processed measurement using uncertainty propagation
Outcomes
We were able to collect drain rate data in a systematic fashion that produced repeatable results and closely matched our calibration values. However, they were not accurate to the theoretical drain rate values. Discrepancies between the experimental and theoretical drain rates were mainly attributed to the fact that some of our sinks had varying geometries that invalidated our geometrical assumptions. For example, one team member’s drain area was twice as large as the others’, invalidating assumption #3 in his case. In addition, the curved bottom edges of our sinks seem to consume more volume than we initially anticipated, thus invalidating assumption #1.