Skip to content
Open-source diode laser combiner, fiber launch, and sequencing controller for fluorescence microscopy
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Hardware
Software
Triggering
License.MD Create License.MD Jun 26, 2016
README.md

README.md

NicoLase

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

New users please check out the associated open-access publication from PLoS ONE: http://dx.doi.org/10.1371/journal.pone.0173879

Therein you'll find a complete description of the NicoLase platform and performance specifications.

Here in the repository you can find all of the files and supplementary descriptions to build your own fiber-coupled diode laser launch as described in the publication. As the project matures, new features and softwares will be incorporated here.

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.

Update April 2019 - Plans for an enclosure in the form factor of a 19" rack (that fits under the optical table!) is included in 3600 model folder. This rack can hold the NicoLase breadboard in the upper compartment with additional accessories and equipment underneath. This includes laser power supplies (on their own shelf) with any additional boxes, power supplies, or even a PC underneath. Laser portion can be enclosed for a facility or dark room application. Whole thing sits on sliding feet to fit under the optical table making a very convenient package!

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.

A procedure for the assembly and alignment of the optics has also been included in the Hardware\Optics\ 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. Alignment of a single-mirror system is only marginally more difficult than aligning the two mirror system. 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.

Update April 2019 - A new, improved, 6 head version included as NicoLase 3600. This combines the loads of lasers in the 1500 (plus an one more!) with the ease of alignment of the 2400. The use of new Thorlabs 12 mm posts and 1/2" optics squeezes an additional mirror path in the same footprint as the other NicoLase designs. The resulting design is easier to align and support combinations of laser makers who might have slightly different opinions on what a 3/4" beam height actually is. This breadboard design is also a bit taller (1.6" inches vs 1.5") to avoid the need of any additional custom-made mounting components beyond the heat sink. This combined with the new rack mount enclosure is a compact, easy to align, integrated solution for your microscope hardware. Special thanks to Mike Taormina for the clever design.

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. These may be small but they can be successfully hand-soldered using a standard temperature controlled soldering iron and reel solder. A great guide for those getting started with surface mount components is available from SparkFun (https://www.sparkfun.com/tutorials/36). 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.

A Basic Controller and an Advanced System Controller are included in the repo. The Basic Controller relies on an external trigger signal (ie a camera Fire pulse) to synchronize and iterate over the sequence of outputs. The Advanced System Controller provides the main features of the Basic Controller in external clock mode, but additionally can be configured to have the Arduino act as the master clock for the system.

The Basic Controller is simpler to operate and is sufficient for most applications. The Advanced System Controller is a great option if you wish to have a master clock that isn't reliant on the camera signal. Additionally, the Advanced System Controller solves the timelapse issue in Micromanager for acquisitions between ~3 Hz and the free-run rate of your camera. More detail on this issue is given below.

Both configurations use the same hardware and share many of the same serial commands. Switching between the two options is a matter of uploading the appropriate sketch to the Arduino and intefacing with the respective PC-side software or serial commands.

Basic Controller

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.

Additional commands enable configuration of the controller as a UserDefinedStateDevice and UserDefinedShutter device in Micro-Manager. In this mode basic fluorescence microscopy functions (select a laser set and toggle on/off) directly through Micro-manager GUI. For those wishing to use the NicoLase in a straightforward or multi-user environment this may be useful.

Advanced System Controller

The basic controls for laser sequencing during a camera-synchronized acquisition described above are supported. In addition there is an available mode in which the Arduino can act as the master system clock. The camera and lasers are then both driven by the Arduino system clock.

The primary motivation for the Arduino as the master clock is solving the no-mans-land of timelapse rates between the camera's free-run rate (delay < [exposure time + dead time]) and ~3 Hz. In Micromanager, the timelapse delays in this range seem to change from a continuous camera acquisition to a series of single acquisitions at a given rate. This comes with much more communication overhead, ultimately limiting the capture rate to accomodate the ~250 ms of added delay. Such a delay is not immediately obvious in the software without checking the timestamps of acquired images and may not necessarily affect your system or measurements. We like to work in the affected range for our system, however, so a solution is needed.

In this configuration all cameras are set to External Trigger mode. The primary camera is then triggered by the Arduino. If a secondary camera is present, it is triggered by the Fire signal from the primary camera. By having all cameras set to External Trigger mode, the communication overhead comes once at the beginning of the acquisition. Between frame captures the camera does not have to communicate with the PC except to transfer image data. The cameras wait for the next incoming external trigger pulse to take the next image and are able to capture without additional communication overhead. This means timelapse images can be captured at any rate from the free-run rate of the camera on up to a limit imposed by the Arduino timing roll-over (days to weeks).

It is essential that these external pulses come when the camera is listening, so the external delay must be greater than the set exposure time plus the camera dead time (50-65 ms on an Andor 888; check the Minumum Cycle Time on the Micromanager Device Property Browser for this value). The current version of this software does not check for a 'Ready' signal from the camera before sending the next pulse, so this timing is the responsibility of the user.

** Note ** With the Arduino as the master clock, you don't need another clock signal! If you simply want to trigger TTL devices at a given rate, then this software may work for you! See .\Software\AdvancedSystemController\Arduino_controller documentation for details on how to control sequencing and serial communication with the associated Arduino sketch.

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.

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.

For the Basic Controller an example Micro-manager script to communicate laser sequence settings are given for inclusion into the Beanshell interface. 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.

A Micro-manager plug-in for the Advanced System Controller includes a GUI for programming laser and camera sequencing as well as loop and step timing. The configuration is passed to the Arduino via serial commands and the acquisition sequence begun. The plug-in then reassembles the data sequence into the proper multidimensional stack, including separating channels by camera and laser configuration dimension.

Update March 2019 - The Basic Controller now supports use as a SerialStateDevice and SerialShutter in MicroManager. This allows you to control the laser sequencer just like a physical shutter or filter wheel. See the software build notes for details.

Triggering

A diagram of the triggering sequence in the default external clock mode 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

With the Arduino as the master clock, the primary camera follows trigger pulses from the Arduino. The secondary camera, if present, follows the primary camera. For each frame the MASTERTRIGGER pin on the Arduino is used to trigger the primary camera, which is in External Trigger mode (rather than External Start or Software triggering). The Advanced Laser Controller software does not explicitly support a Pre- or Post-acquisition exposure at this 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 keeping things straight in 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.

You can’t perform that action at this time.