TDK DK-CH101 User manual

AN-000240
Chirp Microsystems reserves the right to change
specifications and information herein without notice.
Chirp Microsystems
2560 Ninth Street, Ste 200, Berkeley, CA 94710 U.S.A
+1(510) 640–8155
www.chirpmicro.com
Document Number: AN-000240
Revision: 2.0
Release Date: 03/04/2022
Application User Guide for Floor Type Detection of
Robotic Vacuums

AN-000240
Document Number: AN-000240 Page 2 of 23
Revision: 2.0
Table of Contents
1INTRODUCTION .........................................................................................................................................................................3
1.1 SCOPE...........................................................................................................................................................................................3
1.2 REFERENCE DOCUMENTATION...........................................................................................................................................................3
1.3 REQUIRED HARDWARE AND SOFTWARE...............................................................................................................................................4
1.4 THEORY.........................................................................................................................................................................................4
2HARDWARE SETUP.....................................................................................................................................................................5
2.1 SMARTSONIC (DK-CH101) PREPARATION ..........................................................................................................................................5
2.1.1 DK-x01 SmartSonic and Daughterboard Hardware ...........................................................................................................5
2.1.2 Using SmartSonic Module Sensor.......................................................................................................................................6
2.1.3 Flash SmartSonic FW..........................................................................................................................................................7
2.2 CH101 CHIRP SENSOR MODULE MOUNTING.......................................................................................................................................8
3GUI ............................................................................................................................................................................................9
3.1 LAUNCH GUI .................................................................................................................................................................................9
3.2 GUI FIELDS AND WIDGETS................................................................................................................................................................9
3.3 SETTINGS AND TUNING ..................................................................................................................................................................10
3.3.1 Settings: Widget & Device Settings ..................................................................................................................................10
3.3.2 Settings: Sensor height from floor (Auto Configurations) ................................................................................................11
3.3.3 Settings: Tuning with Custom Parameters .......................................................................................................................12
3.4 GUI DISPLAY................................................................................................................................................................................15
3.4.1 Real time plots ........................................................................................................................................................................15
3.4.2 Floor Type Detection ...............................................................................................................................................................17
4APPENDIX ................................................................................................................................................................................20
4.1 TROUBLESHOOTING:BAD TUNING....................................................................................................................................................20
5REVISION HISTORY...................................................................................................................................................................23

AN-000240
Document Number: AN-000240 Page 3 of 23
Revision: 2.0
1INTRODUCTION
This guide will explain the hardware and software setup of the floor type detection for robotic vacuum applications. Using a Chirp
sensor module, the floor type detection setup can distinguish between a hard and soft floor surface such as a hardwood floor and
carpet. Using the GUI, real-time numerical data can be recorded and viewed in plot form. Using automatic parameter settings, a
demo of hard and soft floor detection can be demonstrated with proper mounting, the evaluation kit setup and inputting the floor
distance. For a more refined demonstration, custom parameter settings can be used.
1.1 SCOPE
•Review the floor type detection demo hardware and software setup
•Run the floor type detection application (Robofloor) GUI
•Understand how to set the floor height and proper mounting
•Tune parameters and data output
•Basic understanding of the GUI detection output
•Debug hardware and software setup issues
1.2 REFERENCE DOCUMENTATION
Table 1-1. Reference Documentation
Type
TDK/ Chirp Reference Document
Document Number: Name
Section
CH101 Module
AN-000259: CH101 Design Guide
AN-000231: EV_MOD_CH101 User Guide
AN-000260: CH101 Module with 45° FoV & Particle Ingress Filter
DS-000388: CH101 Datasheet
1
Hardware
AN-000158: CH101 Mechanical Integration Guide
PB-000110: DK-CH101 Product Brief
2
Software
AN-000180: CH101 & CH201 Smart Sonic Eval Kit
AN-000154: SmartSonic Hello Chirp Application Hands-on Exercise
AN-000175: SonicLib Programmers Guide
AN-000176: SmartSonic Robo-Floor Example User’s Guide
2-3

AN-000240
Document Number: AN-000240 Page 4 of 23
Revision: 2.0
1.3 REQUIRED HARDWARE AND SOFTWARE
The hardware list may differ if a different type of module is used. Use the latest or desired software (s/w) package along with the
proper hardware and firmware (f/w).
1. Hardware
•DK-CH101 - Evaluation Kit
•Micro-USB cable
•CH101 Chirp sensor module
•Cable FFC 8POS
2. Software
•RoboFloor_vX.X.X.exe (provided s/w package)
•Atmel Studio 7 –if f/w flash needed
1.4 THEORY
Please refer to AN-000259 CH101 Design Guide for detailed module and module integration information.
The CH101 sensor, a single pulse-echo sensor, is an ultrasonic transceiver that can transmit and receive ultrasound signals. These
sensors measure the round-trip time that it takes for sound to be transmitted and returned to determine the distance. This is also
known as the Time of Flight (ToF). The image below shows an example of the how the sensor detects a signal, in this case a floor
surface. Using the data received, the floor type can be distinguished by the strength of the return signal. For a more in-depth
explanation of ultrasonic sensing and hardware, refer to the reference documentation section.
Figure 1-1. Single-Sensor Pulse-Echo
Floor/Surface

AN-000240
Document Number: AN-000240 Page 5 of 23
Revision: 2.0
2HARDWARE SETUP
2.1 SMARTSONIC (DK-CH101) PREPARATION
Before using the demo, the DK-CH101 SmartSonic needs to be flashed with the proper f/w. Download and unpack the latest or
desired f/w release package. This step can be skipped if the DK-CH101 is known to have the correct f/w. Below is the list of available
f/w package/s available. The X in the file name is the version number. The latest file should be provided.
Table 2-1. Available f/w for Standalone Demo
Description
FW
Floor Type GUI logger
Gui-demo-smartsonic-robofloor-logger_X.XX.X.hex
2.1.1 DK-x01 SmartSonic and Daughterboard Hardware
The DK-x01 SmartSonic hardware out-of-box is shown below. Note that the horn on the daughter board may differ from the picture.
Refer to the reference documentation for more information.
Figure 2-1. SmartSonic Hardware basics

AN-000240
Document Number: AN-000240 Page 6 of 23
Revision: 2.0
2.1.2 Using SmartSonic Module Sensor
Setup instructions are below:
1. Connect one end of the 8POS FFC cable to the Sensor-0 connector and the other into the CH101 module sensor. Check
flex orientation to prevent flex cable hitting other components.
a) Sensor-0 –J6
b) CH101 - Note: Horn/Housing may differ from picture
2. Move jumper to FTDI slot after board has been programmed
3. Connect all J3 jumpers
4. Connect USB cable from PC to FTDI-USB connector
5. Toggle the switch from U15 to J6 (Sensor-0) - Note: U15 will use sensor on SmartSonic daughterboard
6. Reset the board when changing any connections
Figure 2-2. SmartSonic Connections
1a.
4.
3.
6.
5.
1b.
2.

AN-000240
Document Number: AN-000240 Page 7 of 23
Revision: 2.0
2.1.3 Flash SmartSonic FW
If the SmartSonic has the correct FW, this section can be skipped.
Flash setup instructions:
1. Connect the SmartSonic board to your PC:
•Plug Micro-USB into the EDBG-USB
•Move jumper to EDBG (middle)
2. Open Atmel Studio 7 application or use command prompt:
•Download Atmel Studio from their website, if needed.
•Link: https://www.microchip.com/mplab/avr-support/atmel-studio-7
3. Pull down the Tools menu: “Tools> Device Programming” for programmer SW.
4. Select the settings below and hit ‘Apply’.
5. Upgrade MCU firmware, if necessary. Older SmartSonic boards will need firmware upgrade.
6. In the Memories section, browse for the hex/elf file from the desktop. The file will be in the packaged exe folder or you can
specify a desired file.

AN-000240
Document Number: AN-000240 Page 8 of 23
Revision: 2.0
7. Hit ‘Program’ button.
8. There will be a Verify Flash completion. If flash procedure has an error, reset the SmartSonic board, then check the setup
again from the start of this section.
2.2 CH101 CHIRP SENSOR MODULE MOUNTING
Please refer to AN-000259 CH101 Design Guide for detailed module and module integration information.
For the module to detect floor types, it must be mounted correctly. It is important to meet all mounting requirements and follow
mounting suggestions. The mechanical integration guide, listed in the Reference Documentation section, can be reviewed for a
deeper dive into the module assembly and further explanation on the requirements listed below.
Requirements:
Mount the CH101 downward to a fixture, cart, or desired apparatus, but ensure that it meets the list of requirements below:
•No reflecting objects in the FoV (below sensor and floor surface)
•Parallel to floor surface (no tilt angle –for best detection)
•Set to desired distance
•Facing downward to the surface
•No force must be applied on the sensor and horn/housing when mounting
Figure 2-3. CH101 mounting requirements
Floor distance (in mm)
Floor
CH101
*not to scale
Parallel
No reflections in FoV

AN-000240
Document Number: AN-000240 Page 9 of 23
Revision: 2.0
3GUI
The GUI is used to display real-time plots and output numerical values of its scans.
3.1 LAUNCH GUI
1. Plug in the USB from the Smartsonic to the computer.
2. Open the unpacked folder, ‘Gui-demo-robofloor-X.X.X’. Ensure proper firmware is flashed on SmartSonic.
3. Launch ‘floor_demo.exe’.
4. Hit ‘Connect’ and the detection will start.
3.2 GUI FIELDS AND WIDGETS
Figure 3-1. Robo Floor GUI Interface
1. Connect: Establish connection. Starts real-time sensing and data stream.
2. Settings: Input settings. See Section 3.3.
3. Record: Record the raw data anytime by checking the ‘Record’ box. The “record.txt” can be changed to a desired name.
1
2
3
4
5
6
7
8

AN-000240
Document Number: AN-000240 Page 10 of 23
Revision: 2.0
•Records are saved in the GUI records directory folder:
oInput data settings used for record: \Gui-Demo-robofloor-x.x.x\records
oOutput raw data of record: \Gui-Demo-robofloor-x.x.x\records\algo\floortype_emd
Figure 3-2. Sample Data File
4. ASCAN: Grayscale amplitude scan. See Section 3.4.
5. Sensor Table: Table showing real-time numerical value outputs
6. Display: Status display. Shows Sensor and detected floor type.
7. Plots: Real-time magnitude, floor metric, and floor range. See Section 3.4.
8. Help ( ): For more information on the GUI features (recording, plots, algo configurations, etc), click the (?) and ‘Open
documentation’ dropdown.
3.3 SETTINGS AND TUNING
The GUI is used to display real-time plots and output numerical values of its scans with automatic (auto) or custom (tuned)
parameters/configuration. The auto parameters are set from validation data collected from different surface types and only the
floor distance needs to be inputted to output floor metrics. For more refined tuning parameters for custom setups, additional
custom parameters are needed. These custom parameter values can be used to set the API functions and input into the MCU.
3.3.1 Settings: Widget & Device Settings
Figure 3-3. Settings: Widget & Device
Widget and Device Setting Description:
•Widget Settings
oShow Sensor i: Show plots of sensor number i (where i = sensor 0, 1, 2, and 3); Supports up to 4 sensors.

AN-000240
Document Number: AN-000240 Page 11 of 23
Revision: 2.0
▪Note: ODR needs to be increased when connecting additional sensors as it requires more data bandwidth.
•Device Settings
oCOM Port: Specify com port in case multiple hardware boards are connected.
oODR: Time interval to periodically trigger the sensor. Reducing ODR increases the data bandwidth requirement to
transfer data from sensor to host.
oDecimation: Decimate IQ data or magnitude streamed from the sensor.
oMax range in sample: Number of IQ samples to acquire.
3.3.2 Settings: Sensor height from floor (Auto Configurations)
To use auto configurations set from validation data collected from different surface types, only the floor height value needs to be
inputted. All mounting requirements need to be met and the floor distance needs to be known. For setting custom parameters and
refining the tuning parameters, see Section 3.3.3.
Steps:
1. Mount the module to the desired location with the horn/housing facing downward to the floor surface. The sensor must be
facing the floor surface with no tilt or reflective surroundings. For more information on module mounting, refer to Section
2.2.
2. In the unpacked folder (RoboFloor_vX.X.X.exe) and in the GUI folder, open ‘Gui-demo-robofloor-x.x.x’.
3. Click the settings icon ( ) to input settings.
4. For auto-configuration, only edit the “Sensor Height” value in the settings between 2.5-6cm (25-60mm). This is the distance
from the acoustic horn/housing bottom surface to the surface.
a. The default is set to 35mm. All custom parameters are disregarded (in red).
b. The ‘Sensor Height’ value corresponds to the height that the CH101 sensor is set on the hardware relative to the
surface.
c. Settings can be saved to a .json file. This will be saved in the GUI folder. Loading the file will overwrite the current
settings to the saved .json file. The .json file can be opened in a notepad or text application to modify the
parameters.
Figure 3-4. Settings: Floor Height
5. Hit ‘OK’ to save settings for current run. Then click ‘Connect’ to display real-time outputs.

AN-000240
Document Number: AN-000240 Page 12 of 23
Revision: 2.0
3.3.3 Settings: Tuning with Custom Parameters
To tune for custom apparatus, floor types, or different setups, custom parameters need to be used
Steps:
1. Mount the module to the desired location with the horn/housing facing downward to the floor surface. The sensor must be
facing the floor surface with no tilt or reflective surroundings. For more information on module mounting, refer to Section
2.2.
2. In the unpacked folder (RoboFloor_vX.X.X.exe) and in the GUI folder, open ‘Gui-demo-robofloor-x.x.x’.
3. Click the settings icon ( ) to input settings.
4. To use custom parameters, the “Use Customer Configuration (Parameters Below)” must be checked. Edit values for each
setting (see Algo Setting Descriptions below). Load or save settings using the buttons. This will load or save a .json file from
the GUI folder.
Figure 3-5. Settings: Algo Settings
5. Hit ‘OK’ to save settings for current run. Then click ‘Connect’ to display real-time outputs.

AN-000240
Document Number: AN-000240 Page 13 of 23
Revision: 2.0
Algo Setting Descriptions:
•Sensor height: Sets up the library with recommended parameters given a specific sensor height
oDistance from the horn/housing bottom surface to floor surface. See Section 2.2 for mounting Section 3.1 for auto
parameters
•Use custom configuration: Check this box to enable custom parameters below
•Customize ringdown start index: Define the index where ringdown started (typical is 8). Start index of window before floor
reflection. Shift this setting to where ringdown begins or to desired starting point.
•Customize ringdown length: Define the size of ringdown window (typical ringdown window ends before floor 1st echo)
•Customize floor start index: Define the index where floor echo started (depends on floor height). Occurs after ringdown
section
•Customize floor length: Define the size of floor echo (typical size is 16 samples at decimation = 1).
Figure 3-6. Ringdown and Floor Windows
Ringdown
Ringdown
Sense
Area
Sense
Area
Entire Sense
Window
Entire Sense
Window
floor_start_idx
floor_length
ringdown_start_idx
ringdown_length
len_window

AN-000240
Document Number: AN-000240 Page 14 of 23
Revision: 2.0
•Customize floortype threshold: Threshold that classify soft vs hard floor types. The threshold should be reduced with
higher sensor to floor distance.
•Customize floortype threshold hysteresis: Threshold margin to avoid floor type classification toggling when metric
transition occurs.
•Customize max number of samples: Set the max number of samples to process (typical value should cover the whole floor
window).
•Customize range threshold decay factor: Decay factor of the threshold [0-100]. Impacts short distance detection. Low
values improve detection sensitivity. Higher values reduce false positives.
•Customize range threshold minimum value: Lower bound of detection threshold. Impacts far distance detection.
Figure 3-7. Threshold Settings
Example Settings:
threshold: 80
Threshold_hyst: 110 (threshold+30)
Threshold_hyst: 50 (threshold-30)
Hard floor detection
Soft floor detection

AN-000240
Document Number: AN-000240 Page 15 of 23
Revision: 2.0
3.4 GUI DISPLAY
The GUI plots are displayed in real time. The section below explains each of the display windows and widgets.
3.4.1 Real Time Plots
•Magnitude: Echoes measured by the sensor
oMagnitude plot of range vs amplitude for the sensor
Figure 3-8. Plot: Magnitude
•Floor Metric: Decision metric to distinguish between a soft and hard floor
oPlot of floor metric in LSB over time for the sensor
Figure 3-9. Plot: Floor Metric

AN-000240
Document Number: AN-000240 Page 16 of 23
Revision: 2.0
•Floor Range: Distance between floor and sensor
oPlot of distance to floor over time for the sensor
Figure 3-10. Plot: Floor Range
•ASCAN: Amplitude scan
oBright/white areas in the plot represent high amplitude reflections, while dark areas represent low amplitude
reflections
Figure 3-11. Ascan

AN-000240
Document Number: AN-000240 Page 17 of 23
Revision: 2.0
3.4.2 Floor Type Detection
After inputting the proper settings, the GUI will output the detected type of surface. Moving the sensor over a ‘Soft Floor,’ such as a
carpet, will output a 0, while moving over a ‘Hard Floor,’ such as a hardwood floor, will output a 1.
•Soft Floor Detection:
oFloor Type of 0 and a metric below the detection threshold will display a ‘Soft Floor’ along with its numerical
output values
oExample of Floor Metric plot for ‘Soft Floor’ (below the threshold)
Figure 3-12. Example of a “Soft Floor” output plot. (Real-time plot at time 0 being current value)

AN-000240
Document Number: AN-000240 Page 18 of 23
Revision: 2.0
Figure 3-13. Example of a plot of a transition from ‘Soft Floor’ to ‘Hard Floor’. (Real-time plot at time 0 being current value)
•Hard Floor Detection:
oFloor Type of 1 and a metric below the detection threshold will display a ‘Hard Floor’ along with its numerical
output values
oFloor Metric plot for ‘Hard Floor’ (above the threshold)
Hard
Soft
Threshold

AN-000240
Document Number: AN-000240 Page 19 of 23
Revision: 2.0
Figure 3-14. Example of a “Hard Floor” output plot. (Real-time plot at time 0 being current value)
Figure 3-15. Example of a plot of a transition from ‘Hard Floor’ to ‘Soft Floor’. (Real-time plot at time 0 being current value)
Hard
Soft
Threshold

AN-000240
Document Number: AN-000240 Page 20 of 23
Revision: 2.0
4APPENDIX
4.1 TROUBLESHOOTING: BAD TUNING
1. Ringdown settings
•Example settings:
oSensor Height: 48mm
o“ringdown_start_idx”: 5
•Issues:
oLatency affected
oBad data in the ringdown phase
oHard to distinguish floor type due to threshold limit of bad data
oStuck in one floor type
Table of contents
Other TDK Microcontroller manuals
Popular Microcontroller manuals by other brands

STMicroelectronics
STMicroelectronics X-NUCLEO-IHM07M1 user manual

NXP Semiconductors
NXP Semiconductors i.MX 8M PLUS EVK quick start guide

ABOV SEMICONDUCTOR
ABOV SEMICONDUCTOR MC81F4204 user manual

Texas Instruments
Texas Instruments MSP430F67771 manual

Advantech
Advantech EPD-132 user manual

PLX Technology
PLX Technology PCI 9054RDK-LITE Hardware reference manual

Vageo
Vageo RT-1B manual

NXP Semiconductors
NXP Semiconductors Freescale DEMOEM MCF51EM Lab Tutorial

Atmel
Atmel AVR365 user guide

Texas Instruments
Texas Instruments 430BOOST-SENSE1 user guide

Freescale Semiconductor
Freescale Semiconductor TWR-K60N512 quick start guide

Texas Instruments
Texas Instruments MSP430F67681 manual