Start a Project
What we do
Capabilities Services Industries
Work
Company
About Careers Contact
Start a Project
Selected work 06

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.

Client
Eawag
Swiss Federal Institute of Aquatic Science and Technology
Industry
Scientific and laboratory equipment
Stage at start
Rig built, no software
Volvix Systems role
Control software, sensor integration and the operator interface
The Fly Counter operator interface on its touch panel, beside a diagram of the dark cage, sensor, gate and breeding cage
01 / The system

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.

02 / Our contribution

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.

01Control software — The software that runs the filling process: it reads the sensor continuously, tracks each cage against its target, drives the gate open and closed against its end-stops, and runs cage agitation on an interval the researcher sets. 02Counting logic — Beams broken at the same instant are grouped and divided by the number of beams one fly is expected to cover, then rounded up. That divisor is exposed as a setting, so it can be tuned against real insects rather than assumed. 03Sensor integration — The state of all 48 beams is read over a serial link to the grid. That per-beam status is the only raw signal the count is built from, so everything downstream depends on reading it reliably and in step with the gate. 04Operator interface — The touch panel leads the researcher through a filling run: identify the breeding cage, identify each dark cage in turn, start, watch, stop. The running count, the total against target and the light grid are all on one screen. 05Session records — Two files are written per session: one summarising each dark cage with its start and finish times and totals, and one logging every detection event. The second exists so the counter can be checked against a manual count. 06Parameters — Cage targets, the time limit, the rate threshold, the beams-per-fly divisor and the agitation timings are all exposed on the settings screen and bounded to sensible ranges, so the process can be retuned between experiments without a code change.
The start screen, showing the breeding cage identified, its fill against target, and the dark cages counted so far
Start
The scan screen, reading the code on a dark cage and showing its details before the gate is opened
Scan cage
The counting screen, with the running count, the total against target, the light grid and the close conditions
Counting
Operator interface
One screen per stage of the run.
The count and the total against target sit together, with the light grid underneath and the close conditions beside them, so the researcher can see which condition will end the run before it does.
The dark cage and the breeding cage in the Eawag nursery, connected for a filling run
Fig. 01 — The two cages in the nursery, connected for a run.
03 / Where it stands

A number the research can be run on.

Before
A rig that could move flies between cages, with no way to know how many had moved.
After
Cages filled to a set target, with the gate closing on the first condition met and a record written for every session.
Next
Calibrating the beams-per-fly divisor against manual counts, using the per-event log written for that purpose.

Have a product or system you’re trying to build?

Tell us what you are working on and what you need help with.

Start a Project