ESP8266 Radiation Pattern



Introduction: ESP8266 Radiation Pattern

About: Finding a simple solution to a problem.

The ESP8266 is a popular microcontroller module because it can be connected to the internet through the onboard WiFi. This opens up many opportunities for the hobbyist to make remote controlled gadgets and IoT devices with the minimum of extra hardware. Conveniently, most of the modules incorporate an antenna, either a printed circuit inverted F type or a ceramic chip. Some boards even allow an external antenna to be plugged in for extra range.
Most of us are familiar with the quirks of radio, TV or even cell phone antennae. After carefully adjusting the position of the antenna or set, the signal goes noisy just as you move away and sit down! Unfortunately, the ESP8266 being a wireless device, can show similar antisocial behaviour. A method of measuring the radiation pattern of the ESP8266 is explained in this Instructable using the RSSI signal strength reported by the module. Several antenna types are tested and the sweet spot highlighted for each version.
A small stepper motor is used to rotate the ESP8266 module through 360 degrees over a period of 30 minutes and an average RSSI reading measured every 20 seconds. The data is sent to ThingSpeak, a free IoT analysis service that charts the results as a polar plot from which the direction of maximum signal can be resolved. This process was repeated for several orientations of the ESP8266 module.


Components for this project are easily found on the internet from suppliers like eBay, Amazon etc. if not already in your junk box.

28BYJ48 5V stepper motor
ULN2003 driver board
Arduino UNO or similar
ESP8266 modules for test
External antenna
USB power supply
Arduino IDE and ThingSpeak account
Sundries - plastic tube, wire, Blu tak

Step 1: Overview of System

An Arduino Uno is used to drive the stepper motor through a full rotation over a period of 30 minutes. As the motor takes more current than available from the Uno, the ULN2003 driver board is used to supply the extra motor current. The motor is screwed down on a piece of wood to give a stable platform and a length of plastic tube pushed onto the motor spindle which will be used for mounting the module under test. When the Uno is powered up, the motor spindle makes a full rotation every 30 minutes.
An ESP8266 module programmed to measure the WiFi signal strength, RSSI, is stuck to the plastic tube so that the module makes a full rotation. Every 20 seconds, the ESP8266 sends the signal strength reading to ThingSpeak where the signal is plotted in polar coordinates.
The RSSI reading can vary between chip manufacturers but generally lies between 0 and -100 with each unit corresponding to 1dBm of signal. As I hate dealing with negative numbers, a constant 100 has been added to the RSSI reading in the polar plot so that the readings are positive and higher values indicate a better signal strength.

Step 2: Stepper Motor

The 28BYJ48 stepper motor is lightly screwed down to a piece of wood to provide stability. About 8 inches of 1/4” plastic tube is glued onto the stepper motor spindle for mounting the module under test. The Uno, driver board and motor are wired up as has been described many times on the internet. A short sketch in the file is flashed into the Uno so that the tube will rotate a full circle every 30 minutes when powered up.

The sketch used to rotate the motor is listed in the text file, nothing revolutionary here.

Step 3: ESP8266 Testing

The modules for test were first flashed with a sketch that sends the RSSI reading to ThingSpeak every 20 seconds for a full revolution of the stepper motor. Three orientations were plotted for each module denoted by test A, B and C.
In position A, the module is mounted on the tube side with the antenna uppermost. When facing the antenna, the RHS of the antenna points to the router at the start of the test. Unfortunately, I was nobbled by negative numbers again, the motor turns clockwise but the polar plot is scaled anti-clockwise. This means that the unobscured broadside of the antenna is facing the router at about 270 degrees.
In position B, the module is mounted horizontally on the top of the tube. The antenna points at the router as in test A at the start of the test.
Finally, the module is positioned as in test A and then the module is twisted clockwise by 90 degrees and mounted to give the test C position.

The text file gives the code required to send the RSSI data to ThingSpeak. You need to add your own WiFi details and API key if you use ThingSpeak.

Step 4: Inverted F Printed Circuit Results

The first module tested had a meandering printed circuit antenna which is the most common type because it is the cheapest to manufacture. The polar plot shows how the signal strength changes as the module is rotated. Remember the RSSI is based on a log scale and so a change of 10 RSSI units is a 10 times change in signal power.
Test A with the antenna at the top of the module gives the highest signal. Also, the best position is when the PCB track faces the router. The worse results occurs in test B where there is a lot of shielding from the other components on the board. Test C also suffers from component shielding but there are some positions where the PCB track has a clear path to the router.
The best way to mount the module is with the antenna uppermost with the PCB track facing the router. In this case, we can expect a signal strength of about 35 units. Non optimum positions can easily reduce the signal strength by a factor of ten. Normally, the module would be mounted in a box for both physical and environmental protection, we could expect that this will reduce the signal even more... A test for the future.

ThingSpeak needs a bit of code to organise the data and make the polar plots. This can be found in the embedded text file.

Step 5: Ceramic Chip Results

Some ESP8266 modules use a ceramic chip for the antenna instead of the printed circuit track. I have no idea how they work except the high dielectric constant of the ceramic probably allows for a shrink in physical size. The advantage of the chip Antenna is a smaller footprint at the expense of cost. Signal strength tests were repeated on a module with a ceramic chip antenna giving the results in the picture.
The chip antenna struggles to achieve a signal strength greater than 30 compared to 35 with the PCB design. Perhaps size does matter after all😉 Mounting the module with the chip uppermost gives the best transmission. However in Test B with the board mounted horizontally, there is a lot of shielding from the other components on the board in certain positions. Finally in Test C there are positions where the chip has a clear path to the router and other times when there is obstruction from the other board components.

Step 6: Omni Directional Antenna Results

The ceramic chip module had the option of connecting an external antenna through an IPX connector. Before the connector can be used, a link must be moved to swap the signal path from the chip to the IPX socket. This proved quite easy by holding the link with tweezers and then heating the link with a soldering iron. Once the solder melts, the link can be lifted off and placed in the new position. Another dab with the soldering iron will solder the link back into the new position.
Testing the omni antenna was slightly different. First the antenna was tested by rotating it horizontally. Next the antenna was clicked into a 45 degree position and tested. Finally a plot was made with the antenna vertical.
Rather surprisingly, the worse position was a vertical position for the antenna especially as the router antennae were vertical and in a similar plane. The best positions were with the antenna between horizontal and 45 degrees with a rotation angle of about 120 degrees. Under these conditions, the signal strength reached 40, a significant improvement over the original chip antenna.
The plots only show the slightest resemblance to those beautifully symmetrical doughnut diagrams shown in text books for antennae. In reality, many other factors, known and unknown, influence the signal strength making experimental measurement the best way to test the system.

Step 7: The Optimum Antenna

As a final test, the omni directional antenna was set a 45 degrees in the position of highest signal strength. This time the antenna was not rotated but left to datalog for 30 minutes to give an idea of the measurement variation. The plot indicates the measurement is stable to within +/- 2 RSSI units. All these results were taken in an electrically busy household. No attempt was made turn off DECT phones, microwave ovens or other WiFi and Bluetooth devices to reduce electrical noise. This is the real world...

This Instructable shows how to measure the effectiveness of the antennae used on ESP8266 and similar modules. A printed track antenna gives a better signal strength compared to a chip antenna. However, as expected, an external antenna gives the best result.

Arduino Contest 2020

Participated in the
Arduino Contest 2020

Be the First to Share


    • Pumpkins & Gourds Speed Challenge

      Pumpkins & Gourds Speed Challenge
    • 3D Printed Student Design Challenge

      3D Printed Student Design Challenge
    • Back to School: Student Design Challenge

      Back to School: Student Design Challenge