Posted on Leave a comment

WiFi In The Sky

Raspberry Pi Sticky-Taped To Drone

When you sticky-tape a Raspberry Pi to a drone, how far can you get the WiFi signal? There is the theory, and then there is reality. In our last post, our customer suggested that a Raspberry Pi in an airborne drone would be a possible solution to increase the LoRaWAN radio range of our GPS trackers. We investigated if the built-in WiFi on a Raspberry Pi would work at the distances involved.

The Theory

When a WiFi engineer designs a solution, there are many factors that need to be taken into account, such as how many devices will be connected, what the capabilities of those devices are, what the radio environment is like, and how fast the network needs to perform. In this case, the answers to those kinds of questions are almost the opposite of what are normally encountered. There will be exactly 1 device connected, in a very quiet radio environment, with minimal performance needs, but the distance of that link will be very long. Long-distance links are usually handled by WiMAX radios, not WiFi, but the same design principles still apply.

How Far?

Long-distance WiFi link design starts with the distance between the access point and the station. Normally, these kinds of links have fixed locations (e.g. a Wireless-ISP base station to subscriber homes), but in this case the WiFi client is moving around. There is a limit on how far the drone will be away from the WiFi AP due to CASA drone rules, so those limits can be used as the maximum distance and the link can be designed from that. The CASA drone rules state a maximum altitude of 120 metres (400 feet) above ground level, and visual line-of-sight distance which is approximately 1KM for a medium sized drone and an experienced drone operator. 1000M away and 120M in the air makes a triangle, and applying the Pythagorean Theorem to these distances will make a link of approximately 1007M.

How Loud?

WiFi, like all radio communications, reduces in power as the distance increases. This effect is called the Free Space Path Loss, and is the primary source of signal loss in long-distance outdoor radio links. At the 1007M maximum distance required, on WiFi channel 1, the FSPL is 100.15dB. The point at which a WiFi radio signal is indistinguishable from radio noise is usually about -93dBm, and much more is required for a reliable link.

To calculate the expected radio reception power, start with the radio transmitter power, add the transmitter’s antenna gain, add the receiver’s antenna gain, and subtract the path loss. Good WiFi equipment will list radio transmitter power and antenna gain in data sheets, but most consumer devices do not make this information easily available. Unfortunately the Raspberry Pi falls into the latter category, requiring analysis of FCC certification documents to determine radio transmission power and antenna gain. Our drone test platform, the Raspberry Pi ZeroW, has a radio transmission power of 20dBm, and an antenna gain of 2dBi. On the other end of the WiFi link, we tested the Ubiquiti UniFi UAP-AC-M and the UAP-AC-M-Pro WiFi access points which have radio transmit power of 20dBm and 22dBm, and antenna gain of 3/4dBi and 8dBi respectively. We also tested the Ubiquiti UMA-D directional antenna with the UAP-AC-M which provides a 10/15dBi gain instead of the 3/4dBi gain of the included omni-directional antennas.

Adding these numbers together, the estimated signal level received by the Raspberry Pi ZeroW is -75.15dBm when transmitted from the UAP-AC-M, and -68.15dBm on the UAP-AC-M-Pro and UAP-AC-M with UMA-D antenna. The estimated signal level received by the UAP-AC-M is -75.15dBm, by the UAP-AC-M-Pro is -70.15dBm, and by the UAP-AC-M with UMA-D is -68.15dBm.

How Fast?

This solution doesn’t need to be particularly fast, as LoRaWAN data is designed to have a very small payload, but knowing how fast this link can go at the signal levels expected will ensure that there is a good signal margin for the data rate to drop due to conditions in the field. The expected signal levels can be used with MCS Index Charts to determine expected data rates, and in this case the expected data rate is somewhere between 20Mbit/sec and 50Mbit/sec. This is far more than needed, as each LoRaWAN uplink message is less than 1KB.

The Setup

Ground Station

The WiFi test setup consists of a Raspberry Pi 4 on the ground providing one end of the data link, routing to the Internet, and in the production deployment will be running a full LoRaWAN stack from radio concentrator to application. A Ubiquiti UAP-AC-M-Pro is connected to the Raspberry Pi 4 Ethernet port, and a Ubiquiti UAP-AC-M is connected to the secondary ethernet port on the UAP-AC-M-Pro. Both WiFi access points are configured to broadcast the same SSID. The UAP-AC-M is attached to a UMA-D directional antenna. Power to the WiFi access points are provided by Tycon Power DC-DC PoE injectors, which are powered from a 3S LiPo battery pack.

A Raspberry Pi ZeroW is attached to the drone and a GPS receiver, and is configured to log WiFi access points that it can hear at 10 second intervals along with the GPS location. A continuous ping is running between the Pi ZeroW in the air and the Pi4 on the ground.

Drone Tracker Pointing At The Drone

Because the directional antenna always needs to be pointing towards the drone for a good signal, Phase Zero developed and provided a drone tracking platform that will always face the drone.

The Results

Drone Tracker Pointing At The Sky

The setup and configuration took far longer than expected due to a number of factors, including lack of compatible power connectors and lack of correct tools, and only 2 flights were attempted. During both flights, the WiFi connection was running and stable the entire time, with signal level received by the Raspberry Pi ZeroW at maximum distance of 750m between -69dBm for the directional antenna on the UAP-AC-M and -78dBm for the UAP-AC-M-Pro.

During the second flight test, the drone unexpectedly stopped responding to flight controls and went into safe mode until it ran out of battery. It was found an hour later on a river bank, with only a single broken leg.

WiFi2Work and Phase Zero are calling this a successful test, and will be rolling out this solution.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.