IoTuesday: Maximize Your WiFi With This One Weird Trick!

Your IT department hates this.

Terrible clickbait titles aside, I wanted to improve on a project from a few weeks ago. Nick Poole gave me the idea of automating the DIY Yagi-Uda antenna/divining rod I had put together in order to find the orientation of the maximum WiFi signal strength.

The execution was straightforward: mount the antenna and ESP8266 Thing Dev Board onto a pan/tilt bracket with some servos. The ESP8266 code was updated to connect to a WiFi access point (AP) and begin sweeping up and down (about 70°) and left to right (about 180°). At 5° increments, the ESP8266 would take an RSSI reading and remember the yaw and pitch settings of the highest RSSI. After sweeping, the antenna automatically returns to the position with the best RSSI.

Here's a video of it in action:

There are, of course, a number of problems with this whole setup:

  1. The polarization (roll) of the antenna is not taken into consideration. It would require another servo to test vertical and horizontal orientations.
  2. If the antenna were moved, it would obviously require another maximizer sweep.
  3. If you stand in front of the antenna, place your hand near it, or put any sort of object in its line of sight. You change the multipath propagation of the radio waves, which can mess up the sweep tests or change where the best signal strength might be.
  4. I'm still relying on a poorly made DIY antenna. A professionally made directional antenna should, in theory, perform a lot better than my warped popsicle stick and paperclip monstrosity.
  5. Because the sweep arc is limited, the best connection might be behind the antenna.

Here's a shot of the rig post-maximization:

WiFi maximizer using a pan/tilt bracket and servos

The OLED display shows an updated RSSI to give you an idea of the connection strength even after the sweep is complete. If you think the given dBm might be unacceptable, then you may want to move the rig and test another spot, especially if you are indoors and multipath is an issue.

If you are interested in trying out the WiFi Auto Maximizer for yourself, you can find the pin connections and code here.

This setup could be useful for performing a very basic characterization of antennas (as per 71784's suggestion) if you are outdoors and have line of sight to an access point. By sweeping through the different angles, you could develop very simple and limited azimuth and elevation plots. It would not be very accurate, but it could still be useful for those of us without access to an anechoic chamber.

If I wanted to buy an inexpensive 2.4 GHz directional antenna (in lieu of DIY) to test with this rig, what would you recommend? Share your thoughts and suggestions in the comments below.