Skip to main content
Renesas Electronics Corporation

Servo Controlled by NFC

Overview

Secure Access with Immediate Physical Feedback

Review locally controlled access and actuation quickly with a ready-to-evaluate project that combines NFC credential reading with servo motor positioning. This solution uses a Renesas FPB-RA2E3, a PTX105R NFC reader module, and an SG90 servo motor to demonstrate how a presented NFC card can trigger a clear physical response.

The reference application reads an NFC card, validates the presented credential locally on the RA2E3, and commands the servo to move between predefined positions. A valid card triggers a sweep from 0 to 180 degrees, a pause, and a return sweep. An invalid card triggers a smaller 10-degree movement before the servo returns to the original 0-degree position.

Solution

Quickly Connect Credential Recognition to Physical Action

The Servo Controlled by NFC solution project combines two reusable software building blocks: NFC Card Reader and PWM Servo Motor Control. The PTX105R detects and reads the NFC card, while the RA2E3 application validates the credential and selects the corresponding servo movement. The RA2E3 General PWM Timer generates the PWM signal used to position the SG90 servo.

The project is built with Renesas FSP and FreeRTOS and is delivered through Renesas 365. The packaged Visual Studio Code project includes the NFC reader and PWM servo software building blocks folders together with the application logic required to connect credential recognition to physical actuation.

Image
NFC Enables Servo Motor Solution Block Diagram.

How it Works

Number 1 within a blue circle.
Detect the NFC Card

The PTX105R reader continuously waits for a supported NFC card and reports the detected card information to the RA2E3 application.

Number 2 within a blue circle.
Read the Credential

The NFC reader software identifies the card and provides its user ID and available NDEF information to the application callback.

Number 2 within a blue circle.
Validate Locally

The RA2E3 application compares the presented credential with the configured valid-credential logic.

Number 4 within a blue circle.
Select the Movement

A valid credential commands the servo to sweep from 0 to 180 degrees, pause, and sweep back. An invalid credential commands a 10-degree movement and returns the servo to 0 degrees.

Number 5 within a blue circle.
Generate the PWM Output

The RA2E3 GPT peripheral generates the servo PWM waveform, and the reusable servo layer converts the requested angle or percentage into the required timer duty-cycle count.

Customer Benefits

  • Develop an end-to-end NFC-to-motion application using modular Renesas hardware and reusable software building blocks.
  • Keep credential processing and access decisions local to the embedded system.
  • Reduce integration effort by combining prebuilt NFC reader and PWM servo software building blocks.
  • Adapt locked and unlocked positions, movement profiles, and credential logic for the target product.
  • Reuse angle-based or percentage-based servo-position commands in user application logic.
  • Progress from project creation in Renesas 365 to local build, flash, and evaluation in Visual Studio Code. 

Software Components

ComponentsPurpose
NFC Card ReaderDiscovers and activates supported NFC cards, reads card identity and supported NDEF data, and delivers results through application callbacks.
PTX105R Adapter and FSP IntegrationConnects the NFC workflow to the PTX105R SDK, SPI interface, interrupt, timers, and platform drivers.
Credential Validation LogicEvaluates the detected card credential locally and selects the valid-card or invalid-card movement response.
PWM Servo Motor ControlGenerates the servo PWM output and provides reusable functions for opening, positioning, sweeping, and closing the servo instance.
Application Movement SequenceImplements the valid-card 0-to-180-degree sweep and the invalid-card 10-degree indication before returning to the initial position.
FreeRTOS Application FrameworkSupports the NFC workflow and integration of multiple functional blocks within the application.
Xplore tool NFC servo UI screenshot.

Get Started

All Xplore assets are delivered through Renesas 365, connecting hardware, software, documentation, and technical resources in one environment to accelerate development from exploration to prototype.

Documentation