# Fast 50 Hz Updated Static Infrared Positioning System Based on Triangulation Method
## 2 Materials and Methods
### IR Receiver  
A simplified block diagram of the analog and digital parts of the 32-channel IR receiver and its implementation is shown in Figure 8 and Figure 9, respectively. The receiver was housed in a compact 3D-printed casing, which contained a two-layer PCB with electronic components. On the top side of the PCB, two microcontrollers 1 were located, which measured the voltages in the analog channels. The STM32 microcontrollers' internal ADCs were used. The ADC converter has a maximum clock frequency of 35 MHz, resulting in a minimum conversion time of 400 ns for 12-bit resolution. Circuit measurements are taken at a sampling rate of 1 kHz. The photodiodes 3 are positioned at 11.25-degree intervals and operate in the photovoltaic mode with MCP6271 transimpedance amplifiers 4 (\(U_{1}\),...,\(U_{32}\)) in typical configuration [55]. Each amplifier converts a small current \(I_{D}\) into a corresponding voltage, which is then applied to the ADC input. The advantage of the use of the photovoltaic mode is the reduction of the dark current. In typical diodes, the application of a barrier polarization voltage increases the reverse current. A similar relationship applies to the dark current in photodiodes. The greater the voltage of barrier polarization, the greater the dark current, while without polarization, it is eliminated. Furthermore, this mode enables the photodiode to be applied in pulsed circuits, making it ideal for precision applications. The circuit's gain is determined by the feedback resistor \(R_{f}=820\,k\Omega\) (tol. \(\pm\) 0.1%), and the amplifier output voltage is equal to \(U_{OUT}=I_{D}\cdot R_{f}\). The operational amplifier is a rail-to-rail type. This means that its maximum output voltage is equal to its supply voltage of 3.3 V. The microcontrollers 1 communicate with 2 via the SPI interface, with a clock signal of 1 kHz. The bus transmits measurement results from 32 channels. The microcontroller 4 communicates with the radio module 5 through the SPI interface, which is the wireless component of the beacon synchronizing circuit. For diagnostic purposes and in order to read out the calculated coordinates and angles, the UART interface is used by microcontroller 2. The IR receiver is equipped with an nRF24L01 radio transceiver module marked 5 in Figure 9. This radio module operates in listen-only mode so that the receiver has information about the current status of the beacon's duty cycle. When the module receives information with the \(ID_{i}\) number of a particular beacon, after a period of approximately 2.5 ms (half of the beacon's activity period) from receiving the \(ID_{i}\), it registers the data from the 32 photodiodes as a spectrum of the beacon \(B_{i}\). In our previous version of the system, the beacons were synchronised by wire using an additional circuit. The previous receiver had no connection or feedback to the beacon system and had to identify the beacon signal (which signal was coming from which beacon) by analyzing the recorded spectrum, which required more time, leading to a system operating frequency below 50 Hz. When spectrum  
Figure 7: Oscilloscope diagrams of beacon IR diode currents. from all beacons is recorded, the IR receiver determines the \(\varphi_{i}\) angles via the Weighted Mean of Angles method described in Section 2.2.2. To determine the position of the receiver, a method belonging to the family of Geometric Circle Intersection algorithms, the so-called ToTal algorithm, was used [56]. The algorithm consists of two computational phases. In the first phase, the equations of the three circles are determined based on the known positions of beacons \(B_{1}\), \(B_{2}\), \(B_{3}\) and the measured angles \(\varphi_{1}\), \(\varphi_{2}\) and \(\varphi_{3}\). If \(R\) is the position of the receiver, the given circle passes through the positions of the beacons (e.g., \(B_{1}\) and \(B_{2}\),) and the point \(R\). Three beacons and three angles give three circles, whose centers and radii can be determined analytically.