Does your IoT device need an antenna upgrade?
I've long been curious about the effectiveness of the built-in antennas that are attached to common WiFi modules. Can that tiny, serpentine PCB track really match the performance of a "real" antenna? How does it even work?
I set up a quick test to find out. Using a pair of ESP8266 development modules, I set up a test measuring gateway ping times, and sending the resulting values to AWS IoT Core. Messages are routed to Firehouse, stored in S3, and aggregated with Athena. (AWS has put together an impressively elegant IoT pipeline, but that's a future post!)
The first device is using the onboard antenna supplied with the board, and the second device has a 6dBi omni-directional antenna attached to the U.FL port. Both used the default TX power of 20.5 dBm. Both were oriented towards the AP to achieve the best observed RSSI.
Before we get to the results it's worth noting our office is a very challenging RF environment. We are in a dense urban area; in a typical week we'll see over 2,500 neighboring networks competing for 2.4 GHz spectrum:
The results were a bit surprising – the two antennas showed only a very slight difference. The 6 dBi showed about 20% less packet loss, and fewer outliers on the ping chart. The median ping time and IQR were identical. Even in this difficult environment the onboard antenna gave excellent performance.
The onboard antenna has a few other advantages: its compact size, and modular FCC certification. If you choose a pre-certified module for your device, it will almost certainly come with a PCB trace antenna of some kind, and the module will save a significant amount of time and expense during FCC certification.
How do these things work, anyway?
The big mystery – what's really going on with that PCB trace? Above is the layout for the inverted-F antenna (IFA). antenna-theory.com has a great analysis of why these radiate: