## 2 Development of Sensor Module
### Multiple-Sensor Orientation and Coordinate System  
Eight distance sensors are arranged in an octagonal configuration at 45-degree intervals (\(\alpha=45^{\circ}\)) to achieve full 360-degree horizontal coverage around the drone, as illustrated in Figure 5. Each sensor provides a 45-degree horizontal field of view, ensuring seamless obstacle detection in all directions. The coordinate system defines the x-axis and y-axis for directional reference, with \(r\) representing the radius from the center of the module to each sensor. This layout was implemented using a 3D-printed sensor holder to maintain precise angular spacing, as shown in Figure 6a. To manage this sensor configuration efficiently while maintaining a compact, lightweight, and low-power design, an ESP32-WROOM-32 microcontroller was employed to handle all data processing. When connecting multiple distance sensors to a single microcontroller, several key considerations must be addressed to ensure proper functionality. All sensors can share a common power supply and ground: the VCC pins are connected to a 3.3 V source, and the GND pins are connected to the microcontroller's ground. For I2C communication [29], all sensors utilize the same SDA and SCL lines, connected to the corresponding pins on the microcontroller. However, each sensor must be assigned a unique I2C address to avoid communication conflicts [29]. Since the microcontroller does not support dynamic address assignment,  
Figure 5: Top view of the eight-sensor orientation and coordinate system. Figure 6: Sensor module implementation and coverage characteristics; (**a**) Developed eight-sensor module mounted in a custom 3D-printed octagonal holder, designed to position each sensor at 45-degree intervals for complete horizontal coverage; (**b**) Side view illustration of the sensor coverage, showing the 360-degree horizontal field of view (FoV) achieved through the sensor arrangement and the individual 45-degree vertical FoV of each sensor. address management is achieved by controlling the power state of each sensor via GPIO pins, as illustrated in the wiring diagram shown in Figure 7. The microcontroller enables one sensor at a time by powering it on through a dedicated GPIO pin, allowing the sensor's I2C address to be configured without interference from others. This process is repeated for all eight sensors, enabling effective multiplexed communication. To describe how each sensor's measurement data is interpreted, Figure 8 defines the local coordinate system for the sensor module. Each sensor detects distances, denoted by \(d_{s}\), to objects within its field of view. These raw distance measurements are initially defined in each sensor's local coordinate frame and must be transformed into the sensor module coordinate frame of the drone using rotation and translation matrices. The distance data from each sensor (\(i_{0}\) to \(i_{7}\)) are obtained using a coordinate transformation matrix \(M\). Each sensor's distance data \(d_{s}\) is transformed using a matrix \(M\), which incorporates the following steps:  
1. Rotate around the \(z-axis\) by an angle \(\alpha\), represented by \(R_{z}(\alpha)\), and translate \(x^{\prime}-axis\) by \(r\) represented as \(T_{xr}(r)\). Figure 8: Coordinate system for mapping detected points from the local to the sensor module coordinate frame. Figure 7: Wiring diagram of multiple ToF distance sensors connected to the microcontroller. 2. Rotate around the \(z^{\prime}-axis\) by an angle \(\beta\), denoted as \(\mathbf{R}_{z^{\prime}}(\beta)\), where \(\beta\) ranges from \(-22.5^{\circ}\) to \(22.5^{\circ}\). 3. Rotate around the \(y^{\prime\prime}-axis\) by an angle \(\gamma\), represented as \(\mathbf{R}_{y^{\prime\prime}}(\gamma)\), where \(\gamma\) also ranges from \(-22.5^{\circ}\) to \(22.5^{\circ}\). 4. Translation along the \(x^{\prime\prime}-axis\) of the rotated coordinate system by a distance \(d_{s}\), denoted as \(\mathbf{T}_{x^{\prime\prime}}(d_{s})\).