ESP32-CAM Connect External Antenna (Extend Wi-Fi Coverage)

The ESP32-CAM comes with an on-board Wi-Fi antenna, but it also has an IPEX connector if you want to use an external antenna. Using an external antenna can solve problems related with slow video streaming web servers and other connectivity problems. This tutorial shows how to use an external antenna with the ESP32-CAM.

ESP32-CAM Connect External Antenna Extend Wi-Fi Coverage Signal strength

How to connect an External Antenna to the ESP32-CAM

The ESP32-CAM has the option to use either the built-in PCB antenna or an external antenna as the one shown in the following figure.

How to connect an External Antenna to the ESP32-CAM camera AI Thinker Module

Next to the IPEX connector there are three little white squares laid out like a “<” with the middle position being common. There is a resistor selecting the desired antenna. Here’s the two configurations:

  • To use the IPEX connector with an external antenna, the resistor must be on the bottom position, like this “\”. See illustration below;
  • To use the PCB antenna (on-board antenna), the resistor must be on the top position, like this “/”.
ESP32-CAM Camera AI Thinker Module External Antenna and on-board antenna

Take a look at your board to see if it is set to use the on-board antenna or the IPEX connector. Using the on-board antenna works well if you are close to your router. We recommend using the IPEX connector with an external antenna for better results.

Projects with video streaming crash frequently when you don’t use an external antenna due to poor connectivity. So, make sure you get one to have your projects working reliably.

To enable or disable the on-board antenna, you just need to unsolder that resistor and solder it in the desired configuration. You can also drop some solder to connect those points (you don’t necessarily need to add the resistor as long as the pads are connected).

Note: You can’t use the two antennas at the same time, so you can only have one connection for the antenna.

When getting an ESP32-CAM, there are stores that offer the package with an external antenna:

Testing the ESP32-CAM Wi-Fi Signal Strength

You can upload the following code to your ESP32-CAM boards to check the signal strength of the connection to the router (RSSI – Received Signal Strength Indication).

#include "WiFi.h"

const char* ssid     = "REPLACE_WITH_YOUR_SSID";
const char* password = "REPLACE_WITH_YOUR_PASSWORD";

void setup(){
  Serial.begin(115200);
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.println("");
  Serial.println("WiFi connected.");
  delay(100);
}

void loop(){
  Serial.print("RSSI: ");
  Serial.println(WiFi.RSSI());
  delay(2000);
}

When testing the signal strength, the closer the value to 0, the stronger the signal is.

In our case, with a distance of approximately 5 meters (16.4 feet) to the router with obstacles in between (walls), we got the following results:

  • ESP32-CAM without antenna: RSSI of approximately -60
  • ESP32-CAM with antenna: RSSI of approximately -36

Learn how to program and build 17 projects with the ESP32-CAM using Arduino IDE DOWNLOAD »

Learn how to program and build 17 projects with the ESP32-CAM using Arduino IDE DOWNLOAD »

Wrapping Up

If you’re having issues with your video streaming projects with the ESP32-CAM: constant lag and very slow web servers, adding an external antenna might solve those problems. If you connect an external antenna, take a look at your board to see if it has the right connection to actually use the external antenna.

If you’re having other problems/errors with your ESP32-CAM projects, take a look at our troubleshooting guide – ESP32-CAM Troubleshooting Guide.

We hope you’ve found these tips about the ESP32-CAM antenna useful. We have more projects and tutorials about the ESP32-CAM that you may like:

Thanks for reading.


Learn how to program and build projects with the ESP32 and ESP8266 using MicroPython firmware DOWNLOAD »

Learn how to program and build projects with the ESP32 and ESP8266 using MicroPython firmware DOWNLOAD »


Enjoyed this project? Stay updated by subscribing our weekly newsletter!

5 thoughts on “ESP32-CAM Connect External Antenna (Extend Wi-Fi Coverage)”

  1. Hi Sara,
    Which are the specifications of the resistor that I must solder in my ESP32-CAM to enable the IPEX antenna?

    Knowing myself, I believe that when I unsolder the resistor from the board, it will be useless… even more a ultra small part like this resistor.

    So I believe that soldering a new one, instead the old one, is a better ideia in my case.

    Reply
  2. Lost the resistor the moment it was unsoldered. But it’s working better now when the pads are soldered for external Antenna. Thanks a bunch 😊 😊 😊

    Reply

Leave a Comment

Download our Free eBooks and Resources

Get instant access to our FREE eBooks, Resources, and Exclusive Electronics Projects by entering your email address below.