Mouse Urine Monitoring System

Working with the department of Veterinary Medicine – Urology at the University of Wisconsin Madison, I created a system to help collect urine and feces data through a Mettler-Toledo scale, a raspberry pi, a python script and a raspberry pi camera module.

The scale data is logged into a csv file, each row containing a timestamp and the weight read from the scale. The file is labeled with the date and time the recording started. The video is continuously recording into a circular buffer and when the scale’s weight fluctuates by more than 5 mg, the previous 10 seconds and the following 10 seconds are recorded into a video file with the filename being the date and time the scale detected the event.

Code and Instructions on System

https://github.com/metalshreds/rpi_urine_monitoring

Previously the department of urology would continuously record the video for the duration of the experiments (which could be as long as 4 hours). A researcher would then review the videos and identify if the mouse voided or defecated, not only was this time intensive for the researcher, but it was also resource intensive for the computer. The new setup offers significantly shorter videos for review with the labeled time of the event. Additionally it uses very little resources; testing proved that the system could store about 46 hours of video on a 16gb SD card provided an event happened with a frequency of 5 min.