Crazyflie 2.0: Radio range test

As you might already know we have added a 20dBm RF amplifier to the Crazyflie 2.0 as well as to the Crazyradio PA. We have had high hopes of getting a more stable link and much better range with this. We have done a lot of tests in the building we are sitting in and already experienced a big improvement in range. However radio range is a tricky thing as it depends on so many things and when we have tested it outside of the office we could only get a stable link for about 80m. This is very different from the documents we read where we could expect up to a kilometer of range! Maybe the fifteen wifi networks that where present outside our office played an effect.

So this weekend I set out to do some test on the country side. I packed my bag and mounted the Crazyradio PA on a 1m stick which I put in my bag so it could reach higher than my head. Then I took the bike to get to the country side. I got a lot of strange looks while bicycling. It was first when I reached the country side, it came to me that bicycling around with an antenna sticking out your backpack might be interpreted the wrong way :-o. After a while I reached a good spot and decided to put the Crazyflie still somewhere and instead take the computer with me so I could see what was happening. As the nRF51822 can take RSSI measurements we made a simple python program where the computer pings the Crazyflie and the Crazyflie responds with the RSSI measurement. We save the data in a CVS file which can be plotted in real time. I hang the Crazyflie in a bush, started the Crazyflie 2.0 at channel 10 and 250k air data rate, fired up the plot and took the bicycle and started pedaling.

After 100m I still had a solid connection, very good sign. After 500m the RSSI had dropped to about -80dBm but still a stable connection. After 1300m it got really shaky, about -100dBm, as the line of sight was obstructed by some trees and the road turned as well, 1.3km, LOS, that’s a huge improvement from the 80m we got back at the office. We know these circumstances are very optimal but at least it shows us we are not way off and hopefully we can expect half of that range in a more real situation. We have still not tuned the matching network for the antenna, which we will do soon, so hopefully we can expect yet another improvement. I also did a test with a hacked Crazyflie 2.0 with a duck antenna. With this one I got about -70dBm at the same 1.3km spot. This could be a great hack for special applications that require long radio distance as it could probably go beyond 2km range LOS, both up- and downlink.

10 comments on “Crazyflie 2.0: Radio range test

  • Hi.

    Would it be possible to post the code used for the measurements as an example code somewhere. We are currently using version 1.0 for both research and demonstration purposes and we would like to start using RSSI measurements for some experiments. Using version 2.0 and the code from this post would most likely speed up that process.

    • Hi,
      The code for RSSI measurement is highly dependent of the Crazyflie 2.0 nRF51822 radio chip. The nRF24 used in Crazyradio (PA) and the original Crazyflie is not hardware capable to measure RSSI (it only have a one bit “power detector” that indicate if the signal strength is bellow -64dBm).

      So to reproduce RSSI measurement you would need an nRF51 on the Crazyflie or wait for the Crazyflie 2.0. If you still want the code just tell and we can upload it somewhere, this was quite simple code.

      • I might not have been clear, but what I wanted was the code that was used in the CF2.0. Because of the new capabilities in CF2.0 we are dead set on buying it on launch.

        • Ok, I misunderstood. Glad that you will be getting a CF2.0 :-).

          I uploaded the relevant pieces of code on a Gist: https://gist.github.com/ataffanel/9dbb3cab827ae837bbb7 (for some reason gist put the python file on the bottom, scroll down to see it, the top file is the radio driver running in NRF51)

          The basic idea is that instead of sending back empty ACK packets when there is no data to send back, the Crazyflie 2 sends “0xff 0x01 |RSSI|” which is a kind of NULL packet ignored by higher layer protocols. On the python side we just send ‘null packets’ 0xFF and print the RSSI we receive back. This is activated in CF2.0 with a compilation flag for now (RSSI_ACK_PACKET) but if there is some more interest we can certainly make it a runtime parameter.

          • I know we will be using the RSSI feature extensivly so having runtime support would make it quite a lot easier for us. However, we are also interested in getting the CF2.0 as soon as possible so as long as the code in the Gist works we will be very happy.

    • I’m really very intresting in those new features of crazyflie 2.0, you gays did great job! Can you tell me the approximate release date of crazyflie 2.0 .

      • Sorry for my poor english, Correct two spelling errors: I’m really very interesting in those new features of crazyflie 2.0, you guys did great job! Can you tell me the approximate release date of crazyflie 2.0 .

  • I am trying to get RSSI values from crazyflie.
    I am trying to send an empty packet : pk = cradio.send_packet((0xff, )) and then trying to read then ACK and expecting a data packet with (0xff, 0x01 and | RSSI |). But I am only receiving the acknowledgment (pk.ack is true) but not receiving any data. Can anyone suggest what could be the cause of this ?

    I don’t know if I am setting the (RSSI_ACK_PACKET) compiler flag correctly (if anyone can tell me how to set this in firmware and which files to modify

Leave a Reply

Your email address will not be published. Required fields are marked *