nRF24L01+ 2.4 GHz Wireless Connectivity with the tinyK20 Board

I’m using the tiny and inexpensive Nordic Semiconductor nRF24L01+ transceiver (see “Tutorial: Nordic Semiconductor nRF24L01+ with the Freescale FRDM-K64F Board“) in many projects: it costs less than $3 and allows me to communicate with a proprietary 2.4GHz protocol in a low power way (see “IoT: FreeRTOS Down to the Micro Amps“). I have that transceiver now running with the tinyK20 board too:

nRF24L01+ Transceiver with tinyK20

nRF24L01+ Transceiver with tinyK20

The normal 2×3 pin rows of the transceiver module are not very bread board friendly. I have used the following connections to the nRF module:

  • SPI MISO: PTC7
  • SPI MOSI: PTC6
  • SPI SCK: PTC5
  • CE: PTC2
  • CSN: PTD1
  • IRQ: not connected
  • 3.3V: 3.3V
  • GND: GND
tinyK20 nRF24L01+ Connection

tinyK20 nRF24L01+ Connection

The project is for Eclipse (NXP Kinetis Design Studio) and is using the RNet wireless network stack:

nRF24L01+ Project for tinyK20

nRF24L01+ Project for tinyK20

For easier portability to other microcontroller the project is using Processor Expert components which encapsulate the low-level drives and software stacks including the RTOS:

nRF24L01+ Components

nRF24L01+ Components

The project includes a command line interface (38400 baud, 8N1) to send and receive messages, to do remote command execution and to inspect the status of the transceiver using Segger RTT. Plus it includes a wireless packet sniffer.

Command Line Shell with Segger RTT

Command Line Shell with Segger RTT

Alternatively, a USB CDC or UART (Serial) connection can be used.

I’m not going much into details how to use the nRF24L01+, RNet and all the other components. Check the links at the end of this article for more details.

Summary

With this project I have the tinyK20 board enabled with 2.4 GHz wireless connectivity for less than $3 using the Nordic Semiconductor nRF24L01+ transceiver. I plan to use this in one of my next projects which need to have all board components in a small enclosure: here the tinyK20 fits well :-).

The sources of this project are available on GitHub here: https://github.com/ErichStyger/mcuoneclipse/tree/master/Examples/KDS/tinyK20/tinyK20_nrf

Happy nRF’ing 🙂

Links

10 thoughts on “nRF24L01+ 2.4 GHz Wireless Connectivity with the tinyK20 Board

  1. How is this RF network in comparison with an RF network based on Freescale’s SMAC protocol over the MC1323x Transceiver (IEEE 802.15.4)?

    The aspects that I’m interested in are:

    – Reliability: The MC1323x Transceiver supports ACK mechanism for retransmissions, but it is rather complicated; we’ve implemented our own ACKing procedure at the application layer, which is less efficient of course; Can this Nordic Semiconductor nRF24L01+ transceiver be programmed “easily” for retransmissions as needed?

    – Reception: We’ve encountered some extremely bad sessions with almost no RX whatsoever; we haven’t figured out the source of this problem; it could be a cellular antenna on the roof of our office building, but we’ve also experienced it in other places, in particularly when many other RF networks of various types (BT, Wifi, etc) are present in the vicinity; As a last resort, we’ve used the MC1323x Transceiver’s support for 16 channels between 2.405GHz and 2.480GHz. It doesn’t always resolve the problem, but still keeps the network “alive”. Does this Nordic Semiconductor nRF24L01+ transceiver support different frequencies in any manner?

    I assume you might not have all the answers, so any additional insights would be highly appreciated.

    Thanks 🙂

    Like

    • The nRF24L01+ has a very easy ACK mechanism (called ‘ShockBurst’): it will automatically re-transmit packages, and you can configure it. I have this turned on by default. Plus it includes CRC checking too. The nRF24L01+ supports 127 channels, so plenty of channels, and different speeds up to 2MBit. For best reliablility, choose the 250kBit data rate. One disadvante of the nRF is that it does not support true broadcasting: you only can broadcast on a given address/range area, and if there are conflicts, you need to retransmit the data. I recommend to have a look at the nRF24L01+ data sheet for additional details.

      Like

  2. Hello Erich,
    I really enjoy reading your posts. I have learned much from them.
    FYI, the links on your homepage in the NXP section (e.g. 10 Best Eclipse Shortcuts) are broken.

    Like

    • Hi Bruce,
      thanks for your feedback!
      About the links: thanks for reporting this. So they changed the links, *again* :-(. I have not removed them as I’m not sure how I can have them listed if they are changing all the time 😦

      Like

  3. Pingback: nRF24L01+ 2.4 GHz wireless connectivity with the TinyK20 board - Electronics-Lab

  4. Nice project! I’m interested in knowing what is the typical range for transmission and receiving? Also, do you transmit at maximum power all the time, or do you automatically adjust the transmission power based upon the strength of the previous signal received?

    Like

    • Typical range is 15-20 meters, depends on building walls/line of sight/etc and of course of the module/antenna. We were able to get up to 100 m a a free-line-of-sight environment. The transmit power can be configured (see the shell commands), typically I send with maximum power. But of course it is possible in the driver to adjust it based on the RSS.

      Like

  5. Pingback: Zumo Robot with Magnetic Encoders | MCU on Eclipse

  6. Pingback: INTRO Robot Remote – First Production PCB | MCU on Eclipse

  7. Pingback: MINTomat: World’s Most Complicated Bubble Gum Automata? | MCU on Eclipse

What do you think?

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