# Demo: Simultaneous Localization and Clock Calibration for Crystal-Free Mote

Cheng Wang, Tengfei Chang, Said Alvarado-Marin, David Burnett, Filip Maksimovic, Kristofer S.J. Pister, Thomas Watteyne

<figure><img src="image_1.png" /></figure>

## To cite this version:

Cheng Wang, Tengfei Chang, Said Alvarado-Marin, David Burnett, Filip Maksimovic, et al., Demo: Simultaneous Localization and Clock Calibration for Crystal-Free Mote. CrystalFreeIoT 2024 - Workshop on Crystal-Free/-Less Radio and System-based Research for IoT, IEEE, May 2024, Hong Kong, Hong Kong SAR China. hal-04828941

HAL Id: hal-04828941

https://inria.hal.science/hal-04828941v1

Submitted on 10 Dec 2024

HAL is a multi-disciplinary open access archive for the deposit and dissemination of scientific research documents, whether they are published or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

<figure><img src="image_2.png" /></figure>
# Demo: Simultaneous Localization and Clock Calibration for Crystal-Free Mote

Cheng Wang†, Tengfei Chang\*†, Said Alvarado-Marin‡, David Burnett§,
Filip Maksimovic‡, Thomas Watteyne‡, Kristofer SJ Pister¶

† *HKUST (Guangzhou), Guangzhou, China, {cwang199@connect., tengfeichang@}hkust-gz.edu.cn*

‡ Inria, Paris, France, {said-alexander.alvarado-marin, filip.maksimovic, thomas.watteyne} @inria.fr

§ Portland State University, Portland, United States, dburnett@pdx.edu

¶ UC Berkeley, Berkeley, United States, ksjp@berkeley.edu

**Abstract**—The Single Chip micro Mote, SCµM, is designed for building small footprint micro robots. The localization and inter-individual communication are prerequisites for swarm robots to achieve collaboration. SCµM features a 2.4 GHz wireless transceiver, which relies on its internal oscillator circuit, without an external crystal. The chip is embedded with an optical receiver, and supports optical programming functionality. Meanwhile, the optical receiver can detect infrared light, enabling low-power localization of the SCµM with the assistance of a lighthouse positioning base station. For the communication, the inaccurate internal oscillator of SCµM requires calibration before communicating with other commercial off-the-shelf wireless products, such as a Bluetooth device. Clock calibration and localization for SCµM were two separated topics in the previous studies. In this paper, our preliminary work achieves both with the lighthouse base stations. By utilizing the two different functions of infrared light emitted by the base station, we can calibrate the oscillator and the position information at the same time.

**Index Terms**—Localization, Clock Calibration, SCµM

## I. MICRO WSN MOTE SCµM

SCµM is designed to provide complete Wireless Sensor Network (WSN) node functionality including communication, computation, sensing and power in a minimized form factor. On a 2 × 3mm² single die, SCµM contains a 2.4 GHz IEEE 802.15.4/BLE radio, a 32bit ARM Cortex-M0 core and an optical programmer (“Optical receiver” in Fig. 1). In addition to serving as an interface for programming, this optical receiver can also be used to detect infrared (IR) light emitted by the HTC Vive lighthouse base station V1 [1].

## II. HTC VIVE Lighthouse BASE STATION

HTC Vive lighthouse base station V1 was previously used for interaction enhancement in Virtual Reality (VR) devices. In order to obtain location information, users need to wear a tracker equipped with IR receivers. The simplicity of the lighthouse positioning system enables multiple open source solutions and customized position schemes [2], [3]. Each positioning cycle of lighthouse starts by illuminating the positioning space with an IR LED array, called “sync light” as shown in Fig. 1. Then, base station sweeps a laser beam over the entire space in one direction. A second sync light will be triggered again, followed by another laser beam sweep in

<figure><img src="image_3.png" /><figcaption>Fig. 1. System overview. In an indoor environment, two lighthouse base stations are placed in predefined positions so they can see each other's infrared light. The optical receiver of SCµM, can detect the light emitted by the base station. SCµM measures the interval between the sync light and the sweep light of the respective base stations to obtain its coordinate information. At the same time, SCµM also measures the intervals between the sync lights from one of the stations to obtain a clock reference for calibrating its radio frequency. After the localization and calibration, the position information is advertised as a BLE beacon, which can be received by a BLE device, i.e. a cell phone.</figcaption></figure>

an orthogonal direction to the previous one. This completes one positioning cycle. The timing of the sync and laser beam sweep light in space is shown in Fig. 2. SCµM is able to detect those light events through its optical receiver and trigger an interruption.

The goal is to use the fixed interval of the sync light to calibrate SCµM's frequency. This requires the sync light interval to meet a certain accuracy. We monitored this interval with a standard lighthouse optical receiver, the TS4231 Light to Digital Converter [4] and a logic analyzer. The TS4231 chip can detect the sync light from the lighthouse base station and toggle one GPIO pin on a nRF52840-DK board, which is used for this experiments. By measuring the duration of each sync light events, we find the sync light interval fluctuates a lot around 8.3333 ms, corresponding to 120 Hz as pre-defined. We suspect this could be caused by the motor jitters of the base station. These jitters translates to ±360 ppm frequency drift, based on 85% of the samples. By applying a moving average filter on the latest 10 sync light intervals, the jitter

<footnote>*Corresponding Author</footnote>
<figure><img src="image_4.png" /></figure>

Fig. 2. Timing Diagram for one positioning cycle of the lighthouse. Two lighthouse base stations are placed in the same space and synchronized automatically. The sync light of base station B (*Sync*<sup>B</sup><sub>X</sub>, *Sync*<sup>B</sup><sub>Y</sub>) is emitted after the sync light of base station A (*Sync*<sup>A</sup><sub>X</sub>, *Sync*<sup>A</sup><sub>Y</sub>). The optical receiver receives the infrared light from base station A and B, and by measuring the sync light, it knows which base station is sending the coordinate information. In the timing diagram, base station A is sending coordinates *X*<sub>A</sub>, *Y*<sub>A</sub> by the sweep light *Sweep*<sup>A</sup><sub>X</sub>, *Sweep*<sup>A</sup><sub>Y</sub> and base station B is sleeping. The raw coordinate information *X*<sub>A</sub> and *Y*<sub>A</sub> required for localization comes from measuring the sync and sweep intervals. For clock calibration, we measure the interval *T*<sub>Calibration</sub> between *Sync*<sup>A</sup><sub>X</sub> and *Sync*<sup>A</sup><sub>Y</sub> as the calibration reference.

<figure><img src="image_5.png" /></figure>

Fig. 3. The sync light received by TS4231 chip is shinning at 120 Hz, resulting an approximately 8.333 ms interval. We measured 1538 consecutive intervals and applied a moving average filter to the interval samples. This histogram plot shows 88.07% of the averaged intervals present an error of ±0.3 µs, which is a drift of ±40 ppm.

can be reduced. As shown in Fig. 3, 88.07% of the interval samples are within ±0.3µs, equivalent to ±40 ppm.

### III. LOCALIZATION AND CALIBRATION

Lighthouse has been mainly used for localization. The research of clock calibration for SCµM are mainly based on additional communication devices (e.g., other nodes in a WSN with external crystals [5] [6]) to provide a more accurate clock reference. In this work, we achieve the simultaneous localization and calibration of SCµM using the lighthouse system. Comparing to the previous calibration work around SCµM, lighthouse-based calibration does not require additional wireless nodes in the network being used. As long as SCµM is within the coverage area of one lighthouse base station, we are able to have SCµM keep a sufficiently

accurate frequency for communication, meanwhile achieving self-positioning.

As mentioned previously, SCµM utilizes its optical receiver to detect the IR light emitted by the base station. Given that both sync light and sweep laser beam are IR lights, we first need to identify the sync light event out of the two. In order to minimize the extra delay caused by the computation, we setup a capture interrupt using the timer peripheral of SCµM, which is triggered when IR light is detected. According to the sync light interval accuracy experiment in the previous section, the calibration happens every 10 sync light events, which is roughly 83 ms.

To efficiently demonstrate localization and clock calibration, we programmed the radio of SCµM to advertise Bluetooth beacons, which allows cell phones to monitor. When the SCµM obtains its position and has its clock calibrated, it transmits the location information in the beacon, and the real-time positions will show in the cell phone with a Bluetooth app, as illustrated in Fig. 1.

### IV. CONCLUSION

By using only lighthouse base stations, we provide a method for simultaneous positioning and clock calibration for the crystal-free wireless sensor node, SCµM. Since both sync light and the laser beam are IR light, the way to identify the sync light event is to measure their duration. 10 consecutive sync light intervals demonstrate a sufficiently accurate reference for SCµM to calibrate its 2.4 GHz radio frequency. Meanwhile, by measuring the interval between sync light and laser beams, SCµM can calculate its position coordinates based on the lighthouse localization method. This work is demonstrated by using a SCµM transmit its real-time position information through lighthouse localization mechanism, in a Bluetooth-compliant beacon. The beacon can be monitored on a cell-phone's Bluetooth app. This indicates the success of both clock calibration and localization.

### REFERENCES

[1] B. G. Kilberg, F. M. R. Campos, F. Maksimovic, T. Watteyne, and K. S. Pister, "Accurate 3d lighthouse localization of a low-power crystal-free single-chip mote," *Journal of Microelectromechanical Systems*, vol. 29, no. 5, pp. 818-824, 2020.

[2] M. Greiff, A. Robertsson, and K. Berntorp, "Performance bounds in positioning with the vive lighthouse system," *2019 22th International Conference on Information Fusion (FUSION)*, pp. 1-8, 2019.

[3] A. Taffanel, B. Rousselot, J. Danielsson, K. N. McGuire, K. Richardsson, M. Eliasson, T. Antonsson, and W. Hönig, "Lighthouse positioning system: Dataset, accuracy, and precision for uav research," *ArXiv*, vol. abs/2104.11523, 2021.

[4] "Ts4231 light to digital converter product datasheet," Traid Semiconductor, Inc., Tech. Rep., 2017.

[5] T. Chang, T. Watteyne, B. Wheeler, F. Maksimovic, O. Khan, S. Mesri, L. Lee, I. Suciu, D. Burnett, X. Vilajosana et al., "6tisch on scµm: running a synchronized protocol stack without crystals," *Sensors*, vol. 20, no. 7, p. 1912, 2020.

[6] T. Chang, T. Watteyne, B. Wheeler, F. Maksimovic, D. Burnett, and K. S. Pister, "Surviving the Hair Dryer: Continuous Calibration of a Crystal-Free Mote-on-Chip," *IEEE Internet Things J.*, vol. 9, pp. 4737-4747, 26 August 2021.