|Software apps and online services:|
|Hand tools and fabrication machines:|
This project grew out of a need - a need to know when water in the reservoir that you are carrying on your back is running out and you are about to die of thirst. Such a reservoir - often called "Hydration Pack" - is simply a plastic bag with a tube and some kind of a valve at the end and looks a lot like this:
These bags are great for biking or hiking as they are light, fit into backpacks and can contain a significant amount of water (2 or 3 litres). The main problem with them is that it is almost impossible to know how much water is left in the bag without pulling it out of the backpack. The contraption that I have devised is an attempt to remedy this issue. Behold: The Hydro-Pack Bluetooth Monitor (HPBM).
The HPBM is comprised of two parts: a black box mounted on the hydro-pack's tube and a smartphone application that displays the data about water consumption and amount left. The black box - called HPBM-Device - contains a Seeed Studio Water Flow Meter, a Li-Pol battery and a Bluefruit LE Micro microcontroller.
The smartphone app - called HPBM-App - is an Android application that speaks with the HPBM-Device via Bluetooth LE and displays live data about the amount of water left on the reservoir as well as the current and average water consumption. It also calculates the amount of time that the user has before the the reservoir runs dry.
The central component of the HPBM-Device is a water flow meter. The device that I've chosen comes from Seeed Studio, is compatible with 1/4 inch tubes and measures water flow in the range between 0.3L/min and 6L/min. The working voltage is between 5V and 24V. This was a bit of a problem as the Bluefruit is a 3.3V device. Thus, I needed to use a step-up voltage regulator. I used a Pololu S7V7F5 as I had one of those laying around. It's actually a step-up/step-down module so probably an overkill.
The regulator solved my problem with powering the flow meter but I still needed to read its signal and although the Bluefruit would probably survive the short 5V pulses sent by the sensor, I've decided not to take any chances and applied a simple voltage level converter. The converter is built around a MOSFET according to the guidelines provided here. The whole circuit looks more or less like this:
Because of the risk that the tubes or the flow meter may leak, I've decided to add some protection to the electronics and placed the board with the microcontroller in a plastic bag. I really hope that I will not have to test the protective value of this solution.
The device is contained in a Kradex Z36. It's a neat black box that is actually a bit too large for this project. However, the extra space inside the container makes it easier to do quick fixes.
The only controls on the device are the power switch and a blue LED that blinks during transmission. The LED starts to blink a few seconds after switching on the power. Data is transmitted every second.
The Bluefruit LE Micro is connected to the perf-board with goldpins so that it can be easily salvaged. That's in case something gets burned on the perforated board.
The Android application that connects to the HPBM-Device is loosely based on the Adafruit's Bluefruit LE Connect app. I've basically took parts of the source code of this application that dealt with serial communication over Bluetooth and adapted them to my needs. I have also relied heavily on official Android API Guides.
The UI is rather straightforward. There are only three screens. The first one displays all Bluetooth devices that are in range and provide a serial communication service. An HPBM-Device will appear on this list as HPBM-Device with some number.
After selecting the proper device and touching the "Connect" button, the user is presented with the second screen. This screen allows the user to set the initial amount of water stored in the reservoir. The value must be provided in milliliters.
Touching the "Start" button brings up the last and most important screen - the monitoring screen. This is where all the water consumption data is displayed. The gauge at the top shows how much water there's left in the reservoir and the numerical displays below show the current consumption in milliliters per second, the average consumption and the time left before the reservoir runs dry.
And that's all there's to it.
I've prepared a short video that shows the HPBM in action. It is not a proper test in outdoor conditions but the results are encouraging.
This project was basically a Proof Of Concept. It showed that such a device can be created with easily available components and that it will provide the user with reasonable data. However, to make it really useful, there are quite a few improvements that need to be done:
- Make it more resilient. Currently, the HPBM-App has problems with reconnecting to the Device after it looses Bluetooth connection.
- Add a charging port. Currently, if you want to recharge the battery, you need to open the black box, take the battery out of it and recharge it using a special charger. That's not very practical. A micro-USB port on the box and a special charging module inside would make a much better solution.
- Add a battery level indicator. It's a bit ironic that a gizmo designed to let you know how much water you have in your reservoir does not inform you when it is itself running out of juice.
- Make it smaller. The HPBM-Device in its current form is way too big. Its size is determined by the water flow sensor, so in order to make the whole device smaller, one would have to find a smaller sensor. The ideal flow sensor should fit inside the tube and operate with 3.3V so that no level conversion is necessary.
- Use a two-way flow sensor or a one-way valve. The currently used sensor does not differentiate between water flowing from the reservoir and water going back. This causes measurement errors. Thus, a sensor that can detect the direction of water flow or a one-way valve would surely improve reliability of the HPBM. A better flow sensor would have an additional advantage of handling a situation when the reservoir is being refilled from a faucet through the tube.
- Add data recording. Gathering data on water use could be useful for performance analysis and, if coupled with weather data and activity measurements, could potentially be used to warn future users about a risk of dehydration.
- Add warnings. The App should display warning notifications when the amount of water falls below a certain threshold. Those notifications could be displayed not only on the smartphone but also on a smartwatch or a wrist band.
HPBM Source Code on GitHub
Did you replicate this project? Share it!I made one
Love this project? Think it could be improved? Tell us what you think!