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.

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.

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.

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.
