User Tools

Site Tools


projects:crazyflie2:hardware:externalantenna

How to activate the CF 2.1 external antenna

The Crazyflie 2.1 comes with a new radio power amplifier that incorporates a switch allowing for use of two antennas. One of the outputs is wired to the chip antenna and the other to a u.FL antenna connector. The power amplifier, a RFX2411N, has control signals that selects the active antenna which are wired to the nRF51.

Currently there is no run-time switch implemented to select the active antenna in run-time and the selection has to be hard-coded and new FW uploaded to the nRF51. Thus to switch to external antenna you will have to have the development environment setup to be able to build new nRF51 FW with a different antenna selection.

Build FW with external antenna activated

To activate the external antenna the define USE_EXT_ANTENNA needs to be activated.

    #ifdef USE_EXT_ANTENNA
      // Select u.FL antenna
      nrf_gpio_pin_clear(RADIO_PA_ANT_SW);
    #else
      // Select chip antenna
      nrf_gpio_pin_set(RADIO_PA_ANT_SW);
    #endif

This can be achieved by defining it in the top of the pm.c file

...
#include "platform.h"
 
#define TICK_BETWEEN_STATE 2
 
// To activate external antenna
#define USE_EXT_ANTENNA 
 
//#define ENABLE_FAST_CHARGE_1A
//#define RFX2411N_BYPASS_MODE
...

Then clean, build and flash it to the CF2.1 using your preferred method, e.g. radio bootloader.

make clean all cload

What external antenna to use

The antenna should have a mating u.FL connector, 50ohm impedance and in the frequency range 2.4-2.5GHz. Other then that choose one for your needs.

Future development

Being able to select antenna in run-time would be nice. After that things like antenna-diversity (selecting the best antenna at the moment) could be implemented.

projects/crazyflie2/hardware/externalantenna.txt · Last modified: 2019-09-11 09:45 by tobias