Time Domain fNIRS module

For TD-fNIRS, subnanosecond timing resolution is required, as the absorption and scattering of light in brain tissues happen very rapidly - The speed of light in tissue is about 0.2 meters per nanosecond. Subnanosecond timing allows localization and depth discrimination on the order of millimeters, which is necessary for functional brain imaging, calling for ultrafast light sources, detectors and time-to-digital converters (TDCs). In this section, we present a low-cost prototype of these subsystems, combined into a semi-working demo.

Pulsed laser diode driver

We aimed to develop a simple pulsed laser driver circuit, combined with an off-the-shelf laser diode, to produce very short pulses of light based on the principle of “gain switching” (see Ref). The idea is to bias the laser diode with a DC current right below the lasing threshold, and then apply an AC square wave of very small amplitude on top of it, exceeding the threshold every half-cycle. As this happens, stimulated emission quickly depopulates the excited states in the material, producing a very short burst of light, much shorter than the applied electrical pulse.

We developed and tested the following circuit, first on a breadboard and then on a PCB. It’s a DC current source, tunable from 0-80 mA or 0-800 mA (depending on the jumper setting), combined with a LC tee that superimposes an AC signal on top of the DC bias.


Left: Prototype of the laser driver circuit. Right: fully assembled PCBs with a test LED.


The circuit was tested with a HL6738MG 690 nm laser diode from Thor Labs with a threshold current of around 65 mA. We used an avalanche photodiode (APD) in linear mode to monitor its light output. The laser was modulated with a 1 MHz square wave of amplitudes 15 and 1.5 mA, respectively. Waveforms of the laser current and the produced light output are shown below. The laser is kept at threshold, so the small modulation has a large effect on its light output.


Blue is the laser diode current, modulated with 15 mA at 1 MHz, and yellow is the APD response

Unfortunately, no gain switching was observed neither at 15 mA nor at 1.5 mA modulation and the light output was always 500 ns wide as we varied the DC bias current. We suspect we might need to further increase the AC frequency and reduce its amplitude to achieve gain switching. Work is underway to attempt to achieve this.

Single photon detectors

Detecting single photons with high timing accuracy is far from trivial, and we decided to approach this challenge with two different solutions - a fast, actively quenched avalanche photodiode (APD), and a silicon photomultiplier (SiPM) detector. APDs and SiPMs are modern solid state devices, capable of single photon detection. They are in fact closely related - SiPMs are just large arrays of single photon APDs (SPADs), allowing them to detect multiple photons at once. We present both detector prototypes below.

Avalanche photodiode circuit

In order to achieve high speed operation of the APD, we decided to build an active quenching circuit for it, based on the schematic proposed by M. Stipčević (insert Ref). The circuit diagram is shown below.


We implemented the APD active quenching circuit proposed by M. Stipčević (Ref). Figure is from (Ref) and does not include the linear voltage regulators for the +5V and the +7V rails. The SPAD is inserted into the board and -VR is brought in from an external HVDC supply.


The design has a dead time of cca 40 ns, allowing for high photon count rates. We coupled the circuit with a Hamamatsu S12023-02 Si APD, which is technically not optimized for single photon Geiger mode operation, but it nevertheless performed very well, most likely due to successful active quenching. The assembled PCB and a dark box setup for light detection characterization are shown below.

Left: assembled PCB of the active quenching circuit. Right: test setup with a Hamamatsu S12023-02 APD and a LED source inside a dark box.

The LED was controlled with the laser driver circuit, so we could precisely regulate its light output. The APD was closed inside a dark sealed box and the digital output of the circuit was observed on the oscilloscope. We increased the high voltage bias on the APD until it reached the Geiger mode of 

operation at -135 V. This transition is easily observed on the oscilloscope, as dark counts start to appear (see left figure below). Then, we started to turn on the LED, producing a lot of photon counts (right figure).

APD circuit performance. Yellow is APD digital output, blue is LED current. Left: dark counts. Right: LED current has been very slightly increased, producing a lot of photon detections on the APD. The pulses are a couple nanoseconds wide, as expected from the paper (ref).

Silicon Photomultiplier circuit

For the SiPM setup, we used an AFBR-S4E001 evaluation board from Broadcom, coupled to their AFBR-S4N44C013 SiPM chip. The setup was similar to the one just described, and the SiPM was biased with +38 V to reach Geiger mode.

Broadcom’s SiPM and evaluation board in a dark box setup, together with an LED. The breadboard circuit hosts a dual linear 5 V power supply for the evaluation board.

The results of the light characterization are shown below, using the fast analog “OUT2” output of the evaluation board.

Left: dark counts appear as the device reaches breakdown voltage (Geiger mode). Right: photon pulses dominate as the LED is slowly turned on.

Note the clearly visible 1 MHz modulation of the light source at this time scale. The SiPM performed similarly compared to the APD circuit. However, one major difference was a much larger dead time of the SiPM (in the order of several 100 ns) due to the lack of active quenching. Consequently, the APD was the preferred choice for our application.

FPGA Time to digital converter (TDC)

For accurate time measurements of signals, we used an open source 2-channel time-to-digital converter (TDC) system (Refs to github and thesis) implemented on a Red Pitaya board (Ref). The Red Pitaya features a fully programmable Xilinx Zynq 7010 SoC/FPGA, running its own version of the Linux operating system. The TDC design was reimplemented using Xilinx Vivado 2021.2 ML, where we added a square wave generator derived from the processing system clock. We use this square wave output to modulate the laser current and provide the START signal for the TDC. The Block Design of the system implemented in the FPGA is shown below.


Block design of the implemented TDC system on the FPGA. There are two TDC cores, together with a clock divider that serves as the square wave output. The output frequency is programmable by the Red Pitaya OS.

The TDC has a 14 ns dead time, which enables capturing up to 70 MS/s, and has a maximum timing resolution of 11 ps per channel. It’s interfaced with a MATLAB application running on the host PC. After calibrating the instrument, we performed a basic characterization of the instrument by connecting the same signal to both TDC channels in order to get the instrument response function of the TDC itself. The result is shown below. The interchannel resolution of the TDC was below 40 ps, which is more than good enough for our needs, as we expect much higher jitter from the optical sources and detectors.


Interchannel measurement of the same edge yielded a resolution of 39 ps, which is a bit worse from the “advertised” 20 ps or less, but still more than good enough for our needs. We attribute the suboptimal performance of the TDC to the jittery experimental setup, where we used the most basic jumper wires without any proper impedance matching.

Basic demo with a full optical setup

Lastly, the pulsed laser source, the APD detector circuit and the TDC were connected together into a full system, which is shown below. The 1 MHz 3.3 V square wave output of the Red Pitaya serves as the modulation signal for the laser driver and also provides the reference (START signal) for the first TDC channel. The 3.3 V digital output of the APD circuit (inside the box) then goes to the second TDC channel to measure the time-of-flight. We are using an Applied Kilovolts 4479 series HVDC source to provide the -135 V bias to the APD.


Optical time-of-flight demo system. On the left is the Red Pitaya with the 2-channel TDC system and the square wave generator. On top of the box is the laser driver circuit. Inside the box are the laser diode and the APD circuit presented before. Behind is the Applied Kilovolts 4479-208 HVDC source that provides the negative high voltage bias for the APD.

Since we couldn’t get the laser diode to produce short pulses at this point, we couldn’t really demonstrate a proper TD-fNIRS instrument response function. The TDC did however manage to see the 1 MHz optical modulation of the light source very well, proving that the setup works. Below are the photon arrival time distributions for three distinct cases - when the source is off, slightly crossing threshold, and above threshold.

TDC output when the source is turned off, so we are only receiving randomly distributed dark counts. There is however some noise present from the active 1 MHz signal, so distortions at the 500 ns marks can still be seen.


TDC output when the source starts to cross the lasing threshold. 1 MHz modulation is clearly visible.

Higher light intensity. The 1 MHz modulation is still visible, albeit less clearly compared to the near-threshold case. This is due to the fact that the system (APD + TDC) is starting to saturate in terms of the number of counts it can process.


We then repeated the same experiment using the SiPM module instead of the APD circuit. Since the output of the SiPM evaluation board is analog and doesn’t match the LVCMOS33 input levels of the FPGA, a high-speed AD8611 comparator was used to produce the desired output. Unsurprisingly, the TDC measurement results with this setup were basically the same as those attained with the APD.

In order to properly and fully characterize the system, we would need a working subnanosecond pulsed laser source that we are now actively working on. That will allow us to get the desired instrument response function and actually compare the APD and SiPM detectors in terms of timing accuracy. Another issue we noticed during the design of the system is the very high sensitivity of the laser diode and the APD to temperature variations. As the operating temperature changes, the lasing threshold and the breakdown voltage shift, which can pose a big problem for linearity and accurate gain switching. A proper thermally-regulated substrate would be needed for these optical devices.