![TDK SmartSonic CH201 User Manual Download Page 2](http://html1.mh-extra.com/html/tdk/smartsonic-ch201/smartsonic-ch201_user-manual_3931042002.webp)
AN-000227
Document Number: AN-000227
Page 2 of 15
Revision: 1.0
INTRODUCTION
This example project shows how to build and run an ultrasonic presence detection application using the Chirp
SonicLib sensor API.
This is a companion document to AN-000214 Presence Detection, and AN-000226 CH201 Ultrasonic Presence
Detection Reference Design User Guide. Application note AN-000214 focuses on the test results of the embedded
static target rejection algorithm and the presence detection algorithm used in the CH201 presence detection
evaluation module. Application note AN-000226 is a user guide for the CH201 ultrasonic presence detection
reference design module. The Presence Detection example is a simple C application that demonstrates the use of
motion detection to determine the presence of people and objects. The application uses the Chirp SonicLib API
functions to initialize, configure, and operate one or more ultrasonic sensors. It uses special sensor firmware along
with API functions which specifically support presence detection.
The application discovers what sensors are connected to the board, programs and configures them, and then triggers
and displays ultrasonic measurement results through a serial connection. Each measurement result includes both a
range to the detected object and a confidence level, based on the presence detection algorithm.
In this example, the application is built using Atmel Studio 7 for the Chirp SmartSonic evaluation board, which
features an Atmel SAMG55 microcontroller. The SmartSonic board uses a sensor daughterboard that supports up to
four ultrasonic sensors. The Presence Detection application can detect and run with either a single sensor or multiple
sensors connected to the board, however the most common configuration is to use a single sensor.
The
source/application/smartsonic-presence-example/main.c
file is the main file in the application. It contains
extensive comments explaining how the SonicLib interfaces are used. The
source/application/smartsonic-
presence-example/app_config.h
file contains the setting for the application’s overall timing.
1.1
REQUIRED EQUIPMENT
•
SmartSonic evaluation board
•
Chirp sensor daughter board
•
One Micro-USB cable
•
Internet connection (if downloading and installing files)
1.2
REQUIRED SOFTWARE PACKAGES
•
package-smartsonic-presence-example-v
X
_
X
_
X
.zip
(actual file name will include version number),
includes:
o
Presence Detection application source files
o
Chirp SonicLib sensor API and driver files. The Presence Detection application requires SonicLib
v2.0.5 or later.
o
Sensor firmware image files
o
Board support package files for Chirp SmartSonic board
o
Atmel Studio 7 project files to build the application
•
integrated development environment – download from Microchip.com
•
Terminal emulator of your choice (for example PuTTY or TeraTerm)