Low-cost programable stroboscopic illumination with sub-microsecond pulses for high-throughput microfluidic applications

Graphical abstract

To visualize fast-moving objects in microfluidic applications, the image acquisition time must be on the order of a microsecond or less. Commercial imaging systems capable of such short exposure times may be too expensive for many research laboratories. We have therefore developed a low-cost stroboscopic illumination for transmitted-light microscopy based on a high-power LED that can be coupled to a standard industrial camera and provides exposure times on the order of 500 ns. The system is designed to be easily mounted on a standard condenser of an inverted microscope. The illumination is controlled by a fast Arduino-compatible Teensy Ò 4.0 development board, and the illumination parameters can be set from a PC via a graphical user interface written in Python. The system has been successfully used for highthroughput cell phenotyping using deformability cytometry on a Nikon TE2000 microscope, as well as for droplet microfluidic on an old Olympus inverted microscope.

Hardware in context
In typical high-throughput microfluidic applications, such as microdroplet analysis [1], cell imaging flow cytometry [2], or deformability cytometry [3], objects move at velocities on the order of 1 m/s. To put this velocity in context: If scaled, a cell with a diameter of 20 lm moving at 1 m/s is comparable to a 20 cm soccer ball moving at 10 km/s. Objects moving at such high speeds https://doi.org/10.1016/j.ohx.2022.e00367 2468-0672/Ó 2022 The Authors. Published by Elsevier Ltd. This is an open access article under the CC BY license (http://creativecommons.org/licenses/by/4.0/). cannot be visualized with standard cameras that have acquisition times on the order of 10 ls. To avoid blurring, exposure times must be in the microsecond range or less. For many laboratories, commercial high-speed cameras capable of such short exposure times are prohibitively expensive. An alternative approach to acquire sharp images of fast-moving objects is the stroboscopic technique, i.e., to use a standard camera and a short bright flash to illuminate the object [1][2][3]. While standard microscope illumination is too slow for stroboscopic illumination, microscopy systems based on high-power light emitting diodes (LEDs), such as Zellmechanik's DeCellerator, can provide fast acquisitions, but they still cost tens of thousands of dollars.
Over the past decade, low-cost open-source illumination systems based on high-power LEDs have been successfully applied to a variety of microscopy techniques that require illumination with short flashes, from particle image velocimetry [4,5] to fast multi-color fluorescence and optogenetic applications [6][7][8]. In addition, LEDs in pulsed mode have been shown to operate at voltages that are much higher than their nominal voltage for continuous operation [4], which makes them particularly suitable for stroboscopic applications. To control the LED flashes, systems typically employ Arduino-compatible development boards [6][7][8][9], which can output easily programable pulses of varying lengths. However, accurate timing of the pulses in the sub-microsecond range is limited by the relatively low speed of Arduino.
Inspired by open-source work on high-power LEDs in microscopy, we have developed a simple stroboscopic LED illumination for transmitted light microscopy that can deliver programmable sub-microsecond pulses and is suitable for imaging in high-throughput microfluidic applications. We used an Arduino-compatible Teensy Ò 4.0 development board which runs at 600 MHz (the standard Arduino runs at 16 MHz) and can output pulses in the range of 100 ns. The system is designed to be easily mounted on a standard inverted microscope without requiring changes to existing light paths or imaging modalities, which is critical in laboratories where one microscope is shared by multiple experimental applications. The Teensy code for pulse timing is only about 20 lines long, making it easy to customize for non-conventional pulse sequences. In addition, all the parameters of the stroboscopic illumination can be controlled via a simple graphical user interface (GUI) written in Python, allowing the system to be used by novice users without knowledge of Arduino programing.

Hardware description
The experimental setup is schematically shown in Fig. 1A. The stroboscopic LED illumination consists of two modules: a 3D printed box for the LED and its driver, mounted on the microscope condenser, and a control box comprising a Teensy 4.0  (Fig. 1B), which ensures uniform illumination of the sample. The principle of operation is as follows (Fig. 1C): When the camera starts image acquisition, it outputs a TTL trigger signal that is detected by the Teensy. The Teensy then sends N p TTL pulses with width t 0 to the LED driver. In this way, one camera frame is illuminated by N p flashes, creating the stroboscopic effect. The inter-pulse width is t p , and the delay between the camera exposure and the first pulse is t d . The LED emits light for the duration of the TTL pulses from the Teensy, but its response is not instantaneous and therefore the actual LED flashes exhibit an exponential rise and fall. The width of the LED pulses at half-maximum (FWHM) is referred to as t LED . The flashing parameters on the Teensy can be set via a USB connection from a PC running a graphical user interface (GUI) written in Python. The schematic of the LED driver is shown in Fig. 1D [4,10]. The camera is connected to the PC via USB 3, which allows image acquisition at 160 full frames per second and up to 1000 frames per second if the region of interest is reduced.
Timing of pulses with Teensy 4.0 is software-based. It relies on the build-in function delayNanoseconds(), which is not a standard Arduino function and is only available on Teensy 4.0. With the presented system, the durations of the shortest Teensy TTL OUT pulse width and the shortest interpulse width are approximately t 0 = 50 ns, t p = 50 ns. The duration of the shortest usable LED flash is approximately t LED = 200 ns. It is limited by the rise/fall time of the LED and its driver, not by the speed of the Teensy. The final intensity on the camera depends on the LED pulse width (t LED ), the LED driving voltage (V SS ), the brightness of the objective, and the microscope's port (e.g., 80/20 or 100). The enclosure for the LED illumination is 3D-printed and fits into a standard condenser unit of Nikon inverted research microscopes (e.g., Eclipse-2000, Ti, Ti-2). It can be mounted and unmounted in seconds and does not interfere with other imaging techniques used on the microscope. The LED is positioned near the back focal plane of the condenser and provides uniform illumination in the plane of the sample. The 3D-printed housing is optional -one can also use a handmade cardboard/duct tape housing. The illumination parameters can be controlled via a GUI on a PC, so that the system can be used by an unexperienced user. Software-based timing of pulses allows easy tinkering with pulse sequences and does not require in-depth knowledge of the hardware. The design files comprise three STL files for 3D printing of the LED illumination housing, a script for the Teensy development board, and a Python GUI used to control the system from a PC. The LED housing described in this paper is designed to fit a standard condenser of a Nikon inverted research microscope. The LED illumination was tested with a Nikon Eclipse TE2000 inverted research microscope with a 40x objective and a Ximea industrial camera with Sony IMX-174 chip (MC023MG-SY-UB, the cost of a new camera is about 1000 €) on an 80/20 microscope front port. Note that a camera with ''global shutter" is required for stroboscopic illumination. Also, the camera must have an I/O port for triggering external devices (the I/O cable is usually provided by the camera manufacturer at additional cost). The housing for the LED illumination was printed with a Prusa i3 MK3 3D printer. It consumed approximately 100 g of the standard PLA filament (the cost of the filament was less than 5 €).

LED driver
The LED driver design follows the one described in detail in [4,10]. The whole LED driver electronic circuit (Fig. 1D) fits a small 1-inch square protoboard ( Supplementary Fig. 1). Electronic components on the protoboard are assembled using wires from a Jumper Wire Kit (e.g., MC001810, https://www.farnell.com, 6.67 €) and soldered on its back side.
A small 1x1x1 cm heatsink is mounted on the back side of the LED by a self-adhesive thermal pad ( Supplementary Fig. 1). The LED is then connected to the LED driver by two 10 cm wires. It is advisable to keep the connections between the components as short as possible to avoid noise and the effect of parasitic inductance introduced by the wires [4,10]. Because the current for the LED flashes is provided by a capacitor C1, a standard 24 V DC power supply is enough for delivering V SS .

Teensy box
For easier soldering of connectors to the Teensy board we recommend using the Teensy Header Kit, which is sold separately. To protect the Teensy board, it is secured in an off-the-shelf plastic enclosure (Junction Box) that has openings for the Micro USB B to USB A Male to Male cable, which connects the Teensy to a PC, and two coaxial connectors (J1) for the camera trigger TTL IN and the Teensy TTL OUT (Fig. 2a, Supplementary Fig. 2). The power for the Teensy is provided via USB. TTL IN is connected to PIN 14 on the Teensy, and TTL OUT to PIN 19 (any other suitable combination of pins can be used as well).
Teensy pins accept only 3.3 V TTL signals. If the camera outputs a 5 V TTL, the signal has to be lowered to 3.3 V before reaching the Teensy, using for example a logic level converter, such as SparkFun Logic Level Converter (PRT-14765).

The LED box for the LED and its driver
The 3D-printed LED box consists of three separate parts (Fig. 2b, and Supplementary Fig. 3): 1. The main cylindrical housing that fits into the microscope's condenser unit. 2. The narrow cylindrical holder for the LED, which fits into the housing and slides vertically to fine tune the position of the LED with respect to the condenser lens. 3. The lid for the housing.
The housing has side-openings for three connectors: a coaxial connector for the TTL trigger from Teensy (J1), a DC power connector (J3) for V CC (15 V), which powers the MOSFET driver U1, and a DC power connector (J2) for V SS (24 V), which The image on the right shows the assembled system mounted on a condenser of a Nikon TE2000 inverted microscope during a microfluidic application. charges the capacitor C1 powering the LED. The 15 V and 24 V power connectors are different so that the user cannot accidentally connect wrong voltages. Also, separate connectors allow flexibility to adjust Vss without affecting Vcc (if needed). Make sure that the power supplies are set to correct connectors, voltages and polarities (see the power supply manual). The housing is closed by the lid, which has only an esthetic and no functional role.
The LED is mounted into the narrow cylindrical holder by two self-tapping screws with washers fastened directly into the 3D-printed PLA. The cylindrical holder is then inserted into the main housing and secured by a M4 screw and bolt. The protoboard is secured on the housing with a single self-tapping screw and a washer.
The STL files for 3D printing provided in this paper are for a LED housing that fits on a standard condenser for Nikon inverted research microscopes. For use with a different microscope, the dimensions of the housing need to be adjusted accordingly. Note that the 3D-printed housing for the LED is optional -the illumination works just as well with an improvised housing made of duct tape and cardboard (Supplementary Fig. 4).

Installing the software
The software for the stroboscopic illumination consists of two parts: the StroboTeensy script for the Teensy and the Stro-boGUI Python script for the graphical user interface (GUI) on the PC. Once the StroboTeensy is installed on the Teensy, all the illumination parameters can be set via the StroboGUI.
After Teensyduino is installed, the Teensy can be used as any other Arduino. 3. Download the StroboTeensy script from the repository and install it on the Teensy (follow the instructions provided by Arduino IDE, https://www.arduino.cc/en/software). 4. Download the StroboGUI Python script from the repository and run it as any other Python script. The script requires ''pySerial" module, which is a standard module in many Python distributions (for installation instructions refer to your Python environment documentation). For easier operation it is advised that you make an executable program which can than run directly from a PC without using Python environment.

Operation instructions
The Teensy is connected to the PC via USB, the Teensy TTL IN to the ''I/O out" port on the camera via the I/O cable provided by the camera manufacturer, and the Teensy TTL OUT to the LED driver via a coaxial cable. The 24 V and 15 V power supplies are connected to the appropriate connectors on the LED housing. The LED housing is mounted onto the microscope condenser.
Once the StroboTeensy script is installed on the Teensy and the Teensy is plugged into a PC USB port, it will start listening for the trigger signal from the camera and generating pulses with the flashing parameters that are saved in its memory (the initial set of parameters is defined when the StroboTeensy script is installed on the Teensy). The parameters remain saved in the Teensy even after it is powered off.
To change the flashing parameters, one can change their values in the StroboTeensy script and re-install the script via Arduino IDE. An alternative method is to use the StroboGUI script on the PC, which does not require Arduino IDE. When the StroboGUI starts, the user must first specify the PC COM port connected to Teensy. The COM port of the Teensy can be determined from the Adruino IDE/Tools/Ports or from the Device Manager/Ports (COM&LPT), and usually doesn't change unless additional USB devices are plugged into the PC.
Image acquisition is performed using the software provided by the camera manufacturer. Note that the camera must be set to output the exposure trigger signal, i.e., the camera I/O must be ''on" for the entire duration of exposure (most cameras do not output this signal by default). It is advisable that, before the first use, the triggering is verified by an oscilloscope -for short acquisition times, the TTL signal from the camera may not reach the threshold required by Teensy ( Supplementary  Fig. 5).
If the LED is not centered in the optical axis of the transmitted light path, it can be centered with the knobs for centering the condenser aperture. Non-ideal centering shows as an asymmetrical halo around objects in the image ( Supplementary  Fig. 6). Vertically, the LED can be adjusted by moving the condenser unit or by using the screw on the side of the LED housing. If the condenser aperture is fully open, the screw allows to position the LED positioned exactly in the back focal plane of the condenser. However, we have noticed that the precise vertical position of the LED does not visibly affect the image quality in our application, therefore we simply adjust the vertical position of the condenser so that the intensity on the camera is maximal.
Potential safety hazards: At full power, the flashes from the LED are very bright -avoid direct eye contact.

Validation and characterization
First, we evaluated the TTL pulses generated by the Teensy 4.0 (Fig. 3a). The oscilloscope (Tektronix TDS 1001B, 40 MHz) showed that the shortest Teensy pulse duration using the StroboTeensy script was approximately t 0 = 50 ns ( Supplementary  Fig. 7). Note that because the pulse triggering is software-based, it is inherently subjected to delays induced by Teensy code execution. The StroboTeensy script compensates for these delays with a variable TeensyDelayNano. In this way, if the user sets the Teensy pulse width to 100 ns, the Teensy TTL pulse width is indeed 100 ns.
While Teensy can output short square TTL pulses, the LED flashes exhibit an exponential rise and fall with characteristic time that depends on the set-up, e.g., the speed of the LED and its driver, and the length of the wires [4]. Measuring the LED intensity with a photodiode (Hamamatsu S5973) revealed an approximately exponential rise of the signal with a characteristic time s = 300 ns (Fig. 3b). Note that this characteristic time may not depend only on the LED response but also on the response of the photodiode detection system, however, with our instrumentation we were not able to distinguish between these two effects. The shortest detectable flash was reached at approximately t 0 = 200 ns. For Teensy pulses shorter than approximately 1.5 ls, the LED intensity started to decrease before reaching the maximum value.
To theoretically model the LED flash width t LED , we assumed that the flash intensity exponentially rises and falls with a characteristic time s (Supplementary Fig. 8). By defining the LED flash width t LED as the full width at the pulse half-maximum (FWHM), analytical integration yields that the LED flash width is equal to.
Correspondingly, the integrated LED intensity, which is proportional to the number of emitted photons, is.
where IðtÞ is the instantaneous LED intensity and I 0 its saturating value. Fig. 3c shows the theoretical and the measured LED flash width t LED as a function of the Teensy pulse width t 0 . The measured data were in qualitative agreement with the theoretical prediction. For long pulses, the flash width was linear with Teensy pulse width and approximately 100 ns shorter. For short pulses, the measured flash width approached the limit of about 500 ns, regardless of the Teensy pulse width (according to theoretical model, the limiting value is lim In agreement with theoretical prediction, the numerically integrated photodiode signal was proportional to the Teensy pulse width for all pulse widths (Fig. 3d). Thus, if the system is used in applications that do not require extremely short exposure times, the brightness of the illumination can be simply adjusted by changing the Teensy pulse width. For applications that require the shortest flash possible, the brightness can still be adjusted by the LED driving voltage V SS (see below).
Finally, we analyzed the LED illumination with the microscope. Since the LED illumination bypasses the collector of the standard Koehler illumination, we first checked the flatness of the illuminated field. We found that the position of the LED near the back focal plane of the condenser provided an evenly illuminated field of view (Fig. 4a), comparable to that obtained with the full Koehler illumination comprising the field aperture. We then measured how the intensity of the acquired image depended on the Teensy pulse width t 0 (Fig. 4b). In agreement with the photodiode measurements and the theoretical model (Fig. 3d), we found that the intensity was linear with t 0 down to 200 ns, where it reached the thermal noise of the camera.
To evaluate the stability of the LED flashes duration, we measured the variation of the intensity on camera for long acquisition runs. Fig. 4c shows a typical 10-minute run with 250 ns pulses acquired at 500 fps. Among the 300,000 acquired frames the intensity of only one frame deviated from the mean value for more than 0.5 %. The standard deviation of the intensities for the entire run was on the order of 0.1 %, which was comparable to the standard deviation of intensities obtained at a similar absolute intensity level by the standard halogen illumination of the microscope. Note that the intensity stability is markedly worse if the Teensy code is not optimized for accurate timing (Supplemental Fig. 9). To assess the thermal properties of the set-up, we analyzed long acquisition runs at increasing LED duty cycles. An increased temperature reduces the LED luminosity, therefore it shows as a decrease in the intensity acquired by the camera. In addition, we used a thermocouple to measure the temperature at the back side of the LED. Fig. 4d shows how the LED luminosity decreased during acquisitions at different duty cycles. For a non-cooled LED and a typical duty cycle of 0.0005, i.e., 1 ls flashes at 500 fps, the intensity decreased for approximately 2 %, and the temperature stabilized at 28°C (the room temperature was 22°C). As expected, the thermal response depended only on the integral LED duty cycle but not on the distribution of the flashes, e.g., 2 ls flashes at 1000 fps resulted in the same temperature increase as 4 ls flashes at 500 fps. If the duty cycle was increased to 0.003, the luminosity fell for approximately 10 % and the temperature reached 59°C, which is close to the thermal limit for the PLA filament used for the 3D printed housing. The thermal properties significantly improved after a small passive heatsink was mounted on the back side of the LED.
To assess the LED stroboscopic illumination in a high-throughput microfluidic application, we tested the system with deformability cytometry of Jurkat cells. Except for the imaging part, the experimental setup has been described previously [11]. In short, the cells are pushed one-by-one at high speed through a narrow microfluidic channel where they deform due to high shear forces [3]. The individual cells are imaged, and their deformation is assessed from the image. The need for short acquisition times in this application is evident from Fig. 5a, where cell images obtained at various Teensy pulse widths are shown. With 6 ls pulses, the cells are barely visible, but their images become sharp with flashes of 1 ls and less. With the setup presented, we were able to analyze 20,000 cells in 5 min.
The flashing parameters of the presented LED stroboscopic illumination can be easily adjusted to specific needs. Fig. 5b shows a cell that was illuminated with three successive flashes, so that its passage through the entire length of the microchannel can be followed. In addition, due to accurate timing between flashes, the system can be used for straightforward measurements of cell velocity, v ¼ Dx=ðt 0 þ t p Þ, where Dx is the distance traveled by the cell between two successive flashes. Accordingly, the system can be as well used for particle image velocimetry [4,5].
The stroboscopic illumination presented in this paper has been extensively tested with imaging applications that required acquisitions at up to 700 frames per second and LED duty cycles up to approximately 0.001. For other scenarios, the user should take into consideration the following points: The software-based timing of LED pulses is sufficiently accurate for typical imaging applications. For applications that rely on high-precision timing, consider employing hardware-based solutions, such as solutions based on pulse width modulation (PWM). An advantage of the software-based timings is that the Teensy code can be easily modified to provide exotic flash sequences, e.g., sequences of flashes with varying inter-pulse delays (Fig. 6). The LED in the presented set-up is driven by 24 V, which is supplied by an off-the-shelf power supply and does not pose a safety risk. However, it has been shown that LEDs are usually damaged by thermal effects rather than voltage, and that in the stroboscopic mode they can withstand voltages much higher than the nominal voltage and thus produce much brighter flashes than in continuous mode [4,10]. The LED used in our system was tested up to V SS = 59 V (the highest DC available in our lab, Supplementary Fig. 10). Note that, if higher voltages are used, C1 must be replaced by a capacitor that can tolerate higher voltages. Good cooling is essential for system operation at high duty cycles. A simple passive heat sink is adequate for duty cycles up to about 0.001, but active cooling is recommended for higher duty cycles [4,10]. For applications with higher duty cycles or higher trigger frequencies, the values of C1 and R1 may need adjustment, e.g., by decreasing R1 to shorten the characteristic time for charging C1 (if C1 is not fully charged between successive flashes, the intensity of the LED would not reach its maximal value). Also, a more powerful power supply might be required [4,10]. The experimental set-up presented here is modular so that the Teensy and the LED driver can be used separately in other applications. If needed, the two can also be housed in the same enclosure. Also, long wires are used to connect the LED to the driver, so that the vertical position of the LED can be adjusted independently from position of the LED driver in the main housing. For applications that require very short pulses, a more compact solution would be advantageous, because shorter connecting wires would improve the characteristics of the illumination unit [4,10].
To conclude, we have developed a low-cost stroboscopic illumination system for transmitted light microscopy that can be easily mounted on a condenser of a standard inverted microscope. Although the system bypasses the full standard Koehler illumination, it nonetheless provides sufficiently uniform illumination suitable for many applications. It is capable of delivering flashes with durations down to approximately 500 ns, which are required in high-throughput microfluidic applications such as deformability cytometry or droplet microfluidics. The shortest flash duration is not limited by the Teensy development board and could be improved by using a different design of the illumination unit. The software-based timing of the pulses allows modifications of pulse sequences without in-depth knowledge of the hardware. Due to its low cost, the system can also be used to refurbish old microscopes for which spare parts are no longer available.

Ethics statements
The work complies with the ethical guidelines of HardwareX and did not involve human subjects nor animal experiments.

Declaration of Competing Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.  6. An example of cell deformability image acquired with a modified pulse sequence (schematically shown below the image). In this example, the Teensy code was modified to generate flashes with varying inter-pulse widths. In this way, one can follow a cell in flow that accelerates significantly as the cell enters a narrow microchannel. The image shows two red blood cells as they approach the channel narrowing. The inter-pulse duration between flashes #1 and #2 was four time longer than the one between flashes #2 and #3. Cell A started in a slow flow and then accelerated in the narrow channel. Cell B remained in the slow flow during all three flashes, so its last two images overlapped. Scale bar: 20 lm. (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.)