Skip to main content

NFC for XIAO nRF54LM20A Sense


Near Field Communication (NFC) is a technology for wireless transfer of small amounts of data between two devices. It uses very simple communication protocols and, therefore, allows quicker connection than Bluetooth® Low Energy. However, because NFC uses magnetic induction to enable communication, the devices must be very close (< 10 cm) to connect.】

The XIAO nRF54LM20A is equipped with a reserved NFC interface for you to explore and utilize NFC functions further.

tip

This tutorial is based on VS Code and the nRF Connect Extension. If you are new to them, you can refer to XIAO nRF54LM20A nRFConnect SDK Usage

Hardware Preperation

Before starting the experiment, you need to prepare an XIAO nRF54LM20A and a Nordic NFC antenna.

Seeed Studio XIAO nRF54LM20A Sense
tip

The Nordic NFC antenna is not sold separately on Seeed Studio Bazaar, so you will need to purchase it from other sources.

Solder the antenna

On the XIAO nRF54LM20A, the default pins for the external NFC antenna are P1.01 and P1.02, marked N1 and N2 on the silkscreen. See the soldering example below.

  • Pre-connection Diagram

  • Physical Connection Diagram

caution

This soldering process is relatively difficult and requires proficient soldering skills. Please pay attention to safety precautions to avoid personal injury and device damage.

Software

tip
  • This section demonstrates how to use NFC based on sample code from the Nordic Connect SDK.

NFC Records text

This example demonstrates reading text information via NFC.

  1. Within the extension, create a blank routine and choose to copy an existing routine.
  1. Enter nfc, select NFC Records text
  1. Select storage path
  1. Open the project, add the XIAO nRF54LM20A configuration under the corresponding extension, and compile.
  1. Open the terminal and enter the command west flash to burn the firmware to the XIAO nRF54LM20A.

Result

Please select a mobile phone with NFC functionality to attempt this experiment.

  1. To view NFC read information in more detail, you need to download the corresponding app for your system.
  1. Place your phone's NFC area close to the NFC antenna to read detailed NFC information.

The text information displayed on your phone is:

Hello World!
Hallo Verden!
Witaj świecie!
NFC ToolsnRF NFC Toolbox

NFC Launch App

This section covers the NFC function. Please search for nRF Toolbox for Bluetooth LE.

  1. Within the extension, create a blank sample project, select to copy an existing sample, and choose NFC Launch App. Configure and compile it by referring to NFC Records text.
  1. 打开终端,输入 west flash指令烧录到 XIAO nRF54LM20A 上。

Result

  1. To view NFC read information in more detail, you need to download the corresponding app for your system.
  1. Bring your phone's NFC sensor close to the NFC antenna. The browser will launch and search for "no.nordicsemi.android.nrftoolbox", and the reading record will be displayed in nRF NFC Toolbox.
ChromenRF NFC Toolbox

Summary

NFC features can be reused in various scenarios, such as data writing and low-power wake-up. The nRF Connect SDK provides corresponding sample codes. You can extend these samples for practical applications. For instance, combining NFC low-power wake-up with motor control enables a simple smart lock for daily use.

In addition, we believe you have gained a basic understanding of NFC implementation on the XIAO nRF54LM20A through the above examples. We look forward to your creative ideas and contributions to the open-source community.

Tech Support & Product Discussion

Thank you for choosing our products! We are here to provide you with different support to ensure that your experience with our products is as smooth as possible. We offer several communication channels to cater to different preferences and needs.

Loading Comments...