Arduino Mosquito Repeller

by webgeeks in Circuits > Arduino

64099 Views, 396 Favorites, 0 Comments

Arduino Mosquito Repeller

10.png
12.png
14.png
11.png

In this instructable I'm going to show you how to build a mosquito repeller using an Arduino. The repeller is in the form of a shield that plugs into the Arduino board and the frequency of the repeller can be changed easily.

This project is ideal if you are going camping or hiking outdoors, this device produces a sound of 31KHz Frequency which acts as a mosquito repellent. The frequency of this device can be adjusted and at 23kHZ to 54 kHz it also acts as a dog whistle. Human ears are not sensitive to these frequency ranges.

You can also view the video below on how to build this project.


Tools and Components

4.png
3.png
1.png

Here is a list of the components and tools required, the list is simple and all you need is

  • Arduino Uno
  • PCB
  • Piezoelectric Disk
  • Header Pins
  • A breadboard (optional)
  • Wires
  • Soldering Iron
  • Soldering Lead

Measuring

4.png
6.png

For this project we will be using digital pins 9 and 11, you could use any other pin with PWM support. So we will need to cut the header pins to our requirement. Then plug the headers into the PCB and mark the layout of the shield. Solder the header pins on to the Arduino, to solder the pins move the black connectors up a little bit and then solder it.

After soldering place the PCB on the Arduino to see if everything fits fine.

Cutting

6.png
5.png
7.png

After soldering the headers lets cut the excess PCB out, to do this I used a rotary tool, you can also use a PCB cutter. After cutting the PCB you should have a shield, like the one in the picture. You can sand out uneven edges to get a cleaner look.

Plug the board on the Arduino to make sure it fits right.

Circuit

15.png
16.png
17.png
8.png

The circuit is very simple, one of the piezoelectric disk is connected to digital pin 9 and the other to digital pin 11. The left over terminal of both the disks is connected together and soldered to the ground terminal of the Arduino. I am using two digital pins because I want to generate two different frequencies. You could connect both the disks in parallel if you like to use only one frequency.

Setting both the disks to the same frequency will cause the board to resonate and will give you more range.

Code

14.png
9.png

The code for this circuit can be found below the code is really simple and is self explanatory, you can change the frequency by altering the frequency range in the code. 31KHz is the frequency that repels mosquito's and 23kHZ to 54 kHz to act as a dog whistle.

int speaker = 9;
int frequency = 31000;
int speaker2 = 11;
int frequency2 = 31000;

void setup(){
pinMode(speaker, OUTPUT);
pinMode(speaker2, OUTPUT); }

void loop(){ tone(speaker, frequency, 1000); tone(speaker2, frequency2, 1000); }