Mosquitoes can be one of the most annoying and dangerous insects during the summer months. Their bites leave irritating itchy welts, and they can transmit harmful diseases like West Nile virus and malaria. Luckily, there's a safe and easy way to repel mosquitoes using common electronic parts and items found around your home. In this guide, I'll walk you through the full process of building your own DIY electronic mosquito repeller using things you likely already have in your garage.

What is an Electronic Mosquito Repeller and How Does it Work?

An electronic mosquito repeller is a device that uses high frequency sounds to drive mosquitoes away. Mosquitoes have extremely sensitive hearing receptors that pick up frequencies between 1 kHz and 10 kHz. When they detect these high-pitched sounds, it overwhelms and disorients them, causing them to quickly leave the area to escape the irritating noise.

Electronic repellers work by producing ultrasonic sound waves that are beyond the range of human hearing but easily detected by mosquitoes. This allows the devices to create a protective bubble around an area, driving away any mosquitoes that come near while being silent to human ears.

Key Components Needed From Your Garage

Building a homemade mosquito repeller only requires a few basic electronic components that you likely have tucked away somewhere around your house or garage:

Arduino or Raspberry Pi

The core part of the mosquito repeller is a microcontroller board like an Arduino or Raspberry Pi. This acts as the brain that will control the device. Both Arduino and Raspberry Pi boards are inexpensive, readily available, and programmable.

Ultrasonic Transducer

An ultrasonic transducer is needed to actually generate the high frequency tones. This sensor will plug into the microcontroller board. Cheap ultrasonic transducers are easy to find at electronics stores or online for just a couple dollars.


Any basic computer speaker will work well. This will amplify the signals from the ultrasonic transducer to help create a larger bubble of protection.

Power Supply

The repeller will need some kind of power supply, ideally around 5 volts. This can be a plug-in adapter, USB charger, or batteries.

Optional Housing

For a more finished product, you can house the electronics in some sort of case or box. Plastic food containers or even an Altoids tin would work perfectly to safely contain the components.

Step-by-Step Building Instructions

Now let's walk through how to actually build the mosquito repeller:

1. Set up the Microcontroller Board

First, prepare your Arduino or Raspberry Pi board by plugging it into your computer. For an Arduino, you'll need to download the Arduino software. For Raspberry Pi, download the latest Raspbian operating system image and flash it onto an SD card.

2. Program the Microcontroller

Next, you'll need to load a simple ultrasonic mosquito repeller program onto the microcontroller board. If you search online, you can find free sample Arduino or Raspberry Pi code to use. The program will create oscillating high frequency outputs in the 15-20 kHz range that help cover the mosquito hearing range.

3. Connect the Ultrasonic Transducer

Once programmed, hook up the ultrasonic transducer to the microcontroller board using jumper wires. Consult the pinout diagram for your board to see where to make the proper connections.

4. Connect the Speaker

Take the input leads of your computer speaker and attach them to the same connections for the transducer. This allows the signals to be picked up by both components.

5. Provide Power

Now you need to actually power on the device. If using batteries, insert them into the holder slot on the microcontroller board. For a USB or DC power adapter, insert the cord into the board's power jack.

6. Test and Tweak the Device

Turn on the mosquito repeller and use an ultrasonic frequency analyzer phone app to confirm it's emitting sounds in the 15-20 kHz range. Adjust the program as needed to hit the optimal pitch.

7. Add Optional Housing

Finally, you can add the repeller components into a protective enclosure if desired. Make sure at least one side remains open or has holes so that the ultrasonic waves can freely emit.

And that's it! Once built, position your DIY mosquito repeller in an outdoor area and let it work its magic driving away those annoying mosquitoes.

Tips for Maximizing Effectiveness

Here are some useful tips to get the most out of your homemade electronic mosquito repeller:


Building your own mosquito repelling device is an easy and affordable way to enjoy the outdoors bite-free this summer. The simple electronic components put out silent high frequency sounds that naturally force mosquitoes to flee. Positioned properly around patios, decks, or yards, these DIY repellers create a safe and peaceful mosquito-free zone. So don't let pesky mosquitoes ruin your next BBQ or outdoor party. Follow these steps to make an effective mosquito repeller with spare parts and get ready to relax outside in peace.