How it works

One machine per arena. One node for the lab.

An ethoscope platform has three parts: the ethoscopes that record and track, a node computer that runs the lab, and the analysis tools that turn tracking data into results.

The ethoscope

Each ethoscope is a Raspberry Pi with a camera, mounted in a 3D-printed case above an arena. The standard arena holds 20 glass tubes, one fly per tube; other arenas are available and new ones can be designed. The camera is infrared-sensitive and the arena is lit with infrared, so tracking continues in the dark.

Exploded view of an ethoscope: Raspberry Pi, 3D-printed case, camera, two acrylic walls, the tube arena and the base.
An ethoscope, taken apart: Raspberry Pi and camera in the printed case, acrylic walls, and the arena of glass tubes.

Tracking runs on the Raspberry Pi itself, in real time. For every animal the ethoscope records position, movement and orientation several times per second and writes them to a local database.

Live camera view of a 20-tube arena with numbered regions; each tracked fly is outlined in red.
The live view: one region of interest per tube, each fly fitted with an ellipse. Demo data.

The node

The node is an ordinary Linux computer on the same network as the ethoscopes. It discovers every machine, starts and stops experiments, keeps track of metadata, and copies the data from each ethoscope to central storage. Users interact with it through a web interface.

The network

Ethoscopes connect to the node over a dedicated Wi-Fi network. A small lab can use a single router; larger installations use managed access points. The manual describes both.

Modules

Because each animal is tracked live, an ethoscope can respond to it. Modules add actuators under the arena: motors that rotate tubes for sleep deprivation, valves that deliver air or odours, and LEDs for optogenetics. Current modules use one Arduino-based board with 20 output channels.

An ethoscope on a teal sleep-deprivation module, with a row of small motors at the front.
The sleep-deprivation module: a motor under each tube turns it when its fly has been still for too long.

Analysis

Data from the node are read by ethoscopy (Python) or rethomics (R). Both annotate sleep from movement, link data to experimental metadata, and produce activity, sleep and circadian analyses. ethoscope-lab packages ethoscopy in a JupyterLab environment that runs next to the node.

Open source

Software, firmware and printable parts are on GitHub. The software is released under GPL-3.0. The case can be printed, or built from LEGO, as described in the original paper.

An ethoscope built from LEGO: a white and blue brick base, black Technic columns and a brick housing for the Raspberry Pi.
An ethoscope built from LEGO.