Inspiration

As Californians, the Droplytics team has seen the progression of this drought over the past several years. Although we've just gone through an historic el nino, we would need three to four more such events just to get back to normal reserves. The reality of global climate change is that we will face this problem well into the future. Water scarcity is not a new phenomena - it is the new normal, and it is global in scope.

We need a conservation renaissance. We know that we need to save more water, we know that our very existence depends on it - so what's stopping us? Let's use the hard-drive as an analogy. Think about the last time you needed to clear some space on your computer. You know that you have limited space, say 500GB, and that you are using nearly 490GB. If I just gave you this information, how would you start cleaning? Where do you look first? How do we seperate what is junk from what is important?

"We need a conservation Renaissance"

To make intelligent decisions, you need intelligent information! You need to see how your space is being used, understand what kinds of files are located where, where the biggest files are stored, and how often you've been using them. With this information, the path to a clean hard drive is clear.

Alt text

Now, think about your water bill. Your utility uses large, clunky, mechanical mesuring devies that send low-resolution, granular, and aggregated data at very slow sampling rates. All you get is a piece of paper every 1-3 months with two numbers: the amount you will pay, and the volume of water you used (in some obscure units). This system is akin to you logging in to your computer to clean your hard drive only knowing how much space you've used. There is simply no way to truly optimize your water usage without reliable benchmarks. The Aquastat was conceived and designed specifically for this task. Gone are the days of the water bill as our conservation yard-stick. Welcome to the future of smart homes, where you can analyze, and optimize your home's water usage effortlessly.

What it does

The Aquastat is a turn-key sensing platform designed to be placed on or near fixtures for the purpose of estimating flow rate. It uses a combination of vibrational and acoustic sensing to 'tune in' on and estimate water flow, enabling intelligent tracking of water usage automatically.

The Aquastst listens for water flow perpetually. Once water flow has been detected, the Aquastat kicks into high gear and starts making sense of the flow rate. Flow rate data is transmistted over BLE to the Artik where we leverage its advanced computing capabilties by applying complex signal processing and machine learning techniques. Together, the Aquastat and the Artik form a feeback loop that will give people insight into their water usage like never before.

Although our sensing system is novel in the consumer space, this idea is not completely new. In days gone by, our very survival may have depended on the ability to listen for and estimate the quantitiy of water flowing near us. Unfortunately, it has not been feasible to teach a machine to do this - until now. With the ability to break down and examine the audio, and ultrasonic spectrums in near-real time, we can actually see and make sense of the sounds emminating from the pipes in your home, and correlate these sounds to their respective flow rates.

Together, the Aquastat and the Artik form a feeback loop that will give people insight into their water usage like never before.

During a short calibration procedure, we simply place the device in the desired installation location on or near a pipe or faucet. Next, we collect some training data with the Aquastst, and send it over to the Artik for processing. The Artik filters and analyzes the audio data collected, and classifies features of the sounds that seperate which data corresponds to low and high flow rates, and which parts of the data are just noise. Once the calculations on the Artik are complete, we transmit an acoustic fingerprint to the Aquastst for it to use on it's local 'on-the-fly' calcualtions. Using this fingerprint, we have an accurate benchmark for the sensor to use and estimate with. Now, whenever we turn on the water, the Aquastst not only detects these events, but actually estimate the water flow in real time!

With a distributed set of Aquastats, one can imagine outfitting a home with these intelligent devices with the Artik serving as the IoT hub making sense of the data and ensuring accuracy.

How we built it

Aquastat Hardware
Analog

As with any good hardware design, we began with a breadboarded prototype. Because our project reies heavily on sampled data from sensors, we needed to make sure to take special care of our signal chain with anti-aliasing filters, precision references and decoupling. We ended up with a programmable gain amplifier with automatic gain control for a broad dynamic range.

Alt text

Digital

Once we were sure our analog hardware worked well, we began the integration of the digital components: an ARM micro, a BLE stack, and the Artik. The Aquastat is a completely custom, mixed-signal system that uses a powerful microcontroller to run FFTs on sensor data collected. Once we had outlined the performance target and bandwidth necessary for the sensor, we laid out the PCB and sent it to fabrication.

After we recived the blank PCBs, we sat down under a microscope for a few hours and placed all of the fine pitch components using hot-air, a soldering iron.

Alt text

After attaching sensors, verification on the oscilloscope revealed that the circuit was behaving exactly as expected. We were able to flash the BLE stack and verify that it broadcast. With working sensor hardware, we were ready to tackle the massive systems integration task of making it all work together with the Artik.

Artik Development

The really great thing about developing code for the Artik is that if we can run it on a linux system, we can run it on the Artik with little to no work porting code. This allowed for rapid development even when we were away from the Artik. We opted to work primarily with Python and Bash tools to further potentiate this cross-platform spirit. Because of the suite of radios included, and because of the exceptional processing power, we envision the Artik 10 serving as a highly intelligent IoT hub for homes of the future, in addition to the multitude of other tasks that its power and verisility make it well suited for.

The surce code we run on the artik serves primarily to outline the Artiks role as IoT manager. The code launches a seperate process on the Artik, wherein we scan for new devices, and load newly discoverd Aquastats into a dictionary for tracking and calibration purposes. Each Aquastst object in the code contains facilities for hooking into hcitool, gattool, and Bluez to communicate with Aquastst devices. The Artik is also responsible for collecting and analyzing training data using Python scikit.learn, scipy.signal, scikit.fftpack, amongst many other packages in the 'Scipy' stack, such as numpy and maplotlib. these powerful processing and linear algebra tools will allow us to build out our prototype into a truly market-ready product.

Aquastat Web Interface

The Aquastat web interface utilizes a mix of python Flask, jquery, bootstrap, and plotly charts. All of these elements were integrated together in about 3 weeks, allowing users to see live plots of their water flow usage piped to our web servers from the Artik allowing Aquastat users to view and track their usage from a variety of platforms. For a typical user, we envision a simple procedure wherein we register devices to particular users/hubs, then allow the usage statistics to be monitored for those devices. Right now, we are testing with a single module.

Alt text

Aquastat Mechanical

From day one, we understood that no matter how well the device worked, that people would be less inclined to install it if it clashed with the decor of their homes. We wanted to make the Aquastst as unobtrusive and flexible as possible. For revision one, we opted for a 'backpack' that holds all the computing power of the Aquastat, and a smaller mounting piece for the sensor breakout to allow it to mount discretely in a variety of locations.

The droplet design is fabricated using the lates additive manufacturing techniques. The result is a device that feels like it will provide reliable service for many years.

Alt text

Challenges we ran into

BLE

We chose BLE for this first iteration, primarily for low power, and because we had some previoue experience with the protocol for mobile applications. Because the Artik 10 is still in beta, this made BLE connections a little tough, but ultimately we persevered by using a BLE UART dongle as a workaround. From there, we were able to use standard Linux BLE tools like Bluez, hcitool, and gatttool to connect and communicate between the Artik and the Aquastat.

Hardware + PCBs

We didn't use soldermask on our first batch of PCBs to speed turnaround, and to save on cost. The flat-pack and fine pitch components were very diffiuclt to solder without shorting to power and ground planes, so we had to do a second run.

BUilding an amplifier for sensors producing widely varying signals is no easy task, especially if we need to maintain a wide dynamic range. Given the limited window we need to squeeze the signal into for safe measurement by the ADC, we had to scrap an original fixed hardware design in favor of the feedback controlled programmablae gain system we now employ.

Alt text

Accomplishments that we're proud of

First and foremost, we did something that's never been done before!

Apart from that and being accepted into the Samsung MAD challenge, we've also garnered interest from The Foundry at UC Berkeley, a tech startup incubator - and CITRIS, the University of California's center for developing new technologies in the interest of humanity. Were quite proud of what we've done so far - will you let us show you what else we can do?

What we learned

We have learned a lot about the varying fields of aeroacoustics, signal processing, and entrepreneurship.

What's next for Aquastat

We're just starting to scratch the surface of what's possible with the Artik and the Aquastat. We're excited to increase the accuracy of our estimation, streamline the web interface, and simplify the process of calibration. Overall, we're very happy with the progress we've made in the relatively short timeframe. We strongly believe that our demonstration of the Artik platform as a powerhouse IoT hub will only grow more compelling.

Looking forward, we envision a complete redesign of our revision one hardware. We are anxiously anticipating the availability of the Artik 1 platform, as we believe its RTOS caapabilities, and exceptionally small size and power footprint make it a perfect choice for the Aquastat's next revision.

Code

Please find our code hosted on Gitlab: https://gitlab.com/friend0/lighthill.git Our website can be found in this .zip: https://www.dropbox.com/sh/o78mxo6jej7yx6d/AAD8hMG6Ov8Yk_JgltkZqEcZa?dl=0

Built With

Share this project:
×

Updates