# Temporal Encoding to Reject Background Signals
## 4 Materials and Methods  
### Optical Transmitter and Receiver Realisation  
The transmitter used for the results presented here is a complementary metal oxide semiconductor (CMOS) integrated gallium nitride micro-LED pixel. Details and fabrication of comparable devices can be found in [29]. The micro-LED pixel is a square \(100\times 100\) m in size, and part of a \(16\times 16\) array with a \(405\,\mathrm{nm}\) emission wavelength. The array was fabricated in flip chip format, and bump-bonded onto CMOS control electronics which allow the LEDs to be modulated in a pulsed mode, triggered by the falling edge of an input logic signal. The shortest stable optical pulses \(t_{pulse}\) that could be generated with this device and control system were \(5\,\mathrm{ns}\). To produce pulses for the OOK transmission, a data signal was produced at the desired data rate by a field programmable gate array (FPGA) (Xilinx Spartan-3, XEM3010, Opal Kelly, Portland, OR, USA). The FPGA clocks were derived from a \(48\) MHz signal from a USB microcontroller, with parts of the system running at \(100\) MHz. The data sequence was sent to a simple transmission circuit. Here, the data signal was combined with an oscillator producing a signal of square waves with a period of \(40\,\mathrm{ns}\), through an AND gate, as shown in Figure 2b.  
The SPAD receiver is a commercial module (SPCM20A, Thorlabs, Newton, NJ, USA), with a detector active area diameter of \(20\,\mathrm{\SIUnitSymbolMicro m}\). The dead time of the detector is \(35\,\mathrm{ns}\), and the typical dark count rate is \(25\,\mathrm{Hz}\). At \(405\,\mathrm{nm}\) and \(450\,\mathrm{nm}\), the PDP is \(18\%\) and \(25\%\), respectively. The module outputs \(3\,\mathrm{V}\) logic signals indicating photon counts. This signal was sent to an oscilloscope, and collected by the PC for offline processing of \(g(\tau_{j})\). In a practical system, this processing could be performed by digital logic circuits  
The LED output was collected with a lens (C220 TME-A, Thorlabs, Newton, NJ, USA) and transmitted through a graded neutral density (ND) wheel (NDC-50C-4M-A, Thorlabs, Newton, NJ, USA). A \(450\,\mathrm{nm}\) shortpass filter was used in front of the SPAD to reject additional background light. This filter was removed for the experiments assessing performance under high background conditions. The pixel was imaged onto the SPAD active area. As the pixel image is approximately a \(7\,\mathrm{mm}\) square, only a small portion of the light was imaged on to the SPAD circular active area of diameter \(20\,\mathrm{\SIUnitSymbolMicro m}\). In a practical system, receiver optics could be used to collect more light on to the active area of the SPAD, reducing the loss through the channel. Received optical power was calculated numerically from the average number of photon counts detected. This method accounts for detector dead time, and photon detection probability at the operational wavelength. Details of the calculation can be found in the Supplementary Materials of Reference [21].  
To assess the effects of DC background illumination, a commercial \(450\,\mathrm{nm}\) LED (LD CQ7P, OSRAM, Munich, Germany) was placed within a few centimetres of the transmitter LED, directed towards the SPAD, as shown in the setup schematic in Figure 2b. By increasing the driving current for the commercial LED, the background counts could be controlled. The modulated background optical signal was generated using a commercial \(450\,\mathrm{nm}\) LED (LERTDUW \(52\mathrm{W}\), OSRAM, Munich, Germany) modulated with a transistor. This commercial LED had a modulation bandwidth of \(15.9\,\mathrm{MHz}\), and was placed within a few centimetres of the transmitting LED. Modulating this LED with a PRBS effectively simulates operation of the correlation link in an environment with conventional optical wireless communication links.