Mothbox 4.5 Takes Advantage of AI and Open Source Hardware for Insect Identification



Digital Naturalism Laboratories’ (Dinalab) Mothbox is described as a low-cost, high-performance insect monitor featuring a power-efficient and lightweight design that enables users to deploy the platform in remote locations. Its affordable and readily available hardware lets users assemble their own, as the physical designs, electronics schematics, Pi scripts, and insect-IDing AI are free to use and modify to suit individual needs.

The Mothbox is designed to facilitate the discovery of new species of insects and to gauge insect populations, which have been in decline worldwide due to climate change, pollution and other environmental factors. According to a report from Our World in Data, there are 1.5 million known insect species, and still more that are undiscovered. Those numbers allow scientists and researchers to gain significant insights into the health of certain environments. Combining that information with the activity of thousands of species of insects, along with other data like climate, acoustic, or soil analysis, can provide a deep analysis of how environments can be repaired.

“Because they tend to have short lives and often limited ranges, insects can provide super localized data,” states Andy Quitmeyer, a member of the Dinalab team. “For comparison, think about something like a Jaguar, which is a rare find and scientifically valuable to see on a wildlife camera, but they have large ranges and long lives. The presence of a Jaguar does not necessarily tell us much about the health of the environment where it was spotted. It could simply be traveling across disturbed farmland to escape from a destroyed habitat elsewhere. Having an insect sensor (like a Mothbox), however, that could compare the activity of thousands of different species of insects can highlight differences in environmental health in areas just a couple kilometers apart.”

Developed by the Dinalab team, including Andy Quitmeyer, Bri Johns, and Hubert Szczygiel, the Mothbox is the ideal tool to garner data on insects in remote locations, as other identifiers can cost upwards of $10,000 and are too large to be deployed by a single individual.

The platform’s compact form factor takes advantage of a Raspberry Pi 5 (or the Pi 4 with PiJuice for power management), an Arducam 64MP autofocus camera, and a Talentcell rechargeable battery with a 12V regulator to power the device. It also makes use of UV and visible light attractors, including custom-designed Mothbeam PCBs, to lure the insects, a three-channel relay board for managing the lights and other peripherals, and a modified Plano 1460-00 waterproof case with laser-cut acrylic arms and epoxy-sealed lens adapter.

The Mothbox operates autonomously, following a user-defined schedule. When the schedule begins, the device powers on and activates its UV light attractors to lure nocturnal insects. The high-resolution camera then captures the critters, which are then processed using open source AI scripts, including YOLOv8, which identifies and crops insect images, and a customized version of BioCLIP (complete with a user interface) that assists in grouping and identifying insects to various taxonomic levels. The processed data can then be stored locally on the device or uploaded to the cloud for additional analysis.

The Mothbox can also leverage several different targets or backgrounds to highlight insects. These include the standard target, which can be illuminated by lighting from inside the device; a dual target that’s larger than the standard but can be folded in half for easy portability; a quad target that’s four times larger than the standard and has to be positioned further away from the camera, and “just point it at something,” which can take advantage of walls or sheets.

Most of the targets are cut from acrylic and are designed to fit the arms of the Mothbox, making them easy to carry and deploy; however the larger targets can cause anomalies as the camera focuses at certain time intervals. So, suppose the target happens to be a sheet or other malleable material that sways during a light breeze. In that case, the camera will need to refocus in order to accurately identify insects.

The material should remain as flat as possible; otherwise parts of the image may be occluded by wrinkles. The same goes for lighting, which should illuminate the entire target to maintain uniformity from the center of the target to the edges. The targets themselves will also need to be cleaned every so often, as insects, especially moths, have a tendency to defecate a lot, so choosing a material that is easily cleaned is ideal; for these instances, the team used felt and a thin piece of metal painted white.

The Mothbox build process is straightforward, but requires power tools to drill holes in the enclosure for the camera and holes for the bolts that connect the arms. Most of the material is acrylic and needs to be laser cut to specific sizes and lengths to accommodate the mainboard and most of the electronics. The Mothbox uses ring lights intended for microscopes as well, which are disassembled and stripped of their electronics before being rewired to the enclosure. These are positioned on either side of the camera to maintain uniformity and reduce lens glare.

The rest of the build involves connecting the Raspberry Pi, camera, and other electronics to the cut acrylic pieces and wiring them together inside the plastic, weatherproof enclosure. The Dinalab team suggests users can wire the Mothbox up to add a solar panel that will help prolong battery life and even how to install a weatherproof charging port if needed.

What’s more, the team points out that users can equip the device with different light-based attractors depending on their requirements. These include the Mothbeam made by Moritz, which offers UV and visible light attractors, internal and external 12V UV lights, and more.

Once the Mothbox is completed, it simply needs to be flashed with the team’s latest Mothbox image, which installs on the Raspberry Pi’s SD card drive. The team notes that the installation time is longer than normal (about 10 minutes) as it “does all kinds of prep” before it’s launched. This process requires a second boot sequence, as the operating system will have loaded up, and the whole device should go into “Mothbox Mode,” turning on the UV attractor and flashing the Ring Lights every minute. Of course, users can program their own time intervals and when to power up and power down the platform.

According to the Dinalab team, the Mothbox has already been deployed in over 140 locations across Panama, the United States, Ecuador, Peru, and Mexico for biodiversity monitoring conservation research and as an educational tool that engages communities and students in various science projects. The Mothbox project also recently won the 2025 WILDLABS Award, securing a $50,000 grant to develop a mass-manufacturable version that aims to further reduce costs (currently costs about $375) and simplify assembly.

Andy Quitmeyer shows off the Mothbox at Open Hardware Summit 2025

By admin

Deixe um comentário

O seu endereço de email não será publicado. Campos obrigatórios marcados com *