Ranging configuration is the first step of all tests, usually measuring the distance between the tag and the base station. The demo kit consists of two BU03-Kit development boards (with screens).
Once correctly configured, the OLED screen on the base station will display the real-time distance between the tag and the base station.
Sample List- BU03-Kit (with screen) × 2
- USB data cable × 2
- Ai-Thinker Serial Debug Tool:
https://docs.ai-thinker.com/_media/tools/aithinker_serial_tool_v1.2.3.7z
- Computer (Windows 10 or Windows 11 system)
Different AT commands are sent through the serial debug tool under the TTL connection to configure roles in this step. There are two roles: base station and tag. Please refer to the illustration below.
AT Command InstructionsAfter successfully executing the above commands, the base station’s OLED screen will display the real-time distance. However, the following points must be noted during ranging:
1. Keep the antenna area clear (i.e., no obstructions between the tag and the base station); otherwise, the measurement error will be too large or the distance will be severely reduced.
2. The base station or tag should not be placed directly on the desktop during testing, as this will result in significant errors.
3. If higher precision is still required after the above two confirmations, you can use the calibration command to improve accuracy.
Ranging Accuracy CalibrationPrincipleRanging accuracy calibration, also known as distance calibration, is mainly used when the factory calibration coefficient is not sufficient in the test environment, or when low-density materials such as enclosures block the device, causing significant measurement deviation.
Sample List- BU03-Kit (with screen) × 2
- USB data cable × 2
- Ai-Thinker Serial Debug Tool: Download link
- Computer (Windows 10 or Windows 11 system)
If large deviations are found after the ranging step, proceed with the following:
(1) Download the calibration spreadsheet
https://docs.ai-thinker.com/_media/d_%E6%95%B0%E6%8D%AE%E6%A0%87%E5%AE%9A%E6%A8%A1%E6%9D%BF.xlsx
(2) Fill in the spreadsheet
- Set up the devices in the test environment.
- Use a measuring tool (such as a ruler or tape measure) to place the tag at 1-meter intervals.
- Record the OLED screen readings for each position and enter them into the spreadsheet.
- The spreadsheet will generate a calibration coefficient value based on around 15–20 groups of measurements.
A corresponding calibration coefficient chart will be generated.
Apply this coefficient via AT command correction to improve measurement accuracy.
(3) Send the calibration command
Replace the parameters in the following AT command format with the calculated coefficients, then send the command along with the save instruction. Other parameters remain unchanged except for the highlighted values.
Command format:
AT+SETDEV=10, 16336, 1, 0.018, 0.642, 0.9924, -317.68, 0, 0
This test requires the ranging environment to be set up beforehand. After proper calibration, the measurement error will be significantly improved.
Note that OLED readings may update too quickly; for rapid testing, visual estimation is sufficient.
Comments