Cheap Automated Mothbox

Hi everyone! @Hubertszcz has a biodiversity monitoring project in Panama, and we have been working on quick and dirty, ultra low cost high quality insect monitoring. We built a model last year that we tested out and has been getting decent data from! I'm crossposting from the GOSH forums where we are also developing and discussing it. There's more example images there!

We got a tiny bit of funding for a couple weeks of design work and are gonna make a new version, and i'm checkin with you all to see if there's any extra things i should consider in the next design!


Here’s some design targets for it:

  • be weatherproof and self-contained and functioning while left outside in the rainforest for a month at a time
  • automatically turn itself on for 4 random nights during that month
  • get high quality images of the insect visitors (for instance moths that are only 5mm long) that can be processed later
  • be reliably usable by non-experts
  • cost less than $400 in parts
  • the attractive/ photographable area should be at least the size of an A4 piece of paper (210x297mm)
  • adaptable to use different types of lights (We have a weatherproofed USB attachment)
  • Be carry-able by foot by a person to deploy deep into the field. Ideally a person could carry 2-3 of these at a time.
  • Be robust to survive travel into difficult places to reach

our current version has been built and tested over the past couple months.


I was just about to do some testing with exactly these cameras, and @tom_august and @albags saved me the trouble with the testing they did in their very similar project


I was thinking about possibly testing out the 5MP arducam SPI cameras i could control with a microcontroller for ULTRA low energy use, but i think that that would be too low resolution for our purposes. It looks like the 16mp RPI cam would be fine, but i think we will stay with the hawkeye now that we got it working and getting better images. 


One of our main concerns right now is POWER. the whole thing can run on our battery for a night or two right now, but we want LONGER and i think we can get there with possibly better power management. @tom_august what system do you use to cycle your pi into lower power modes.

Let me know any other thoughts on our design!

these are some example cropped images


Some fun updates on the low-cost automated insect detector design! I added a custom tripod mount so we can set them up on cheap tripods in the field (or anything with a 1/4in bolt). I have also made a fun mechanism using telescoping rods that holds the target out when deployed (to attract and photograph moths, and it collapses to protect the lens when being transported. Plus it adds a pretty fun flair to the project!

New Features on Automated Moth Detector (Youtube Video)


Goal is to make it strong, compact and easy for field biologists like Hubert @Hubertszcz or conservationists like Azuero Reforesta to set up.



PXL_20230927_1951480331080×813 215 KB


The next version will shift how it holds the rods so the target can collapse all the way to the lens for A) better compactness B) lens protection. But this first prototype works great!

Also the current target is currently just cardboard I’m prototyping with, the real one will be slippery plastic with cloth on the target side to lure in insects to land.


PXL_20230927_1955221221080×813 245 KB



PXL_20230927_1959526961080×813 317 KB



PXL_20230927_2000321141080×1434 251 KB


The rods I use are these cheap magnetic telescoping pick up tools you can find online for about a dollar each. They seem quite strong and to be made of stainless steel so I think they should last okay out in the wild (like retractable antennas on cars)

mothbox fusion

mothbox fusion930×792 162 KB


If you unscrew the magnet there is a super short m2 bolt thread, but i couldn’t figure out a good easy way to attach that to my target. So i actually ended up snipping and flattening and drilling a hole to then put my own bolt through. If someone has a better or more elegant solution, i would love to know!

Oh this looks like fun! I'll try building you one from an ESP32-cam which I believe is not 5mp but might take some great images anyway. As far as raspberry power supplies I've been working on a solar aircraft receiver for ads-b using a raspberry pi zero and 18650 batteries. I'll get some test photos using as esp32-cam and see if the pictures are up to the challenge.