
A121 Touchless Button Reference Application User Guide
2 Touchless button
The purpose of the touchless button reference application is to employ the A121 sensor as a contactless button. This
algorithm proves useful in scenarios where registering a button press is needed without physically touching a surface. A
prime example would be in public spaces.
Moreover, the algorithm is designed to automatically recalibrate itself when static objects obstruct the sensor, preventing
prolonged and erroneous detections. An initial calibration of the background is performed before starting to detect button
presses. As long as no presses are detected the background will be continuously updated. If a button press is detected
for a long period of time (
calibration_interval_s
seconds), the background will be reset since this is considered a
change in the environment. If the initial calibration is done with something in front of the sensor, this will most likely
cause false detects when removed, but the calibration will be reset and a new calibration will be performed. The algorithm
is very dynamic to be able to adapt to changes in the environment.
2.1 Measurement Range and Presets
The reference application is designed to have two different detection ranges: one in close proximity to the sensor and
another farther away. Users can choose which range, or even both, to activate simultaneously.
The close range is defined as the zone from the sensor up to 5 centimeters, while the far range spans from the sensor to
roughly 24 cenitmeters. These ranges are presented in three preset configurations within the Exploration Tool: one for
exclusive close range detection, another for exclusive far range detection, and a third for detecting in both ranges.
It’s important to note that the algorithm can also accommodate extended ranges, provided the sensor settings are
appropriately adjusted to encompass a larger distance.
2.2 Configuration
Each detection range is composed of a single subsweep, allowing for independent configuration and adjustment of each
range.
The
measurement_type
processing parameter is used to activate a specific range and set which patience and sensitivity
processing parameters to apply during the processing.
The sensitivity parameters (
sensitivity_close
and
sensitivity_far
) establish the detection threshold for each
range. Meanwhile, the patience parameters (
patience_close
and
patience_far
) dictate the consecutive frame count
above the threshold required to recognize a button press, as well as the consecutive frames below the threshold to signify
the end of a button press action.
2.3 Calibration
Each subsweep is comprised of multiple points (
num_points
), with each point corresponding to a distance in space where
reflected pulses are measured. These points undergo continuous individual calibration. The threshold is normalized for
each point by evaluating the standard deviation in the number of sweeps received during the
calibration_duration_s
period. This threshold normalization remains dynamically updated as long as no detections occur within any range.
Consequently, there might be slight variations in the processor result when both ranges are simultaneously active compared
to their separate activation on the same data.
To change the calibration to include more or fewer frames, the configuration parameter
calibration_duration_s
should be increased or decreased respectively. Note that during the calibration no button press actions should be performed
since the purpose of the calibration is to record the background noise.
The
calibration_interval_s
configuration parameter establishes the maximum time interval in seconds between
successive calibrations. When a consecutive detection reaches the time limit set by
calibration_interval_s
, a fresh
calibration is initiated. The purpose of the parameter is to adjust the normalization of the detection threshold to
effectively respond to significant environmental changes, such as the introduction of static objects within the detection
range. Therefore,
calibration_interval_s
should not be set lower than the estimated duration of the longest
continuous detection event.
© 2023 by Acconeer AB - All rights reserved Page 5 of 13