Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob

Solution Demo of XENSIV™ BGT60TR13C Radar on ESP32 MCU

Infineon_Team
Employee
Employee
50 replies posted 25 likes received 25 replies posted
lock attach
Attachments are accessible only for community members.

Exploring the solution demo that uses XENSIV™ BGT60TR13C Radar and ESP32 microcontroller

photo_63096747062650278_y.jpg

Components

Hardware

Name Quantity
XENSIV™ KIT CSK BGT60TR13C 1 Buy Online

Description

Let's explore the latest solution demo provided by Infineon, which uses the XENSIV™ BGT60TR13C Radar and ESP32 microcontroller. Nowadays, motion sensing has become a standard feature in many devices. Today's devices are becoming smarter by detecting the presence of the user. Traditionally, motion sensors have been designed using passive infrared (PIR) sensing. PIR sensors have performance limitations, such as not being able to detect small motions when a person is stationary, and requiring a lens, while radar sensors can be covered and disguised behind enclosures. What if there was a solution that could detect even the tiniest movements without requiring an opening in the product housing

Infineon's radar presence detection solution enables the detection of human presence within a configured range. This solution uses the Infineon XENSIV™ BGT60TR13C radar (a 60 GHz radar with an antenna-in-package) and sophisticated radar presence detection algorithms, providing extremely high accuracy in detecting both macro and micro movements. Presence detection is an application of a radar system that detects targets within a specified vicinity. The radar detects targets within an angle coverage up to a certain distance. Parameters such as maximum distance can be configured through the radar settings. Presence detection can be further utilized for applications such as micro presence, macro presence, and absence state.

The key features of the solution presented here are:

  • FMCW 60GHz, ISM-Band (460MHz)
  • Tx1(#1) & Rx1(#3)
  • Field of view (FoV): ±45° Azimuth, ±40° Elevation
  • Human presence detection within a configurable distance, with maximum detection ranges up to 5 m
  • High accuracy in detecting both micro and macro motions
  • Adjustable sensitivity

Infineon_Team_0-1694766565403.png

Figure 1. FoV and orientation of the board

With Infineon's radar presence detection solution, you can detect the presence of humans with an extremely high level of accuracy, without requiring an opening in the product housing. The solution is highly configurable, making it suitable for a wide range of applications, including those where small movements need to be detected.

Hardware Setup

To use this code example, you will require the XENSIV™ BGT60TR13C radar wing board (SP005568071), available as component of the  XENSIV™ KIT CSK BGT60TR13C and Adafruit ESP32 Feather V2 board. However, a minor hardware modification is necessary for the radar wing board, specifically changing the SPI CS Pin to a standard GPIO.

By making this modification, you can easily use the XENSIV™ BGT60TR13C radar wing board with the ESP32 Feather V2 board and take advantage of the features presented in the solution demo.

Infineon_Team_2-1694766690854.pngFigure 2. BGT60TR13C Radar wing board modification

After performing the hardware modification as previously described, you can proceed by connecting the radar wing board to the ESP32 Feather board using the provided pin headers. Ensure that the pins are correctly aligned. You can refer to Figure 5, which illustrates the test environment for reference.

Infineon_Team_3-1694766750633.png
Figure 3. Adafruit ESP32 Feather V2

Infineon_Team_4-1694766764186.png

Figure 4. XENSIV™ BGT60TR13C wing

Infineon_Team_5-1694766833981.png

Figure 5. Test Environment

Software Setup

  • Use the ESP-IDF tool to flash the binary files attached below onto your ESP32 Feather V2 board. The ESP-IDF tool is a software development framework for the ESP32 series of microcontrollers, and it provides a set of tools and libraries for developing applications for the ESP32.
  • Install Tera Term, a terminal emulator program that allows you to observe the output from the ESP32 Feather V2 board.

Operation

The code example provided demonstrates Infineon's radar presence solution, which uses the XENSIV™ 60-GHz radar to detect human presence within a configurable distance. This solution provides excellent accuracy in detecting both micro and macro motions, making it a superior alternative to conventional technologies used for detecting human presence. The XENSIV™ BGT60TR13C radar's unique ability to detect micro-motion enables it to be used in user interaction with devices, providing increased convenience and a more intuitive user experience.

By running the code example, you will be able to test the functionality of the XENSIV™ BGT60TR13C radar and observe its performance in detecting human presence. This will allow you to evaluate the accuracy and effectiveness of the radar presence solution and assess its suitability for your specific use case. Overall, the XENSIV™ BGT60TR13C radar offers a reliable and innovative solution for detecting human presence, with a wide range of potential applications across various industries.

Note: This ESP32 demo solution is ported from CSK version: https://github.com/Infineon/mtb-example-psoc6-radar-presence

To use the Mount radar wing board with the ESP32 Feather V2 board, you need to connect it to your PC using the USB cable that comes with the board. Simply plug the cable into the KitProg3 USB connector to establish the connection.

Infineon_Team_6-1694766917454.png

Figure 6. Mount BGT60TR13C radar wing board on ESP32 Feather V2 board

To program the board with the provided binary file (.bin), follow these steps:

  • Download the attached binary image file named 'esp32-example-radar-presence.bin'.
  • Open the ESP Tool program on your computer.
  • Connect the board to your computer using the appropriate cable.
  • Once a connection is established between the board and ESP Tool, the program will display a message as shown in the Figure 8.
  • Finally, program the board using the default baud rate (912600).

Infineon_Team_7-1694766982609.pngFigure 7. Connecting the board with ESP Tool

Infineon_Team_8-1694767017779.pngFigure 8. Connection established

To ensure that there are no errors during programming, it is recommended to erase the board before proceeding. After completing the erasure, follow these steps to program the board.

  • Change the address to 0x0000.
  • Select the binary file (.bin) you wish to program.
  • Initiate the programming process.

By following these steps, you can successfully program the board without encountering any issues.

Infineon_Team_9-1694767058813.pngFigure 9. Erasing any pre-flashed program on the board

Infineon_Team_10-1694767115762.pngFigure 10. Flashing the board with bin file

If the programming process is successful, a message resembling the one displayed in the figure will appear on the screen. However, in case you encounter any issues, it's crucial to double-check that you've followed all the steps outlined above to ensure a successful programming process.

Infineon_Team_11-1694767152206.pngFigure 11. Program flashed successfully

To observe the output, please follow these steps:

  • Open a terminal program of your choice (e.g., Tera Term)
  • Select the COM port for the USB serial driver.
  • Set the serial port parameters to a baud rate of 115200.
  • Clear and reset the terminal.
  • You should now be able to observe the output.

Infineon_Team_12-1694767185549.pngFigure 12. Output on tera term

Table 1. Terminal output description

Parameters

Event type

Description

Radar State

macro presence

Presence event detected.

Range bin

5

maximum range bin

Time stamp

'6745'

relative time in ms

 

To confirm that the detection system is working properly, please follow these steps:

  • Observe the ESP32 Feather V2 board LED and ensure that it blinks at approximately 1 Hz.
  • When a target is detected, the onboard LED will turn red, and a corresponding message will be displayed in the terminal.
  • If the target leaves the detection zone, the onboard LED will switch to green, and an absence message will be printed in the terminal.
  • The system provides presence information, either as macro or micro presence, which can be observed through the messages in the terminal and the status of the onboard LED.

Table 2. Events and LED indication

LED color

Event type

Description

Red

XENSIV_RADAR_PRESENCE_STATE_MACRO_PRESENCE

Presence event detected.

Red

XENSIV_RADAR_PRESENCE_STATE_MICRO_PRESENCE

Presence event detected.

Green

XENSIV_RADAR_PRESENCE_STATE_ABSENCE

Absence event detected.

 

To configure the application parameters, follow these steps:

  • Press the 'Enter' key to switch from work mode to settings mode.
  • Type "help" and press the 'Enter' key to view a list of the configurable parameters, as shown in Figure 11. The complete list of configurable parameters with valid values is shown in Table 3.
  • Micro-motions: Detecting small movements like figure gestures or small head movements in a typical smart home environment, for instance, while working on a laptop/keyboard. Micromotion also includes the detection of stationary humans (normally breathing and blinking eyes) in sitting or standing positions (in line of sight).
  • Macro-motions: Detecting major movements into or through the field of view (Motion Detection).

Note: Macro and Micro threshold parameters can be adjusted to achieve different levels of sensitivity. The table below summarizes three different levels (for instance, 'high' means the solution is more sensitive to stationary people)."

Infineon_Team_13-1694767402622.png

Figure 13. Configuration mode

Table 3. Presence algorithm configuration parameters

Key

Default value

Valid Values

set_max_range (m)

2.0

0.66-5.0

set_macro_threshold

0.5

0.5-2.0

set_micro_threshold

12.5

0.2-50.0

bandpass_filter

disable

enable/disable

decimation_filter

disable

enable/disable

set_mode

micro_if_macro

macro_only/micro_only/micro_if_macro/micro_and_macro


Table 4. Sensitivity level with the corresponding threshold setting

Sensitivity

Macro_threshold_value

Micro_threshold_value

High

0.5

12.5

Medium

1.0

25

Low

2.0

50

 

To update a parameter value, follow these steps:

  • Type the name of the command followed by the desired value.
  • Press the 'enter' key to execute the command.
  • If the update is successful, you will see 'ok' displayed. If not, you may see 'command not recognized' or 'invalid value' printed.

And there you have it, folks – a presence sensing solution demo on ESP32.

The folder (.zip files) contains the binary file to flash in order to get this project up and running.

Happy experimenting and keep exploring! 🙂

Attachments

Code

Contributors

Moderator

Community Manager

4178 Views
9 Comments
Project Analytics
  • Views: 4178
  • Comments: 9
  • Likes: 6