Well Cow™ project
Well Cow™ is a research tool used to measure stomach acidity in cows' stomachs. Cows are susceptible to rumen acidosis
, where the acidity of the stomach affects yield of milk or beef. Well Cow™ provided the original sensor (a 'bolus'), which sits in the cow's stomach. The task for our team was to see if usability improvements could be made.
This is what our team did:
- Made the 'Gateway'. This device sits in the in the communual area for the cows on the farm and listens for any boluses within range
- Created a web app for controlling the Gateway from any device that has an Internet connection and a web browser
- Created the Cloud server for data backup and for sending commands to boluses remotely
- Designed the whole system to be asynchronous. Commands for a bolus (like requesting acidity data) are sent via the Gateway with the idea that the cow might not be nearby
In our team of three, I implemented the majority of the Gateway software and all of the cloud server. One colleague worked on the radio side of the Gateway software, and improved the database side when I had other projects to complete. My other colleague worked on the hardware design of the bolus and implemented the firmware.
What I worked on
The Gateway is a multi-process Python application that runs on a Raspberry Pi
The Gateway is designed to take commands for boluses that might not be within radio range. The user can access the Gateway via the web browser on their device and send commands to boluses. Once a bolus is in-range, the data is downloaded to the Gateway and uploaded to the remote server.
Multi-process: ZeroMQ was used for inter-process communication
- The web server process listens for incoming HTTP requests, processes them, and sends a response back to the user's web browser. There is heavy use of AJAX due to the potential wait for responses from other processes.
- The router handles incoming and outgoing commands for all of the boluses.
- The janitor does housecleaning, handles commands for the Gateway (as opposed to commands for a bolus), and backs up data to the cloud server
Full automated test suite
- A cow might have more than one bolus in its lifetime. On the Gateway's interface, an unassigned bolus can be assigned to an 'animal' (not cow-specific), and an animal can be a part of a group of animals.
Google App Engine (Python) was used. The cloud server stores all acidity data from all the boluses, and can be used to send commands to a bolus away from the farm.
- Full automated test suite
- Accounts system where each user is a part of an organisation. These users have a clearance level, meaning they are limited to what they can do in the control panel. For example, organisation admins can invite others to create an account, but organisation users cannot.
- Each user can see the hierachy of groups, animals and boluses within their organisation