logo elektroda
logo elektroda
X
logo elektroda

How to connect an external antenna to the ESP32? IPEX connector and jumpers - better WiFi coverage

p.kaczmarek2 1287 6
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
📢 Listen (AI):
  • How to connect an external antenna to the ESP32? IPEX connector and jumpers - better WiFi coverage .
    ESP32 modules often offer the possibility to connect an external WiFi antenna, which can significantly improve signal quality and range - especially in projects operating at a greater distance from the router or in difficult conditions (obstacles, interference). Many modules (e.g. ESP32-WROOM-32U) and boards (e.g. LilyGO T-CAN485) have a specially designed IPEX (U.FL) connector for this, which allows a quick and convenient connection of an external antenna. However, in order for the antenna to work properly, it may be necessary to reposition a jumper or solder a resistor, which in the factory configuration leads to the antenna located on the PCB.

    I will try to demonstrate this in this topic.

    First, let's consider the case of the module itself - compare the ESP32-WROOM-32U and the ESP32-WROOM-32D.
    How to connect an external antenna to the ESP32? IPEX connector and jumpers - better WiFi coverage .
    Here the issue is simple. One module has a built-in antenna (on the PCB), it is intended for an external antenna - we simply have a connector, plug it in and we are done.
    How to connect an external antenna to the ESP32? IPEX connector and jumpers - better WiFi coverage .
    How to connect an external antenna to the ESP32? IPEX connector and jumpers - better WiFi coverage .
    The matter becomes more complicated when it comes to boards that support two types of antenna. For example, the LilyGO T-CAN485.
    How to connect an external antenna to the ESP32? IPEX connector and jumpers - better WiFi coverage How to connect an external antenna to the ESP32? IPEX connector and jumpers - better WiFi coverage .
    Here we have the antenna located on the PCB and additionally, optionally, the IPEX connector:
    How to connect an external antenna to the ESP32? IPEX connector and jumpers - better WiFi coverage .
    The active antenna is selected using a jumper - a resistor with negligible resistance.
    The easiest way to do this is using hot air, although a suitable soldering iron tip will also do the job. My method is to apply a little flux, choose a low blow and a relatively low temperature and heat the board, while gently trying to remove the resistor with tweezers.
    How to connect an external antenna to the ESP32? IPEX connector and jumpers - better WiFi coverage .
    Caution - such a resistor is easy to lose as well as to blow off, I recommend trying on the electrical junk beforehand. Only once you have become proficient can you operate on the board with the ESP.
    Resistor removed:
    How to connect an external antenna to the ESP32? IPEX connector and jumpers - better WiFi coverage .
    I also place the resistor in its new place using hot air. I only add flux, sometimes I also whiten the pads, although here it wasn't even necessary. I didn't even change the binder to lead.
    How to connect an external antenna to the ESP32? IPEX connector and jumpers - better WiFi coverage .
    Then a short test with a multimeter:
    How to connect an external antenna to the ESP32? IPEX connector and jumpers - better WiFi coverage .
    Then there's the question of what kind of antenna - in fact, something from an old router might even fit, but I bought a 2.4GHz WiFi antenna with 3 dBi gain offering an SMA connector with a U.FL connector adapter in the form of a cable. Less than £10 a piece.
    How to connect an external antenna to the ESP32? IPEX connector and jumpers - better WiFi coverage .
    Of course, the choice of antenna is quite a separate matter, it depends on the conditions and the intended use, we also have directional antennas available, among other things, but this I may try to explore in a separate topic.

    We could end here, but probably many readers would also like to see some kind of test or comparison of coverage with and without an antenna....
    I find it quite difficult to reliably compare this in home conditions, especially as there are quite a lot of WiFi networks in my area, practically every flat already has a router, and in addition the conditions "in the ether" change dynamically, people walk around with phones in their pockets, open videos, routers switch channels, etc.... but well, let's try to compare something.

    First - a scan of the WiFi network. Software:
    Code: C / C++
    Log in, to see the code
    .
    I uploaded and tested it in four configurations:
    - without antenna (I don't recommend testing this, we might risk damaging the ESP?).
    - with antenna on PCB
    - with external antenna
    - with a piece of wire on the IPEX connector
    As for the whole test, I have two comments:
    - the results of successive scans were slightly different, moreover, the orientation of the antenna also matters, I only tried to select "average" readings, this is no scientific test, just a short demonstration
    - the names of the WiFi networks are as I have taken the liberty of anonymising them

    ESP32 Lilygo built-in antenna:
    10 networks found:
    1: NetBoxyz123 (-44dBm) Encrypted
    2: MojeWiFi (-54dBm) Encrypted
    3: Cokolwiek123 (-85dBm) Encrypted
    4: SiecWiFi (-85dBm) Encrypted
    5: SiecWiFi_EXT (-87dBm) Encrypted
    6: Internety123 (-89dBm) Encrypted
    7: Connectivity123 (-90dBm) Encrypted
    8: Globalny555 (-92dBm) Encrypted
    9: RouterWiFiABC (-92dBm) Encrypted
    10: NetBox-BBAACC (-94dBm) Encrypted
    .

    ESP32 Lilygo without antenna:
    1: NetBoxyz123 (-66dBm) Encrypted
    2: MojeWiFi (-68dBm) Encrypted
    .

    ESP32 Lilygo piece of wire:
    15 networks found:
    1: NetBoxyz123 (-55dBm) Encrypted
    2: MojeWiFi (-63dBm) Encrypted
    3: Internety123 (-84dBm) Encrypted
    4: Cokolwiek123 (-88dBm) Encrypted
    5: RouterWiFiABC (-88dBm) Encrypted
    6: SiecWiFi_EXT (-90dBm) Encrypted
    7: Globalny555 (-91dBm) Encrypted
    8: WiFiFast123 (-91dBm) Encrypted
    9: CosSwiatlowod (-92dBm) Encrypted
    10: OtworzSiec (-93dBm) Encrypted
    11: DomBaDaTa (-94dBm) Encrypted
    12: NetoLINK_Online (-94dBm) Encrypted
    13: LinkXY12 (-94dBm) Encrypted
    14: SiecWiFi (-95dBm) Encrypted
    15: JeszczeCos789 (-96dBm) Encrypted
    .

    ESP32 Lilygo external antenna:
    1: NetBoxyz123 (-41dBm) Encrypted
    2: MojeWiFi (-44dBm) Encrypted
    3: Cokolwiek123 (-79dBm) Encrypted
    4: Internety123 (-82dBm) Encrypted
    5: SiecWiFi (-86dBm) Encrypted
    6: OtworzSiec (-88dBm) Encrypted
    7: LinkXY12 (-89dBm) Encrypted
    8: CosSwiatlowod (-89dBm) Encrypted
    9: SiecWiFi_EXT (-89dBm) Encrypted
    10: RouterWiFiABC (-89dBm) Encrypted
    11: NetBox-BBAACC (-90dBm) Encrypted
    12: Globalny555 (-91dBm) Encrypted
    13: InnaSiec542 (-91dBm) Encrypted
    14: JeszczeCos789 (-92dBm) Encrypted
    15: WiFiFast123 (-94dBm) Encrypted
    .
    Signal strength is expressed in dBm. The smaller the absolute value (i.e. closer to zero), the better the signal.

    Without an antenna, the results are abysmal, so if you solder something wrong, you will find out quickly. With a built-in antenna it's not too bad, but an external one is able to find more networks, and also provides a slightly better signal for those nearby networks too. Surprisingly a piece of wire also picks up quite well, I have also seen similar experiments on the web.

    My side note is that the numbers of detected networks oscillated a bit anyway, so perhaps in a separate topic I will try to do some more extensive testing along with automatic collection and processing of the results.

    Ok, but that's just network visibility. What about the ping?
    I've set up two Lilygo's at the other end of the flat - it's behind three walls to be exact (against the fourth wall). I tested a similar configuration before (without an external antenna) and for both ESPs I still saw lost pings, will anything change now?
    Antenna placed on the table:
    How to connect an external antenna to the ESP32? IPEX connector and jumpers - better WiFi coverage .
    Antenna vertical:
    How to connect an external antenna to the ESP32? IPEX connector and jumpers - better WiFi coverage .
    How to connect an external antenna to the ESP32? IPEX connector and jumpers - better WiFi coverage .
    How to connect an external antenna to the ESP32? IPEX connector and jumpers - better WiFi coverage .
    It wasn't a big revelation in my case, but it did indeed help with package loss. The page loads a bit faster and there aren't those annoying 'hangs' as much as before, although the results still spontaneously change over time.

    In summary , the range of the ESP32 can potentially be easily increased by adding an external antenna, but with many boards, however, you have to solder this resistor, which can be a problem for beginners. It may be better to pick up an antenna-ready board straight away without soldering, but this is not always an option.... in addition, the fun showed that maybe the DIY version of the antenna also makes sense, still as if the length was properly chosen, but that's for another time.
    And what experiences do you have with this - what antennas have you used for ESP and to what extent have they improved your range? .

    PS: Related topic about directional antenna from @TechEkspert YAGI PCB 2.4GHz Wi-Fi antenna for ESP-NOW

    Cool? Ranking DIY
    Helpful post? Buy me a coffee.
    About Author
    p.kaczmarek2
    Moderator Smart Home
    Offline 
    p.kaczmarek2 wrote 12174 posts with rating 10128, helped 580 times. Been with us since 2014 year.
  • ADVERTISEMENT
  • #2 21563566
    TechEkspert
    Editor
    Virtually any working external antenna worked better than a PCB antenna. A PCB antenna is often sufficient and compact.
    I was under the impression that ceramic antennas soldered onto PCBs worked better than an antenna from a PCB track, but this is just an opinion, I have not tested this in a meaningful way.
  • ADVERTISEMENT
  • #3 21563598
    p.kaczmarek2
    Moderator Smart Home
    Of course, here we have the typical compromise between size and functionality. An external antenna means more range, but on a small prototype board it wouldn't be handy, for which reason there is usually an option of choice. And even when there isn't an option, I've seen people scrape off the soldermask, cut the antenna on the PCB and solder their own on.

    With authoritative testing, on the other hand, it's rather a problem. I was thinking about a bigger test, e.g. comparing several antennas (including DIY), also taking into account directivity, but would it make sense in such a chaotic ether, with so many networks of neighbours around? The programme could automatically collect samples and the test would last a selected number of hours, but I don't know if it would make any substantive sense anyway. In addition, from what I gather, even the very location where the ESP will lay down matters.... (signal reflections, obstacles, etc.)

    I wonder what the difference in signal quality is between a socket with a WiFi module, such:
    Disassembled power socket with WiFi module and antenna on a wooden surface. .
    Source: Electrical socket with LSPA9 energy measurement - we program our own firmware
    and such (small external antenna):
    Close-up of a WiFi socket's interior showing a circuit board with a wire antenna and electronic components. .
    source: [ESP8266+BL0937] Old Neo Power Plug 16A, 2018, Tasmota, difficult access to pads .

    By the way, once when I was changing to an Archer router I made an attempt to do a test on how much it increased my WiFi network efficiency, but in the end I didn't upload it to Elektroda. Here is a screenshot of PingInfoView, a potentially useful program:
    Screenshot of the PingInfoView program showing ping test results for several IP addresses on a local network. .
    Helpful post? Buy me a coffee.
  • #4 21563926
    dktr
    Level 25  
    p.kaczmarek2 wrote:
    I bought a 2.4 GHz WiFi antenna with 3 dBi gain
    .
    An antenna is a passive element and has no gain, but if there is more than a half-wave dipole placed in vertical polarisation in the antenna design then it may already have energy gain and also directionality, you can imagine it like adding a reflector to a light bulb, even though it still has the same power it shines more strongly in a particular direction.
  • ADVERTISEMENT
  • #5 21564134
    __Maciek__
    Level 20  
    I think that in some cases an external antenna is a "must have" ... if esp01 was still doing quite well ... then esp32c3 super mini is already a total bummer and without an external antenna the range is in many cases bizarre.
    Fortunately someone has already done a piece of comparison test Link and the solution in the form of a piece of wire works quite well. ( I am not saying good ... not bad is already much better than it was. Admittedly I didn't do it 1:1 ... and rotated it 90deg. still I'm reasonably happy with the result. )
  • #6 21564815
    bsw
    Level 21  
    p.kaczmarek2 wrote:
    I have seen people scrape off the soldermask, cut the antenna on the PCB and solder their own.
    .
    Exactly right - I recommend this solution:
    ESP8266 module with a soldered antenna cable and SMA connector. .
    Just cut the antenna paths and solder in with a cable bought with the antenna for less than 3pln....
    Useful not only for increased range but also for mounting in a metal enclosure.
  • ADVERTISEMENT
  • #7 21564972
    djbpm
    Level 24  
    >>21564815 You have completely messed up the impedance matching with such a connection. This is 2.4 GHz! Unless you are already using a plug, this should be soldered with as short a stripped wire as possible. These wires can be shortened 3 times and if not 4 times....
📢 Listen (AI):

Topic summary

ESP32 modules such as the ESP32-WROOM-32U and boards like the LilyGO T-CAN485 often include an IPEX (U.FL) connector to enable connection of an external WiFi antenna, which can significantly improve signal quality and range compared to onboard PCB antennas. Factory configurations typically use a PCB antenna, requiring repositioning jumpers or soldering resistors to switch to the external antenna. External antennas generally provide better performance than PCB antennas, though compactness and convenience are trade-offs. Antenna design affects gain and directionality; adding elements like a half-wave dipole can enhance signal focus. Practical solutions include cutting PCB antenna traces and soldering coaxial cables to the IPEX connector for improved range and mounting flexibility, especially in metal enclosures. However, care must be taken to maintain proper impedance matching at 2.4 GHz by minimizing cable length and using appropriate connectors to avoid signal degradation. Comparative tests show even simple wire antennas can outperform onboard antennas, particularly on smaller ESP32 variants like the ESP32-C3, where onboard antenna performance is limited.
Summary generated by the language model.
ADVERTISEMENT