Crazyflie Radio 2 power setting location?

Firmware/software/electronics
Post Reply
CliffH
Beginner
Posts: 28
Joined: Mon Jun 16, 2014 5:45 pm

Crazyflie Radio 2 power setting location?

Post by CliffH »

I am looking through the firmware for code that sets the power level of the Crazyflie 2 radio Tx output. Is it NRF_POWER? With the PA, what is the Tx output power level? +10dbm?
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Crazyflie Radio 2 power setting location?

Post by arnaud »

Hi,

The default nRF51 TX radio power is 0dBm (https://github.com/bitcraze/crazyflie2- ... /esb.c#L45) and the Crazyflie 2 has a radio power amplifier (U8 in http://wiki.bitcraze.se/_media/projects ... matics.pdf). The power amplifier is specified for 25dB of small signal amplification but is limited to about 20dBm output power, so crazyflie 2 TX 20dBm by default.

Note though that the Crazyflie 2 shipped so far had the nRF51 TX power set to -12dBm, we changed that when pushing the nRF51 code to github: https://github.com/bitcraze/crazyflie2- ... e/releases
CliffH
Beginner
Posts: 28
Joined: Mon Jun 16, 2014 5:45 pm

Re: Crazyflie Radio 2 power setting location?

Post by CliffH »

Thanks. This is very helpful. So the Crazyflie is running at +8dB Tx without the update. I'm surprised my RSSI readings aren't much higher than what I tend to see with other no-PA BLE devices, which are probably running at +0dBm to +4dBm.
CliffH
Beginner
Posts: 28
Joined: Mon Jun 16, 2014 5:45 pm

Re: Crazyflie Radio 2 power setting location?

Post by CliffH »

Is it possible to update radio parameters from the Python client using the param framework? Specifically, I would like to be able to change txpower from the Python client.
CliffH
Beginner
Posts: 28
Joined: Mon Jun 16, 2014 5:45 pm

Re: Crazyflie Radio 2 power setting location?

Post by CliffH »

Another thought regarding output power.

+8dBm corresponds to roughly 6mw while +20dBm corresponds to roughly 100mW. Has anyone measured the impact on battery life for the second wave of Crazyflie's shipping with the Tx output set to 20dBm?
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Crazyflie Radio 2 power setting location?

Post by arnaud »

Hi CliffH,

How are you measuring the RSSI? We observered a great increase in range when adding the PA, though it is not so useful when communicating with BLE devices as the TX power of BLE phones will still be around 0dBm.

The Bluetooth tx power is actually handled separately by the BLE stack and has been 0dBm all along (so +20dBm after the PA). When measuring with an RFExplorer in max-hold mode I get -10dBm with the Crazyflie and -26dBm with a dev kit that is set to 0dBm in similar condition, which looks OK (considering the different antenna and tolerances in components). When measuring with a phone (Nexus 5), when close to the devices both look like they have similar output power (Crazyflie is above but the powers sometime cross), however when going away the Crazyflie clearly have more margin (see screenshot). Note that this screenshoot was taken just before the advertising was lost and both got lost almost at the same time even with the link margin. This is because the phone is sending requests to an advertising device with about 0dBm and the Crazyflie LNA (RX amplifier) does not seems to help very much here.

As for setting the TX power there is no way to set it from Python yet. For ESB (the Crazyradio mode) there is code in the nRF so it 'just' has to be added to the STM32. For the BLE mode there is no implemented way to set the power yet.
Attachments
Screenshot_2015-02-09-15-38-09.png
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Crazyflie Radio 2 power setting location?

Post by arnaud »

As for the battery life, the Crazyflie 2 consumes about 7.5W to hover so the added radio power will have a really small impact on flight time. Though if you are interested in IDLE battery time (ie. when Crazyflie is powered but does not fly), the impact will be more significant.
CliffH
Beginner
Posts: 28
Joined: Mon Jun 16, 2014 5:45 pm

Re: Crazyflie Radio 2 power setting location?

Post by CliffH »

Hi Arnaud,

This is great data! I have just been using my iPhone 5S with the TI SensorTag app holding the phone about a foot away. Very unscientific. I compared Crazyflie with the TI sensor tag. When close, Crazyflie is probably about 10dBm better at best -- the RSSI bounces around a lot. But based on your results I tried it again with more distance and the results clearly and concistently show about 20 dBm difference, which is excellent and as expected.

Why are the PA_RX_EN and PA_TX_DIS pins connected to GPIO on the Nordic chip? Doesn't VDD_PA control switching on the PA? According to the truth table, TXEN high is TX active. RXEN can be tied high unless we want to power down the chip. What are you doing in firmware with these signals?

Cliff
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Crazyflie Radio 2 power setting location?

Post by arnaud »

Hi Cliff,

I guess the rssi measurements are not meant to be used with 'high' power, the nrf51 in the crazyflie2 will read -40dBm max...

Currently when the copter is powered we keep RX_EN high in firmware and we have TX_DIS as HI-Z.

The PA is on an always-ON voltage (VCCNRF is never switched off) so RX_EN is set to low when switching off the STM and when the NRF is going to power-off mode.

TX_DIS will allow to have a super whisper mode: if it is set to low the PA will be disabled and it will become an attenuator. There was some idea that this could be used as proximity detector.
Post Reply