Fly Counter — counting insects as they move between breeding cages.
Eawag had built the rig: two cages, a connecting tunnel, a light grid across the passage and a motorised gate. What it did not have was the software to make those parts behave as one instrument. We developed the control software and the operator interface that count adult flies as they migrate, and that record every filling session.

Every batch starts with a known number of flies.
Eawag researches organic waste treatment using black soldier fly larvae, which reduce waste biomass and are then harvested as animal feed. The process depends on producing young larvae in consistent quality and quantity, and that in turn depends on stocking each breeding cage with a known number of adult flies.
Flies are moved from a dark cage into a breeding cage through a short tunnel. A light grid of 48 beams at a 5 mm pitch sits across that passage, and the question put to us was how to turn those beam interruptions into a count the research could rely on.
It is not a direct measurement. An adult fly is wider than the gap between beams, so one insect breaks several neighbouring beams at the same instant, and counting interruptions would badly overcount. The count has to be derived, and the figure it is derived from depends on the insects and on the grid — which makes it a setting a researcher can change, not a constant in the code.
A rig with moving parts, turned into an instrument.
The cages, the tunnel, the gate mechanism and the light grid are the client’s. Our scope was the layer that reads the sensor, decides what the readings mean, sequences the mechanism, puts the process in front of a researcher and leaves a record behind.
A number the research can be run on.

