/NicoLase

Open-source diode laser combiner, fiber launch, and sequencing controller for fluorescence microscopy

Primary LanguageEagleApache License 2.0Apache-2.0

NicoLase

An open-source diode laser combiner, fiber launch, and sequencing controller for fluorescence microscopy

Motivation

Diode laser units are convenient for fluorescence microscopy and super-resolution microscopy due to their high power and ease of use. A couple dozen lines are avaliable from most makers to cover UV through mid-IR applications. With the addition of direct modulation avaliable on nearly all modern units there's no need for an AOTF or other tuning or power modulation control in addition to the diodes themselves.

Multiple laser lines are almost are a requirement for a modern fluorescence microscope. Rarely can a system produce publication-appropriate results without at least a second laser. Multiple lasers need to be combined and then controlled together for multicolor illumination.

Software and trigger control of the lasers is strongly desired. Microscopy cameras often have a dead time between frames when laser illumination is (almost always) undesired, and at the very least it's nice to have a laser that shuts off when the acquisition simply isn't running. Then, as a further step, it's often necessary to alternate or otherwise sequence lasers for certain experiments (ie ALEX FRET or pseudo-simultaneous multicolor imaging). With digital control of laser emission this needs to be controlled at the laser head.

There are commercial options to achieve nearly all of these. Basically, this system does not do anything you can't buy. But the final cost here is 2/3 to 1/2 of the cost of commerical instruments and can be easily customized in terms of size, number of lines, and final configuration. The system here is cheap (ish), flexible, and quite compact.

Two generations of this project are included in the repo. The first, half-sarcastically called the NicoLase 1500, is a single-mirror coupling system running 5 (expandable to 6) diode lasers. The later, the NicoLase 2400, is a two-mirror system with 4 diode lasers. These share the same footprint, many of the same components, and the same control software and PC interface.

Note: Throughout I use the catch-all term 'lasers' or 'laser outputs' for the end target for TTL outputs of the controller. Of course this same controller and software can be used with any equipment receiving a TTL input pulse that needs to be synced to camera acquisitions. We commonly use an LED illuminator for transmitted light with the controller output, for example.

Hardware

Lasers

The NicoLase is built primarily around Vortran Stradus laser diode units. These are a standardized size for each line, reasonably priced, and produce a large amount of power for their size and cost. Nearly all produce enough power for dSTORM work. These units can be digitally modulated at a high rate (usually up to 2 MHz) and potentially analog modulated if desired. I don't have any financial reason for recommending these units, just a satisfied customer.

A straightforward modification allows you to use Coherent OBIS heads in place of some/all of the Vortran units. Control is nearly identical and aside from some extra screw holes, these are drop-in replacements for the Vortran units.

I haven't had a chance to test any other laser diodes with this system, though there's no reason others with the same characteristics won't work.

Key features for any lasers chosen are :

  • 100 mm x 50 mm footprint or smaller
  • 19.05 mm or 3/4" beam height, or can be brought to this height with spacers/lifts
  • Digital modulation via TTL pulse
  • Software control of laser power via USB or RS-232 (for add-on plug-in control)

Heatsinks and Mounting

Diode laser heads require a heat sink for proper operation, which has to at least be a contact with a block of aluminum. We need the laser outputs to be at 39.0 mm to intersect with the steering and coupling optics. Oh, and the laser have to actually bolt down to something.

To solve these issues, a heat sink + mounting block was machined. Three dimensions must be held to strict tolerances for this part. The top must be as flat as possible (0.1 mm specified) with no scratches or machine marks to interface with the bottom of the laser diode for heat transfer. The top and bottom faces must be parallel (0.1 mm specified) so the beams are at the same height. And the total height must be the specified thickness (0.2 mm specified).

Keeping the top flat can be done by using a piece of ground stock and machining other faces. Keeping the top and bottom flat to that tolerance should be straightforward for a decent mill. And we can use a bit of a trick for the total height. This is because we don't actually care about the bottom of the part and can therefore add shims of sheet stock (with clearance holes cut) to bring the total assembly to the desired height. The block can be machined on the bottom face until the thickness is a bit short, then a piece or pieces of sheet stock selected to bring it up to the final thickness. Much simpler and easier to meet the necessary tolerance than hitting the right thickness with machining only.

The heat sink block must be made of either aluminum or copper. Steel, especially stainless, does not have a sufficient heat transfer rate to keep the diodes from overheating. We had our top blocks made from aluminum and the shims from copper sheet, which works great. DO NOT add heat sink paste or thermal grease to the interface between the laser and the heat sink block. That stuff outgasses like mad and gets on your optics, plus the flat surface does an excellent job of heat transfer already.

Mirrors and other optics mount to standard Thorlabs parts except for the fiber coupler itself. This needs a custom pedistal to be machined, but this is a straightforward piece of turning. No dramas there. The original 1500 design uses a flat block for this mount but the 2400 pedistal is a much better design.

All optics are chosen for a 1.5" center height. Mirrors and dichroic mirrors are mounted in Thorlabs Polaris 1" mounts. The single-mirror system requires 3-adjuster mounts, but either 2- or 3- adjuster mounts can be used for the two-mirror system. Hex adjuster are nice for squeezing the mounts closer together, but are a bit more of a pain to adjust. Clearances are just barely there for thumb adjusters and for your fingers. Those more rotundly-digited of us may prefer the hex adjuster mirrors.

Excitation filters can be mounted in standard lens mounts, or options for 3D printed mounts for 1/2" filters designed for the NicoLase is given in my 3D printing repo here. A mount to tie the Aruino to the optical table is given in the same repo, or you can make a mounting plate to bolt in a spare laser slot on the heat sink block (3D printed version forthcoming).

Drawings and pictures of enclosures are provided (one a bit more 'polished' than the other). These keep the lasers away from the unsuspecting eyes of users and the optics protected from bumps and dust. Components for the NicoLase 1500 enclosure are from 80/20 using 25 mm aluminum profile. The 2400 enclosure is made of corrugated plastic sheeting and held together with magnets and 3D printed magnet clips (available here). In both cases the laser power supplies are on the optical table with the breadboard and lasers above, but there's no reason the whole assembly can't be moved to a shelf off of the optical table if you need the space.

Technical drawings for all machined components are given. These were sufficient for our Uni's machine shop to complete satisfactory work with no additional consultation.

Optics

Optics are relatively straightforward - a few dichroic mirrors, optional filters, and a fiber coupler. This unit is built around mostly standard Thorlabs components. Aside from a T-shirt I got at a conference once, I have no interest in pushing Thorlabs components though they are reliable, self-compatible, and widely available.

Dichroic mirrors are used to combine lasers into a single multi-wavelength beam. A mix of Chroma and Semrock filters are used. All are standard 1" round long-pass filters costing a few hundred USD each. Which ones are used depends on which wavelengths are being combined, but of course you want to pick a cut-on wavelength that reflects the beam being folded in and transmits all others upstream. Picking a cut-on wavelength that falls between adjacent laser lines usually works well, but double-check the provided spectra to confirm there aren't odd peaks or dips in the filter spectrum.

Diode lasers often require an emission clean-up filter to block odd long-wavelength emission from the laser head. We've had particularly bad luck with 488 nm diodes in this sense. At the same time, diode heads are ordered by nominal wavelength, but the actual wavelength of the supplied unit may vary 3-5 nm from this nomial value. This means that you can't necessarily order a laser line filter for the nominal wavelength and have it work for your diode. For example, our '488' nm diode actually emits at 490 nm, and our 488 nm clean-up filter blocks half of the emitted power. A 485/10 band-pass filter does a much better job and blocks the offending green emission. This means you MUST double-check the actual emitted wavelength (should be specified by the vendor in the factory testing docs) when chosing an emission filter or if emitted wavelength is critical.

A Thorlabs PAFA-X-F-A Achromatic FiberPort FC/APC coupler is used to couple the combined laser beams into a polarization-maintaining FC/APC patch cable. The FiberPorts aren't cheap (~$500 USD), but they do prove to be stable and relatively achromatic. 50-70% coupling efficiency across all lines is achievable without too much hassle on this configuration.

A bill of materials for optical components is given in the Hardware folder of the repo.

One mirror or two?

Using two mirrors to steer a beam from one vector to another is taken as dogma for most applications. It is true that this is necessary for arbitrary output and input vectors, but that's not the case here.

Because lasers with identical beam heights and angle relative to the breadboard are used (assuming proper machining tolerances on the mounting block), one degree of freedom is removed. As such you don't need four adjusters to steer the beam into the fiber coupler, but rather three. This means that you can use a single three-adjuster mirror mount and, as a result, squeeze 6 laser heads and steering optics into a single 450 mm x 300 mm footprint. This layout is given in the NicoLase 1500 description.

A more typical two adjuster layout is used in the NicoLase 2400. This uses a pair of two-adjuster mirrors for each laser and fits four lasers into the 450 mm x 300 mm footprint. Using two mirrors does have more tolerance for lasers that might have unequal beam heights, such as when mixing Vortran and OBIS diode heads in a single unit.

Alignment of a single-mirror system is only marginally more difficult than aligning the two mirror system. The single-mirror system is more stable.

Controller

Trigger translation, especially with a time-variable component, requires some form of controller. A DAC board (such as the many options from National Instruments) are the "professional" choice, but are frankly overkill. A couple of input channels and no more than 8 input channels are needed. Timing precision, rise times, and trigger jitter on the microsecond or even tens of microseconds time scale is actually more than good enough here (10 microseconds of jitter on a 10 ms exposure is a 0.1% variation). USB or serial control is good to communicate with the controller, as is low cost for the unit and the I/O interface.

Enter the Arduino Uno. Units cost $40 AUD for an official one (knock-offs are under $10). Timing precision and programming space is sufficient, I/O interfaces are easy with a shield, and there's a USB serial port built-in.

Another Arduino variant or another microcontroller can be swapped in if the need arises (maybe you want to add more analog ins/outs? or a 32 bit timer?) but that's beyond the scope of this project. As long as you can take a master trigger in, output the appropriate pulses, and communicate over a serial port, this part can be modified to meet your needs.

Interfacing with the trigger pulses in and out is accomplished with a custom shield. The PCB includes 10 BNC ports (2 camera inputs, 2 camera outputs, and 6 laser outputs), a OR gate, 3v3 to 5v level shifter, and pushbutton, plus a few pull-down and limiting resistors. With some male header strips, the shield mounts atop the Arduino.

Circuit schematic included in ShieldPCB folder. All power is drawn from Arduino. MASTERTRIGGER camera input heads straight to SLAVETRIGGER output as well as to a 3v3 OR gate. Other OR gate input is SLAVEFIRE input, meaning either camera can be used to trigger Arduino. OR gate output connects through 4050 3v3->5v level shifter to ensure that pulse adequately triggers 5v input on Arduino. There the 5v pulse connects to interrupt digital pin 2 of the Arduino. Arduino digital pin 3 connects to pushbutton on PCB which can also be used to iterate laser sequence for testing in place of a camera trigger. Digital pin 4 goes through a current-limiting resistor to the MASTERTRIGGER output.

All CHX outputs occur on Analog Out register of Arduino. Sharing a register means all can be set simultaneously in the Arduino software without having to go through the digitalWrite() function. This allows faster triggering and all lasers are set with the same delay/jitter rather than a variable delay depending on which pin on the register they lie.

The shield PCB can be ordered here. If you order there I get a dollar or two of shop credit, but you're welcome to take the files in this repo and order them from another supplier. A bill of materials is also included in the Shield repo for the parts necessary to populate the shield. Surface mount components are used to get everything squeezed into the space available. All should be commonly available from standard suppliers (element14, Mouser, DigiKey...) though I haven't done any work to ensure the longevity of the supply chain for any specific component.

Software

Software is split into two parts - controller software running on the Arduino and interface software for the PC. Only the controller software is strictly necessary for triggering. Examples of PC software are given which can be expanded to work with your particular system.

Controller Software

The Arduino sketch accomplishes two primary needs - external communication and sequence programming via serial port, and triggering + interating a programmed laser sequence in response to a trigger pulse.

Serial commands are via the USB connection to the control PC. This USB also provides power to the Arduino, so no additional external supply is required. Once powered on, the Arduino listens over the serial port for an incoming sequence to alter the standard sequence (all lasers on when the fire signal is high) or to reach any of the alternate features.

A detailed description of the possible serial commands is given in the documentation in the Arduino Sketch folder of the repo. Breifly each command is a capital letter character, sometimes a space followed by one or more digits, and a newline character.

Triggering (via either the PCB MASTERFIRE or SLAVEFIRE connection) triggers an interrupt on the Arduino. A rising edge causes the laser outputs (CH1 through CH6) to go high. A falling edge on the trigger pulse drives the laser outputs low and iterates the programmed sequence to the next one. If the end of the sequence list is reached the Arduino goes back to the start. Any given line of the sequence can be repeated any number of times (up to 2147483647 times per line).

Alternate functions are available for what is called a pre- or post-acquisition command. These are single laser patterns that can be triggered by a serial command independent of a trigger input. Each has a time associated for how long the outputs will be held high. The pre-acquisition sequence has an additional delay after which an optional pulse will be send to the MASTER TRIGGER pin. This means you can, for example, have an acquisition sequence of a 488 nm laser and 561 nm laser firing on alternating camera frames (the 'acquisition sequence'). Before that sequence is reached, however, a pre-acquisition sequence of a 405 nm laser is fired with no camera acquisition for 1000 ms, followed by a 500 ms delay, and then the actual acquisition begun by the Arduino sending a pulse to the master camera. A more detailed description of the triggering and associated controller functions is given in the Triggering section.

PC Software

Communication with the Arduino is through standard serial commands. Serial settings are essentially defaults - 9600 baud, 8-n-1, and a newline character line feed.

Example Micro-manager scripts to communicate laser sequence settings are given for inclusion into the Beanshell interface. The Arduino is added to the Micro-manager config as a FreeSerialPort device (be sure to get the right COM port + settings!) for this communication. sendSerialPortCommand() calls pass along strings to the Arduino at the beginning of the experiment (or during, if you want) which then waits for trigger pulses from the camera.

A GUI plug-in for programming laser sequences more easily in Micro-manager is forthcoming. In the meantime, a MATLAB GUI for easily uploading arbitrary sequences is also included. This can run in parallel with Micro-manager if the FreeSerialPort has NOT been added to the Micro-manager config, or in your own external application.

Triggering

A diagram of the triggering sequence is given below:

Trigger diagram

Here input signals are blue (Master In and Slave In), outputs to cameras in red (Master Out and Slave Out), and outputs to lasers in wavelength-approximate colors (Ch6 - Ch1). Trigger event stages are separated by dashed black lines with acquisition frames in gray blocks with gray dotted borders.

Because the SLAVEFIRE and MASTERFIRE inputs first pass through an OR gate, either being high results in the input to the Arduino being high. In practice the separation between these two pulses is on the order of single microseconds, so these are treated as simultaneous. Also, this means that even in a dual-camera system, running either camera alone is sufficient to trigger the CHX outputs. Single cameras can work on either, though using MASTERFIRE input only is recommended.

The progression of trigger signals for this experiment of 8 imaging frames is as follows:

  • Serial command to Arduino starts Pre-acquisition sequence with Ch1 and Ch6 high (ie 405 nm laser and blue transmitted LED)
  • After defined illumination time, Pre-acquisition ends and Pre-acquisition delay begins
  • After defined pre-acquisition delay time, a pulse is sent to the MASTERTRIGGER output
  • The Master camera begins acquiring frames (charcteristics defined through camera software). Each is associated with an input pulse at the MASTERFIRE pin
  • Each incoming MASTERFIRE pulse results in an output SLAVETRIGGER pulse and output pulses to the user-specified CHX output pins. Here I show alternating sequences of [Ch5 + Ch4] and [Ch3 + Ch2] to illustrate the programmable sequencing of these pins.
  • Each SLAVETRIGGER pulse triggers the slave camera, which in turn results in an incoming SLAVEFIRE pulse (ignored in 2-camera acquisitions)
  • Falling edge of MASTERFIRE pulse drives CHX outputs low and Arduino iterates to next line of sequence
  • After acquisition is complete, serial command to Arduino starts Post-acquisition sequence (here Ch6, blue transmitted LED high) for user-defined time

Outgoing pulses are all 5v TTL. Incoming signals are anticipated to be 3v3 TTL signals (5v tolerant).

Typical configuration assumes that CHX outputs are connected to lasers from Ch1 -> Ch6 running blue-red. This is arbitrary except for using associated PC software.

Going foward

As these systems continue to be used and mature more modifications and software will be added to the repo. Until then, feel free to ask questions or give a build of your own a try.