BLE Transmit Power Settings
As I started to take data on my direct connect setup, I realized that the measured carrier power was not changing in response to power setting change that I was making in the program. I had discovered the method for setting the TX power on a thread on stackoverflow.com which has been a generally useful source of information when documentation is lacking. I am aware that there are 3 BLE TX power types - one for advertising, one for scanning, and one for default which will be used if the other types are not set.
I had used the setPower() function in the library which only takes a single power_level argument, so I assumed that it would at least set the default power if not all of them. It turns out that I should have used a lower level function that would explicitly set the advertising power. That function esp_ble_tx_power_set() takes both power_type and power_level arguments. I also discovered that the non-programmed default ESP32 power level is 3 dBm (0 dBm is the default for Nordic nRF devices). And apparently the actual levels that can be set in the hardware differs between these device families, so I may have to do a bit of windage in making comparisons.
The ESP32 BLE TX power can be set to 8 different levels from -12 dBm to 9 dBm in 3 dBm steps. I corrected the program and verified the power levels in direct connect mode. The results are reasonably linear with an offset between the programmed and measured values of about -2 dBm which I assume is the cable and connection loss.
Other Measurement Displays available in Digital Demod mode
Before I move on to antenna testing I thought I would show the other measurement displays that are available besides the Eye Diagram. For my purposes I will rely on the Eye Diagram as it also shows numerical values for Frequency Deviation and Modulation Error, but the graphical displays could be useful when analyzing error characteristics.
Symbols display
Shows the symbols (data) captured within the packet burst
Modulation Deviation
Shows frequency shift vs time
Modulation Error
Shows modulation error vs time
I/Q Power Level Trigger
Before I started doing antenna measurements, I wanted to decide on a transmit power level that would give me the best match across device types. It looks like all devices have the ability to set a 0 dBm TX power. The largest variation in settings occurs at the high and low range limits. E.G. the ESP32 varies between -12 to +9 dBm and the nRF52 varies between -40 to +4 dBm.
As I experimented with a 0 dBm TX level with an ESP32 Thing (PCB antenna), I discovered a limitation with the I/Q Power Trigger Level. It turns out that the lowest value that can be set is -50 dBm. I was a bit surprised because a feature of the FPC1500 is that it has a very large dynamic range from -165 to +30 dBm (high and low levels enabled with use of attenuator and preamplifier). It turns out that with a 0 dBm TX power - the signal from the ESP32 Thing could not be reliably captured at a 2 meter distance using a -50 dBm trigger level. I submitted a support ticket with R&S to see if I could get the specification and description of the I/Q Power Trigger. I received a quick response, but no new information - so I assume that the -50 dBm is the limitation of the demodulating hardware.
Until I can get a better idea of what the received signal strength (RSS) is for my various board configurations, I'm going to set the boards to maximum TX power for my antenna testing. That hopefully will allow me to work at 2 meter separation without having trigger level issues. For the ESP32 measurements below I'll use a TX power of +9 dBm.
Antenna tests
Free Space Path Loss
I wanted to have some expectation for the measurement values and I found this reference for WiFi signals at 2.4 and 5 GHz - Free Space Path Loss Diagram. I don't have a perfectly clean setup but it would be nice to see close to the 6 dB loss between 1 and 2 meters.
The loss equation as a function of distance (d in km) and frequency (f in GHz) is:
ESP32 Thing Plus external U.FL 9 dBi omnidirectional antenna
0.5 meter
1.0 meter
2.0 meter
ESP32 Thing PCB antenna
0.5 meter
1.0 meter
2.0 meter
Other than the obvious performance difference between the external and PCB antennas, the other value that stands out is the carrier frequency error is quite a bit larger on the Thing vs the Thing Plus. A side-by-side view shows that there is a significant configuration difference in that the Thing Plus is using a shielded WROOM module while the Thing is using a bare ESP32. The modulation performance of both boards is good. The Eye Diagram for the Thing is somewhat noisier as might be expected.
Board orientation effect on loss measurement
The plane of the PCB antenna with respect to the receiving antenna will affect the magnitude of the received signal. I'll maintain a consistent orientation for all the measurements, but I thought it would be good to measure the min-max values and the associated orientation.
It turns out that it is proving much harder than I anticipated to get repeatable measurements while trying to maintain the various board orientations. I did get consistent data in some orientations, but I may need fixturing to get better repeatability in all orientations. Part of the problem is that I'm using the USB cable for power and I think that is interfering more in some orientations. The best orientation for the the ESP32 Thing was to have the board in the same vertical plane as the transmitting antenna as shown below. This orientation was about 3 dBm better than others that I tried. This is the orientation used for the previous measurements.
Here's a representation of the orientation.
I'll need to circle back later and revisit this after I try other boards.