An autonomous mosquito detection and elimination system. Because some pests deserve a robotic response.
Difficulty
Intermediate to Advanced
Est. Cost
$40–200
Time
2–5 Weekends
Competition Categories
AI Demo · Utility · Freestyle
The Problem
Mosquitoes kill more humans than any other animal on earth. They ruin backyard barbecues, keep you up at night, and transmit diseases across six continents. Chemical sprays are temporary. Citronella candles are decorative at best. Bug zappers kill everything except mosquitoes (studies show they mostly attract and kill beneficial insects).
The No-Mo takes a different approach: detect the mosquito by its acoustic signature, then eliminate it. No chemicals, no collateral damage, no mercy.
The Science
Every mosquito species has a distinctive wing beat frequency — the rate at which its wings oscillate in flight. This produces the characteristic whine you hear at 2 AM. That sound is a fingerprint.
Species
Wing Beat Frequency
Region
Aedes aegypti (Yellow Fever)
450–600 Hz
Tropical / Southern US
Aedes albopictus (Asian Tiger)
350–500 Hz
Eastern US / Global
Culex pipiens (Common House)
300–450 Hz
Worldwide
Anopheles gambiae (Malaria)
350–500 Hz
Sub-Saharan Africa
Housefly (not a mosquito)
190–200 Hz
—
Honeybee (not a mosquito)
200–250 Hz
—
The key insight: mosquitoes occupy a higher frequency band (300–600 Hz) than most other common flying insects. A microphone, a fast Fourier transform, and some filtering can reliably distinguish a mosquito from a fly, bee, or moth. Research teams have demonstrated 80%+ species-level accuracy using this method on low-power embedded hardware.
Choose Your Approach
Tier 1: Detect + Alert
Mic array detects mosquito presence and lights up an LED or sends a phone notification. Simplest build — no moving parts, no kill mechanism. Pure detection proof-of-concept.
Tier 2: Detect + Trap
Detection triggers a fan trap or UV lure to activate only when mosquitoes are present. Energy-efficient — the trap only runs when there's something to catch.
Tier 3: Detect + Track + Eliminate
Acoustic triangulation or camera tracking to pinpoint the mosquito's position, then a focused response — laser, directed air blast, or precision fan. The Photonic Fence approach, scaled down to a porch.
What You Bring
The kit includes the microphone array, frequency analysis board, and trap hardware. You supply:
Raspberry Pi 4 / 5 — runs FFT analysis and trap control logic
microSD card — 16GB recommended
USB power supply — 5V/3A for the Pi
Box fan or 120mm PC fan — for the intake trap (Tier 1 build)
Enclosure — weatherproof box if deploying outdoors (plastic tub works)
What's Included in the BYOB Kit
Dual MEMS microphone array (I2S digital output)
80mm intake fan with 3D-printed funnel
Mesh capture bag with quick-release mount
MOSFET trigger board for fan control
UV LED lure strip with driver circuit
Weatherproof enclosure
Pre-crimped wiring harness with labeled connectors
Complete source code, wiring diagrams, and setup documentation
Wire your MEMS mic to the Pi. For the I2S SPH0645 breakout:
# Enable I2S on the Pi
# Add to /boot/config.txt:
dtparam=i2s=on
// ... full implementation in project files
For analog mics (MAX4466), connect the output to a USB sound card's mic input. Simpler wiring, slightly noisier signal.
2
Real-Time FFT Detection
The core of the No-Mo is a continuous frequency analysis loop. Capture short audio windows, run an FFT, and look for energy spikes in the mosquito band:
import numpy as np
import pyaudio
from scipy.signal import butter, lfilter
// ... full implementation in project files
Tuning the threshold: Run the system for a few hours in your environment and log the band energy values. You'll see a clear noise floor with spikes when mosquitoes are near. Set the threshold just above the noise floor. Too low = false positives from ambient noise. Too high = missed detections.
3
Build the Fan Trap
The trap is simple: a funnel that concentrates airflow into a mesh bag, powered by a PC fan. When a mosquito is detected, the fan spins up and creates a downdraft that pulls the mosquito into the bag where it dehydrates.
Mount an 80mm or 120mm PC fan blowing inward (pulling air through the intake)
Attach a funnel or cone to the intake side — a cut-down plastic bottle works well
Behind the fan, mount a fine mesh bag (pantyhose material works perfectly) to catch trapped insects
Optional: mount UV LEDs around the funnel opening as an attractant
# Fan control via MOSFET
import RPi.GPIO as GPIO
// ... full implementation in project files
4
Add the Lure (Optional but Effective)
Mosquitoes find hosts primarily through CO2, body heat, and skin chemicals. A passive CO2 source near the trap dramatically increases catch rates:
Yeast fermentation: Mix 1 cup warm water + 1/4 cup sugar + 1 packet active dry yeast in a bottle. Produces CO2 for 8–12 hours. Replace daily.
Dry ice: A small chunk in an insulated container releases CO2 slowly. More consistent but requires handling with gloves.
UV LEDs (395nm): Secondary attractant. Place around the intake funnel. Mosquitoes are moderately attracted to UV, especially at dusk.
5
Notifications and Logging
The Pi Zero 2 W has WiFi — use it. Log every detection with a timestamp and peak frequency, and optionally push notifications:
import json
from datetime import datetime
// ... full implementation in project files
Data gold: After a few weeks, your detection log becomes genuinely useful. You can identify peak mosquito hours, correlate with weather, and optimize trap placement. Plot frequency vs. time and you might even identify which species are active in your area.
6
Weatherproof and Deploy
For outdoor deployment (porch, patio, backyard):
Mount everything in a weatherproof enclosure with mesh-covered openings for the mic and fan
Keep the mic exposed but shielded from wind — a small foam windscreen (like on a lavalier mic) cuts wind noise dramatically
Power via a long USB cable from an outdoor outlet, or use a solar panel + battery for truly standalone operation
Position the trap at mosquito flight height: 1–4 feet above ground, near vegetation or standing water where they breed
Laser builds: If you're considering Tier 3 (laser elimination), be aware that even low-power lasers (Class 3B, 100mW+) can cause permanent eye damage with momentary exposure. Laser-based mosquito systems are a fascinating engineering challenge, but they require rigorous safety enclosures, interlock switches, and should never be pointed where people or pets could be exposed. For competition or demonstration purposes, a visible laser pointer (Class 2, <1mW) can show tracking capability without the safety risk — swap in a high-power diode only inside a fully enclosed test chamber.
The Tier 3 Upgrade Path
Once you've mastered detection, the next level is localization and targeting. This is the Photonic Fence approach scaled down:
Triangulation: Three mics in a triangle, 20–30cm apart. Time-difference-of-arrival (TDOA) between mics gives you the angle to the sound source. Two angles from two mic pairs give you a 2D position.
Camera confirmation: A Pi Camera with IR illumination and OpenCV blob detection. Once acoustic detection triggers, the camera searches a narrow region for a small moving object. Confirms the target visually before engaging.
Tracking servo mount: Pan/tilt servos (same setup as the Nerf Sentry guide) to aim a response — laser, focused air jet, or directional speaker (ultrasonic deterrent).
This is genuinely hard engineering — real-time audio processing, computer vision, and servo control running simultaneously on a Pi. But it's been done. A research team at Intellectual Ventures demonstrated a full Photonic Fence prototype that could distinguish male from female mosquitoes (by wing beat frequency — females are slower) and selectively target only the females (the ones that bite).
Competition Ready?
The No-Mo is a standout competition entry because it solves a real problem:
AI Demo: Live acoustic classification is impressive to judges. Show the FFT display, the frequency bands, and a real-time detection event. Bonus: bring a recording of a mosquito and play it near the mic to trigger a demo detection.
Utility Challenge: Deploy it at the venue and catch actual mosquitoes during the event. Nothing proves a concept like a mesh bag with real catches.
Freestyle: The story sells itself — "I built a robot that hunts mosquitoes." Name it, brand it, give it personality. The No-Mo practically markets itself.
Science Fair Crossover: The detection log data (species frequency analysis, activity patterns, environmental correlation) is publishable-quality if you collect enough of it.