Skip to content
All projects

Project 04

UroLab

A low-cost device to measure urine flow and hydration at home, for patients with or recovering from an enlarged prostate. My masters design project, built with a multidisciplinary team.

Role
UroLab hardware and firmware, FlowMasta, the app link
When
Oct 2020 to Jan 2021
Where
University of Southampton, MEng
Stack
FreeRTOS, Bluetooth LE, Android, Python
The UroLab rig on a desk: a 3D-printed frame holding the container, the sensor ring and the wiring

The problem

The brief was two low-cost flowmeters for patients to use at home: UroScale, based on Bluetooth scales, and UroLab, which tests a new way of measuring flow with a drainage hole.

My part was UroLab, the FlowMasta test rig and the link between them and the Android app. It had to measure very low flow rates, around 1 mL/s, while the liquid drains out.

What I built

  1. Firmware on FreeRTOS

    A control task reads each command from Bluetooth and runs the device as a state machine, keeping pressure sampled at a constant rate. The device switches itself off after 60 seconds idle.

  2. Flow from pressure

    A hydrostatic pressure sensor tracks the height of the liquid as it drains, so flow rates around 1 mL/s can be measured continuously.

  3. Hydration by colour

    My own library for the RGB sensor. I moved the LEDs across the container to stop reflections and took readings with them off and on to cancel ambient light. It told apart all 8 hydration levels of the test chart.

  4. A soft power switch

    The board drew about 3 mA asleep, which would have needed a 24,000 mAh battery to last a year. A button and a MOSFET that the microcontroller holds on fixed it; I simulated it, then built it on breadboard and Veroboard.

  5. FlowMasta, the test rig

    A pump that plays flow profiles from a spreadsheet, through a serial interface and a Python app anyone in the team could run. I fixed its drift with a buffer tank and by breaking the siphon.

  6. The Android link

    Found why the app could not find the device on newer phones (Android 10's runtime permissions) and fixed it, and rewrote the flow calculation with a moving average of our own.

On the bench

Eight jars of liquid from clear to deep orange, lined up on a desk
Test samples for the RGB sensor, made to a hydration chart
The white 3D-printed UroLab holder clamped to a toilet, with a red funnel in the container
UroLab in place on a toilet
A 3D-printed white box holding a development board soldered to green Veroboard
The housing I designed for the electronics
A peristaltic pump wired to an Arduino motor shield beside a beaker of water
FlowMasta: the pump and motor shield
A beaker of liquid lit red by LEDs, with the RGB sensor against its side
Testing the RGB sensor
Back to the first projectMade By Night

Hardware and software

Building a device that needs an app?

From the sensor to the phone, I have done each part. Tell me what you are making.